-
Notifications
You must be signed in to change notification settings - Fork 0
TreeItem
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.TreeItem |
| Namespace | Electron2D |
| Kind | class |
| Category | UI and Text |
Stores one row of data inside a Electron2D.Tree control.
public class Electron2D.TreeItem : Electron2D.ObjectTreeItem owns per-column text, icon, selection and selectable state.
Items are normally created through Electron2D.Tree.CreateItem(Electron2D.TreeItem,System.Int32)
so they can participate in tree selection and visible traversal.
A standalone item created with the public constructor can store data, but it has no owning tree until a tree creates or attaches it internally.
This type is not synchronized. Create and mutate tree items on the main scene thread.
This type is available since Electron2D 0.1.0 Preview.
Electron2D.Tree
| Member | Kind | Summary |
|---|---|---|
Electron2D.TreeItem() |
Constructor | Initializes a new standalone instance of the Electron2D.TreeItem class. |
Deselect(System.Int32) |
Method | Clears selection for one column. |
GetChild(System.Int32) |
Method | Gets a direct child item. |
GetChildCount() |
Method | Gets the number of direct child items. |
GetIcon(System.Int32) |
Method | Gets an icon from a column. |
GetNext() |
Method | Gets the next sibling item. |
GetNextVisible() |
Method | Gets the next visible item in owning tree traversal order. |
GetParent() |
Method | Gets the parent item. |
GetPrevious() |
Method | Gets the previous sibling item. |
GetText(System.Int32) |
Method | Gets text from a column. |
GetTree() |
Method | Gets the tree that owns this item. |
IsCollapsed() |
Method | Reports whether this item is collapsed. |
IsSelectable(System.Int32) |
Method | Reports whether a column can be selected. |
IsSelected(System.Int32) |
Method | Reports whether one column is selected. |
Select(System.Int32, System.Boolean) |
Method | Selects this item in its owning tree. |
SetCollapsed(System.Boolean) |
Method | Sets whether this item hides its descendants in visible traversal. |
SetIcon(System.Int32, Electron2D.Texture2D) |
Method | Sets an icon for a column. |
SetSelectable(System.Int32, System.Boolean) |
Method | Sets whether a column can be selected. |
SetText(System.Int32, System.String) |
Method | Sets text for a column. |
Kind: Constructor
public Electron2D.TreeItem()Initializes a new standalone instance of the Electron2D.TreeItem class.
Standalone items can store per-column data but are not visible in a
Electron2D.Tree until created by that tree.
This constructor is not synchronized. Call it from the main scene thread.
This constructor is available since Electron2D 0.1.0 Preview.
Electron2D.Tree.CreateItem(Electron2D.TreeItem,System.Int32)
Kind: Method
public System.Void Deselect(System.Int32)(System.Int32 column)Clears selection for one column.
Calling this method for an unselected column is a no-op.
-
column: The zero-based column index.
-
System.ArgumentOutOfRangeException: Thrown whencolumnis negative.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TreeItem.Select(System.Int32,System.Boolean)
Kind: Method
public Electron2D.TreeItem GetChild(System.Int32)(System.Int32 index)Gets a direct child item.
Negative indices are not normalized in the preview implementation.
-
index: The child index.
The child item, or null when index is outside
the child list.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TreeItem.GetChildCount
Kind: Method
public System.Int32 GetChildCount()()Gets the number of direct child items.
Collapsed state does not affect this count.
The direct child count.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TreeItem.GetChild(System.Int32)
Kind: Method
public Electron2D.Texture2D GetIcon(System.Int32)(System.Int32 column)Gets an icon from a column.
Missing cells are treated as cells without an icon.
-
column: The zero-based column index.
The stored icon, or null when no icon is stored.
-
System.ArgumentOutOfRangeException: Thrown whencolumnis negative.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TreeItem.SetIcon(System.Int32,Electron2D.Texture2D)
Kind: Method
public Electron2D.TreeItem GetNext()()Gets the next sibling item.
This method does not descend into child items.
The next sibling, or null when this item is the last sibling.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TreeItem.GetPrevious
Kind: Method
public Electron2D.TreeItem GetNextVisible()()Gets the next visible item in owning tree traversal order.
Collapsed descendants and a hidden root are skipped by the owning tree.
The next visible item, or null when there is no owning tree or no
later visible item.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Tree.GetItemAtPosition(Electron2D.Vector2)
Kind: Method
public Electron2D.TreeItem GetParent()()Gets the parent item.
Parentage is managed by Electron2D.Tree.CreateItem(Electron2D.TreeItem,System.Int32).
The parent item, or null when this item is the root or standalone.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TreeItem.GetChild(System.Int32)
Kind: Method
public Electron2D.TreeItem GetPrevious()()Gets the previous sibling item.
This method does not inspect parent or child items.
The previous sibling, or null when this item is the first sibling.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TreeItem.GetNext
Kind: Method
public System.String GetText(System.Int32)(System.Int32 column)Gets text from a column.
Missing cells are treated as empty cells.
-
column: The zero-based column index.
The stored text, or an empty string when no text is stored.
-
System.ArgumentOutOfRangeException: Thrown whencolumnis negative.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TreeItem.SetText(System.Int32,System.String)
Kind: Method
public Electron2D.Tree GetTree()()Gets the tree that owns this item.
The value is assigned when an item is created by a tree.
The owning Electron2D.Tree, or null for standalone items.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Tree
Kind: Method
public System.Boolean IsCollapsed()()Reports whether this item is collapsed.
Collapsing an item does not remove descendants from the data tree.
true when descendants are hidden; otherwise, false.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TreeItem.SetCollapsed(System.Boolean)
Kind: Method
public System.Boolean IsSelectable(System.Int32)(System.Int32 column)Reports whether a column can be selected.
Missing cells are selectable by default.
-
column: The zero-based column index.
true when the column is selectable; otherwise, false.
-
System.ArgumentOutOfRangeException: Thrown whencolumnis negative.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TreeItem.SetSelectable(System.Int32,System.Boolean)
Kind: Method
public System.Boolean IsSelected(System.Int32)(System.Int32 column)Reports whether one column is selected.
Missing cells are not selected.
-
column: The zero-based column index.
true when the column is selected; otherwise, false.
-
System.ArgumentOutOfRangeException: Thrown whencolumnis negative.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TreeItem.Select(System.Int32,System.Boolean)
Kind: Method
public System.Void Select(System.Int32, System.Boolean)(System.Int32 column, System.Boolean setAsCursor)Selects this item in its owning tree.
Standalone items update local selected state but cannot change a tree cursor or emit tree signals.
-
column: The zero-based selected column. -
setAsCursor: Whether this item should become the tree cursor.
-
System.ArgumentOutOfRangeException: Thrown whencolumnis negative.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TreeItem.Deselect(System.Int32)
Kind: Method
public System.Void SetCollapsed(System.Boolean)(System.Boolean enable)Sets whether this item hides its descendants in visible traversal.
Changing collapsed state queues the owning tree for redraw and emits
item_collapsed from that tree.
-
enable:trueto collapse descendants; otherwise,false.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TreeItem.IsCollapsed
Kind: Method
public System.Void SetIcon(System.Int32, Electron2D.Texture2D)(System.Int32 column, Electron2D.Texture2D icon)Sets an icon for a column.
Icons are optional and do not affect selection.
-
column: The zero-based column index. -
icon: The icon texture, ornullto remove it.
-
System.ArgumentOutOfRangeException: Thrown whencolumnis negative.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TreeItem.GetIcon(System.Int32)
Kind: Method
public System.Void SetSelectable(System.Int32, System.Boolean)(System.Int32 column, System.Boolean selectable)Sets whether a column can be selected.
Making a selected column non-selectable clears its selected state.
-
column: The zero-based column index. -
selectable:trueto allow selection; otherwise,false.
-
System.ArgumentOutOfRangeException: Thrown whencolumnis negative.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TreeItem.IsSelectable(System.Int32)
Kind: Method
public System.Void SetText(System.Int32, System.String)(System.Int32 column, System.String text)Sets text for a column.
Assigning text queues the owning tree for redraw when one exists.
-
column: The zero-based column index. -
text: The text to store.
-
System.ArgumentOutOfRangeException: Thrown whencolumnis negative. -
System.ArgumentNullException: Thrown whentextisnull.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TreeItem.GetText(System.Int32)
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.