Tree¶
ILxTree¶
-
class
ILxTree
¶ Public Functions
-
LxResult
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.
-
LxResult
ToParent
(LXtObjectID self)¶ The tree object itself can be walked around the tree.
-
LxResult
ToChild
(LXtObjectID self)¶
-
LxResult
ToRoot
(LXtObjectID self)¶
-
LxResult
IsRoot
(LXtObjectID self)¶ This returns LXe_TRUE if this tree has no parent. If so, calling ToParent() will fail.
-
LxResult
ChildIsLeaf
(LXtObjectID self)¶ This returns LXe_TRUE if the current element has no children. It’s equivalent to calling ToChild() and testing the count for zero.
-
LxResult
Count
(LXtObjectID self, unsigned *count)¶ This returns the number of elements in this tier. This can be zero for elements with no children.
-
LxResult
Current
(LXtObjectID self, unsigned *index)¶ The tree object maintains a current element, whose properties can be accessed through an ILxAttributes interface on the tree.
-
LxResult
SetCurrent
(LXtObjectID self, unsigned index)¶
-
LxResult
ItemState
(LXtObjectID self, const char *guid, int *state)¶
-
LxResult
SetItemState
(LXtObjectID self, const char *guid, int state)¶
-
bool
Clone
(unsigned mode, CLxUser_Tree &tree)¶ User Class Only:
-
LxResult
LXiTREE_CLONE
LXiTREE_PARENT
LXiTREE_CHILD
LXiTREE_ROOT
-
LXfTREEITEM_ATTRIB
¶ 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.
EXPANDED
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_EXPANDED
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_EXPANDED_BY_USER
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.
LXfTREEITEM_EXPANDED
LXfTREEITEM_ATTREXP
LXfTREEITEM_HIDDEN
LXfTREEITEM_FILTERED
LXfTREEITEM_FILTER_SKIP
LXfTREEITEM_FILTER_EXPANDED
LXfTREEITEM_FILTER_ATTREXP
LXfTREEITEM_FILTER_EXPANDED_BY_USER
LXfTREEITEM_FILTER_ATTREXP_BY_USER
LXfTREEITEM_CLIENT
LXfTREEITEM_EXPFLAGS
LXfTREEITEM_FILTER_EXPFLAGS
LXfTREEITEM_FILTER_EXPFLAGS_BY_USER
LXfTREEITEM_FILTER_FLAGS
LXfTREEITEM_SETFLAGS
-
LXmTREEITEM_ROWCOLOR_MASK
¶ Row colors are pre-defined flags that can be OR’ed into the state flags returned by ItemState().
LXfTREEITEM_ROWCOLOR_NONE
LXfTREEITEM_ROWCOLOR_RED
LXfTREEITEM_ROWCOLOR_MAGENTA
LXfTREEITEM_ROWCOLOR_PINK
LXfTREEITEM_ROWCOLOR_BROWN
LXfTREEITEM_ROWCOLOR_ORANGE
LXfTREEITEM_ROWCOLOR_YELLOW
LXfTREEITEM_ROWCOLOR_GREEN
LXfTREEITEM_ROWCOLOR_LIGHT_GREEN
LXfTREEITEM_ROWCOLOR_CYAN
LXfTREEITEM_ROWCOLOR_BLUE
LXfTREEITEM_ROWCOLOR_LIGHT_BLUE
LXfTREEITEM_ROWCOLOR_ULTRAMARINE
LXfTREEITEM_ROWCOLOR_PURPLE
LXfTREEITEM_ROWCOLOR_LIGHT_PURPLE
LXfTREEITEM_ROWCOLOR_DARK_GREY
LXfTREEITEM_ROWCOLOR_GREY
LXfTREEITEM_ROWCOLOR_WHITE
ILxTreeListener¶
-
class
ILxTreeListener
¶ 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.
Public Functions
-
LxResult
NewAttributes
(LXtObjectID self)¶ NewAttributes just refreshes the contents of the existing tree cells, asking for new values to display.
-
LxResult
NewShape
(LXtObjectID self)¶ 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.
-
LxResult
NewSpaceForThumbnails
(LXtObjectID self)¶ This indicates that the size of the space reserved for thumbnails has changed, and that new thumbnails hsould be obtained.
-
LxResult
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.
-
LxResult
ClearAllCachedThumbnails
(LXtObjectID self)¶
-
LxResult
NewShowDescriptionText
(LXtObjectID self)¶ This toggles the visibility of the smaller description text in the tree.
-
LxResult
ILxTreeListener1¶
-
class
ILxTreeListener1
¶ Legacy listener with only attribute and shape support.