internal TextPatternRange(UIAutomationClient.IUIAutomationTextRange range, TextPattern pattern) { Debug.Assert(range != null); Debug.Assert(pattern != null); this._range = range; this._pattern = pattern; }
void UIAutomationClient.IUIAutomationFocusChangedEventHandler.HandleFocusChangedEvent( UIAutomationClient.IUIAutomationElement sender) { // Can't set the arguments -- they come from a WinEvent handler. AutomationFocusChangedEventArgs args = new AutomationFocusChangedEventArgs(0, 0); _focusHandler(AutomationElement.Wrap(sender), args); }
internal static TextPatternRange Wrap(UIAutomationClient.IUIAutomationTextRange range, TextPattern pattern) { Debug.Assert(pattern != null); if (range == null) { return null; } else { return new TextPatternRange(range, pattern); } }
void UIAutomationClient.IUIAutomationEventHandler.HandleAutomationEvent( UIAutomationClient.IUIAutomationElement sender, int eventId) { AutomationEventArgs args; if (eventId != WindowPatternIdentifiers.WindowClosedEvent.Id) { args = new AutomationEventArgs(AutomationEvent.LookupById(eventId)); } else { args = new WindowClosedEventArgs((int[])sender.GetRuntimeId()); } _basicHandler(AutomationElement.Wrap(sender), args); }
internal static Condition Wrap(UIAutomationClient.IUIAutomationCondition obj) { if (obj is UIAutomationClient.IUIAutomationBoolCondition) return new BoolCondition((UIAutomationClient.IUIAutomationBoolCondition)obj); else if (obj is UIAutomationClient.IUIAutomationAndCondition) return new AndCondition((UIAutomationClient.IUIAutomationAndCondition)obj); else if (obj is UIAutomationClient.IUIAutomationOrCondition) return new OrCondition((UIAutomationClient.IUIAutomationOrCondition)obj); else if (obj is UIAutomationClient.IUIAutomationNotCondition) return new NotCondition((UIAutomationClient.IUIAutomationNotCondition)obj); else if (obj is UIAutomationClient.IUIAutomationPropertyCondition) return new PropertyCondition((UIAutomationClient.IUIAutomationPropertyCondition)obj); else throw new ArgumentException("obj"); }
internal static AutomationElement[] ConvertToElementArray(UIAutomationClient.IUIAutomationElementArray array) { AutomationElement[] elementArray; if (array != null) { elementArray = new AutomationElement[array.Length]; for (int i = 0; i < array.Length; i++) { elementArray[i] = AutomationElement.Wrap(array.GetElement(i)); } } else { elementArray = null; } return elementArray; }
private TextPattern2(AutomationElement el, UIAutomationClient.IUIAutomationTextPattern2 pattern, UIAutomationClient.IUIAutomationTextPattern basePattern, bool cached) : base(el, basePattern, cached) { Debug.Assert(pattern != null); this._pattern = pattern; }
internal static AutomationElementCollection Wrap(UIAutomationClient.IUIAutomationElementArray obj) { return (obj == null) ? null : new AutomationElementCollection(obj); }
internal AutomationElementCollectionEnumerator(UIAutomationClient.IUIAutomationElementArray obj) { Debug.Assert(obj != null); this._obj = obj; this._cElem = obj.Length; }
internal AutomationElement(UIAutomationClient.IUIAutomationElement obj) { Debug.Assert(obj != null); this._obj = obj; }
internal AutomationElementCollection(UIAutomationClient.IUIAutomationElementArray obj) { Debug.Assert(obj != null); this._obj = obj; }
private DockPattern(AutomationElement el, UIAutomationClient.IUIAutomationDockPattern pattern, bool cached) : base(el, cached) { Debug.Assert(pattern != null); this._pattern = pattern; }
private VirtualizedItemPattern(AutomationElement el, UIAutomationClient.IUIAutomationVirtualizedItemPattern pattern, bool cached) : base(el, cached) { Debug.Assert(pattern != null); this._pattern = pattern; }
internal static System.Windows.Rect ConvertToRect(UIAutomationClient.tagRECT rc) { return new System.Windows.Rect(rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top); }
private TablePattern(AutomationElement el, UIAutomationClient.IUIAutomationTablePattern tablePattern, UIAutomationClient.IUIAutomationGridPattern gridPattern, bool cached) : base(el, gridPattern, cached) { Debug.Assert(tablePattern != null); this._pattern = tablePattern; }
internal static TextPatternRange[] Wrap(UIAutomationClient.IUIAutomationTextRangeArray ranges, TextPattern pattern) { if (ranges == null) { return null; } TextPatternRange[] rangeArray = new TextPatternRange[ranges.Length]; for (int i = 0; i < ranges.Length; i++) { rangeArray[i] = new TextPatternRange(ranges.GetElement(i), pattern); } return rangeArray; }
void UIAutomationClient.IUIAutomationPropertyChangedEventHandler.HandlePropertyChangedEvent( UIAutomationClient.IUIAutomationElement sender, int propertyId, object newValue) { AutomationProperty property = AutomationProperty.LookupById(propertyId); object wrappedObj = Utility.WrapObjectAsProperty(property, newValue); AutomationPropertyChangedEventArgs args = new AutomationPropertyChangedEventArgs( property, null, wrappedObj); this._propChangeHandler(AutomationElement.Wrap(sender), args); }
internal TreeWalker(UIAutomationClient.IUIAutomationTreeWalker obj) { Debug.Assert(obj != null); _obj = obj; }
private SpreadsheetItemPattern(AutomationElement el, UIAutomationClient.IUIAutomationSpreadsheetItemPattern pattern, bool cached) : base(el, cached) { Debug.Assert(pattern != null); this._pattern = pattern; }
internal AndCondition(UIAutomationClient.IUIAutomationAndCondition obj) { Debug.Assert(obj != null); this._obj = obj; }
protected TextPattern(AutomationElement el, UIAutomationClient.IUIAutomationTextPattern pattern, bool cached) : base(el, cached) { Debug.Assert(pattern != null); this._pattern = pattern; }
private LegacyIAccessiblePattern(AutomationElement el, UIAutomationClient.IUIAutomationLegacyIAccessiblePattern pattern, bool cached) : base(el, cached) { Debug.Assert(pattern != null); this._pattern = pattern; }
private SynchronizedInputPattern(AutomationElement el, UIAutomationClient.IUIAutomationSynchronizedInputPattern pattern, bool cached) : base(el, cached) { Debug.Assert(pattern != null); this._pattern = pattern; }
internal static AutomationElement Wrap(UIAutomationClient.IUIAutomationElement obj) { return (obj == null) ? null : new AutomationElement(obj); }
void UIAutomationClient.IUIAutomationStructureChangedEventHandler.HandleStructureChangedEvent(UIAutomationClient.IUIAutomationElement sender, UIAutomationClient.StructureChangeType changeType, Array runtimeId) { StructureChangedEventArgs args = new StructureChangedEventArgs( (StructureChangeType)changeType, (int[])runtimeId); this._structureChangeHandler(AutomationElement.Wrap(sender), args); }
internal TreeWalker Wrap(UIAutomationClient.IUIAutomationTreeWalker obj) { return (obj == null) ? null : Wrap(obj); }
internal CacheRequest(UIAutomationClient.IUIAutomationCacheRequest obj) { Debug.Assert(obj != null); this._obj = obj; this._lock = new object(); }
private TransformPattern2(AutomationElement el, UIAutomationClient.IUIAutomationTransformPattern2 pattern2, UIAutomationClient.IUIAutomationTransformPattern pattern, bool cached) : base(el, pattern, cached) { Debug.Assert(pattern2 != null); this._pattern = pattern2; }