InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
PstLstUITVHierarchyAdapter Class Reference
Inheritance diagram for PstLstUITVHierarchyAdapter:
ITreeViewHierarchyAdapterIPMUnknown

Public Member Functions

 PstLstUITVHierarchyAdapter (IPMUnknown *boss)
 
virtual NodeID_rv GetRootNode () const
 
virtual NodeID_rv GetParentNode (const NodeID &node) const
 
virtual int32 GetNumChildren (const NodeID &node) const
 
virtual NodeID_rv GetNthChild (const NodeID &node, const int32 &nth) const
 
virtual int32 GetChildIndex (const NodeID &parent, const NodeID &child) const
 
virtual bool16 ShouldAddNthChild (const NodeID &node, const int32 &nth) const
 
virtual NodeID_rv GetGenericNodeID () const
 

Additional Inherited Members

- Public Types inherited from ITreeViewHierarchyAdapter
enum  { kDefaultIID = IID_ITREEVIEWHIERARCHYADAPTER }
 

Detailed Description

Tree view adapter

Member Function Documentation

int32 PstLstUITVHierarchyAdapter::GetChildIndex (const NodeIDparent,
const NodeIDchild 
) const
virtual

Accessor to determine the index of a given child node in its parent's collection of children.

Parameters
parentspecifies the parent node whose child we are querying about
childspecifies child of interest
Returns
index of given child in parent's collection, (-1) if not in collection

Implements ITreeViewHierarchyAdapter.

NodeID_rv PstLstUITVHierarchyAdapter::GetGenericNodeID () const
virtual

Return a dummy node that can be used as a generic node anywhere in the tree.

Returns
reference to a generic node

Implements ITreeViewHierarchyAdapter.

NodeID_rv PstLstUITVHierarchyAdapter::GetNthChild (const NodeIDnode,
const int32 & nth 
) const
virtual

Accessor for a child of a given node by index.

Parameters
nodespecifies the parent node
nthspecifies index of child to choose
Returns
reference to the child at the given index

Implements ITreeViewHierarchyAdapter.

int32 PstLstUITVHierarchyAdapter::GetNumChildren (const NodeIDnode) const
virtual

Accessor for the number of children given a node that is in the tree-model. specifies the node of interest

Returns
number of children of given node

Implements ITreeViewHierarchyAdapter.

NodeID_rv PstLstUITVHierarchyAdapter::GetParentNode (const NodeIDnode) const
virtual

Accessor for the parent node of a given node. If the given node is the root node, this should return nil.

Implements ITreeViewHierarchyAdapter.

NodeID_rv PstLstUITVHierarchyAdapter::GetRootNode () const
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.

Returns
reference to root node

Implements ITreeViewHierarchyAdapter.

virtual bool16 PstLstUITVHierarchyAdapter::ShouldAddNthChild (const NodeIDnode,
const int32 & nth 
) const
inlinevirtual

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.

Parameters
nodespecifies the parent node
nthspecifies index of child to choose
Returns
if the node should be added to the tree or not

Implements ITreeViewHierarchyAdapter.