Example #1
0
		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;
		}
Example #2
0
		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];
		}
Example #3
0
		public TreeItemElement (Accessible accessible) : base (accessible)
		{
			tableElement = Element.GetElement (accessible.Parent) as TableElement;
			this.row = tableElement.table.GetRowAtIndex (accessible.IndexInParent);;
			SetParentCell ();
		}
Example #4
0
		public TreeItemElement (Accessible accessible, TableElement tableElement, int row) : base (accessible)
		{
			this.row = row;
			this.tableElement = tableElement;
			SetParentCell ();
		}
Example #5
0
		public TableHeaderElement (Accessible accessible, TableElement tableElement) : base (accessible)
		{
			this.tableElement = tableElement;
		}
Example #6
0
 public TableHeaderElement(Accessible accessible, TableElement tableElement) : base(accessible)
 {
     this.tableElement = tableElement;
 }
Example #7
0
		public DataItemElement (TableElement containingGrid, int row) : base (containingGrid.accessible)
		{
			this.containingGrid = containingGrid;
			this.row = row;
		}