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

#include <ITextModelCmds.h>

Inheritance diagram for ITextModelCmds:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ITEXTMODELCMDS }
 

Public Member Functions

virtual ICommandPasteCmd (TextIndex position, const boost::shared_ptr< PasteData > &data, bool16 ignoreAttributes=kFalse)=0
 
virtual ICommandPasteCmd (const RangeData &r, const boost::shared_ptr< PasteData > &data, bool16 ignoreAttributes=kFalse)=0
 
virtual ICommandInsertCmd (TextIndex position, const boost::shared_ptr< WideString > &data, const ILanguage *language=nil)=0
 
virtual ICommandInsertCmd (const RangeData &r, const boost::shared_ptr< WideString > &data, const ILanguage *language=nil)=0
 
virtual ICommandDeleteCmd (TextIndex start, int32 length, bool16 ignoreLock=kFalse)=0
 
virtual ICommandDeleteCmd (const RangeData &range, bool16 ignoreLock=kFalse)=0
 
virtual ICommandReplaceCmd (TextIndex start, int32 length, const boost::shared_ptr< WideString > &insert, const ILanguage *language=nil, bool16 clearNonContinuingAttrs=kTrue)=0
 
virtual ICommandTypeTextCmd (TextIndex startPosition, TextIndex endPosition, const boost::shared_ptr< WideString > &insert, const ILanguage *language=nil)=0
 
virtual ICommandTypeTextCmd (const RangeData &range, const boost::shared_ptr< WideString > &insert, const ILanguage *language=nil)=0
 
virtual ICommandApplyCmd (TextIndex start, int32 length, const boost::shared_ptr< AttributeBossList > &list, ClassID whichStrand)=0
 
virtual ICommandApplyCmd (const RangeData &range, const boost::shared_ptr< AttributeBossList > &list, ClassID whichStrand)=0
 
virtual ICommandApplyStyleCmd (TextIndex start, int32 length, UID stylerefid, ClassID whichStrand, bool16 replaceOverrides=kTrue, bool16 autoNextStyle=kFalse, bool16 keepOldStyleAsOverrides=kTrue)=0
 
virtual ICommandUnapplyStyleCmd (TextIndex start, int32 length, ClassID whichStrand)=0
 
virtual ICommandClearOverridesCmd (TextIndex start, int32 length, const boost::shared_ptr< AttributeBossList > &these, ClassID whichStrand)=0
 
virtual ICommandUserApplyCmd (TextIndex start, int32 length, const boost::shared_ptr< AttributeBossList > &list, ClassID whichStrand)=0
 
virtual ICommandRegisterStrandCmd (UID strand)=0
 
virtual ICommandUnregisterStrandCmd (UID strand)=0
 
virtual ICommandReplaceCmd (const boost::shared_ptr< ITextModel::ReplacementList > &replacementList, const ILanguage *language=nil, bool16 clearNonContinuingAttrs=kTrue)=0
 
virtual TextEditAction * GetApplyTextStyle_Action (TextIndex start, int32 len, UID style, const boost::shared_ptr< AttributeBossList > &overrides, ClassID which, bool16 destroyOverrides, bool16 autoNextStyle, bool16 keepOldStyleAsOverrides=kTrue)=0
 
virtual TextEditAction * GetReplaceText_Action (TextIndex start, int32 oldLen, const boost::shared_ptr< WideString > &insertData, ILanguage *pLanguage, bool16 clearNonContinuingAttrs=kTrue)=0
 
virtual TextEditAction * GetUserApplyAttr_Action (TextIndex start, int32 len, UID style, const boost::shared_ptr< AttributeBossList > &over, ClassID which, bool16 destroyLocalOverrides, bool16 autoNextStyle, bool16 keepOldStyleAsOverrides=kTrue, IFontLockingData::FontLockLevel fontLocking=IFontLockingData::kAllowFontLockingWithOverride)=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

This is a Text story interface. It serves to query for text edit commands to operate on the story. The functions in this interface used to be part of the ITextModel interface.

Member Function Documentation

virtual ICommand* ITextModelCmds::ApplyCmd (TextIndex start,
int32 length,
const boost::shared_ptr< AttributeBossList > & list,
ClassID whichStrand 
)
pure virtual
Returns
a new apply attributes command.
Parameters
startIN start of apply range.
lengthIN length of apply range.
listIN shared pointer of attribute boss list to apply.
See Also
K2SmartPtr for usage of shared_ptr.
Parameters
whichStrandIN whether the attributes applied are paragraph or a character attributes.
virtual ICommand* ITextModelCmds::ApplyCmd (const RangeDatarange,
const boost::shared_ptr< AttributeBossList > & list,
ClassID whichStrand 
)
pure virtual
Returns
a new apply attributes command.
Parameters
rangeIN apply range.
listIN shared pointer of attribute boss list to apply.
See Also
K2SmartPtr for usage of shared_ptr.
Parameters
whichStrandIN whether the attributes applied are paragraph or a character attributes.
virtual ICommand* ITextModelCmds::ApplyStyleCmd (TextIndex start,
int32 length,
UID stylerefid,
ClassID whichStrand,
bool16 replaceOverrides = kTrue,
bool16 autoNextStyle = kFalse,
bool16 keepOldStyleAsOverrides = kTrue 
)
pure virtual
Returns
a new apply style command which applies a style.
Parameters
startIN start of apply range.
lengthIN length of apply range.
stylerefidIN style to apply.
whichStrandIN whether the attributes applied are paragraph or a character attributes.
replaceOverridesIN whether to clear the overrides.
keepOldStyleAsOverridesIN whether to apply the old style as overrides before setting new style. This variable is only used if stylerefid is the root style.
virtual ICommand* ITextModelCmds::ClearOverridesCmd (TextIndex start,
int32 length,
const boost::shared_ptr< AttributeBossList > & these,
ClassID whichStrand 
)
pure virtual
Returns
a new command which clears specific attributes from a range
Parameters
startIN start of clear range.
lengthIN length of clear range.
theseIN attributes to clear.
whichStrandIN whether paragraph or character attributes need to be cleared.
virtual ICommand* ITextModelCmds::DeleteCmd (TextIndex start,
int32 length,
bool16 ignoreLock = kFalse 
)
pure virtual
Returns
a new delete text command.
Parameters
startIN start of delete range.
lengthIN length of delete range.
ignoreLockIN will bypass checking for locked story
virtual ICommand* ITextModelCmds::DeleteCmd (const RangeDatarange,
bool16 ignoreLock = kFalse 
)
pure virtual
Returns
a new delete text command.
Parameters
rangeIN delete range.
ignoreLockIN will bypass checking for locked story
virtual TextEditAction* ITextModelCmds::GetApplyTextStyle_Action (TextIndex start,
int32 len,
UID style,
const boost::shared_ptr< AttributeBossList > & overrides,
ClassID which,
bool16 destroyOverrides,
bool16 autoNextStyle,
bool16 keepOldStyleAsOverrides = kTrue 
)
pure virtual

For internal use only.

virtual ICommand* ITextModelCmds::InsertCmd (TextIndex position,
const boost::shared_ptr< WideString > & data,
const ILanguagelanguage = nil 
)
pure virtual
Returns
a new command that inserts text into the story.
Parameters
positionIN text index where to insert text.
dataIN text to insert. This is a shared pointer.
See Also
K2SmartPtr for usage of shared_ptr.
Parameters
languageIN language of inserted text.
virtual ICommand* ITextModelCmds::InsertCmd (const RangeDatar,
const boost::shared_ptr< WideString > & data,
const ILanguagelanguage = nil 
)
pure virtual

For internal use only.

virtual ICommand* ITextModelCmds::PasteCmd (TextIndex position,
const boost::shared_ptr< PasteData > & data,
bool16 ignoreAttributes = kFalse 
)
pure virtual
Returns
a new command that pastes text into a story.
Parameters
positionIN insert position.
dataIN pasted text data. data is gathered by the caller as the result of calling ITextModel::CopyRange or ITextModel::Cut. This is a shared pointer.
See Also
K2SmartPtr for usage of shared_ptr.
Parameters
ignoreAttributesto indicate ignore attributes when paste
virtual ICommand* ITextModelCmds::PasteCmd (const RangeDatar,
const boost::shared_ptr< PasteData > & data,
bool16 ignoreAttributes = kFalse 
)
pure virtual

For internal use only.

virtual ICommand* ITextModelCmds::RegisterStrandCmd (UID strand)
pure virtual
Returns
a new command which registers a strand with the text model.
Parameters
strandIN strand uid.
virtual ICommand* ITextModelCmds::ReplaceCmd (TextIndex start,
int32 length,
const boost::shared_ptr< WideString > & insert,
const ILanguagelanguage = nil,
bool16 clearNonContinuingAttrs = kTrue 
)
pure virtual
Returns
a new Replace Text command.
Parameters
startIN start of replace range.
lengthIN length of replace range.
insertIN replacement text. This is a shared pointer.
See Also
K2SmartPtr for usage of shared_ptr.
Parameters
languageIN language of inserted text.
clearNonContinuingAttrsIN clear non continuing attributes after doing the replace.
virtual ICommand* ITextModelCmds::ReplaceCmd (const boost::shared_ptr< ITextModel::ReplacementList > & replacementList,
const ILanguagelanguage = nil,
bool16 clearNonContinuingAttrs = kTrue 
)
pure virtual
Returns
a new multiple replacement Text command.
Parameters
replListIN is a shared pointer and constitutes the requested list of replacements. This is an optimized way to do more than one replacement at a time. The replacement list must be in assending order of text indices (
See Also
ITextModel).
K2SmartPtr for usage of shared_ptr.
Parameters
languageIN indicates the language of the replacement text.
clearNonContinuingAttrsIN clear non continuing attributes after doing each replacement.
virtual ICommand* ITextModelCmds::TypeTextCmd (TextIndex startPosition,
TextIndex endPosition,
const boost::shared_ptr< WideString > & insert,
const ILanguagelanguage = nil 
)
pure virtual
Returns
a new type text command. If the length of the range passed in is greater than zero the text in the range is actually deleted.
Parameters
startPositionIN start of range.
endPositionIN end of range.
insertIN is a shared pointer that constitutes what actually gets inserted into the story.
See Also
K2SmartPtr for usage of shared_ptr.
Parameters
languageIN language of inserted text.
virtual ICommand* ITextModelCmds::TypeTextCmd (const RangeDatarange,
const boost::shared_ptr< WideString > & insert,
const ILanguagelanguage = nil 
)
pure virtual
Returns
a new type text command. If the length of the range passed in is greater than zero the text in the range is actually deleted.
Parameters
rangeIN range.
insertIN is a shared pointer that constitutes what actually gets inserted into the story.
See Also
K2SmartPtr for usage of shared_ptr.
Parameters
languageIN language of inserted text.
virtual ICommand* ITextModelCmds::UnapplyStyleCmd (TextIndex start,
int32 length,
ClassID whichStrand 
)
pure virtual
Returns
a new command which removes all applied styles within a range.
Parameters
startIN start of range.
lengthIN length of range.
whichStrandIN whether paragraph or character styles need to be removed.
virtual ICommand* ITextModelCmds::UnregisterStrandCmd (UID strand)
pure virtual
Returns
a new command which unregisters a strand from the text model.
Parameters
strandIN strand uid
virtual ICommand* ITextModelCmds::UserApplyCmd (TextIndex start,
int32 length,
const boost::shared_ptr< AttributeBossList > & list,
ClassID whichStrand 
)
pure virtual
Returns
a new apply attributes command which applies attributes to a range.
Parameters
startIN start of apply range.
lengthIN length of apply range.
listIN shared pointer of attribute boss list to apply.
See Also
K2SmartPtr for usage of shared_ptr.
Parameters
whichStrandIN whether the attributes applied are paragraph or a character attributes.