Bugzilla – Attachment 315659 Details for
Bug 489941
Implement Atk.Table implementor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
Changed to multi-level
tree-hierarchical.diff (text/plain), 4.29 KB, created by
Andres Aragoneses
on 2009-08-27 23:55:34 UTC
(
hide
)
Description:
Changed to multi-level
Filename:
MIME Type:
Creator:
Andres Aragoneses
Created:
2009-08-27 23:55:34 UTC
Size:
4.29 KB
patch
obsolete
>Index: UiaAtkBridge/UiaAtkBridge/TreeItem.cs >=================================================================== >--- UiaAtkBridge/UiaAtkBridge/TreeItem.cs (revision 140655) >+++ UiaAtkBridge/UiaAtkBridge/TreeItem.cs (working copy) >@@ -28,10 +28,12 @@ > using Mono.UIAutomation.Services; > using System.Windows.Automation.Provider; > >+using SCG = System.Collections.Generic; >+ > namespace UiaAtkBridge > { > >- public class TreeItem : ComponentAdapter, Atk.TextImplementor, Atk.ActionImplementor, >+ public class TreeItem : ComponentParentAdapter, Atk.TextImplementor, Atk.ActionImplementor, > Atk.ImageImplementor, Atk.EditableTextImplementor > { > protected const string EXPAND_OR_CONTRACT_ACTION_NAME = "expand or contract"; >@@ -75,6 +77,51 @@ > editableTextExpert = new EditableTextImplementorHelper (this, this); > } > >+ public override void RaiseStructureChangedEvent (object provider, StructureChangedEventArgs e) >+ { >+ //TODO >+ return; >+ } >+ >+ protected override Atk.RelationSet OnRefRelationSet () >+ { >+ Atk.RelationSet relSet = base.OnRefRelationSet (); >+ if (relSet == null) >+ relSet = new Atk.RelationSet (); >+ >+ SCG.List<Atk.Relation> relsToRemove = new SCG.List<Atk.Relation> (); >+ for (int i = 0; i < relSet.NRelations; i++) { >+ Atk.Relation rel = relSet.GetRelation (i); >+ if (relSet.GetRelation (i).RelationType == Atk.RelationType.NodeChildOf) >+ relsToRemove.Add (rel); >+ } >+ foreach (Atk.Relation relation in relsToRemove) >+ relSet.Remove (relation); >+ >+ if (VirtualParent != null) { >+ Atk.Object[] parents = new Atk.Object [1]; >+ parents [0] = VirtualParent; >+ var rel = new Atk.Relation (parents, >+ Atk.RelationType.NodeChildOf); >+ relSet.Add (rel); >+ } >+ return relSet; >+ } >+ >+ internal override Adapter VirtualParent { >+ get { >+ //FIXME: this should be the real implementation of VirtualParent in the Adapter class, and later each class should >+ //override the special cases, not the other way around (so the AutomationBridge.GetParentAdapter method gets OOP) >+ IRawElementProviderFragment frag = Provider as IRawElementProviderFragment; >+ if (frag == null) >+ return null; >+ frag = frag.Navigate (NavigateDirection.Parent); >+ if (frag != null) >+ return AutomationBridge.GetAdapterForProviderSemiLazy (frag); >+ return null; >+ } >+ } >+ > protected IToggleProvider ToggleProvider { > get { > return (IToggleProvider) Provider.GetPatternProvider (TogglePatternIdentifiers.Pattern.Id); >@@ -411,7 +458,10 @@ > if (oldValue == ExpandCollapseState.Expanded || newValue == ExpandCollapseState.Expanded) { > bool expanded = (newValue == ExpandCollapseState.Expanded); > NotifyStateChange (Atk.StateType.Expanded, expanded); >- ((Tree)Parent).NotifyRowAdjusted (this, expanded); >+ var parent = Parent; >+ while (!(parent is Tree)) >+ parent = Parent.Parent; >+ ((Tree)parent).NotifyRowAdjusted (this, expanded); > } > } else > base.RaiseAutomationPropertyChangedEvent (e); >Index: UiaAtkBridge/UiaAtkBridge/Adapter.cs >=================================================================== >--- UiaAtkBridge/UiaAtkBridge/Adapter.cs (revision 140655) >+++ UiaAtkBridge/UiaAtkBridge/Adapter.cs (working copy) >@@ -329,7 +330,7 @@ > } > } > >- internal Adapter VirtualParent { >+ internal virtual Adapter VirtualParent { > get { return (Provider == null) ? null : AutomationBridge.GetParentAdapter (Provider); } > } > >Index: UiaAtkBridge/UiaAtkBridge/AutomationBridge.cs >=================================================================== >--- UiaAtkBridge/UiaAtkBridge/AutomationBridge.cs (revision 140655) >+++ UiaAtkBridge/UiaAtkBridge/AutomationBridge.cs (working copy) >@@ -510,10 +513,11 @@ > int parentControlTypeId = (int) > parentProvider.GetPropertyValue (AEIds.ControlTypeProperty.Id); > if (parentControlTypeId == ControlType.Header.Id || >- parentControlTypeId == ControlType.DataItem.Id || >- parentControlTypeId == ControlType.TreeItem.Id) >+ parentControlTypeId == ControlType.DataItem.Id)// || >+ //parentControlTypeId == ControlType.TreeItem.Id) > return GetParentAdapter (parentProvider); > > // For a MenuItem provider, a Menu parent could indicate > // the hidden menu generated when a parent MenuItem is > // expanded. So if grandparent is MenuItem, treat its
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 489941
:
315659
|
319135