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

Public Types | |
| enum | { kDefaultIID = IID_IRUNINSTYLESUTILS } |
Public Member Functions | |
| virtual bool16 | ParseParagraphForRunInStyles (const ITextModel *model, TextIndex position, const ICompositionStyle *paragraphStyle, RunInStyleResults &results, int32 *pParagraphLengthLeft=nil, bool16 moveBackwards=kFalse)=0 |
| virtual void | MapExpressionToPMString (const WideString &expression, PMString *pOutput, int32 *pCount, bool16 *pInclusive)=0 |
| virtual void | MapPMStringToExpression (const PMString &nicePhrase, int32 count, bool16 inclusive, WideString *pExpression)=0 |
| virtual bool16 | ToggleExpressionInclusion (const WideString &original, WideString *pToggled)=0 |
| virtual int32 | CalculateDropCapCount (const TextIterator &beginPosition, int16 baseCharCount, WideString *dcText)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Some utility functions to aid in processing run-in styles
| pure virtual |
calculate actual number of char that dropcap need to be applied (adjusted for hidden character at the beginning of paragraph)
| beginPosition | beginning position for dropcap evaluation (usually beginning position of paragraph) |
| baseCharCount | number of dropcap char specified by user |
| dcText | actual text string used for dropcap |
| pure virtual |
map the attribute's expression string into a PMString for readibility. The attribute is split into the characters to match and the count.
| expression | the attribute's value describing the rule |
| pOutput | the string that should contain a readable version of the rule |
| pCount | the number of TIMES that the expression should be found before switching styles |
| pInclusive | will be return whether the style INCLUDES the final trigger |
| pure virtual |
map a user description of a rule PLUS a count into an attribute's expression string
| nicePhrase | a PMString version of the rule |
| count | the number of time the rule should be satisfied |
| pExpression | the attribute's rule string the describes the input. |
| inclusive | declares whether the style INCLUDES the final trigger |
| pure virtual |
Calculate the Run-In style transition points for the given paragraph
| model | the text model of the story being examined |
| position | usually the starting index of the paragraph being examined |
| paragraphStyle | the paragraph attributes for the paragraph. If the paragraphStyle is nil, then everything is fine and the position can be arbitrary. If the paragraphStyle is NOT file, then it position should be == to paragraph start. |
| results | a list of run-in styles for this paragraph specified as an ordered list of <character style UID, number of characters> pairs |
| ignoreUnsetLines | specifies whether to ignore "lines" nested styles or to set that style over the entire remaining paragraph. In already-composed paragraphs, this parameter is ignored, but in uncomposed paragraphs, the choice exists. Generally, they are ignored except by composition itself. |
| pParagraphLengthLeft | should be SET to the paragraph length if the paragraphStyle was passed in, otherwise, it's for occasional callers who need to know the rest of the paragraph's length too. |
| moveBackwards | specifies the direction in which rest of the paragraph's length is to be reported. The value is kTrue for backwards direction and kFalse for forward direction. |
| pure virtual |
toggle whether the rule include the character that triggers the switch or not
| original | the original expression from the run-in style list |
| pToggled | the new expression, with the inclusion toggled |