InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IBookmarkUtils Class Referenceabstract

#include <IBookmarkUtils.h>

Inheritance diagram for IBookmarkUtils:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IBOOKMARKUTILS }
 

Public Member Functions

virtual int32 GetChildIndexFromParent (IDataBase *db, const UID parent, const UID child)=0
 
virtual int32 GetBookmarkChildCount (UIDRef bookmarkRef)=0
 
virtual UIDRef GetNthBookmarkOfParent (UIDRef bookmarkRef, int32 index)=0
 
virtual void BuildListOfNestedBookmarks (IBookMarkData *bookmark, UIDList *nestedList)=0
 
virtual bool16 IsBookmarkAParentOfUID (IDataBase *db, const UID parent, const UID child)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Utilities relating to bookmarks (kBookmarkBoss).

See Also
kBookmarkBoss
IBookMarkData

Member Function Documentation

virtual void IBookmarkUtils::BuildListOfNestedBookmarks (IBookMarkDatabookmark,
UIDListnestedList 
)
pure virtual

Build a list of ALL bookmarks under a given bookmark. This list is in reverse order (The lowest bookmarks are first in the list) NOTE: this method is recursive

Parameters
*bookmark- The top level bookmark to have in the list
*nestedList- Final list of bookmarks
virtual int32 IBookmarkUtils::GetBookmarkChildCount (UIDRef bookmarkRef)
pure virtual

Given a UIDRef of a bookmark this method will return the number of children under the bookmark.

Parameters
bookmarkRef- The ref which client wants a child count for (This can be a bookmark or te document (which will return the count of root level bookmarks)
Returns
int32 - The number of children
virtual int32 IBookmarkUtils::GetChildIndexFromParent (IDataBasedb,
const UID parent,
const UID child 
)
pure virtual

Given a pointer to an IDataBase and two UIDs of bookmarks in that database this method will return an int32 which is the locaiton of the child UID in the parent.

Parameters
*db- IDataBase of the document that the client is dealing with
parent- UID of the database (if the child is at the root) or the parent of the child
child- UID of the child whose location you are trying to get
Returns
int32 - Location of the child under the parent (-1 if not found)
virtual UIDRef IBookmarkUtils::GetNthBookmarkOfParent (UIDRef bookmarkRef,
int32 index 
)
pure virtual

Given a UIDRef of a bookmark and an index this method will return the Nth child under the bookmark

Parameters
bookmarkRef- The bookmark (or document) to get the Nth child of
index- Which child to return
Returns
UIDRef - The child bookmark (gNull if child couldn't be found)
virtual bool16 IBookmarkUtils::IsBookmarkAParentOfUID (IDataBasedb,
const UID parent,
const UID child 
)
pure virtual

Search up the bookmark tree to determine if given child is already a parent of parent. NOTE: this method is recursive

Parameters
*db- DataBase we are dealing with
parent- The parent bookmark (may also be a document)
child- The child bookmark (This is the one we are making sure is not already a parent of parent
Returns
bool16 - kTrue if the parent is