InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
DataUpdaterUITVHierarchyAdapter Class Reference
Inheritance diagram for DataUpdaterUITVHierarchyAdapter:
CPMUnknown< ITreeViewHierarchyAdapter >ITreeViewHierarchyAdapterIPMUnknown

Public Member Functions

 DataUpdaterUITVHierarchyAdapter (IPMUnknown *boss)
 
virtual ~DataUpdaterUITVHierarchyAdapter ()
 
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 NodeID_rv GetGenericNodeID () const
 
virtual bool16 ShouldAddNthChild (const NodeID &node, const int32 &nth) const
 
- Public Member Functions inherited from CPMUnknown< ITreeViewHierarchyAdapter >
IPMUnknownQueryInterface (PMIID interfaceID) const
 
void AddRef () const
 
void Release () const
 
void PreDirty (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
void PreDirtyNoMessage (ImplementationID prop=kInvalidImpl, bool16 allowModification=kTrue)
 
 CPMUnknown (const CPMUnknown &)=delete
 
CPMUnknownoperator= (const CPMUnknown &)=delete
 

Additional Inherited Members

- Public Types inherited from ITreeViewHierarchyAdapter
enum  { kDefaultIID = IID_ITREEVIEWHIERARCHYADAPTER }
 
- Protected Member Functions inherited from CPMUnknown< ITreeViewHierarchyAdapter >
 CPMUnknown (IPMUnknown *boss)
 
- Protected Attributes inherited from CPMUnknown< ITreeViewHierarchyAdapter >
HelperInterface fHelperInterface
 

Detailed Description

Implementation of ITreeViewHierarchyAdapter, adapts our tree model to the needs of the tree-view widget. Implements an adapter for the tree hierarchy; this is where the hierarchy is accessed by the application core - you'll find that this is the only implementation you provide with methods like GetNumChildren or GetParent.

For further reading on ITreeViewHiearchyAdapter interface, see the Widgets chapter of the User Interface technote.

Constructor & Destructor Documentation

Binds the C implementation class onto its ImplementationID making the C code callable by the application * DataUpdaterUITVHierarchyAdapter::DataUpdaterUITVHierarchyAdapter (IPMUnknownboss)

Constructor

DataUpdaterUITVHierarchyAdapter::~DataUpdaterUITVHierarchyAdapter ()
virtual

Destructor

Member Function Documentation

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

Determines the index of given child in the parent's list of children. Given the parent and an instance of a child, indicate what the index of the given child node should be in the list of children of the parent, if any.

Parameters
parent(in) reference to the parent node
child(in) reference to the child node, whose index we're seeking
Returns
index of child in parent's kids, or (-1) if the child doesn't belong to this parent

Implements ITreeViewHierarchyAdapter.

NodeID_rv DataUpdaterUITVHierarchyAdapter::GetGenericNodeID () const
virtual

Acquire reference to a general-purpose node. This should return an instance of a node that can be used anywhere in the hierarchy.

Returns
reference to general purpose node

Implements ITreeViewHierarchyAdapter.

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

Acquire a reference to the nth child. Note: the indexing is from 0 to (numChildren-1).

Parameters
node(in) identifies the parent node for which we're seeking the nth child
nth(in) get the child at this index in the list of children of the specified node
Returns
reference to the nth child

Implements ITreeViewHierarchyAdapter.

int32 DataUpdaterUITVHierarchyAdapter::GetNumChildren (const NodeIDnode) const
virtual

Determine the number of child nodes that the given node has.

Parameters
node(in) specifies node of interest
Returns
count of children for given node

Implements ITreeViewHierarchyAdapter.

NodeID_rv DataUpdaterUITVHierarchyAdapter::GetParentNode (const NodeIDnode) const
virtual

Acquire a reference to the parent of the given node. GetParentNode() should always return kInvalidNodeID for the root.

Parameters
node(in) specifies node of interest
Returns
reference to parent of given node

Implements ITreeViewHierarchyAdapter.

NodeID_rv DataUpdaterUITVHierarchyAdapter::GetRootNode () const
virtual

Acquire reference to root node of our tree.

Returns
reference to root node

Implements ITreeViewHierarchyAdapter.

virtual bool16 DataUpdaterUITVHierarchyAdapter::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.