internal static Element GetElement (Accessible accessible, bool create) { if (accessible == null) return null; // We expose the children of Applications as top-level, // to be more like UIA if (accessible.Role == Role.Application) return null; if (elements.ContainsKey (accessible)) return elements [accessible]; if (!create) return null; Element element; if (IsTable (accessible)) element = new TableElement (accessible); else if (IsTableHeaderItem (accessible)) element = new TableHeaderItemElement (accessible); else if (IsTreeItem (accessible)) element = new TreeItemElement (accessible); else element = new Element (accessible); return element; }
internal static Element GetElement (Accessible accessible, TableElement parent, int row) { if (accessible == null) return null; if (elements.ContainsKey (accessible)) return elements [accessible]; elements [accessible] = new TreeItemElement (accessible, parent, row); return elements [accessible]; }
public TreeItemElement (Accessible accessible) : base (accessible) { tableElement = Element.GetElement (accessible.Parent) as TableElement; this.row = tableElement.table.GetRowAtIndex (accessible.IndexInParent);; SetParentCell (); }
public TreeItemElement (Accessible accessible, TableElement tableElement, int row) : base (accessible) { this.row = row; this.tableElement = tableElement; SetParentCell (); }
public TableHeaderElement (Accessible accessible, TableElement tableElement) : base (accessible) { this.tableElement = tableElement; }
public TableHeaderElement(Accessible accessible, TableElement tableElement) : base(accessible) { this.tableElement = tableElement; }
public DataItemElement (TableElement containingGrid, int row) : base (containingGrid.accessible) { this.containingGrid = containingGrid; this.row = row; }