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

#include <IAttributeStrand.h>

Inheritance diagram for IAttributeStrand:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IATTRIBUTESTRAND }
 

Public Member Functions

virtual void DoApplyTextStyle (const ITextModel *model, ClassID which, TextIndex *pstartpos, int32 *pnumchars, UID styleref, bool16 removeAll, bool16 keepOldStyleAsOverrides=kTrue)=0
 
virtual void DoApplyOverrides (const ITextModel *model, ClassID whichStrand, TextIndex *startpos, int32 *numchars, const AttributeBossList *over)=0
 
virtual void DoClearOverrides (const ITextModel *model, ClassID whichStrand, TextIndex *startpos, int32 *numchars, const AttributeBossList *over)=0
 
virtual void UnhookParagraphStyle (const ITextModel *model, TextIndex start, int32 len, UID rootStyle, UID oldParagraphStyle, UID storyThreadStyle)=0
 
virtual UID GetStyleUID (TextIndex position, int32 *count, TextIndex *runBegin=nil) const =0
 
virtual DataWrapper
< AttributeBossList
GetLocalOverrides (TextIndex position, int32 *count, TextIndex *runBegin=nil) const =0
 
virtual void ResetWithNoUndo (const ITextModel *model, TextIndex start, int32 length, UID toStyle)=0
 
virtual void StoryThreadStyleDiffs_ApplyAtPaste (TextIndex start, int32 length, const UID &charRootStyle, const UID &paraRootStyle, const AttributeBossList *diffAttrs, const AttributeBossList *dest_SrcStoryThreadStyleDiffs, const ITextModel *model)=0
 
virtual void ParaRootStyleDiffs_ApplyAtPaste (TextIndex start, int32 length, const UID &charRootStyle, const UID &paraRootStyle, const AttributeBossList *diffAttrs, const AttributeBossList *paraDest_SrcRootStyleDiffs, const ITextModel *model)=0
 
virtual void CharRootStyleDiffs_ApplyAtPaste (TextIndex start, int32 length, const UID &charRootStyle, const UID &paraRootStyle, const AttributeBossList *diffAttrs, const AttributeBossList *charDest_SrcRootStyleDiffs, const ITextModel *model)=0
 
virtual void RemoveRedundantOverrides (const ITextModel *model, TextIndex start, int32 len)=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

Abstract interface that all attribute strands must implement.

Member Function Documentation

virtual void IAttributeStrand::CharRootStyleDiffs_ApplyAtPaste (TextIndex start,
int32 length,
const UIDcharRootStyle,
const UIDparaRootStyle,
const AttributeBossListdiffAttrs,
const AttributeBossListcharDest_SrcRootStyleDiffs,
const ITextModelmodel 
)
pure virtual

For internal use only.

virtual void IAttributeStrand::DoApplyOverrides (const ITextModelmodel,
ClassID whichStrand,
TextIndex * startpos,
int32 * numchars,
const AttributeBossListover 
)
pure virtual

Applies text attributes to a range.

Parameters
modelIN text model.
whichStrandIN whether these are character or a paragraph attributes.
startposIN start of apply range.
numcharsIN apply range length.
overIN attributes to apply. Adjusts startpos & numchars to encompass EXACTLY ALL the characters within the intersecting paragraphs.
virtual void IAttributeStrand::DoApplyTextStyle (const ITextModelmodel,
ClassID which,
TextIndex * pstartpos,
int32 * pnumchars,
UID styleref,
bool16 removeAll,
bool16 keepOldStyleAsOverrides = kTrue 
)
pure virtual

Applies a text style to a range.

Parameters
modelIN text model.
whichIN whether this is a character or a paragraph style.
pstartposIN start of apply range.
pnumcharsIN length of apply range.
stylerefIN applied style uid
removeallIN whether to remove all overrides.
keepOldStyleAsOverridesIN whether to apply current style as overrides before setting new style. Adjusts pstartpos & pnumchars to encompass EXACTLY ALL the characters within the intersecting paragraphs.
virtual void IAttributeStrand::DoClearOverrides (const ITextModelmodel,
ClassID whichStrand,
TextIndex * startpos,
int32 * numchars,
const AttributeBossListover 
)
pure virtual

Clears text attributes from a range.

Parameters
modelIN text model.
whichStrandIN whether these are character or paragraph attributes.
startposIN start of clear range.
numcharsIN clear range length.
overIN attributes to clear. Adjusts startpos & numchars to encompass EXACTLY ALL the characters within the intersecting paragraphs.
virtual DataWrapper<AttributeBossList> IAttributeStrand::GetLocalOverrides (TextIndex position,
int32 * count,
TextIndex * runBegin = nil 
) const
pure virtual
Returns
list of attributes applied at a position.
Parameters
positionIN text index to look at.
countOUT length from position to end of paragraph run.
runBeginOUT text index of start of paragraph run.
virtual UID IAttributeStrand::GetStyleUID (TextIndex position,
int32 * count,
TextIndex * runBegin = nil 
) const
pure virtual
Returns
UID of the style applied at a position
Parameters
positionIN text index to look at.
countOUT length from 'position' to end of paragraph run.
runBeginOUT text index of start of paragraph run.
virtual void IAttributeStrand::ParaRootStyleDiffs_ApplyAtPaste (TextIndex start,
int32 length,
const UIDcharRootStyle,
const UIDparaRootStyle,
const AttributeBossListdiffAttrs,
const AttributeBossListparaDest_SrcRootStyleDiffs,
const ITextModelmodel 
)
pure virtual

For internal use only.

virtual void IAttributeStrand::RemoveRedundantOverrides (const ITextModelmodel,
TextIndex start,
int32 len 
)
pure virtual

Remove overrides which are already applied through styles.

Parameters
modelIN text model.
startIN start of remove range.
numcharsIN remove range length.
virtual void IAttributeStrand::ResetWithNoUndo (const ITextModelmodel,
TextIndex start,
int32 length,
UID toStyle 
)
pure virtual

For internal use only.

virtual void IAttributeStrand::StoryThreadStyleDiffs_ApplyAtPaste (TextIndex start,
int32 length,
const UIDcharRootStyle,
const UIDparaRootStyle,
const AttributeBossListdiffAttrs,
const AttributeBossListdest_SrcStoryThreadStyleDiffs,
const ITextModelmodel 
)
pure virtual

For internal use only.

virtual void IAttributeStrand::UnhookParagraphStyle (const ITextModelmodel,
TextIndex start,
int32 len,
UID rootStyle,
UID oldParagraphStyle,
UID storyThreadStyle 
)
pure virtual

Remove reference to paragraph style but leave its effect in the form of overrides.

Parameters
modelIN text model.
startIN start of unhook range.
lenIN unhook range length.
rootStyleIN root style UID.
oldParagraphStyleIN paragraph style to unhook.
storyThreadStyleIN story thread style.