Class responsible for locating and managing tree view items. More...
#include <STreeView.h>
Public Member Functions | |
| STreeViewItemLocator (int nIndent=16) | |
| Constructor for STreeViewItemLocator. | |
| ~STreeViewItemLocator () | |
| Destructor for STreeViewItemLocator. | |
| void | SetAdapter (ITvAdapter *pAdapter) OVERRIDE |
| Sets the adapter for the tree view items. | |
| void | OnBranchChanged (HSTREEITEM hItem) OVERRIDE |
| Notifies the locator that a branch has changed. | |
| void | OnBranchExpandedChanged (HSTREEITEM hItem, BOOL bExpandedOld, BOOL bExpandedNew) OVERRIDE |
| Notifies the locator that the expanded state of a branch has changed. | |
| int | GetTotalHeight () SCONST OVERRIDE |
| Gets the total height of the tree view. | |
| int | GetTotalWidth () SCONST OVERRIDE |
| Gets the total width of the tree view. | |
| int | Item2Position (HSTREEITEM hItem) SCONST OVERRIDE |
| Converts an item handle to its position. | |
| HSTREEITEM | Position2Item (int position) SCONST OVERRIDE |
| Converts a position to an item handle. | |
| int | GetScrollLineSize () SCONST OVERRIDE |
| Gets the scroll line size. | |
| void | SetItemWidth (HSTREEITEM hItem, int nWidth) OVERRIDE |
| Sets the width of an item. | |
| int | GetItemWidth (HSTREEITEM hItem) SCONST OVERRIDE |
| Gets the width of an item. | |
| void | SetItemHeight (HSTREEITEM hItem, int nHeight) OVERRIDE |
| Sets the height of an item. | |
| int | GetItemHeight (HSTREEITEM hItem) SCONST OVERRIDE |
| Gets the height of an item. | |
| int | GetItemIndent (HSTREEITEM hItem) SCONST OVERRIDE |
| Gets the indentation of an item. | |
| int | GetIndent () SCONST OVERRIDE |
| Gets the indentation between levels. | |
| void | SetIndent (int nIndent) OVERRIDE |
| Sets the indentation between levels. | |
Public Member Functions inherited from TObjRefImpl< ITreeViewItemLocator > | |
| TObjRefImpl () | |
| Constructor that initializes the reference count to 1. | |
| virtual | ~TObjRefImpl () |
| Virtual destructor. | |
| long | AddRef () override |
| Increments the reference count. | |
| long | Release () override |
| Decrements the reference count and deletes the object if the count reaches zero. | |
| void | OnFinalRelease () override |
| Deletes the object. | |
Protected Member Functions | |
| BOOL | IsItemExpanded (HSTREEITEM hItem) const |
| Checks if an item is expanded. | |
| void | _UpdateBranchWidth (HSTREEITEM hItem, int nOldWidth, int nNewWidth) |
| Updates the branch width data in the parent window. | |
| int | _GetBranchWidth (HSTREEITEM hBranch) const |
| Gets the width of a branch. | |
| void | _SetBranchWidth (HSTREEITEM hBranch, int nWidth) |
| Sets the width of a branch. | |
| void | _SetItemWidth (HSTREEITEM hItem, int nWidth) |
| Sets the width of an item. | |
| int | _GetBranchHeight (HSTREEITEM hItem) const |
| Gets the height of a branch. | |
| void | _SetBranchHeight (HSTREEITEM hItem, int nHeight) |
| Sets the height of a branch. | |
| void | _UpdateBranchHeight (HSTREEITEM hItem, int nDiff) |
| Updates the height of a branch. | |
| void | _UpdateSiblingsOffset (HSTREEITEM hItem) |
| Updates the offset of sibling items. | |
| int | _GetItemOffset (HSTREEITEM hItem) const |
| Gets the offset of an item. | |
| void | _SetItemOffset (HSTREEITEM hItem, int nOffset) |
| Sets the offset of an item. | |
| void | _SetItemHeight (HSTREEITEM hItem, int nHeight) |
| Sets the height of an item. | |
| int | _GetItemVisibleHeight (HSTREEITEM hItem) const |
| Gets the visible height of an item. | |
| int | _GetItemVisibleWidth (HSTREEITEM hItem) const |
| Gets the visible width of an item. | |
| HSTREEITEM | _Position2Item (int position, HSTREEITEM hParent, int nParentPosition) const |
| Converts a position to an item handle. | |
| BOOL | _IsItemVisible (HSTREEITEM hItem) const |
| Checks if an item is visible. | |
| void | _InitBranch (HSTREEITEM hItem) |
| Initializes a branch. | |
Protected Attributes | |
| SAutoRefPtr< ITvAdapter > | m_adapter |
| int | m_nLineHeight |
| int | m_nIndent |
| CSize | m_szDef |
Protected Attributes inherited from TObjRefImpl< ITreeViewItemLocator > | |
| LONG | m_cRef |
| Reference count. | |
Class responsible for locating and managing tree view items.
Definition at line 17 of file STreeView.h.
| STreeViewItemLocator::STreeViewItemLocator | ( | int | nIndent = 16 | ) |
Constructor for STreeViewItemLocator.
| nIndent | Indentation between levels. |
Definition at line 39 of file STreeView.cpp.
| STreeViewItemLocator::~STreeViewItemLocator | ( | ) |
Destructor for STreeViewItemLocator.
Definition at line 46 of file STreeView.cpp.
|
protected |
Gets the height of a branch.
| hItem | Handle to the item. |
Definition at line 214 of file STreeView.cpp.
|
protected |
Gets the width of a branch.
| hBranch | Handle to the branch. |
Definition at line 229 of file STreeView.cpp.
|
protected |
Gets the offset of an item.
| hItem | Handle to the item. |
Definition at line 173 of file STreeView.cpp.
|
protected |
Gets the visible height of an item.
| hItem | Handle to the item. |
Definition at line 155 of file STreeView.cpp.
|
protected |
Gets the visible width of an item.
| hItem | Handle to the item. |
Definition at line 145 of file STreeView.cpp.
|
protected |
Initializes a branch.
| hItem | Handle to the item. |
Definition at line 55 of file STreeView.cpp.
|
protected |
Checks if an item is visible.
| hItem | Handle to the item. |
Definition at line 90 of file STreeView.cpp.
|
protected |
Converts a position to an item handle.
| position | Position in the tree view. |
| hParent | Handle to the parent item. |
| nParentPosition | Position of the parent item. |
Definition at line 95 of file STreeView.cpp.
|
protected |
Sets the height of a branch.
| hItem | Handle to the item. |
| nHeight | New height of the branch. |
Definition at line 209 of file STreeView.cpp.
|
protected |
Sets the width of a branch.
| hBranch | Handle to the branch. |
| nWidth | New width of the branch. |
Definition at line 224 of file STreeView.cpp.
|
protected |
Sets the height of an item.
| hItem | Handle to the item. |
| nHeight | New height of the item. |
Definition at line 163 of file STreeView.cpp.
|
protected |
Sets the offset of an item.
| hItem | Handle to the item. |
| nOffset | New offset of the item. |
Definition at line 168 of file STreeView.cpp.
|
protected |
Sets the width of an item.
| hItem | Handle to the item. |
| nWidth | New width of the item. |
Definition at line 219 of file STreeView.cpp.
|
protected |
Updates the height of a branch.
| hItem | Handle to the item. |
| nDiff | Difference in height. |
Definition at line 198 of file STreeView.cpp.
|
protected |
Updates the branch width data in the parent window.
| hItem | Handle to the item. |
| nOldWidth | Old width of the branch. |
| nNewWidth | New width of the branch. |
Definition at line 234 of file STreeView.cpp.
|
protected |
Updates the offset of sibling items.
| hItem | Handle to the item. |
Definition at line 178 of file STreeView.cpp.
| int STreeViewItemLocator::GetIndent | ( | ) |
Gets the indentation between levels.
Definition at line 293 of file STreeView.cpp.
| int STreeViewItemLocator::GetItemHeight | ( | HSTREEITEM | hItem | ) |
Gets the height of an item.
| hItem | Handle to the item. |
Definition at line 303 of file STreeView.cpp.
| int STreeViewItemLocator::GetItemIndent | ( | HSTREEITEM | hItem | ) |
Gets the indentation of an item.
| hItem | Handle to the item. |
Definition at line 280 of file STreeView.cpp.
| int STreeViewItemLocator::GetItemWidth | ( | HSTREEITEM | hItem | ) |
Gets the width of an item.
| hItem | Handle to the item. |
Definition at line 308 of file STreeView.cpp.
| int STreeViewItemLocator::GetScrollLineSize | ( | ) |
| int STreeViewItemLocator::GetTotalHeight | ( | ) |
Gets the total height of the tree view.
Definition at line 375 of file STreeView.cpp.
| int STreeViewItemLocator::GetTotalWidth | ( | ) |
Gets the total width of the tree view.
Definition at line 370 of file STreeView.cpp.
|
protected |
Checks if an item is expanded.
| hItem | Handle to the item. |
Definition at line 275 of file STreeView.cpp.
| int STreeViewItemLocator::Item2Position | ( | HSTREEITEM | hItem | ) |
Converts an item handle to its position.
| hItem | Handle to the item. |
Definition at line 342 of file STreeView.cpp.
| void STreeViewItemLocator::OnBranchChanged | ( | HSTREEITEM | hItem | ) |
Notifies the locator that a branch has changed.
| hItem | Handle to the branch item. |
Definition at line 400 of file STreeView.cpp.
| void STreeViewItemLocator::OnBranchExpandedChanged | ( | HSTREEITEM | hItem, |
| BOOL | bExpandedOld, | ||
| BOOL | bExpandedNew ) |
Notifies the locator that the expanded state of a branch has changed.
| hItem | Handle to the branch item. |
| bExpandedOld | Old expanded state. |
| bExpandedNew | New expanded state. |
Definition at line 380 of file STreeView.cpp.
| HSTREEITEM STreeViewItemLocator::Position2Item | ( | int | position | ) |
Converts a position to an item handle.
| position | Position in the tree view. |
Definition at line 337 of file STreeView.cpp.
| void STreeViewItemLocator::SetAdapter | ( | ITvAdapter * | pAdapter | ) |
Sets the adapter for the tree view items.
| pAdapter | Pointer to the adapter. |
Definition at line 50 of file STreeView.cpp.
| void STreeViewItemLocator::SetIndent | ( | int | nIndent | ) |
Sets the indentation between levels.
| nIndent | New indentation value. |
Definition at line 298 of file STreeView.cpp.
| void STreeViewItemLocator::SetItemHeight | ( | HSTREEITEM | hItem, |
| int | nHeight ) |
Sets the height of an item.
| hItem | Handle to the item. |
| nHeight | New height of the item. |
Definition at line 313 of file STreeView.cpp.
| void STreeViewItemLocator::SetItemWidth | ( | HSTREEITEM | hItem, |
| int | nWidth ) |
Sets the width of an item.
| hItem | Handle to the item. |
| nWidth | New width of the item. |
Definition at line 324 of file STreeView.cpp.
|
protected |
Adapter for the tree view items.
Definition at line 252 of file STreeView.h.
|
protected |
Indentation between levels.
Definition at line 254 of file STreeView.h.
|
protected |
Line height.
Definition at line 253 of file STreeView.h.
|
protected |
Default size.
Definition at line 255 of file STreeView.h.