24 #ifndef __ITEXTMODEL__ 25 #define __ITEXTMODEL__ 27 #include "IPMUnknown.h" 28 #include "PMTextUtils.h" 30 #include "WideString.h" 31 #include "K2SmartPtr.h" 32 #include "ErrorUtils.h" 33 #include "ITextFocusManager.h" 63 enum { kDefaultIID = IID_ITEXTMODEL };
106 virtual ErrorCode
CopyRange(TextIndex start, int32 length, boost::shared_ptr<PasteData>&pasteData ) = 0;
154 virtual bool16 HasChanged()
const = 0;
207 TextIndex *pStart = nil,
208 int32 *pLen = nil)
const = 0;
216 TextIndex *pStart = nil,
217 int32 *pSpan = nil)
const = 0;
226 int32 *pSpan = nil)
const = 0;
243 virtual UID GetStoryThreadStyle(TextIndex at , TextIndex * pStart = nil, TextIndex * pSpan = nil)
const = 0;
256 virtual void LockModel( bool16 bLock ) = 0;
257 virtual bool16 IsModelLocked()
const = 0;
286 virtual ErrorCode
Delete( TextIndex start, int32 len) = 0;
305 virtual ErrorCode
Cut(TextIndex start, int32 len, boost::shared_ptr<PasteData>& pasteData) = 0;
316 virtual ErrorCode
Cut(
const RangeData& range, boost::shared_ptr<PasteData>& pasteData) = 0;
327 virtual ErrorCode
Replace(TextIndex start,
331 bool16 clearNonContinuingAttrs = kTrue) = 0;
340 virtual ErrorCode
Paste(TextIndex start,
const boost::shared_ptr<PasteData>& data) = 0;
352 virtual ErrorCode
ApplyStyle(TextIndex start, int32 len,
UID styleref,
ClassID which, bool16 destroyAll, bool16 keepOldStyleAsOverrides = kTrue) = 0;
391 uint32 threadDictKey,
443 (TextIndex start, int32 len) = 0;
454 virtual void SetChanged(bool16 changed = kTrue) = 0;
485 fPosition(kInvalidTextIndex),
487 fReplacementStringLen(0),
492 fPosition(rVal.fPosition),
493 fFoundStringLen(rVal.fFoundStringLen),
494 fReplacementStringLen(rVal.fReplacementStringLen),
495 fReplacementString(rVal.fReplacementString)
499 int32 fFoundStringLen;
500 int32 fReplacementStringLen;
501 boost::shared_ptr<WideString> fReplacementString;
514 virtual ErrorCode
Replace(
const boost::shared_ptr<ReplacementList>& replacementList,
516 bool16 clearNonContinuingAttrs = kTrue) = 0;
517 virtual void StartRecordingChanges_ForUndoRedo() = 0;
518 virtual void EndRecordingChanges_ForUndoRedo() = 0;