24 #ifndef __ITEXTMODELCMDS__ 25 #define __ITEXTMODELCMDS__ 27 #include "IPMUnknown.h" 29 #include "K2SmartPtr.h" 30 #include "ITextModel.h" 31 #include "IFontLockingData.h" 55 enum { kDefaultIID = IID_ITEXTMODELCMDS };
65 virtual ICommand*
PasteCmd(TextIndex position,
const boost::shared_ptr<PasteData>& data, bool16 ignoreAttributes = kFalse) = 0;
70 virtual ICommand*
PasteCmd(
const RangeData& r,
const boost::shared_ptr<PasteData>& data, bool16 ignoreAttributes = kFalse) = 0;
79 virtual ICommand*
InsertCmd(TextIndex position,
const boost::shared_ptr<WideString>& data,
const ILanguage *language = nil ) = 0;
91 virtual ICommand*
DeleteCmd(TextIndex start, int32 length, bool16 ignoreLock=kFalse) = 0;
110 const boost::shared_ptr<WideString> &insert,
112 bool16 clearNonContinuingAttrs = kTrue) = 0;
123 virtual ICommand*
TypeTextCmd(TextIndex startPosition, TextIndex endPosition,
const boost::shared_ptr<WideString>& insert,
const ILanguage *language = nil ) = 0;
142 virtual ICommand*
ApplyCmd(TextIndex start, int32 length,
const boost::shared_ptr<AttributeBossList>& list,
ClassID whichStrand) = 0;
163 virtual ICommand*
ApplyStyleCmd(TextIndex start, int32 length,
UID stylerefid,
ClassID whichStrand, bool16 replaceOverrides = kTrue, bool16 autoNextStyle = kFalse, bool16 keepOldStyleAsOverrides = kTrue) = 0;
189 virtual ICommand*
UserApplyCmd(TextIndex start, int32 length,
const boost::shared_ptr<AttributeBossList>& list,
ClassID whichStrand) = 0;
212 virtual ICommand*
ReplaceCmd(
const boost::shared_ptr<ITextModel::ReplacementList>& replacementList,
214 bool16 clearNonContinuingAttrs = kTrue) = 0;
222 const boost::shared_ptr<AttributeBossList>&overrides,
224 bool16 destroyOverrides,
225 bool16 autoNextStyle, bool16 keepOldStyleAsOverrides = kTrue) = 0;
227 virtual TextEditAction* GetReplaceText_Action (TextIndex start,
229 const boost::shared_ptr<WideString>& insertData,
231 bool16 clearNonContinuingAttrs = kTrue) = 0;
233 virtual TextEditAction* GetUserApplyAttr_Action(TextIndex start,
236 const boost::shared_ptr<AttributeBossList>& over,
238 bool16 destroyLocalOverrides,
239 bool16 autoNextStyle,
240 bool16 keepOldStyleAsOverrides = kTrue,
241 IFontLockingData::FontLockLevel fontLocking = IFontLockingData::kAllowFontLockingWithOverride) = 0;