Spawn(LXtObjectID self, unsigned mode, void **ppvObj)¶
The tree interface represents a single tier of a tree, which is a list of siblings, and a currently selected member of that list. Spawn() creates a new tree object referencing either the same part or another part of the tree. Clients can copy this tier, or they can get the tier containing the parent, or the sub-items of the current child.
This returns LXe_TRUE if this tree has no parent. If so, calling ToParent() will fail.
This returns LXe_TRUE if the current element has no children. It’s equivalent to calling ToChild() and testing the count for zero.
Count(LXtObjectID self, unsigned *count)¶
This returns the number of elements in this tier. This can be zero for elements with no children.
Current(LXtObjectID self, unsigned *index)¶
The tree object maintains a current element, whose properties can be accessed through an ILxAttributes interface on the tree.
Clone(unsigned mode, CLxUser_Tree &tree)¶
User Class Only:
The state flags provide hints and information about the element. Many of the flags are only returned from the tree, while others are both returned and passed to the tree. the tree is expected to store certain flags itself, notably, ones that match the SETFLAGS state (these are the only flags that will be passed to ItemSetState()). You should return those flags from ItemState() by OR’ing them into whatever other get-only flags you are returning. The following flags are defined.
ATTRIB Item is displayed as an attribute (under the +/- expansion widget) instead of as a child.
ATTREXP The children or attributes of this item are expanded and visible. The tree is expected to manage this state itself, storing it in SetItemState() and returning it from ItemState().
HIDDEN The item is not displayed at all.
The filter flags are passed to SetItemState() and returned by ItemState(). Generally you just need to store and return them, and not directly set them yourself.
FILTERED Indicates if the item was hidden because it was filtered out by the tree.
FILTER_SKIP This item and its children aren’t affected by filtering, and are always visible.
FILTER_ATTREXP This is a parent item was expanded due to filtering so that the child item is visible. This should be stored in SetItemTest() and returned from ItemState().
FILTER_ATTREXP_BY_USER This is a parent item that was expadned by the user while the tree was filtered. This state is only valid while the tree is filtered, and is not used once filtering is turned off.
Row colors are pre-defined flags that can be OR’ed into the state flags returned by ItemState().
Tree clients can attach a listener interface (using the tree’s ListenerPort) which can be informed of changes to the tree, either just attribute values or the structure of the tree.
NewAttributes just refreshes the contents of the existing tree cells, asking for new values to display.
NewShape rebuilds the entire tree, and is used when the hierarchy or number visible of rows has changed in any way, including when folding or unfolding an entry to hide/show its children.
This indicates that the size of the space reserved for thumbnails has changed, and that new thumbnails hsould be obtained.
ClearCachedThumbnail(LXtObjectID self, const char *ident)¶
If the tree is using thumbnails with identifier strings, these allow it to purge specific thumbnails or all thubnails from the cache when it wants to provide new ones. Thumbnails are identified by the stirng assigned to them when they were originally returned.