![]() | InDesign SDK 20.5 |
#include <ITreeViewHierarchyAdapter.h>

Public Types | |
| enum | { kDefaultIID = IID_ITREEVIEWHIERARCHYADAPTER } |
Public Member Functions | |
| virtual NodeID_rv | GetRootNode () const =0 |
| virtual NodeID_rv | GetParentNode (const NodeID &node) const =0 |
| virtual int32 | GetNumChildren (const NodeID &node) const =0 |
| virtual bool16 | ShouldAddNthChild (const NodeID &node, const int32 &nth) const =0 |
| virtual NodeID_rv | GetNthChild (const NodeID &node, const int32 &nth) const =0 |
| virtual int32 | GetChildIndex (const NodeID &parent, const NodeID &child) const =0 |
| virtual NodeID_rv | GetGenericNodeID () const =0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Interface that provides the means for navigating through a tree model. It is like the adapter pattern in that it provides a way for the TreeView widget to navigate a tree-model without requiring the tree-model to conform to any given interface.
Client code wishing to use a tree view widget should implement this interface.
To aid in debugging your ITreeViewHierarchyAdapter implementation, check the test menu item Test > UI > Enable TreeView Validation. This enables more debug only code to check that your hierarchy and NodeID implementations are correct.
| pure virtual |
Accessor to determine the index of a given child node in its parent's collection of children.
| parent | specifies the parent node whose child we are querying about |
| child | specifies child of interest |
Implemented in CusDtLnkUITreeTVHierarchyAdapter, PnlTrvTVHierarchyAdapter, DataUpdaterUITVHierarchyAdapter, PstLstUITVHierarchyAdapter, CusCondTxtTreeViewAdapter, and ListTreeViewAdapter.
| pure virtual |
Return a dummy node that can be used as a generic node anywhere in the tree.
Implemented in CusDtLnkUITreeTVHierarchyAdapter, PnlTrvTVHierarchyAdapter, DataUpdaterUITVHierarchyAdapter, PstLstUITVHierarchyAdapter, CusCondTxtTreeViewAdapter, and ListTreeViewAdapter.
| pure virtual |
Accessor for a child of a given node by index.
| node | specifies the parent node |
| nth | specifies index of child to choose |
Implemented in CusDtLnkUITreeTVHierarchyAdapter, PnlTrvTVHierarchyAdapter, DataUpdaterUITVHierarchyAdapter, PstLstUITVHierarchyAdapter, CusCondTxtTreeViewAdapter, and ListTreeViewAdapter.
| pure virtual |
Accessor for the number of children given a node that is in the tree-model. specifies the node of interest
Implemented in CusDtLnkUITreeTVHierarchyAdapter, PnlTrvTVHierarchyAdapter, DataUpdaterUITVHierarchyAdapter, PstLstUITVHierarchyAdapter, CusCondTxtTreeViewAdapter, and ListTreeViewAdapter.
Accessor for the parent node of a given node. If the given node is the root node, this should return nil.
Implemented in CusDtLnkUITreeTVHierarchyAdapter, PnlTrvTVHierarchyAdapter, DataUpdaterUITVHierarchyAdapter, PstLstUITVHierarchyAdapter, CusCondTxtTreeViewAdapter, and ListTreeViewAdapter.
| pure virtual |
Accessor for the root node of the tree model. Should return an instance of a node that represents the root node, with data allowing it to be uniquely identified as such.
Implemented in CusDtLnkUITreeTVHierarchyAdapter, PnlTrvTVHierarchyAdapter, DataUpdaterUITVHierarchyAdapter, PstLstUITVHierarchyAdapter, CusCondTxtTreeViewAdapter, DCLSizTreeViewAdapter, WLBCmpTreeViewAdapter, ListTreeViewAdapter, and TKITreeViewHierarchyAdapter.
| pure virtual |
When building subtrees, this is called so the client can choose to add this particular node or not. In most cases, returning true here is what you want.
| node | specifies the parent node |
| nth | specifies index of child to choose |
Implemented in CusDtLnkUITreeTVHierarchyAdapter, PnlTrvTVHierarchyAdapter, DataUpdaterUITVHierarchyAdapter, PstLstUITVHierarchyAdapter, and ListTreeViewAdapter.