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

Public Types | |
| enum | { kDefaultIID = IID_ISTYLEGROUPHIERARCHY } |
| enum | { kAtTheEnd = -1 } |
| enum | HierarchyTypeEnum { kHierarchyTypeUnknown = 0, kHierarchyTypeRoot = 1, kHierarchyTypeStyle = 2, kHierarchyTypeStyleGroup = 3 } |
| enum | SortFlag { kSortAscending = 0x00000001, kSortDescending = 0x00000002, kSortImmediateChildren = 0x00000004, kSortHierarchy = 0x00000008, kSortAscendingHierarchy = kSortAscending|kSortHierarchy } |
Public Member Functions | |
| virtual IStyleGroupHierarchy * | QueryChild (int32 n) const =0 |
| virtual UID | GetChildUID (int32 n) const =0 |
| virtual int32 | GetChildIndex (const IStyleGroupHierarchy *p) const =0 |
| virtual int32 | GetChildCount () const =0 |
| virtual IStyleGroupHierarchy * | QueryParent () const =0 |
| virtual UID | GetParentUID () const =0 |
| virtual IStyleGroupHierarchy * | QueryRoot () const =0 |
| virtual UID | GetRootUID () const =0 |
| virtual void | Add (IStyleGroupHierarchy *newChild, int32 pos=kAtTheEnd)=0 |
| virtual void | Move (IStyleGroupHierarchy *childToMove, int32 to)=0 |
| virtual void | Remove (IStyleGroupHierarchy *childToRemove)=0 |
| virtual void | Remove (UID childToRemove)=0 |
| virtual bool16 | IsLessThan (IStyleGroupHierarchy *item) const =0 |
| virtual void | GetDescendents (UIDList *resultList, const PMIID &interfaceID) const =0 |
| virtual void | GetAncestors (UIDList *resultList, const PMIID &interfaceID) const =0 |
| virtual UID | FindByName (const PMString &nodeName) const =0 |
| virtual void | Sort (SortFlag flag=kSortAscendingHierarchy)=0 |
| virtual PMString | GetName (bool16 translated=kFalse) const =0 |
| virtual PMString | GetLocation (bool16 translated=kFalse) const =0 |
| virtual PMString | GetFullPath (bool16 translated=kFalse) const =0 |
| virtual HierarchyTypeEnum | GetHierarchyType () const =0 |
| virtual void | SetParent (IStyleGroupHierarchy *newParent)=0 |
| virtual void | SetRootUID (UID newRoot)=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 IStyleGroupHierarchy interface stores a persistent, UID-based tree structure. This tree structure is used for InDesign's display hierarchy. The boss objects that represent (StyleGroups and Styles) aggregate an IStyleGroupHierarchy interface.
| anonymous enum |
Enum to distinguish different type of hierarchy elements Currently we have Styles , Style sets. In future we may have style links, etc.
| pure virtual |
Add a new child before the index position. Or, if kAtTheEnd, add it to the end of the list.
| newChild | [IN] the item to add to the hierarchy. |
| pos | [IN] kAtTheEnd position to add, defaults to kAtTheEnd. Use 0 for initial position of hierarchy. |
Returns the UID of the node if the node name is found in the immediate children of this Hierarchy. kInvalidUID otherwise.
| nodeName | [IN] node name to find. |
| 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. |
| pure virtual |
Return the number of children
| pure virtual |
Return the index of this child
| p | [IN] the child hierarchy to find the position for. |
| pure virtual |
Return the n'th child UID in the hierarchy.
| n | [IN] the index of the child to return. |
| 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. |
| pure virtual |
Returns the full path including name of this hierarchy object e.g. "StyleGroup1:ChildSet2:StyleName1"
| translated | [IN] if you want the full path returned to have translated components |
| pure virtual |
Returns the HierarchyTypeEnum of this hierarchy.
| pure virtual |
Returns the location of this hierarchy object e.g "StyleGroup1:ChildSet2"
| pure virtual |
Returns the name of this node.
| pure virtual |
Returns the immediate parent UID of this item. May be kInvalidUID.
| pure virtual |
Returns the UID of the ultimate parent of the hierarchy.
| 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 | [IN] the item to compare to this item |
| pure virtual |
Move the child to a new location in the index order, Child must be immediate child of this node.
| childToMove | [IN] the item to move |
| to | [IN] the index location to move the item |
| pure virtual |
Return the n'th child in the hierarchy. Called holds reference.
| n | [IN] the index of the child to return. |
| pure virtual |
Returns the immediate parent of this item. Caller holds reference. May be nil.
| pure virtual |
Returns the ultimate parent of the hierarchy. Caller holds reference.
| pure virtual |
Remove the child. It is disowned, and is no longer a child.
| childToRemove | [IN] the item to remove. |
| pure virtual |
Same as above except it allows us to remove the child even if we can't access the IStyleGroupHierarchy interface.
| childToRemove | [IN] the UID of the child to remove. |
| pure virtual |
PRIVATE USE ONLY, DO NOT USE, SetParent is not for external use. It's in the external interface so that subclasses can call it on IStyleGroupHierarchy parameters. (protected doesn't work on parameters). Use appropriate commands
| *newParent |
| pure virtual |
FOR PRIVATE USE ONLY, DONT CALL THIS, SetRootUID is not for external use. It's in the external interface so that subclasses can call it on IStyleGroupHierarchy parameters. (protected doesn't work on parameters)
| newRoot |
| pure virtual |
Sort the hierarchy based on the flag.
| flag | [IN] see SortFlag for details. |