|
| CSTree () |
| Constructor.
|
|
virtual | ~CSTree () |
| Destructor.
|
|
void | DeleteAllItems () |
| Delete all items in the tree.
|
|
HSTREEITEM | GetChildItem (HSTREEITEM hItem, BOOL bFirst=TRUE) const |
| Get the child item.
|
|
int | GetChildrenCount (HSTREEITEM hItem) const |
| Get the number of children.
|
|
virtual void | DeleteItem (HSTREEITEM hItem) |
| Delete an item.
|
|
BOOL | DeleteItemEx (HSTREEITEM hItem) |
| Delete an item and its branch.
|
|
HSTREEITEM | InsertItem (const T &data, HSTREEITEM hParent=((HSTREEITEM) 0xFFFF0000), HSTREEITEM hInsertAfter=((HSTREEITEM) 0xFFFF0002)) |
| Insert a new item.
|
|
HSTREEITEM | TraversingRecursion (HSTREEITEM hItem, CBTRAVERSING funTraversing, LPARAM lParam) |
| Traverse the tree recursively.
|
|
HSTREEITEM | TraversingSequence (HSTREEITEM hItem, CBTRAVERSING funTraversing, LPARAM lParam) |
| Traverse the tree in sequence.
|
|
HSTREEITEM | GetRootItem (BOOL bFirst=TRUE) |
| Get the root item.
|
|
int | GetDesendants (HSTREEITEM hItem) |
| Get the number of descendants of a node.
|
|
HSTREEITEM | GetNextItem (HSTREEITEM hItem) const |
| Get the next item in the tree.
|
|
HSTREEITEM | GetNextItem (HSTREEITEM hItem, int &nLevel) const |
| Get the next item in the tree with level relationship.
|
|
void | SortChildren (HSTREEITEM hItem, int(__cdecl *funSort)(void *, const void *, const void *), void *pCtx) |
| Sort the children of a node.
|
|
void | SetDataFreer (IDataFreer *cbFree) |
| Set the data freer callback.
|
|
|
static HSTREEITEM | GetNextSiblingItem (HSTREEITEM hItem) |
| Get the next sibling item.
|
|
static HSTREEITEM | GetPrevSiblingItem (HSTREEITEM hItem) |
| Get the previous sibling item.
|
|
static HSTREEITEM | GetParentItem (HSTREEITEM hItem) |
| Get the parent item.
|
|
static int | GetItemLevel (HSTREEITEM hItem) |
| Get the level of the item.
|
|
static HSTREEITEM | GetRootItem (HSTREEITEM hItem) |
| Get the root item of the specified node.
|
|
static T | GetItem (HSTREEITEM hItem) |
| Get the item data.
|
|
static T & | GetItemRef (HSTREEITEM hItem) |
| Get the item data reference.
|
|
static T * | GetItemPt (HSTREEITEM hItem) |
| Get the item data pointer.
|
|
template<class T>
class CSTree< T >
Template class for a tree structure.
This template class provides a tree structure for general data types.
Definition at line 56 of file STree.h.
template<class T>
HSTREEITEM CSTree< T >::TraversingSequence |
( |
HSTREEITEM | hItem, |
|
|
CBTRAVERSING | funTraversing, |
|
|
LPARAM | lParam ) |
|
inline |
Traverse the tree in sequence.
- Parameters
-
HSTREEITEM | hItem: Starting node handle |
CBTRAVERSING | funTraversing: Callback function |
LPARAM | lParam: Additional parameter for the callback |
- Returns
- HSTREEITEM: Handle of the node where traversal stopped
Traverses the tree in sequence starting from the specified node. If the callback function returns TRUE, the traversal stops and the current node is returned. Otherwise, it continues to the next node.
< STVI_ROOT
Definition at line 477 of file STree.h.