A tree control for displaying hierarchical data. More...
#include <STreeCtrl.h>
Classes | |
| class | IListener |
| Listener interface for tree view events. More... | |
Public Member Functions | |
| STreeCtrl () | |
| Constructor for STreeCtrl. | |
| virtual | ~STreeCtrl () |
| Destructor for STreeCtrl. | |
| HSTREEITEM | InsertItem (LPCTSTR lpszItem, int nImage, int nSelectedImage, LPARAM lParam, HSTREEITEM hParent=STVI_ROOT, HSTREEITEM hInsertAfter=STVI_LAST) OVERRIDE |
| Inserts a new item into the tree. | |
| HSTREEITEM | InsertItemA (LPCSTR lpszItem, int nImage, int nSelectedImage, LPARAM lParam, HSTREEITEM hParent=STVI_ROOT, HSTREEITEM hInsertAfter=STVI_LAST) OVERRIDE |
| Inserts a new item into the tree (ANSI version). | |
| BOOL | RemoveItem (HSTREEITEM hItem) OVERRIDE |
| Removes an item from the tree. | |
| void | RemoveAllItems () OVERRIDE |
| Removes all items from the tree. | |
| HSTREEITEM | GetRootItem () SCONST OVERRIDE |
| Gets the root item of the tree. | |
| HSTREEITEM | GetNextSiblingItem (HSTREEITEM hItem) SCONST OVERRIDE |
| Gets the next sibling item. | |
| HSTREEITEM | GetPrevSiblingItem (HSTREEITEM hItem) SCONST OVERRIDE |
| Gets the previous sibling item. | |
| HSTREEITEM | GetChildItem (HSTREEITEM hItem, BOOL bFirst=TRUE) SCONST OVERRIDE |
| Gets a child item. | |
| HSTREEITEM | GetParentItem (HSTREEITEM hItem) SCONST OVERRIDE |
| Gets the parent item. | |
| HSTREEITEM | GetSelectedItem () SCONST OVERRIDE |
| Gets the selected item. | |
| HSTREEITEM | GetNextItem (HSTREEITEM hItem) SCONST OVERRIDE |
| Gets the next item. | |
| void | SortChildren (HSTREEITEM hItem, FunTreeSortCallback sortFunc, void *pCtx) OVERRIDE |
| Sorts the children of an item. | |
| BOOL | SelectItem (HSTREEITEM hItem, BOOL bEnsureVisible=TRUE) OVERRIDE |
| Selects an item. | |
| BOOL | GetItemText (HSTREEITEM hItem, IStringT *strText) SCONST OVERRIDE |
| Gets the text of an item. | |
| BOOL | GetItemTextA (HSTREEITEM hItem, IStringA *strText) SCONST OVERRIDE |
| Gets the text of an item (ANSI version). | |
| BOOL | SetItemText (HSTREEITEM hItem, LPCTSTR lpszItem) OVERRIDE |
| Sets the text of an item. | |
| BOOL | SetItemTextA (HSTREEITEM hItem, LPCSTR lpszItem) OVERRIDE |
| Sets the text of an item (ANSI version). | |
| BOOL | GetItemImage (HSTREEITEM hItem, int *nImage, int *nSelectedImage) SCONST OVERRIDE |
| Gets the images of an item. | |
| BOOL | SetItemImage (HSTREEITEM hItem, int nImage, int nSelectedImage) OVERRIDE |
| Sets the images of an item. | |
| LPARAM | GetItemData (HSTREEITEM hItem) SCONST OVERRIDE |
| Gets the application-defined data of an item. | |
| BOOL | SetItemData (HSTREEITEM hItem, LPARAM lParam) OVERRIDE |
| Sets the application-defined data of an item. | |
| BOOL | ItemHasChildren (HSTREEITEM hItem) SCONST OVERRIDE |
| Checks if an item has children. | |
| int | GetCheckState (HSTREEITEM hItem) SCONST OVERRIDE |
| Gets the check state of an item. | |
| BOOL | SetCheckState (HSTREEITEM hItem, BOOL bCheck) OVERRIDE |
| Sets the check state of an item. | |
| BOOL | Expand (HSTREEITEM hItem, UINT nCode=TVE_EXPAND) OVERRIDE |
| Expands or collapses an item. | |
| BOOL | EnsureVisible (HSTREEITEM hItem) OVERRIDE |
| Ensures an item is visible. | |
| void | SetListener (IListener *pListener) |
| Sets the listener for tree view events. | |
| HSTREEITEM | InsertItem (LPCTSTR lpszItem, HSTREEITEM hParent=STVI_ROOT, HSTREEITEM hInsertAfter=STVI_LAST) |
| Inserts a new item into the tree. | |
| HSTREEITEM | InsertItem (LPCTSTR lpszItem, int nImage, int nSelectedImage, HSTREEITEM hParent=STVI_ROOT, HSTREEITEM hInsertAfter=STVI_LAST) |
| Inserts a new item into the tree. | |
| HSTREEITEM | HitTest (CPoint &pt) |
| Performs a hit test on the tree view. | |
| BOOL | GetItemText (HSTREEITEM hItem, SStringT &strText) const |
| Gets the text of an item. | |
Protected Member Functions | |
| void | PageUp () |
| Handles the page up action. | |
| void | PageDown () |
| Handles the page down action. | |
| void | UpdateScrollBar () |
| Updates the scroll bars. | |
| virtual BOOL | CreateChildren (SXmlNode xmlNode) |
| Creates child windows from an XML node. | |
| virtual void | LoadBranch (HSTREEITEM hParent, SXmlNode xmlNode) |
| Loads a branch of items from an XML node. | |
| virtual void | LoadItemAttribute (SXmlNode xmlNode, LPTVITEM pItem) |
| Loads attributes for an item from an XML node. | |
| HSTREEITEM | InsertItem (LPTVITEM pItemObj, HSTREEITEM hParent, HSTREEITEM hInsertAfter) |
| Inserts a new item into the tree. | |
| HSTREEITEM | InsertItem (SXmlNode xmlNode, HSTREEITEM hParent=STVI_ROOT, HSTREEITEM hInsertAfter=STVI_LAST) |
| Inserts a new item into the tree from an XML node. | |
| BOOL | IsAncestor (HSTREEITEM hItem1, HSTREEITEM hItem2) |
| Checks if one item is an ancestor of another. | |
| BOOL | VerifyItem (HSTREEITEM hItem) const |
| Verifies if an item is valid. | |
| void | SetChildrenVisible (HSTREEITEM hItem, BOOL bVisible) |
| Sets the visibility of an item's children. | |
| void | SetChildrenState (HSTREEITEM hItem, int nCheckValue) |
| Sets the check state of an item's children. | |
| BOOL | CheckChildrenState (HSTREEITEM hItem, BOOL bCheck) |
| Checks the state of an item's children. | |
| void | CheckState (HSTREEITEM hItem) |
| Updates the check state of an item. | |
| virtual void | ItemLayout () |
| Performs layout calculations for items. | |
| virtual void | CalcItemContentWidth (LPTVITEM pItem) |
| Calculates the content width of an item. | |
| virtual int | CalcItemWidth (const LPTVITEM pItem) |
| Calculates the width of an item. | |
| virtual int | CalcMaxItemWidth (HSTREEITEM hItem) |
| Calculates the maximum width of an item and its children. | |
| virtual void | UpdateContentWidth () |
| Updates the content width of the tree. | |
| int | GetItemShowIndex (HSTREEITEM hItemObj) |
| Gets the index of an item in the visible list. | |
| BOOL | GetItemRect (LPTVITEM pItem, CRect &rcItem) |
| Gets the rectangle of an item. | |
| void | RedrawItem (HSTREEITEM hItem) |
| Redraws an item. | |
| virtual void | DrawItem (IRenderTarget *pRT, const CRect &rc, HSTREEITEM hItem) |
| Draws an item. | |
| virtual void | DrawLines (IRenderTarget *pRT, const CRect &rc, HSTREEITEM hItem) |
| Draws lines for an item. | |
| int | ItemHitTest (HSTREEITEM hItem, CPoint &pt) const |
| Performs a hit test on an item. | |
| void | ModifyToggleState (HSTREEITEM hItem, DWORD dwStateAdd, DWORD dwStateRemove) |
| Modifies the toggle state of an item. | |
| void | ModifyChekcBoxState (HSTREEITEM hItem, DWORD dwStateAdd, DWORD dwStateRemove) |
| Modifies the checkbox state of an item. | |
| void | ItemLButtonDown (HSTREEITEM hItem, UINT nFlags, CPoint pt) |
| Handles the left mouse button down event for an item. | |
| void | ItemLButtonUp (HSTREEITEM hItem, UINT nFlags, CPoint pt) |
| Handles the left mouse button up event for an item. | |
| void | ItemLButtonDbClick (HSTREEITEM hItem, UINT nFlags, CPoint pt) |
| Handles the left mouse button double-click event for an item. | |
| void | ItemMouseMove (HSTREEITEM hItem, UINT nFlags, CPoint pt) |
| Handles the mouse move event for an item. | |
| void | ItemMouseLeave (HSTREEITEM hItem) |
| Handles the mouse leave event for an item. | |
| virtual void | OnNodeFree (LPTVITEM &pItemData) |
| Frees the memory associated with an item. | |
| virtual void | OnInsertItem (LPTVITEM &pItemData) |
| Handles the insertion of an item. | |
| virtual HRESULT | SetAttribute (const SNS::SStringW &amp;amp;amp;strAttribName, const SNS::SStringW &amp;amp;amp;strValue, BOOL bLoading=FALSE) |
| void | OnDestroy () |
| Handles the destruction of the tree control. | |
| void | OnPaint (IRenderTarget *pRT) |
| Handles the paint event. | |
| void | OnLButtonDown (UINT nFlags, CPoint pt) |
| Handles the left mouse button down event. | |
| void | OnLButtonUp (UINT nFlags, CPoint pt) |
| Handles the left mouse button up event. | |
| void | OnLButtonDbClick (UINT nFlags, CPoint pt) |
| Handles the left mouse button double-click event. | |
| void | OnRButtonDown (UINT nFlags, CPoint pt) |
| Handles the right mouse button down event. | |
| void | OnMouseMove (UINT nFlags, CPoint pt) |
| Handles the mouse move event. | |
| void | OnMouseLeave () |
| Handles the mouse leave event. | |
| void | OnSize (UINT nType, CSize size) |
| Handles the size event. | |
| MSG_WM_RBUTTONDOWN (OnRButtonDown) | |
Protected Member Functions inherited from CSTree< LPTVITEM > | |
| virtual void | OnNodeFree (LPTVITEM &data) |
| Virtual function to handle the freeing of node data. | |
| CSTree () | |
| Constructor. | |
| virtual | ~CSTree () |
| Destructor. | |
| void | DeleteAllItems () |
| Delete all items in the tree. | |
| HSTREEITEM | GetRootItem (BOOL bFirst=TRUE) |
| Get the root item. | |
| 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 LPTVITEM &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. | |
| 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. | |
Protected Attributes | |
| HSTREEITEM | m_hSelItem |
| Handle to the selected item. | |
| HSTREEITEM | m_hHoverItem |
| Handle to the item under the hover state. | |
| HSTREEITEM | m_hCaptureItem |
| Handle to the item that has capture. | |
| int | m_nVisibleItems |
| Number of visible items. | |
| int | m_nContentWidth |
| Total content width of the tree. | |
| UINT | m_uItemMask |
| Mask for item attributes. | |
| int | m_nItemOffset |
| Offset for item positioning. | |
| CRect | m_rcToggle |
| Rectangle for the toggle button. | |
| CRect | m_rcCheckBox |
| Rectangle for the checkbox. | |
| CRect | m_rcIcon |
| Rectangle for the icon. | |
| int | m_nItemHoverBtn |
| Button currently hovered. | |
| int | m_nItemPushDownBtn |
| Button currently pushed down. | |
| int | m_nItemHei |
| Height of each item. | |
| int | m_nIndent |
| Indentation between levels. | |
| int | m_nItemMargin |
| Margin around each item. | |
| BOOL | m_bCheckBox |
| Flag indicating if checkboxes are enabled. | |
| BOOL | m_bRightClickSel |
| Flag indicating if right-click selection is enabled. | |
| IListener * | m_pListener |
| Listener for tree view events. | |
| SAutoRefPtr< ISkinObj > | m_pItemBgSkin |
| Skin for the background of items. | |
| SAutoRefPtr< ISkinObj > | m_pItemSelSkin |
| Skin for the selected background of items. | |
| SAutoRefPtr< ISkinObj > | m_pIconSkin |
| Skin for the icons. | |
| SAutoRefPtr< ISkinObj > | m_pToggleSkin |
| Skin for the toggle buttons. | |
| SAutoRefPtr< ISkinObj > | m_pCheckSkin |
| Skin for the checkboxes. | |
| SAutoRefPtr< ISkinObj > | m_pLineSkin |
| Skin for the lines. | |
| COLORREF | m_crItemBg |
| Background color of items. | |
| COLORREF | m_crItemSelBg |
| Background color of selected items. | |
| COLORREF | m_crItemText |
| Text color of items. | |
| COLORREF | m_crItemSelText |
| Text color of selected items. | |
| BOOL | m_bHasLines |
| Flag indicating if lines are drawn between items. | |
Protected Attributes inherited from CSTree< LPTVITEM > | |
| IDataFreer * | m_dataFreer |
| HSTREENODE | m_hRootFirst |
| HSTREENODE | m_hRootLast |
Additional Inherited Members | |
Static Protected Member Functions inherited from CSTree< LPTVITEM > | |
| 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 LPTVITEM | GetItem (HSTREEITEM hItem) |
| Get the item data. | |
| static LPTVITEM & | GetItemRef (HSTREEITEM hItem) |
| Get the item data reference. | |
| static LPTVITEM * | GetItemPt (HSTREEITEM hItem) |
| Get the item data pointer. | |
A tree control for displaying hierarchical data.
This class represents a tree control that can display hierarchical data with various customization options.
Definition at line 102 of file STreeCtrl.h.
| SNSBEGIN STreeCtrl::STreeCtrl | ( | ) |
Constructor for STreeCtrl.
Definition at line 12 of file STreeCtrl.cpp.
|
virtual |
Destructor for STreeCtrl.
Definition at line 49 of file STreeCtrl.cpp.
|
protectedvirtual |
Calculates the content width of an item.
| pItem | Pointer to the item data. |
Definition at line 621 of file STreeCtrl.cpp.
|
protectedvirtual |
Calculates the width of an item.
| pItem | Pointer to the item data. |
Definition at line 1295 of file STreeCtrl.cpp.
|
protectedvirtual |
Calculates the maximum width of an item and its children.
| hItem | Handle to the item. |
Definition at line 635 of file STreeCtrl.cpp.
|
protected |
Checks the state of an item's children.
| hItem | Handle to the item. |
| bCheck | TRUE to check the children, FALSE to uncheck them. |
Definition at line 517 of file STreeCtrl.cpp.
|
protected |
Updates the check state of an item.
| hItem | Handle to the item. |
Definition at line 538 of file STreeCtrl.cpp.
|
protectedvirtual |
Creates child windows from an XML node.
| xmlNode | XML node containing the child window definitions. |
Reimplemented from SWindow.
Definition at line 378 of file STreeCtrl.cpp.
|
protectedvirtual |
Draws an item.
| pRT | Pointer to the rendering target. |
| rc | Rectangle to draw the item. |
| hItem | Handle to the item. |
Definition at line 794 of file STreeCtrl.cpp.
|
protectedvirtual |
Draws lines for an item.
| pRT | Pointer to the rendering target. |
| rc | Rectangle to draw the lines. |
| hItem | Handle to the item. |
Definition at line 866 of file STreeCtrl.cpp.
| BOOL STreeCtrl::EnsureVisible | ( | HSTREEITEM | hItem | ) |
Ensures an item is visible.
| hItem | Handle to the item. |
Definition at line 336 of file STreeCtrl.cpp.
| BOOL STreeCtrl::Expand | ( | HSTREEITEM | hItem, |
| UINT | nCode = TVE_EXPAND ) |
Expands or collapses an item.
| hItem | Handle to the item. |
| nCode | Code specifying the action (e.g., TVE_EXPAND). |
Definition at line 303 of file STreeCtrl.cpp.
| int STreeCtrl::GetCheckState | ( | HSTREEITEM | hItem | ) |
Gets the check state of an item.
| hItem | Handle to the item. |
Definition at line 269 of file STreeCtrl.cpp.
| HSTREEITEM STreeCtrl::GetChildItem | ( | HSTREEITEM | hItem, |
| BOOL | bFirst = TRUE ) |
Gets a child item.
| hItem | Handle to the item. |
| bFirst | TRUE to get the first child, FALSE to get the next child. |
Definition at line 160 of file STreeCtrl.cpp.
| LPARAM STreeCtrl::GetItemData | ( | HSTREEITEM | hItem | ) |
Gets the application-defined data of an item.
| hItem | Handle to the item. |
Definition at line 236 of file STreeCtrl.cpp.
| BOOL STreeCtrl::GetItemImage | ( | HSTREEITEM | hItem, |
| int * | nImage, | ||
| int * | nSelectedImage ) |
Gets the images of an item.
| hItem | Handle to the item. |
| nImage | Pointer to receive the index of the normal image. |
| nSelectedImage | Pointer to receive the index of the selected image. |
Definition at line 204 of file STreeCtrl.cpp.
|
protected |
Gets the rectangle of an item.
| pItem | Pointer to the item data. |
| rcItem | Rectangle to receive the item position. |
Definition at line 692 of file STreeCtrl.cpp.
|
protected |
Gets the index of an item in the visible list.
| hItemObj | Handle to the item. |
Definition at line 665 of file STreeCtrl.cpp.
| BOOL STreeCtrl::GetItemText | ( | HSTREEITEM | hItem, |
| IStringT * | strText ) |
Gets the text of an item.
| hItem | Handle to the item. |
| strText | String to receive the item text. |
|
inline |
Gets the text of an item.
| hItem | Handle to the item. |
| strText | String to receive the item text. |
Definition at line 403 of file STreeCtrl.h.
|
inline |
Gets the text of an item (ANSI version).
| hItem | Handle to the item. |
| strText | String to receive the item text. |
Definition at line 263 of file STreeCtrl.h.
| HSTREEITEM STreeCtrl::GetNextItem | ( | HSTREEITEM | hItem | ) |
Gets the next item.
| hItem | Handle to the item. |
Definition at line 1431 of file STreeCtrl.cpp.
| HSTREEITEM STreeCtrl::GetNextSiblingItem | ( | HSTREEITEM | hItem | ) |
Gets the next sibling item.
| hItem | Handle to the item. |
Definition at line 150 of file STreeCtrl.cpp.
| HSTREEITEM STreeCtrl::GetParentItem | ( | HSTREEITEM | hItem | ) |
Gets the parent item.
| hItem | Handle to the item. |
Definition at line 165 of file STreeCtrl.cpp.
| HSTREEITEM STreeCtrl::GetPrevSiblingItem | ( | HSTREEITEM | hItem | ) |
Gets the previous sibling item.
| hItem | Handle to the item. |
Definition at line 155 of file STreeCtrl.cpp.
| HSTREEITEM STreeCtrl::GetRootItem | ( | ) |
Gets the root item of the tree.
Definition at line 145 of file STreeCtrl.cpp.
| HSTREEITEM STreeCtrl::GetSelectedItem | ( | ) |
Gets the selected item.
Definition at line 170 of file STreeCtrl.cpp.
| HSTREEITEM STreeCtrl::HitTest | ( | CPoint & | pt | ) |
Performs a hit test on the tree view.
| pt | Mouse position. |
Definition at line 733 of file STreeCtrl.cpp.
| HSTREEITEM STreeCtrl::InsertItem | ( | LPCTSTR | lpszItem, |
| HSTREEITEM | hParent = STVI_ROOT, | ||
| HSTREEITEM | hInsertAfter = STVI_LAST ) |
Inserts a new item into the tree.
| lpszItem | Text of the item. |
| hParent | Handle to the parent item. |
| hInsertAfter | Handle to the item after which to insert. |
Definition at line 55 of file STreeCtrl.cpp.
| HSTREEITEM STreeCtrl::InsertItem | ( | LPCTSTR | lpszItem, |
| int | nImage, | ||
| int | nSelectedImage, | ||
| HSTREEITEM | hParent = STVI_ROOT, | ||
| HSTREEITEM | hInsertAfter = STVI_LAST ) |
Inserts a new item into the tree.
| lpszItem | Text of the item. |
| nImage | Index of the normal image. |
| nSelectedImage | Index of the selected image. |
| hParent | Handle to the parent item. |
| hInsertAfter | Handle to the item after which to insert. |
Definition at line 60 of file STreeCtrl.cpp.
| HSTREEITEM STreeCtrl::InsertItem | ( | LPCTSTR | lpszItem, |
| int | nImage, | ||
| int | nSelectedImage, | ||
| LPARAM | lParam, | ||
| HSTREEITEM | hParent = STVI_ROOT, | ||
| HSTREEITEM | hInsertAfter = STVI_LAST ) |
Inserts a new item into the tree.
| lpszItem | Text of the item. |
| nImage | Index of the normal image. |
| nSelectedImage | Index of the selected image. |
| lParam | Application-defined data. |
| hParent | Handle to the parent item. |
| hInsertAfter | Handle to the item after which to insert. |
Definition at line 65 of file STreeCtrl.cpp.
|
protected |
Inserts a new item into the tree.
| pItemObj | Pointer to the item data. |
| hParent | Handle to the parent item. |
| hInsertAfter | Handle to the item after which to insert. |
Definition at line 425 of file STreeCtrl.cpp.
|
protected |
Inserts a new item into the tree from an XML node.
| xmlNode | XML node containing the item definition. |
| hParent | Handle to the parent item. |
| hInsertAfter | Handle to the item after which to insert. |
Definition at line 471 of file STreeCtrl.cpp.
|
inline |
Inserts a new item into the tree (ANSI version).
| lpszItem | Text of the item. |
| nImage | Index of the normal image. |
| nSelectedImage | Index of the selected image. |
| lParam | Application-defined data. |
| hParent | Handle to the parent item. |
| hInsertAfter | Handle to the item after which to insert. |
Definition at line 164 of file STreeCtrl.h.
|
protected |
Checks if one item is an ancestor of another.
| hItem1 | Handle to the potential ancestor item. |
| hItem2 | Handle to the potential descendant item. |
Definition at line 479 of file STreeCtrl.cpp.
| BOOL STreeCtrl::ItemHasChildren | ( | HSTREEITEM | hItem | ) |
Checks if an item has children.
| hItem | Handle to the item. |
Definition at line 261 of file STreeCtrl.cpp.
|
protected |
Performs a hit test on an item.
| hItem | Handle to the item. |
| pt | Mouse position. |
Definition at line 946 of file STreeCtrl.cpp.
|
protectedvirtual |
Performs layout calculations for items.
Definition at line 575 of file STreeCtrl.cpp.
|
protected |
Handles the left mouse button double-click event for an item.
| hItem | Handle to the item. |
| nFlags | Flags associated with the mouse event. |
| pt | Mouse position. |
Definition at line 1052 of file STreeCtrl.cpp.
|
protected |
Handles the left mouse button down event for an item.
| hItem | Handle to the item. |
| nFlags | Flags associated with the mouse event. |
| pt | Mouse position. |
Definition at line 989 of file STreeCtrl.cpp.
|
protected |
Handles the left mouse button up event for an item.
| hItem | Handle to the item. |
| nFlags | Flags associated with the mouse event. |
| pt | Mouse position. |
Definition at line 1028 of file STreeCtrl.cpp.
|
protected |
Handles the mouse leave event for an item.
| hItem | Handle to the item. |
Definition at line 1107 of file STreeCtrl.cpp.
|
protected |
Handles the mouse move event for an item.
| hItem | Handle to the item. |
| nFlags | Flags associated with the mouse event. |
| pt | Mouse position. |
Definition at line 1072 of file STreeCtrl.cpp.
|
protectedvirtual |
Loads a branch of items from an XML node.
| hParent | Handle to the parent item. |
| xmlNode | XML node containing the branch definitions. |
Definition at line 394 of file STreeCtrl.cpp.
|
protectedvirtual |
Loads attributes for an item from an XML node.
| xmlNode | XML node containing the item attributes. |
| pItem | Pointer to the item. |
Definition at line 410 of file STreeCtrl.cpp.
|
protected |
Modifies the checkbox state of an item.
| hItem | Handle to the item. |
| dwStateAdd | State to add. |
| dwStateRemove | State to remove. |
Definition at line 974 of file STreeCtrl.cpp.
|
protected |
Modifies the toggle state of an item.
| hItem | Handle to the item. |
| dwStateAdd | State to add. |
| dwStateRemove | State to remove. |
Definition at line 959 of file STreeCtrl.cpp.
|
protected |
Handles the destruction of the tree control.
Definition at line 1129 of file STreeCtrl.cpp.
|
protectedvirtual |
Handles the insertion of an item.
| pItemData | Pointer to the item data. |
Definition at line 1331 of file STreeCtrl.cpp.
|
protected |
Handles the left mouse button double-click event.
| nFlags | Flags associated with the mouse event. |
| pt | Mouse position. |
Definition at line 1227 of file STreeCtrl.cpp.
|
protected |
Handles the left mouse button down event.
| nFlags | Flags associated with the mouse event. |
| pt | Mouse position. |
Definition at line 1178 of file STreeCtrl.cpp.
|
protected |
Handles the left mouse button up event.
| nFlags | Flags associated with the mouse event. |
| pt | Mouse position. |
Definition at line 1210 of file STreeCtrl.cpp.
|
protected |
Handles the mouse leave event.
Definition at line 1248 of file STreeCtrl.cpp.
|
protected |
Handles the mouse move event.
| nFlags | Flags associated with the mouse event. |
| pt | Mouse position. |
Definition at line 1233 of file STreeCtrl.cpp.
|
protectedvirtual |
Frees the memory associated with an item.
| pItemData | Pointer to the item data. |
Definition at line 1322 of file STreeCtrl.cpp.
|
protected |
Handles the paint event.
| pRT | Pointer to the rendering target. |
Definition at line 1135 of file STreeCtrl.cpp.
|
protected |
Handles the right mouse button down event.
| nFlags | Flags associated with the mouse event. |
| pt | Mouse position. |
Definition at line 1193 of file STreeCtrl.cpp.
|
protected |
Handles the size event.
| nType | Type of size change. |
| size | New size. |
Definition at line 1425 of file STreeCtrl.cpp.
|
protected |
Handles the page down action.
Definition at line 371 of file STreeCtrl.cpp.
|
protected |
Handles the page up action.
Definition at line 366 of file STreeCtrl.cpp.
|
protected |
| void STreeCtrl::RemoveAllItems | ( | ) |
Removes all items from the tree.
Definition at line 134 of file STreeCtrl.cpp.
| BOOL STreeCtrl::RemoveItem | ( | HSTREEITEM | hItem | ) |
Removes an item from the tree.
| hItem | Handle to the item to remove. |
Definition at line 77 of file STreeCtrl.cpp.
| BOOL STreeCtrl::SelectItem | ( | HSTREEITEM | hItem, |
| BOOL | bEnsureVisible = TRUE ) |
Selects an item.
| hItem | Handle to the item to select. |
| bEnsureVisible | TRUE to ensure the item is visible. |
Definition at line 1257 of file STreeCtrl.cpp.
|
inlineprotectedvirtual |
Reimplemented from SPanel.
Definition at line 794 of file STreeCtrl.h.
| BOOL STreeCtrl::SetCheckState | ( | HSTREEITEM | hItem, |
| BOOL | bCheck ) |
Sets the check state of an item.
| hItem | Handle to the item. |
| bCheck | TRUE to check the item, FALSE to uncheck. |
Definition at line 278 of file STreeCtrl.cpp.
|
protected |
Sets the check state of an item's children.
| hItem | Handle to the item. |
| nCheckValue | New check state value. |
Definition at line 504 of file STreeCtrl.cpp.
|
protected |
Sets the visibility of an item's children.
| hItem | Handle to the item. |
| bVisible | TRUE to make the children visible, FALSE to hide them. |
Definition at line 490 of file STreeCtrl.cpp.
| BOOL STreeCtrl::SetItemData | ( | HSTREEITEM | hItem, |
| LPARAM | lParam ) |
Sets the application-defined data of an item.
| hItem | Handle to the item. |
| lParam | Application-defined data. |
Definition at line 247 of file STreeCtrl.cpp.
| BOOL STreeCtrl::SetItemImage | ( | HSTREEITEM | hItem, |
| int | nImage, | ||
| int | nSelectedImage ) |
Sets the images of an item.
| hItem | Handle to the item. |
| nImage | Index of the normal image. |
| nSelectedImage | Index of the selected image. |
Definition at line 221 of file STreeCtrl.cpp.
| BOOL STreeCtrl::SetItemText | ( | HSTREEITEM | hItem, |
| LPCTSTR | lpszItem ) |
Sets the text of an item.
| hItem | Handle to the item. |
| lpszItem | New text for the item. |
Definition at line 189 of file STreeCtrl.cpp.
|
inline |
Sets the text of an item (ANSI version).
| hItem | Handle to the item. |
| lpszItem | New text for the item. |
Definition at line 286 of file STreeCtrl.h.
| void STreeCtrl::SetListener | ( | IListener * | pListener | ) |
Sets the listener for tree view events.
| pListener | Pointer to the listener. |
Definition at line 1339 of file STreeCtrl.cpp.
| void STreeCtrl::SortChildren | ( | HSTREEITEM | hItem, |
| FunTreeSortCallback | sortFunc, | ||
| void * | pCtx ) |
Sorts the children of an item.
| hItem | Handle to the item. |
| sortFunc | Sorting callback function. |
| pCtx | Context for the sorting function. |
Definition at line 1300 of file STreeCtrl.cpp.
|
protectedvirtual |
Updates the content width of the tree.
Definition at line 660 of file STreeCtrl.cpp.
|
protected |
Updates the scroll bars.
Definition at line 1344 of file STreeCtrl.cpp.
|
protected |
Verifies if an item is valid.
| hItem | Handle to the item to verify. |
Definition at line 1307 of file STreeCtrl.cpp.
|
protected |
Flag indicating if checkboxes are enabled.
Definition at line 727 of file STreeCtrl.h.
|
protected |
Flag indicating if lines are drawn between items.
has lines
Definition at line 792 of file STreeCtrl.h.
|
protected |
Flag indicating if right-click selection is enabled.
Definition at line 732 of file STreeCtrl.h.
|
protected |
Background color of items.
Definition at line 772 of file STreeCtrl.h.
|
protected |
Background color of selected items.
Definition at line 777 of file STreeCtrl.h.
|
protected |
Text color of selected items.
Definition at line 787 of file STreeCtrl.h.
|
protected |
Text color of items.
Definition at line 782 of file STreeCtrl.h.
|
protected |
Handle to the item that has capture.
Definition at line 662 of file STreeCtrl.h.
|
protected |
Handle to the item under the hover state.
Definition at line 657 of file STreeCtrl.h.
|
protected |
Handle to the selected item.
Definition at line 652 of file STreeCtrl.h.
|
protected |
Total content width of the tree.
Definition at line 672 of file STreeCtrl.h.
|
protected |
Indentation between levels.
Definition at line 717 of file STreeCtrl.h.
|
protected |
Height of each item.
Definition at line 712 of file STreeCtrl.h.
|
protected |
Button currently hovered.
Definition at line 702 of file STreeCtrl.h.
|
protected |
Margin around each item.
Definition at line 722 of file STreeCtrl.h.
|
protected |
Offset for item positioning.
Definition at line 682 of file STreeCtrl.h.
|
protected |
Button currently pushed down.
Definition at line 707 of file STreeCtrl.h.
|
protected |
Number of visible items.
Definition at line 667 of file STreeCtrl.h.
|
protected |
Skin for the checkboxes.
Definition at line 762 of file STreeCtrl.h.
|
protected |
Skin for the icons.
Definition at line 752 of file STreeCtrl.h.
|
protected |
Skin for the background of items.
Definition at line 742 of file STreeCtrl.h.
|
protected |
Skin for the selected background of items.
Definition at line 747 of file STreeCtrl.h.
|
protected |
Skin for the lines.
Definition at line 767 of file STreeCtrl.h.
|
protected |
Listener for tree view events.
Definition at line 737 of file STreeCtrl.h.
|
protected |
Skin for the toggle buttons.
Definition at line 757 of file STreeCtrl.h.
|
protected |
Rectangle for the checkbox.
Definition at line 692 of file STreeCtrl.h.
|
protected |
Rectangle for the icon.
Definition at line 697 of file STreeCtrl.h.
|
protected |
Rectangle for the toggle button.
Definition at line 687 of file STreeCtrl.h.
|
protected |
Mask for item attributes.
Definition at line 677 of file STreeCtrl.h.