#include <customgui_itemtree_utils.h>
Represents an element in a tree view through its state and custom data.
The payload combines the node's stable identifier, application ID, display text, view flags, application-defined data, and an optional linked object. Use this class to describe how a node should appear and behave; the item tree owns the payload while the payload owns its linked-object reference.
Public Member Functions | |
| ItemTreeNodeData () | |
| ~ItemTreeNodeData () | |
| const ItemTreeNodeData & | operator= (const ItemTreeNodeData &src) |
| ItemTreeNodeData (const ItemTreeNodeData &src) | |
| Bool | operator!= (const ItemTreeNodeData &rhs) const |
| Bool | CopyFrom (const ItemTreeNodeData &src, AliasTrans *trn) |
| Bool | Init () |
| Bool | Write (HyperFile *hf) const |
| Bool | Read (HyperFile *hf) |
| void | SetSelected (Bool state) |
| Bool | IsSelected () const |
| void | SetMarked (Bool state) |
| Bool | IsMarked () const |
| void | SetOpened (Bool state) |
| Bool | IsOpen () const |
| void | SetHidden (Bool state) |
| Bool | IsHidden () const |
| void | SetEnabled (Bool state) |
| Bool | IsEnabled () const |
| void | SetNoRemove (Bool state) |
| void | SetGreyedOut (Bool state) |
| Bool | IsFolder () const |
| void | SetFlag (const UInt32 flag, const Bool state) |
| Bool | GetFlag (const UInt32 flag) const |
| Bool | IsSelectedAndVisible () const |
| Bool | IsMarkedAndVisible () const |
| Bool | IsHighlightAndVisible () const |
Public Attributes | |
| UInt64 | m_GUID |
| Int32 | m_ID |
| UInt32 | m_Flags |
| String | m_Text |
| GeData | m_Data |
| BaseLink * | m_pLink |
| ItemTreeNodeData | ( | ) |
Initializes an empty item-tree node payload.
| ~ItemTreeNodeData | ( | ) |
Releases the linked object reference owned by the payload.
| ItemTreeNodeData | ( | const ItemTreeNodeData & | src | ) |
Creates a copy of an item-tree node payload.
| [in] | src | Source payload. |
| const ItemTreeNodeData& operator= | ( | const ItemTreeNodeData & | src | ) |
Copies the payload and linked-object state from src.
| [in] | src | Source payload. |
| Bool operator!= | ( | const ItemTreeNodeData & | rhs | ) | const |
Compares this payload with rhs.
| [in] | rhs | Payload to compare with this payload. |
| Bool CopyFrom | ( | const ItemTreeNodeData & | src, |
| AliasTrans * | trn | ||
| ) |
Copies the payload and linked-object state.
| [in] | src | Source payload. |
| [in] | trn | Optional alias translator for referenced data. |
true on success; false if link allocation or copying fails. | Bool Init | ( | ) |
Prepares the payload for use by allocating its link and assigning a stable GUID.
true on success; false if link allocation fails. Serializes the payload and linked-object state to a hyper file.
| [in] | hf | Hyper file receiving the serialized payload. |
true on success; false if the link cannot be allocated or written. Restores the payload and linked-object state from a hyper file.
| [in] | hf | Hyper file containing the serialized payload. |
true on success; false if the link cannot be allocated or read. | void SetSelected | ( | Bool | state | ) |
Sets whether the node is selected through ITEMTREE_FLAG_SELECT.
| [in] | state | true to select the node; false to clear the state. |
| Bool IsSelected | ( | ) | const |
Reports whether the node is selected.
true if the node is selected; otherwise false. | void SetMarked | ( | Bool | state | ) |
Sets whether the node is marked through ITEMTREE_FLAG_MARK.
| [in] | state | true to mark the node; false to clear the state. |
| Bool IsMarked | ( | ) | const |
Reports whether the node is marked.
true if the node is marked; otherwise false. | void SetOpened | ( | Bool | state | ) |
Sets whether the node is open through ITEMTREE_FLAG_OPEN.
| [in] | state | true to open the node; false to close it. |
| Bool IsOpen | ( | ) | const |
Reports whether the node is open.
true if the node is open; otherwise false. | void SetHidden | ( | Bool | state | ) |
Sets whether the node is hidden through ITEMTREE_FLAG_HIDDEN.
| [in] | state | true to hide the node; false to show it. |
| Bool IsHidden | ( | ) | const |
Reports whether the node is hidden.
true if the node is hidden; otherwise false. | void SetEnabled | ( | Bool | state | ) |
Sets whether the node is enabled through ITEMTREE_FLAG_ENABLE.
| [in] | state | true to enable the node; false to disable it. |
| Bool IsEnabled | ( | ) | const |
Reports whether the node is enabled.
true if the node is enabled; otherwise false. | void SetNoRemove | ( | Bool | state | ) |
Sets whether the node can be removed through ITEMTREE_FLAG_NOREMOVE.
| [in] | state | true to prevent removal; false to allow it. |
| void SetGreyedOut | ( | Bool | state | ) |
Sets whether the node is visually greyed out through ITEMTREE_FLAG_GREYED_OUT.
| [in] | state | true to grey out the node; false to restore its normal appearance. |
| Bool IsFolder | ( | ) | const |
Reports whether the node represents a folder.
true if ITEMTREE_FLAG_FOLDER is set; otherwise false. Sets or clears an arbitrary item-tree flag.
| [in] | flag | Flag to change. |
| [in] | state | true to set the flag; false to clear it. |
Reports whether an arbitrary item-tree flag is set.
| [in] | flag | Flag to query. |
true if the flag is set; otherwise false. | Bool IsSelectedAndVisible | ( | ) | const |
Reports whether the node is selected and visible.
true if the node is selected and not hidden; otherwise false. | Bool IsMarkedAndVisible | ( | ) | const |
Reports whether the node is marked and visible.
true if the node is marked and not hidden; otherwise false. | Bool IsHighlightAndVisible | ( | ) | const |
Reports whether the node is highlighted and visible.
true if the node is selected or marked and not hidden; otherwise false. | UInt64 m_GUID |
Stable identifier of the node.
| Int32 m_ID |
Application-defined identifier of the node.
| UInt32 m_Flags |
Combination of ITEMTREE_FLAG_* values describing the node state.
| String m_Text |
Display text of the node.
| GeData m_Data |
Application-defined custom data associated with the node.
| BaseLink* m_pLink |
Optional link to the represented object.