InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
RunInStyleRule Class Reference

#include <RunInStyleList.h>

Public Types

enum  RunInErrorType { kRI_NoError = 0, kRI_Empty, kRI_UnmatchedBraces, kRI_NoTrigger }
 
typedef object_type data_type
 

Public Member Functions

 RunInStyleRule (UID charstyle, const WideString &trigger)
 
bool operator== (const RunInStyleRule &) const
 
void SetTriggerExpression (const WideString &s)
 
bool16 IsLoopbackStyleRule (int32 *pNextRuleIndex=nil) const
 
void SetCharacterStyle (const UID &cs)
 
UID GetCharacterStyle () const
 
const WideStringGetTriggerExpression () const
 
void ReadWrite (IPMStream *stream)
 

Static Public Member Functions

static RunInErrorType VerifyExpression (const WideString &test)
 

Detailed Description

A description of a single run-in style, where a run-in style is an ordered application of character styles to text according to some simple rules. (next word, next sentence, etc). A paragraph will have a text attribute (kTextAttrRunInStylesBoss) specified by either a paragraph style or a locally applied attribute. This attribute contains a list of RunInStyleRule objects called a RunInStyleList.

See Also
RunInStyleList
ITextAttrRunInStyle

Member Enumeration Documentation

Member Function Documentation

UID RunInStyleRule::GetCharacterStyle () const
inline
Returns
the character style associated with this run-in style
const WideString& RunInStyleRule::GetTriggerExpression () const
inline
Returns
the trigger expression associated with this run-in style
See Also
RunInStyleRule::SetTriggerExpression
bool16 RunInStyleRule::IsLoopbackStyleRule (int32 * pNextRuleIndex = nil) const

Is this rule a loop-back?

Parameters
pNextRuleIndexwill be set to the next rule index specified by the loopback.
Returns
kTrue if the rule is a loop-back rule.
void RunInStyleRule::ReadWrite (IPMStreamstream)

read or write the single run-in style rule to the stream

void RunInStyleRule::SetCharacterStyle (const UIDcs)
inline

assign the character style associated with this run-in style

Parameters
characterstyle UID
void RunInStyleRule::SetTriggerExpression (const WideStrings)
inline

Assign the rule that determines when to STOP applying the associated character style

Parameters
thetrigger expression the format of the trigger expression should be: either [x]n or (x)n – if n is missing, "1" is assumed. – if braces are missing, "()" is assumed where n = base-10 number (can be multi-digit) where x = list of characters, any of which will cause the expression to "succeed" where [] mean do NOT include the triggering character, and () means include it
See Also
WideString
static RunInErrorType RunInStyleRule::VerifyExpression (const WideStringtest)
static

verify that the trigger expression is considered legal

Parameters
thestring to test
Returns
error status of this test