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

Public Types | |
| enum | { kDefaultIID = IID_IHYPERLINKTABLE } |
| enum | WhichCache { kHyperlinks, kSources, kDestinations, kBookmarks, kXRefFormats, kAll } |
Public Member Functions | |
| virtual void | InvalidateNameCache (IHyperlinkTable::WhichCache whichCache)=0 |
| virtual bool16 | HasExternalDestination () const =0 |
| virtual void | SetHasExternalDestination (bool16 fHasExternDest)=0 |
| virtual void | AddHyperlinkSource (const UID hyperlinkSource)=0 |
| virtual void | RemoveHyperlinkSource (const UID hyperlinkSource)=0 |
| virtual int32 | GetHyperlinkSourceCount () const =0 |
| virtual UID | GetNthHyperlinkSource (int32 hyperlinkIndex) const =0 |
| virtual int32 | GetHyperlinkSourceIndex (const UID hyperlinkSourceUID) const =0 |
| virtual void | GenerateNewHyperlinkSourceName (PMString *pName)=0 |
| virtual void | AddHyperlinkDestination (const UID hyperlinkDestination)=0 |
| virtual void | RemoveHyperlinkDestination (int32 hyperlinkDestinationKey)=0 |
| virtual void | SwapHyperlinkDestinations (int32 destKey1, int32 destKey2)=0 |
| virtual int32 | GetHyperlinkDestinationCount () const =0 |
| virtual bool16 | IsValidHyperlinkDestinationKey (int32 hyperlinkDestinationKey) const =0 |
| virtual UID | GetHyperlinkDestinationWithKey (int32 hyperlinkKey) const =0 |
| virtual void | GenerateNewHyperlinkDestinationName (PMString *pName)=0 |
| virtual UniqueKeyToUIDMap::const_iterator | GetDestinationKeyToUIDMapBeginIter () const =0 |
| virtual UniqueKeyToUIDMap::const_iterator | GetDestinationKeyToUIDMapEndIter () const =0 |
| virtual UniqueKeyToUIDMap::const_reverse_iterator | GetDestinationKeyToUIDMapRBeginIter () const =0 |
| virtual UniqueKeyToUIDMap::const_reverse_iterator | GetDestinationKeyToUIDMapREndIter () const =0 |
| virtual void | AddHyperlink (const UID hyperlink)=0 |
| virtual UID | RemoveHyperlink (const UID hyperlinkUID)=0 |
| virtual void | MoveHyperlink (const UID hyperlink, const UID moveBefore)=0 |
| virtual UID | GetNthHyperlink (int32 hyperlinkIndex) const =0 |
| virtual int32 | GetHyperlinkWithUID (const UID hyperlink) const =0 |
| virtual int32 | GetHyperlinkCount () const =0 |
| virtual void | GenerateNewHyperlinkName (PMString *pName)=0 |
| virtual UID | GetHyperlinkOfSource (UIDRef sourceUIDRef) const =0 |
| virtual void | AddBookmark (const UID bookmark)=0 |
| virtual void | RemoveBookmark (const UID bookmarkUID)=0 |
| virtual void | MoveBookmark (const UID bookmark, int32 newLoc)=0 |
| virtual UID | GetNthBookmark (int32 bookmarkIndex) const =0 |
| virtual int32 | GetBookmarkWithUID (const UID bookmark) const =0 |
| virtual int32 | GetBookmarkCount () const =0 |
| virtual void | GenerateNewHyperlinkBookmarkName (PMString *pName)=0 |
| virtual void | AddXRefFormat (const UID xRefFormat)=0 |
| virtual bool16 | RemoveXRefFormat (const UID xRefFormat)=0 |
| virtual int32 | GetXRefFormatCount () const =0 |
| virtual UID | GetNthXRefFormat (int32 formatIndex) const =0 |
| virtual int32 | GetXRefFormatIndex (const UID xRefFormatUID) const =0 |
| virtual bool16 | HasXRefFormatName (const PMString &name)=0 |
| virtual UID | GetXRefFormatOfName (const PMString &name)=0 |
| virtual void | GenerateNewXRefFormatName (PMString *pName)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Interface on the document (kDocBoss) that manages references to hyperlink sources, destinations and hyperlinks.
An interface off the document, contains four lists:
Note 1 : there is no requirement that the number of sources match the number of destinations, or the number of hyperlinks. i.e. a hyperlink is valid if either the source or destination (or both) is (are) valid.
Note 2 : this table manages references to hyperlink sources, destinations and hyperlinks, but does not create or delete the sources, destinations, or hyperlink UIDs.
| pure virtual |
Add a new bookmark
| bookmark | - UID of bookmark to add |
| pure virtual |
Add a new hyperlink
| hyperlink | - UID of hyperlink to add |
| pure virtual |
Add a new hyperlink destination
| hyperlinkDestination | - Destination to add |
| pure virtual |
Add a new hyperlink source
| hyperlinkSource | - UID to add |
| pure virtual |
Add a new cross reference format
| xRefFormat | - UID of format to add |
| pure virtual |
Generates a unique bookmark name, of the form
"Bookmark_1", "Bookmark_2", ....
| pName | - Default name to try to use |
| pure virtual |
Generates a unique hyperlink destination name, of the form "Anchor_1", "Anchor_1", ....
| pName | - Default name to try to use |
| pure virtual |
Generates a unique hyperlink destination name, of the form
"Hyperlink_1", "Hyperlink_1", ....
| pName | - Default name to use |
| pure virtual |
Generates a unique hyperlink source name, of the form
"Source_1", "Source_1", ....
| pName | - Default name to try to use |
| pure virtual |
Generates a unique cross reference format name, of the form
"cross reference format_1", "cross reference format_2", ....
| pName | - Default name to try to use |
| pure virtual |
Return the number of bookmark defined in this document (This ignored the bookmark hierarchy)
| none |
| pure virtual |
Use for locating a specified bookmark
| bookmark | - UID of the bookmark you want |
| pure virtual |
Returns the begin iterator of destination map
| pure virtual |
Returns the end iterator of destination map
| pure virtual |
Returns the reverse begin iterator of destination map
| pure virtual |
Returns the reverse end iterator of destination map
| pure virtual |
Return the number of hyperlinks defined in this document
| none |
| pure virtual |
Return the number of hyperlink destinations defined in this document
| none |
| pure virtual |
Given a unique key, retrieve the UID of the hyperlink destination
| hyperlinkKey | - Unique key for the destination |
given the source UIDRef, return the UID of the Hyperlink that uses it.
| sourceUIDRef | - Source to find a hyperlink for |
| pure virtual |
Return the number of hyperlink sources defined in this document
| none |
| pure virtual |
return the index of the specified hyperlink source in the table
| hyperlinkSourceUID | - UID to get the index of |
| pure virtual |
Use for locating a specified hyperlink
| hyperlink | - UID of hyperlink we want |
| pure virtual |
Use for indexing through defined bookmark
| bookmarkIndex | - Index of the bookmark you want |
| pure virtual |
Use for indexing through defined hyperlinks
| hyperlinkIndex | - Index of hyperlink we want |
| pure virtual |
Use for indexing through defined hyperlink sources
| hyperlinkIndex | - Index that we want the UID for |
| pure virtual |
Use for indexing through defined cross reference format
| formatIndex | - Index of the format you want |
| pure virtual |
Return the number of cross reference format defined in this document
| pure virtual |
return the index of the specified cross reference format in the table
| xRefFormatUID | - UID to get the index of |
return UID of the format with specified name if the namealready exists.
| name | - x-ref format name to check |
| pure virtual |
Returns kTrue if there is any hyperlink point to external destination.
| pure virtual |
return kTrue if the specified format name already exists.
| name | - x-ref format name to check |
| pure virtual |
Invalidate the name cache for items stored in this table You need to call this anytime the name of a hyperlink/source/destination/bookmark changes so that the code for generating a new name will be right.
| whichCache | - Indicates what type of item you changed. |
| pure virtual |
Check if the index of the specified hyperlink destination is in the table
| hyperlinkDestinationKey |
| pure virtual |
Move a bookmark to a new location
| bookmark | - Bookmark to move |
| newLoc | - New location of the bookmark (-1 will move to the end of the list) |
| pure virtual |
Move a hyperlink around in the table
| hyperlink | - UID of hyperlink to move |
| moveBefore | - UID of hyperlink we are trying to move before (kInvalidUID == move to end) |
| pure virtual |
Remove the Bbookmark 'UID'
| bookmarkUID | - UID of bookmark to remove |
Remove the hyperlink 'UID'
| hyperlinkUID | - UID of hyperlink to remove |
| pure virtual |
Remove a hyperlink destination
| hyperlinkDestinationKey | - Unique key of the destination to remove |
| pure virtual |
remove a hyperlink source. May orphan a hyperlink destination (i.e. can end up with a target with no sources (in this document)
| hyperlinkSource | - Source to remove |
| pure virtual |
Remove the cross reference format 'UID'. Only custom defined format can be removed.
| xRefFormat | - UID of custom defined cross reference format to remove |
| pure virtual |
Sets the flag indicating if there is any hyperlink pointing to external destination. This method is only for conversion purpose and most time you should not set the flag manually.
| pure virtual |
Swap the UIDs of two keys in the destination map
| destKey1 | - Unique key of the first destination |
| destKey2 | - Unique key of the second destination |