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

#include <IHyperlinkFacade.h>

Inheritance diagram for Facade::IHyperlinkFacade:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IHYPERLINKFACADE }
 

Public Member Functions

virtual ErrorCode CreateHyperlink (UIDRef hyperlinkSource, UIDRef hyperlinkDestination, UIDRef *newHyperlink=nil, const PMString &hyperlinkName="", bool16 visible=kTrue, bool16 defaultAppearance=kTrue, bool16 visibleRectangle=kFalse, int32 borderLineWidth=1, UID borderColor=kInvalidUID, IHyperlinkAppearanceData::HyperlinkHilight hilight=IHyperlinkAppearanceData::kNoHyperlinkHilight, IHyperlinkAppearanceData::HyperlinkOutlineLineStyle outlineStyle=IHyperlinkAppearanceData::kHyperlinkSolidOutline, const PMString &altText="")=0
 
virtual ErrorCode DeleteHyperlinks (UIDList hyperlinks)=0
 
virtual ErrorCode RenameHyperlink (UIDRef hyperlink, const PMString &newName)=0
 
virtual ErrorCode ChangeSourceForHyperlink (UIDRef hyperlink, UIDRef newSource)=0
 
virtual ErrorCode ChangeDestinationForHyperlink (UIDRef hyperlink, UIDRef newDestination)=0
 
virtual ErrorCode ChangeHyperlinkToDefaultAppearance (UIDRef hyperlink)=0
 
virtual ErrorCode ChangeHyperlinkAppearance (UIDRef hyperlink, bool16 changeVisible, bool16 visible, bool16 changeWidth, int32 borderLineWidth, bool16 changeBorderColor, UID borderColor, bool16 changeHilight, IHyperlinkAppearanceData::HyperlinkHilight hilight, bool16 changeOutlineStyle, IHyperlinkAppearanceData::HyperlinkOutlineLineStyle outlineStyle)=0
 
virtual ErrorCode ChangeHyperlinkVisibility (UIDRef hyperlink, bool16 visible)=0
 
virtual ErrorCode ChangeHyperlinkBorderWidth (UIDRef hyperlink, int32 borderLineWidth)=0
 
virtual ErrorCode ChangeHyperlinkBorderColor (UIDRef hyperlink, UID borderColor)=0
 
virtual ErrorCode ChangeHyperlinkHilight (UIDRef hyperlink, IHyperlinkAppearanceData::HyperlinkHilight hilight)=0
 
virtual ErrorCode ChangeHyperlinkOutlineStyle (UIDRef hyperlink, IHyperlinkAppearanceData::HyperlinkOutlineLineStyle outlineStyle)=0
 
virtual ErrorCode ChangeHyperlink (UIDRef hyperlink, const HyperlinkChanges &changes)=0
 
virtual ErrorCode UpdateHyperlinkDestinationInfo (UIDList hyperlinks, bool16 openClosedDoc=kTrue)=0
 
virtual ErrorCode DeleteHyperlinkSource (UIDList sources)=0
 
virtual ErrorCode CreateHyperlinkTextSource (UIDRef story, TextIndex startIndex, int32 length, UIDRef *newSource=nil, const PMString &hyperlinkName="", UID charStyle=kInvalidUID, bool16 visible=kTrue)=0
 
virtual ErrorCode CreateXRefTextSource (UIDRef story, TextIndex startIndex, int32 length, UID xrefFormat, UIDRef *newSource=nil, const PMString &hyperlinkName="", bool16 visible=kTrue)=0
 
virtual ErrorCode RenameTextSource (UIDRef source, const PMString &hyperlinkName)=0
 
virtual ErrorCode ChangeTextSourceCharacterStyle (UIDRef source, UID charStyle)=0
 
virtual ErrorCode ConvertXRefToHyperlink (UIDRef source)=0
 
virtual ErrorCode ChangeFormatForXRef (UIDRef source, UID xrefFormat)=0
 
virtual ErrorCode ConvertHyperlinkToXRef (UIDRef source, UID xrefFormat)=0
 
virtual ErrorCode ChangeTextSource (UIDRef source, bool16 changeStory, UIDRef story, bool16 changeRange=kFalse, TextIndex startIndex=-1, int32 length=-1, bool16 changeName=kFalse, const PMString &hyperlinkName="", bool16 changeCharStyle=kFalse, UID charStyle=kInvalidUID, bool16 changeXRefInfo=kFalse, bool16 isXRef=kFalse, UID xrefFormat=kInvalidUID)=0
 
virtual ErrorCode UpdateXRefSource (UIDList xrefs)=0
 
virtual ErrorCode UpdateXRefSrcsForBook (const IDFile &bookFile)=0
 
virtual ErrorCode CreateHyperlinkPageItemSource (UIDRef pageItem, UIDRef *newSource=nil, const PMString &name="", bool16 visible=kTrue)=0
 
virtual ErrorCode RenameHyperlinkPageItemSource (UIDRef source, const PMString &name)=0
 
virtual ErrorCode ChangeHyperlinkPageItemSource (UIDRef source, UIDRef pageItem)=0
 
virtual ErrorCode ChangeHyperlinkPageItemSource (UIDRef source, UIDRef pageItem, const PMString &name)=0
 
virtual ErrorCode DeleteHyperlinkDestination (UIDList destinations)=0
 
virtual ErrorCode CreateHyperlinkTextDestination (UIDRef story, TextIndex position, UIDRef *newDest=nil, const PMString &name="", bool16 visible=kTrue, bool16 useExistingAnchor=kFalse, int32 uniqueKey=0)=0
 
virtual ErrorCode CreateParagraphDestination (UIDRef story, TextIndex position, UIDRef *newDest=nil, bool16 *newDestCreated=nil, const PMString &name="", int32 uniqueKey=0)=0
 
virtual ErrorCode RenameHyperlinkTextDestination (UIDRef destination, const PMString &name)=0
 
virtual ErrorCode ChangeHyperlinkTextDestination (UIDRef destination, bool16 changeStory, UIDRef story, bool16 changePosition, TextIndex position, bool16 changeName=kFalse, const PMString &name="")=0
 
virtual ErrorCode CreateHyperlinkPageDestination (UIDRef page, UIDRef *newDest, const PMString &name, bool16 visible, PMReal zoomFact=1.0, IPDFHyperlinks::DestinationType pdfFitType=IPDFHyperlinks::DestXYZ, PMRect zoomRectangle=kEmptyRect, int32 uniqueKey=0)=0
 
virtual ErrorCode CreateHyperlinkPageDestinationWithAutoName (UIDRef page, UIDRef *newDest, bool16 visible, PMReal zoomFact=1.0, IPDFHyperlinks::DestinationType pdfFitType=IPDFHyperlinks::DestXYZ, PMRect zoomRectangle=kEmptyRect, int32 uniqueKey=0)=0
 
virtual ErrorCode RenameHyperlinkPageDestination (UIDRef destination, const PMString &name)=0
 
virtual ErrorCode RenameHyperlinkPageDestinationWithAutoName (UIDRef destination)=0
 
virtual ErrorCode ChangeZoomForHyperlinkPageDestination (UIDRef destination, bool16 changeZoomFact, PMReal zoomFact, bool16 changeFitType=kFalse, int32 pdfFitType=-1, bool16 changeRect=kFalse, PMRect zoomRectangle=kEmptyRect)=0
 
virtual ErrorCode ChangeHyperlinkPageDestination (UIDRef destination, bool16 changePage, UIDRef page, bool16 changeName=kFalse, const PMString &name="", bool16 changeZoomFact=kFalse, PMReal zoomFact=-1, bool16 changeFitType=kFalse, int32 pdfFitType=-1, bool16 changeRect=kFalse, PMRect zoomRectangle=kEmptyRect)=0
 
virtual ErrorCode ChangeHyperlinkPageDestinationWithAutoName (UIDRef destination, bool16 changePage, UIDRef page, bool16 changeZoomFact=kFalse, PMReal zoomFact=-1, bool16 changeFitType=kFalse, int32 pdfFitType=-1, bool16 changeRect=kFalse, PMRect zoomRectangle=kEmptyRect)=0
 
virtual ErrorCode CreateHyperlinkExternPageDestination (IDataBase *db, const PMString &filePath, int32 pageIndex, UIDRef *newDest=nil, PMReal zoomFact=1.0, IPDFHyperlinks::DestinationType pdfFitType=IPDFHyperlinks::DestXYZ, PMRect zoomRectangle=kEmptyRect, int32 uniqueKey=0)=0
 
virtual ErrorCode ChangePageIndexForHyperlinkExternPageDest (UIDRef destination, int32 pageIndex)=0
 
virtual ErrorCode ChangeZoomForHyperlinkExternPageDest (UIDRef destination, bool16 changeZoomFact, PMReal zoomFact, bool16 changeFitType=kFalse, int32 pdfFitType=-1, bool16 changeRect=kFalse, PMRect zoomRectangle=kEmptyRect)=0
 
virtual ErrorCode ChangeHyperlinkExternPageDestination (UIDRef destination, bool16 changeFile, const PMString &filePath, bool16 changePageIndex, int32 pageIndex, bool16 changeZoomFact=kFalse, PMReal zoomFact=-1, bool16 changeFitType=kFalse, int32 pdfFitType=-1, bool16 changeRect=kFalse, PMRect zoomRectangle=kEmptyRect)=0
 
virtual ErrorCode CreateHyperlinkURLDestination (IDataBase *db, const PMString &urlString, UIDRef *newDest=nil, const PMString &name="", bool16 visible=kTrue, int32 uniqueKey=0)=0
 
virtual ErrorCode ChangeHyperlinkURLDestinationName (UIDRef destination, const PMString &name)=0
 
virtual ErrorCode ChangeHyperlinkURLDestinationURL (UIDRef destination, const PMString &urlString)=0
 
virtual ErrorCode ChangeHyperlinkURLDestination (UIDRef destination, const PMString &urlString, const PMString &name)=0
 
virtual ErrorCode CreateXRefFormat (IDataBase *db, UIDRef *newFormat=nil, const K2Vector< XRefBuildingBlock > *buildingBlocks=nil, const PMString &name="", UID charStyle=kInvalidUID)=0
 
virtual ErrorCode DeleteXRefFormat (UIDList formats)=0
 
virtual ErrorCode ChangeXRefFormatName (UIDRef format, const PMString &name)=0
 
virtual ErrorCode ChangeXRefFormatCharacterStyle (UIDRef format, UID charStyle)=0
 
virtual ErrorCode ChangeXRefFormatBuildingBlocks (UIDRef format, const K2Vector< XRefBuildingBlock > *buildingBlocks)=0
 
virtual ErrorCode ChangeXRefFormat (UIDRef format, const PMString &name, const K2Vector< XRefBuildingBlock > *buildingBlocks, UID charStyle)=0
 
virtual ErrorCode LoadXRefFormats (IDataBase *db, const IDFile &sourceFile)=0
 
virtual ErrorCode LoadXRefFormatsFromCloudID (IDataBase *db, const std::string &assetRef)=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

A high level API for dealing with hyprelink objects. To use this Facade, include this header file and use the following example syntax: result = Utils<Facade::IHyperlinkFacade>()->CreateHyperlink( ... );

Following are different hyperlink related objects:

Hyperlink destination - Target of a hyperlink. It is where a hyperlink points to. Hyperlink destination can be a page destination, text destination, URL destination or external page destination. Hyperlink text desintation - Text target of a hyperlink. It can be a user created text anchor position or a targeted paragraph. Hyperlink page destination - Page target of a hyperlink. It is a local page targeted by a hyperlink. Hyperlink URL destination - URL target of a hyperlink. It is a URL destination created by user. Hyperlink exteranl page destination - External page targeted by a hyperlink. It is a special proxy destination in the database to track the external page targeted by a local hyperlink.

Hyperlink source - Source of a hyperlink. It is where the hyperlink hot spot lives. Hyperlink source can be either a text hyperlink source or a page item hyperlink source. A text hyperlink source may be a static hyperlink source, which is a regular hyperlink whose content is static text, or a cross reference source, whose content is dynamically calculated from the destination. Hyperlink text source - Text source of a hyperlink. If the text source is a cross reference, the source content is calculated using the cross reference format referenced by the source object. Hyperlink page item source - Page item source of a hyperlink.

Hyperlink - Hyperlink object links corresponding hyperlink source and destination object. The corresponding hyperlink source object needs to be created prior to the creation of a hyperlink object. But the corresponding destination object may be created prior or after the creation of the hyperlink object.

Cross reference format - Application pre-defined or customer created formats in the document. It is referenced in cross reference source object for content calculation.

Bookmark - User created bookmarks in the document which target a text or page destination.

Author
Jianlan Song

Member Function Documentation

virtual ErrorCode Facade::IHyperlinkFacade::ChangeDestinationForHyperlink (UIDRef hyperlink,
UIDRef newDestination 
)
pure virtual

Change the destination for a hyperlink.

Parameters
hyperlink- Hyperlink to be changed.
newDestination- new destination for the hyperlink.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeFormatForXRef (UIDRef source,
UID xrefFormat 
)
pure virtual

Changes format used in the cross reference source.

Parameters
source- cross reference source to be changed.
xrefFormat- UID of the format for new cross reference source.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlink (UIDRef hyperlink,
const HyperlinkChangeschanges 
)
pure virtual

Change the hyperlink.

Parameters
hyperlink- Hyperlink to be changed.
changes- Contains changes to be made to the hyperlink. HyperlinkChanges.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlinkAppearance (UIDRef hyperlink,
bool16 changeVisible,
bool16 visible,
bool16 changeWidth,
int32 borderLineWidth,
bool16 changeBorderColor,
UID borderColor,
bool16 changeHilight,
IHyperlinkAppearanceData::HyperlinkHilight hilight,
bool16 changeOutlineStyle,
IHyperlinkAppearanceData::HyperlinkOutlineLineStyle outlineStyle 
)
pure virtual

Change the hyperlink appearance.

Parameters
hyperlink- Hyperlink to be changed.
changeVisible- kTrue to change visibility of the hyperlink. kFalse otherwise.
visible- kTrue if the new hyprelink is visible in UI. kFalse otherwise.
changeWidth- kTrue to change border line width of the hyperlink. kFalse otherwise.
borderLineWidth- hyperlink border line width.
changeBorderColor- kTrue to change border color of the hyperlink. kFalse otherwise.
borderColor- border line color UID.
changeHilight- kTrue to change hilight of the hyperlink. kFalse otherwise.
hilight- hyperlink hilight setting. IHyperlinkAppearanceData::HyperlinkHilight.
changeOutlineStyle- kTrue to change outline style of the hyperlink. kFalse otherwise.
outlineStyle- hyperlink outline style. IHyperlinkAppearanceData::HyperlinkOutlineLineStyle.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlinkBorderColor (UIDRef hyperlink,
UID borderColor 
)
pure virtual

Change the hyperlink border line color.

Parameters
hyperlink- Hyperlink to be changed.
borderColor- border line color UID.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlinkBorderWidth (UIDRef hyperlink,
int32 borderLineWidth 
)
pure virtual

Change the hyperlink border line width.

Parameters
hyperlink- Hyperlink to be changed.
borderLineWidth- hyperlink border line width.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlinkExternPageDestination (UIDRef destination,
bool16 changeFile,
const PMStringfilePath,
bool16 changePageIndex,
int32 pageIndex,
bool16 changeZoomFact = kFalse,
PMReal zoomFact = -1,
bool16 changeFitType = kFalse,
int32 pdfFitType = -1,
bool16 changeRect = kFalse,
PMRect zoomRectangle = kEmptyRect 
)
pure virtual

Changes a hyperlink external page destination.

Parameters
destination- Hyperlink external page destination to be changed.
changeFile- kTrue to change the file path of the destination. kFalse otherwise.
filePath- New file name of the document for the destination.
changePageIndex- kTrue to change the page index of the destination. kFalse othersie.
pageIndex- New page index of the external page. If changePageIndex is kFalse, pageIndex is ignored.
changeZoomFact- kTrue to change zoom factor. kFalse otherwise. Default is kFalse.
zoomFact- Zoom factor for exporting to PDF.
changeFitType- kTrue to change fit type. kFalse otherwise. Default is kFalse.
pdfFitType- Fit type for exporting to PDF. Default to -1. If changeFitType is kTrue, the value will be one of the type in IPDFHyperlinks::DestinationType.
changeRect- kTrue to change zoom rectangle. kFalse otherwise. Default is kFalse.
zoomRectangle- Zoom rectangle for exporting to PDF. Default to a empty rectangle.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlinkHilight (UIDRef hyperlink,
IHyperlinkAppearanceData::HyperlinkHilight hilight 
)
pure virtual

Change the hyperlink hilight.

Parameters
hyperlink- Hyperlink to be changed.
hilight- hyperlink hilight setting.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlinkOutlineStyle (UIDRef hyperlink,
IHyperlinkAppearanceData::HyperlinkOutlineLineStyle outlineStyle 
)
pure virtual

Change the hyperlink outline style.

Parameters
hyperlink- Hyperlink to be changed.
outlineStyle- hyperlink outline style.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlinkPageDestination (UIDRef destination,
bool16 changePage,
UIDRef page,
bool16 changeName = kFalse,
const PMStringname = "",
bool16 changeZoomFact = kFalse,
PMReal zoomFact = -1,
bool16 changeFitType = kFalse,
int32 pdfFitType = -1,
bool16 changeRect = kFalse,
PMRect zoomRectangle = kEmptyRect 
)
pure virtual

Changes a hyperlink page destination.

Parameters
destination- page destination to be changed.
changePage- kTrue to change the page associated with the destination.
page- New page to create destination for.
changeName- kTrue to change the name of the destination.
name- name of the destination. Default to be empty string.
changeZoomFact- kTrue to change zoom factor. kFalse otherwise. Default is kFalse.
zoomFact- Zoom factor for exporting to PDF.
changeFitType- kTrue to change fit type. kFalse otherwise. Default is kFalse.
pdfFitType- Fit type for exporting to PDF. Default to -1. If changeFitType is kTrue, the value will be one of the type in IPDFHyperlinks::DestinationType.
changeRect- kTrue to change zoom rectangle. kFalse otherwise. Default is kFalse.
zoomRectangle- Zoom rectangle for exporting to PDF.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlinkPageDestinationWithAutoName (UIDRef destination,
bool16 changePage,
UIDRef page,
bool16 changeZoomFact = kFalse,
PMReal zoomFact = -1,
bool16 changeFitType = kFalse,
int32 pdfFitType = -1,
bool16 changeRect = kFalse,
PMRect zoomRectangle = kEmptyRect 
)
pure virtual

Changes a hyperlink page destination and auto generate the name based on page number.

Parameters
destination- page destination to be changed.
changePage- kTrue to change the page associated with the destination.
page- New page to create destination for.
changeZoomFact- kTrue to change zoom factor. kFalse otherwise. Default is kFalse.
zoomFact- Zoom factor for exporting to PDF.
changeFitType- kTrue to change fit type. kFalse otherwise. Default is kFalse.
pdfFitType- Fit type for exporting to PDF. Default to -1. If changeFitType is kTrue, the value will be one of the type in IPDFHyperlinks::DestinationType.
changeRect- kTrue to change zoom rectangle. kFalse otherwise. Default is kFalse.
zoomRectangle- Zoom rectangle for exporting to PDF.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlinkPageItemSource (UIDRef source,
UIDRef pageItem 
)
pure virtual

Changes the page item associated with the hyperlink page item source.

Parameters
source- page item sources to be changed.
pageItem- new page item associated with the source.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlinkPageItemSource (UIDRef source,
UIDRef pageItem,
const PMStringname 
)
pure virtual

Changes hyperlink page item source.

Parameters
source- page item sources to be changed.
pageItem- new page item associated with the source.
name- new name for the page item source.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlinkTextDestination (UIDRef destination,
bool16 changeStory,
UIDRef story,
bool16 changePosition,
TextIndex position,
bool16 changeName = kFalse,
const PMStringname = "" 
)
pure virtual

Changes a hyperlink text destination or paragraph destination. For paragraph destination, you may not change the story or anchor position to different paragraph, or error will be returned.

Parameters
destination- Destination to be changed.
changeStory- kTrue to change the story of the destination. kFalse otherwise.
story- New story to insert destination in.
changePosition- kTrue to change the text index of the destination. kFalse otherwise.
position- Insertion point of the text destination marker.
changeName- kTrue to change the name of the destination. kFalse otherwise. Default is kFalse.
name- name of the destination.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlinkToDefaultAppearance (UIDRef hyperlink)
pure virtual

Change the hyperlink appearance to default apperance.

Parameters
hyperlink- Hyperlink to be changed.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlinkURLDestination (UIDRef destination,
const PMStringurlString,
const PMStringname 
)
pure virtual

Changes a hyperlink URL destination.

Parameters
destination- Hyperlink URL destination to be changed.
urlString- New URL string for the destination.
name- name of the destination.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlinkURLDestinationName (UIDRef destination,
const PMStringname 
)
pure virtual

Changes the name of a hyperlink URL destination.

Parameters
destination- Hyperlink URL destination to be changed.
name- name of the destination.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlinkURLDestinationURL (UIDRef destination,
const PMStringurlString 
)
pure virtual

Changes the URL of a hyperlink URL destination.

Parameters
destination- Hyperlink URL destination to be changed.
urlString- New URL string for the destination.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeHyperlinkVisibility (UIDRef hyperlink,
bool16 visible 
)
pure virtual

Change the hyperlink visibility.

Parameters
hyperlink- Hyperlink to be changed.
visible- kTrue if the new hyprelink is visible in UI. kFalse otherwise.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangePageIndexForHyperlinkExternPageDest (UIDRef destination,
int32 pageIndex 
)
pure virtual

Changes page index of a hyperlink external page destination.

Parameters
destination- page destination to be changed.
pageIndex- New page index of the external page.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeSourceForHyperlink (UIDRef hyperlink,
UIDRef newSource 
)
pure virtual

Change the source for a hyperlink.

Parameters
hyperlink- Hyperlink to be changed.
newSource- new source for the hyperlink.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeTextSource (UIDRef source,
bool16 changeStory,
UIDRef story,
bool16 changeRange = kFalse,
TextIndex startIndex = -1,
int32 length = -1,
bool16 changeName = kFalse,
const PMStringhyperlinkName = "",
bool16 changeCharStyle = kFalse,
UID charStyle = kInvalidUID,
bool16 changeXRefInfo = kFalse,
bool16 isXRef = kFalse,
UID xrefFormat = kInvalidUID 
)
pure virtual

Changes a hyperlink or cross reference text source.

Parameters
source- Text source to be changed.
changeStory- kTrue to change story of the text source. kFalse otherwise. Default is kFalse.
story- story UIDRef to create the new source in.
changeRange- kTrue to change start index or length of the text source range. kFalse otherwise. Default is kFalse.
startIndex- Text index of the start of the new source.
length- length of the selection to create the text source. Default is 0 which is an insertion point.
changeName- kTrue to change the name of the text source. kFalse otherwise. Default is kFalse.
hyperlinkName- Name of the source. Default is empty string in which case a unique name will be generated.
changeCharStyle- kTrue to change the character style applied on the text source. kFalse otherwise. Default is kFalse.
charStyle- UID of character style. Default is kInvalidUID in which case no character style applied.
changeXRefInfo- kTrue to change isXRef flag or cross reference format of the text source. kFalse otherwise. Default is kFalse.
isXRef- kTrue if the source to change the text source to a cross reference source. kFalse to a hyperlink text source. Default is kFalse.
xrefFormat- UID of the format for cross reference source. If isXRef is kFalse, xrefFormat is ignored.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeTextSourceCharacterStyle (UIDRef source,
UID charStyle 
)
pure virtual

Changes character style of the hyperlink text source.

Parameters
source- Hyperlink text source to be changed.
charStyle- character style to be applied.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeXRefFormat (UIDRef format,
const PMStringname,
const K2Vector< XRefBuildingBlock > * buildingBlocks,
UID charStyle 
)
pure virtual

Changes a cross reference format.

Parameters
format- cross reference format to be changed.
name- new name for the format. name should be a non empty string.
buildingBlocks- new building blocks for the format. This should be a non-nil pointer.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeXRefFormatBuildingBlocks (UIDRef format,
const K2Vector< XRefBuildingBlock > * buildingBlocks 
)
pure virtual

Changes building blocks of a cross reference format.

Parameters
format- cross reference format to be changed.
buildingBlocks- new building blocks for the format. This should be a non-nil pointer.
charStyle- new character style for the format.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeXRefFormatCharacterStyle (UIDRef format,
UID charStyle 
)
pure virtual

Changes character style of a cross reference format.

Parameters
format- cross reference format to be changed.
charStyle- new character style for the format.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeXRefFormatName (UIDRef format,
const PMStringname 
)
pure virtual

Changes name of a cross reference format.

Parameters
format- cross reference format to be changed.
name- new name for the format. name should be a non empty string.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeZoomForHyperlinkExternPageDest (UIDRef destination,
bool16 changeZoomFact,
PMReal zoomFact,
bool16 changeFitType = kFalse,
int32 pdfFitType = -1,
bool16 changeRect = kFalse,
PMRect zoomRectangle = kEmptyRect 
)
pure virtual

Changes zoom settings for a hyperlink external page destination.

Parameters
destination- Hyperlink external page destination to be changed.
changeZoomFact- kTrue to change zoom factor. kFalse otherwise.
zoomFact- Zoom factor for exporting to PDF.
changeFitType- kTrue to change fit type. kFalse otherwise. Default is kFalse.
pdfFitType- Fit type for exporting to PDF. Default to -1. If changeFitType is kTrue, the value will be one of the type in IPDFHyperlinks::DestinationType.
changeRect- kTrue to change zoom rectangle. kFalse otherwise. Default is kFalse.
zoomRectangle- Zoom rectangle for exporting to PDF. Default to a empty rectangle.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ChangeZoomForHyperlinkPageDestination (UIDRef destination,
bool16 changeZoomFact,
PMReal zoomFact,
bool16 changeFitType = kFalse,
int32 pdfFitType = -1,
bool16 changeRect = kFalse,
PMRect zoomRectangle = kEmptyRect 
)
pure virtual

Changes zoom settings for a hyperlink page destination.

Parameters
destination- page destination to be changed.
changeZoomFact- kTrue to change zoom factor. kFalse otherwise.
zoomFact- Zoom factor for exporting to PDF.
changeFitType- kTrue to change fit type. kFalse otherwise. Default is kFalse.
pdfFitType- Fit type for exporting to PDF. Otherwise the value will be one of the type in IPDFHyperlinks::DestinationType.
changeRect- kTrue to change zoom rectangle. kFalse otherwise. Default is kFalse.
zoomRectangle- Zoom rectangle for exporting to PDF.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ConvertHyperlinkToXRef (UIDRef source,
UID xrefFormat 
)
pure virtual

Converts a hyperlink text source to a cross reference source.

Parameters
source- Hyperlink text source to be converted.
xrefFormat- UID of the format for new cross reference source.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::ConvertXRefToHyperlink (UIDRef source)
pure virtual

Converts the cross reference source to a hyperlink.

Parameters
source- cross reference source to be converted.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::CreateHyperlink (UIDRef hyperlinkSource,
UIDRef hyperlinkDestination,
UIDRefnewHyperlink = nil,
const PMStringhyperlinkName = "",
bool16 visible = kTrue,
bool16 defaultAppearance = kTrue,
bool16 visibleRectangle = kFalse,
int32 borderLineWidth = 1,
UID borderColor = kInvalidUID,
IHyperlinkAppearanceData::HyperlinkHilight hilight = IHyperlinkAppearanceData::kNoHyperlinkHilight,
IHyperlinkAppearanceData::HyperlinkOutlineLineStyle outlineStyle = IHyperlinkAppearanceData::kHyperlinkSolidOutline,
const PMStringaltText = "" 
)
pure virtual

Creates a new hyperlink object.

Parameters
hyperlinkSource- Hyperlink source object associated with the new hyperlink.
hyperlinkDestination- Hyperlink destination object associated with the new hyperlink.
newHyperlink- [OUT] Returns newly created hyperlink if pointer is non-nil.
hyperlinkName- name of the hyperlink. Default to be empty string in which case a unique name will be generated.
visible- kTrue if the new hyprelink is visible in UI. kFalse otherwise. Default is kTrue.
defaultAppearance- kTrue to use default appearance for the hyperlink. kFalse otherwise. Default is kTrue. In case of kTrue, we ignore the following appearance parameters.
visibleRectangle- kTrue if the new hyprelink has visible rectangle border. kFalse otherwise. Default is kFalse.
borderLineWidth- hyperlink border line width. Default is 1.
borderColor- border line color UID. Default to kInvalidUID to use default color.
hilight- hyperlink hilight setting. Default is no hilight.
outlineStyle- hyperlink outline style. Default is solid outline.
altText- hyperlink alt text. Default is empty.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::CreateHyperlinkExternPageDestination (IDataBasedb,
const PMStringfilePath,
int32 pageIndex,
UIDRefnewDest = nil,
PMReal zoomFact = 1.0,
IPDFHyperlinks::DestinationType pdfFitType = IPDFHyperlinks::DestXYZ,
PMRect zoomRectangle = kEmptyRect,
int32 uniqueKey = 0 
)
pure virtual

Creates a new hyperlink external page destination. To delete the hyperlink external page destination, use IHyperlinkFacade::DeleteHyperlinkDestination method.

Parameters
db- database of the document where the new destination will be added.
filePath- full file name of the document for the external page.
pageIndex- Page index of the external page.
newDest- [OUT] Returns newly created hyperlink external page destination if pointer is non-nil.
zoomFact- Zoom factor for exporting to PDF. Default to 1.0.
pdfFitType- Fit type for exporting to PDF. Default to type DestXYZ which destination specified as upper-left corner point and a zoom factor.
zoomRectangle- Zoom rectangle for exporting to PDF. Default to a empty rectangle which has no area.
uniqueKey- unique key to assign to the destination. Default is 0 in which case a unique key will be generated.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::CreateHyperlinkPageDestination (UIDRef page,
UIDRefnewDest,
const PMStringname,
bool16 visible,
PMReal zoomFact = 1.0,
IPDFHyperlinks::DestinationType pdfFitType = IPDFHyperlinks::DestXYZ,
PMRect zoomRectangle = kEmptyRect,
int32 uniqueKey = 0 
)
pure virtual

Creates a new hyperlink page destination. To delete the hyperlink page destination, use IHyperlinkFacade::DeleteHyperlinkDestination method.

Parameters
page- Page to create destination for.
newDest- [OUT] Returns newly created hyperlink text destination if pointer is non-nil.
name- name of the destination.
visible- kTrue if the new destination is visible in UI. kFalse otherwise. Default is kTrue.
zoomFact- Zoom factor for exporting to PDF. Default to 1.0.
pdfFitType- Fit type for exporting to PDF. Default to type DestXYZ which destination specified as upper-left corner point and a zoom factor.
zoomRectangle- Zoom rectangle for exporting to PDF. Default to a empty rectangle which has no area.
uniqueKey- unique key to assign to the destination. Default is 0 in which case a unique key will be generated.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::CreateHyperlinkPageDestinationWithAutoName (UIDRef page,
UIDRefnewDest,
bool16 visible,
PMReal zoomFact = 1.0,
IPDFHyperlinks::DestinationType pdfFitType = IPDFHyperlinks::DestXYZ,
PMRect zoomRectangle = kEmptyRect,
int32 uniqueKey = 0 
)
pure virtual

Creates a new hyperlink page destination with auto-generated name based on page number. To delete the hyperlink page destination, use IHyperlinkFacade::DeleteHyperlinkDestination method.

Parameters
page- Page to create destination for.
newDest- [OUT] Returns newly created hyperlink text destination if pointer is non-nil.
visible- kTrue if the new destination is visible in UI. kFalse otherwise. Default is kTrue.
zoomFact- Zoom factor for exporting to PDF. Default to 1.0.
pdfFitType- Fit type for exporting to PDF. Default to type DestXYZ which destination specified as upper-left corner point and a zoom factor.
zoomRectangle- Zoom rectangle for exporting to PDF. Default to a empty rectangle which has no area.
uniqueKey- unique key to assign to the destination. Default is 0 in which case a unique key will be generated.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::CreateHyperlinkPageItemSource (UIDRef pageItem,
UIDRefnewSource = nil,
const PMStringname = "",
bool16 visible = kTrue 
)
pure virtual

Creates a new hyperlink page item source. To delete the hyperlink page item source, use IHyperlinkFacade::DeleteHyperlinkSource method.

Parameters
pageItem- page item to create source from.
newSource- [OUT] Returns newly created hyperlink page item source if pointer is non-nil.
name- Name of the new source. Default is empty string in which case a unique name will be generated.
visible- kTrue if the new hyprelink is visible in UI. kFalse otherwise. Default is kTrue.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::CreateHyperlinkTextDestination (UIDRef story,
TextIndex position,
UIDRefnewDest = nil,
const PMStringname = "",
bool16 visible = kTrue,
bool16 useExistingAnchor = kFalse,
int32 uniqueKey = 0 
)
pure virtual

Creates a new hyperlink text destination. To delete the hyperlink text destination, use IHyperlinkFacade::DeleteHyperlinkDestination method.

Parameters
story- Story to create destination in.
position- Insertion point of the text destination marker.
newDest- [OUT] Returns newly created hyperlink text destination if pointer is non-nil.
name- name of the destination. Default to be empty string which will generate a unique name.
visible- kTrue if the new destination is visible in UI. kFalse otherwise. Default is kTrue.
useExistingAnchor- kTrue to use existing text anchor if one already exists at the insertion point. kFalse to always insert a new one. Default to kFalse.
isParagraph- kTrue if the new destination is a paragraph destination. kFlase otherwise. Default is kFalse.
uniqueKey- unique key to assign to the destination. Default is 0 in which case a unique key will be generated.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::CreateHyperlinkTextSource (UIDRef story,
TextIndex startIndex,
int32 length,
UIDRefnewSource = nil,
const PMStringhyperlinkName = "",
UID charStyle = kInvalidUID,
bool16 visible = kTrue 
)
pure virtual

Creates a new hyperlink text source. To delete the hyperlink text source, use IHyperlinkFacade::DeleteHyperlinkSource method.

Parameters
story- story UIDRef to create the new source in.
startIndex- Text index of the start of the new source.
length- length of the selection to create the text source. if 0 then this is an insertion point.
newSource- [OUT] Returns newly created hyperlink text source if pointer is non-nil.
hyperlinkName- Name of the new source. Default is empty string in which case a unique name will be generated.
charStyle- Character style to be applied to the text source. Default is kInvalidUID in which case no character style applied.
visible- kTrue if the new hyprelink is visible in UI. kFalse otherwise. Default is kTrue.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::CreateHyperlinkURLDestination (IDataBasedb,
const PMStringurlString,
UIDRefnewDest = nil,
const PMStringname = "",
bool16 visible = kTrue,
int32 uniqueKey = 0 
)
pure virtual

Creates a new hyperlink URL destination. To delete the hyperlink URL destination, use IHyperlinkFacade::DeleteHyperlinkDestination method.

Parameters
db- database of the document where the new destination will be added.
urlString- URL string for the destination.
newDest- [OUT] Returns newly created hyperlink URL destination if pointer is non-nil.
name- name of the destination. Default is empty string in which case a unique name will be generated.
visible- kTrue if the new destination is visible in UI. kFalse otherwise. Default is kTrue.
uniqueKey- unique key to assign to the destination. Default is 0 in which case a unique key will be generated.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::CreateParagraphDestination (UIDRef story,
TextIndex position,
UIDRefnewDest = nil,
bool16 * newDestCreated = nil,
const PMStringname = "",
int32 uniqueKey = 0 
)
pure virtual

Creates a new paragraph destination for the paragraph containing the specified text index. If there is already a paragraph destination for the paragraph, the exsiting paragraph will be returned.

To delete the paragraph destination, use IHyperlinkFacade::DeleteHyperlinkDestination method.

Parameters
story- Story to create destination in.
position- Text index inside the paragraph to create destination for.
newDest- [OUT] If not nil, returns newly created paragraph destination when there is not one exists already. If a paragraph destination exists already, return the existing one.
newDestCreated-[OUT] if not nil returns kTrue if a new paragraph destination is created, kFalse if an existing one is returned.
name- name of the destination. Default to be empty string which will generate a unique name.
uniqueKey- unique key to assign to the destination. Default is 0 in which case a unique key will be generated.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::CreateXRefFormat (IDataBasedb,
UIDRefnewFormat = nil,
const K2Vector< XRefBuildingBlock > * buildingBlocks = nil,
const PMStringname = "",
UID charStyle = kInvalidUID 
)
pure virtual

Creates a new cross reference format.

Parameters
db- database of the document where the new format will be added.
newFormat- [OUT] Returns newly created cross reference format if pointer is non-nil.
buildingBlocks- List of building blocks for the format.
name- name of the format. Default to empty string in which case a unique name will be generated.
charStyle- character style of the format.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::CreateXRefTextSource (UIDRef story,
TextIndex startIndex,
int32 length,
UID xrefFormat,
UIDRefnewSource = nil,
const PMStringhyperlinkName = "",
bool16 visible = kTrue 
)
pure virtual

Creates a new cross reference text source. To delete the cross reference text source, use IHyperlinkFacade::DeleteHyperlinkSource method.

Parameters
story- story UIDRef to create the new source in.
startIndex- Text index of the start of the new source.
length- length of the selection to create the text source. if 0 then this is an insertion point.
newSource- [OUT] Returns newly created cross reference text source if pointer is non-nil.
xrefFormat- UID of the format for cross reference source.
hyperlinkName- Name of the new source. Default is empty string in which case a unique name will be generated.
visible- kTrue if the new cross reference is visible in UI. kFalse otherwise. Default is kTrue.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::DeleteHyperlinkDestination (UIDList destinations)
pure virtual

Deletes hyperlink destinations. This method is used to delete all types of destinations.

Parameters
destinations- Destinations to be deleted.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::DeleteHyperlinks (UIDList hyperlinks)
pure virtual

Deletes hyperlinks. This method deletes the specified hyperlink object and disassociate the hyperlink with corresponding hyperlink source. However the hyperlink source object still exists. If you want to delete hyperlink source object, you need to call IHyperlinkFacade::DeleteHyperlinkSource. For associated destination of the deleted hyperlink, if it is a hidden destination, we delete the destination as well because there can only be one hyperlink referencing a hidden destination. If the destination is a visible(sharable) destination, it will not be deleted after the operation.

Parameters
hyperlinks- hyperlinks to be deleted.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::DeleteHyperlinkSource (UIDList sources)
pure virtual

Deletes hyperlink sources. This method is used to delete all types of hyperlink sources.

Parameters
sources- hyperlink sources to be deleted.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::DeleteXRefFormat (UIDList formats)
pure virtual

Deletes cross reference formats.

Parameters
formats- cross reference formats to be deleted.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::LoadXRefFormats (IDataBasedb,
const IDFilesourceFile 
)
pure virtual

Loads cross reference formats from another file

Parameters
db- Target database to load formats to.
sourceFile- Source file to load formats from.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::LoadXRefFormatsFromCloudID (IDataBasedb,
const std::string & assetRef 
)
pure virtual

Loads cross reference formats from a cloud file

Parameters
db- Target database to load formats to.
assetRef- asset reference of the cloud doc.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::RenameHyperlink (UIDRef hyperlink,
const PMStringnewName 
)
pure virtual

Rename a hyperlink.

Parameters
hyperlink- Hyperlink to be renamed.
newName- new name for the hyperlink.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::RenameHyperlinkPageDestination (UIDRef destination,
const PMStringname 
)
pure virtual

Renames a hyperlink page destination to a user specified name.

Parameters
destination- page destination to be renamed.
name- name of the destination.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::RenameHyperlinkPageDestinationWithAutoName (UIDRef destination)
pure virtual

Renames a hyperlink page destination to an auto generated name based on page number.

Parameters
destination- page destination to be renamed.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::RenameHyperlinkPageItemSource (UIDRef source,
const PMStringname 
)
pure virtual

Renames hyperlink page item source.

Parameters
source- page item sources to be changed.
name- new name for the page item source.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::RenameHyperlinkTextDestination (UIDRef destination,
const PMStringname 
)
pure virtual

Renames a hyperlink text destination or a paragraph destination.

Parameters
destination- Hyperlink text destination or paragraph destination to be changed.
name- name of the destination.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::RenameTextSource (UIDRef source,
const PMStringhyperlinkName 
)
pure virtual

Renames hyperlink or cross reference text source.

Parameters
source- Hyperlink text source to be changed.
hyperlinkName- Name of the source.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::UpdateHyperlinkDestinationInfo (UIDList hyperlinks,
bool16 openClosedDoc = kTrue 
)
pure virtual

Updates hyperlink destination information. This method is used to update all types of destinations.

Parameters
hyperlinks- Hyperlinks to be updated. If the list is empty, all the hyperlinks in the document will be updated.
openClosedDoc- kTrue to open closed documents to get destination info. kFlase otherwise.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::UpdateXRefSource (UIDList xrefs)
pure virtual

Updates cross reference source text.

Parameters
xrefs- cross references to be updated.
Returns
ErrorCode - result of the operation.
virtual ErrorCode Facade::IHyperlinkFacade::UpdateXRefSrcsForBook (const IDFilebookFile)
pure virtual

Updates cross reference sources in a book.

Parameters
bookFile- file path to the book file.
Returns
ErrorCode - result of the operation.