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

Public Types | |
| enum | { kDefaultIID = IID_IHIERARCHY } |
| enum | { kAtTheEnd = -1 } |
| enum | { kIncludeHidden = 0x00000001 } |
Public Member Functions | |
| virtual IHierarchy * | QueryChild (int32 n) const =0 |
| virtual UID | GetChildUID (int32 n) const =0 |
| virtual int32 | GetChildIndex (const IHierarchy *p) const =0 |
| virtual int32 | GetChildCount () const =0 |
| virtual IHierarchy * | QueryParent () const =0 |
| virtual UID | GetParentUID () const =0 |
| virtual void | SetParent (IHierarchy *newParent)=0 |
| virtual IHierarchy * | QueryRoot () const =0 |
| virtual UID | GetRootUID () const =0 |
| virtual void | SetRootUID (UID newRoot)=0 |
| virtual void | Add (IHierarchy *newChild, int32 pos=kAtTheEnd)=0 |
| virtual void | Move (IHierarchy *childToMove, int32 to)=0 |
| virtual void | Remove (IHierarchy *childToRemove)=0 |
| virtual void | Remove (UID childToRemove)=0 |
| virtual bool16 | IsLessThan (IHierarchy *item)=0 |
| virtual void | GetDescendents (UIDList *resultList, const PMIID &interfaceID, int32 flags=0) const =0 |
| virtual void | GetAncestors (UIDList *resultList, const PMIID &interfaceID) const =0 |
| virtual UID | GetLayerUID () const =0 |
| virtual UID | GetSpreadUID () 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 |
The IHierarchy interface stores a persistent, UID-based tree structure. This tree structure is used for InDesign's display hierarchy. The boss objects that represent spreads, layers, and the various other types of page items (splines, images, etc.) aggregate an IHierarchy interface.
| anonymous enum |
Special position index for adding items to a hierarchy.
| anonymous enum |
| pure virtual |
Add a new child before the index position. Or, if kAtTheEnd, add it to the end of the list.
| *newChild | the item to add to the hierarchy. |
| kAtTheEnd | position to add, defaults to kAtTheEnd. Use 0 for initial position of hierarchy. |
Implemented in CHierarchyNode.
| pure virtual |
Return ancestors that support interfaceID. Collection of ancestors ends when an ancestor is reached that doesn't support the interface.
| *resultList | [OUT] the filled in list of ancestors meeting the requirements. |
| interfaceID | [IN] the interfaceID to check each parent (and grandparent, etc) for. |
Implemented in CHierarchyNode.
| pure virtual |
| pure virtual |
Return the index of this child
| p | the child hierarchy to find the position for. |
Implemented in CHierarchyNode.
| pure virtual |
Return the n'th child UID in the hierarchy.
| n | the index of the child to return. |
Implemented in CHierarchyNode.
| pure virtual |
Return all the descendents that support interfaceID.
| *resultList | [OUT] the filled in list of descendents meeting the requirements. |
| interfaceID | [IN] the interfaceID to check each child (and grandchild, etc) for. |
| flags | Generally 0, but may include hidden items (kIncludeHidden) |
Implemented in CHierarchyNode.
| pure virtual |
Return the spread layer's UID for this hierarchy node.
| none |
Implemented in CHierarchyNode.
| pure virtual |
Returns the immediate parent UID of this item. May be kInvalidUID.
| none |
Implemented in CHierarchyNode.
| pure virtual |
Returns the UID of the ultimate parent of the hierarchy.
| none |
Implemented in CHierarchyNode.
| pure virtual |
Return the spread's UID for this hierarchy node.
| none |
Implemented in CHierarchyNode.
| pure virtual |
Answers, "Is this in before 'item' in the Z-order?" NOTE: Both items must be in the same hierarchy and be the same distance from the root.
| item | the item to compare to this item |
Implemented in CHierarchyNode.
| pure virtual |
Move the child to a new location in the z-order.
| *childToMove | the item to move |
| to | the index location to move the item |
Implemented in CHierarchyNode.
| pure virtual |
Return the n'th child in the hierarchy. Called holds reference.
| n | the index of the child to return. |
Implemented in CHierarchyNode.
| pure virtual |
Returns the immediate parent of this item. Caller holds reference. May be nil.
| none |
Implemented in CHierarchyNode.
| pure virtual |
Returns the ultimate parent of the hierarchy. Caller holds reference.
| none |
Implemented in CHierarchyNode.
| pure virtual |
Remove the child. It is disowned, and is no longer a child.
| *childToRemove | the item to remove. |
Implemented in CHierarchyNode.
| pure virtual |
Same as above except it allows us to remove the child even if we can't access the IHierarchy interface.
| childToRemove | the UID of the child to remove. |
Implemented in CHierarchyNode.
| pure virtual |
SetParent is not for external use. It's in the external interface so that subclasses can call it on IHierarchy parameters. (protected doesn't work on parameters). See kRemoveFromHierarchyCmdBoss and kAddToHierarchyCmdBoss and IHierarchyUtils::AddToHierarchy and IHierarchyUtils::RemoveFromHierarchy
| *newParent |
Implemented in CHierarchyNode.
| pure virtual |
SetRootUID is not for external use. It's in the external interface so that subclasses can call it on IHierarchy parameters. (protected doesn't work on parameters)
| newRoot |
Implemented in CHierarchyNode.