![]() | InDesign SDK 20.5 |
#include <XRefBuildingBlock.h>
Public Types | |
| enum | XRefBuildingBlockType { kInvalidXRefBBType = -1, kXRefBBCustomString = 0, kXRefBBFileName, kXRefBBChapterNumber, kXRefBBPageNumber, kXRefBBFullParagraph, kXRefBBParagraphNumber, kXRefBBParagraphText, kXRefBBBookmarkName, kMaxXRefBBType } |
| typedef object_type | data_type |
Public Member Functions | |
| XRefBuildingBlock (XRefBuildingBlockType type) | |
| XRefBuildingBlock (XRefBuildingBlockType type, UID charStyle) | |
| XRefBuildingBlock (const XRefBuildingBlock &block) | |
| XRefBuildingBlock & | operator= (const XRefBuildingBlock ©) |
| bool16 | operator== (const XRefBuildingBlock &other) const |
| bool16 | operator!= (const XRefBuildingBlock &other) const |
| XRefBuildingBlockType | GetType () const |
| void | SetType (XRefBuildingBlockType type) |
| UID | GetCharacterStyle () const |
| void | SetCharacterStyle (UID charStyle) |
| void | SetCustomText (const PMString &customText) |
| PMString | GetCustomText () const |
| void | SetDelimiter (const UTF32TextChar &delim, bool16 includeDelim) |
| void | SetDelimiter (const UTF32TextChar &delim) |
| void | SetIncludeDelim (bool16 includeDelim) |
| UTF32TextChar | GetDelimiter () const |
| bool16 | IncludeDelimiter () const |
| PMString | GenerateElementString () const |
| PMString | GenerateSourceString (const ITextModel *textModel, TextIndex destIndex, bool16 externDest, std::map< TextIndex, WideString > *variableLocations, std::map< TextIndex, TextIndex > *inlineLocations) const |
| void | ReadWrite (IPMStream *s) |
Static Public Member Functions | |
| static bool | NeedToStripForParaNum (const UTF32TextChar &c) |
This class represents the building block object for cross reference format. Cross reference formats contain one or more building block object(s) which are used to construct the source content of the cross reference source referencing the format.
Building block type enum
| PMString XRefBuildingBlock::GenerateElementString | ( | ) | const |
Generates the string to be inserted into format string for editing in UI.
| PMString XRefBuildingBlock::GenerateSourceString | ( | const ITextModel * | textModel, |
| TextIndex | destIndex, | ||
| bool16 | externDest, | ||
| std::map< TextIndex, WideString > * | variableLocations, | ||
| std::map< TextIndex, TextIndex > * | inlineLocations | ||
| ) | const |
Generates the source content string.
| textModel | - destination story of the cross reference. |
| destIndex | - text index of the destination marker. |
| externDest | - kTrue if the destination is in external document. kFalse otherwise. |
| variableLocations | - [OUT] List of text variables and their offset index in the source content. |
| inlineLocations | - [OUT] List of inline object offset index in the source content and the index in the destination story. |
| inline |
Gets the character style applied to the building block.
| inline |
Gets the custom text of the building block.
| inline |
Gets the delimiter character of the building block.
| inline |
Gets the type of the building block.
| inline |
Gets the flag whether or not delimiter character should be included in the generated source content.
| void XRefBuildingBlock::SetCharacterStyle | ( | UID | charStyle | ) |
Sets the character style of the building block.
| charStyle | - UID of character style to apply to the building block. |
| void XRefBuildingBlock::SetCustomText | ( | const PMString & | customText | ) |
Sets the custom text of the building block. Currently custom text is only applicable for custom string building block. It is ignored for other building blocks.
| customText | - custom text for the building block. |
| void XRefBuildingBlock::SetDelimiter | ( | const UTF32TextChar & | delim, |
| bool16 | includeDelim | ||
| ) |
Sets the delimiter character of the building block.
| delim | - delimiter character on the building block. |
| includeDelim | - kTrue if the delimiter should be included in the generated source text. kFalse otherwise. |
| void XRefBuildingBlock::SetType | ( | XRefBuildingBlockType | type | ) |
Sets the type of the building block.
| type | - type of the building block to be set to. |