InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITextModelCmds.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: EricM
6 //
7 // $Author$
8 //
9 // $DateTime$
10 //
11 // $Revision$
12 //
13 // $Change$
14 //
15 // Copyright 1997-2010 Adobe Systems Incorporated. All rights reserved.
16 //
17 // NOTICE: Adobe permits you to use, modify, and distribute this file in accordance
18 // with the terms of the Adobe license agreement accompanying it. If you have received
19 // this file from a source other than Adobe, then your use, modification, or
20 // distribution of it requires the prior written permission of Adobe.
21 //
22 //========================================================================================
23 
24 #ifndef __ITEXTMODELCMDS__
25 #define __ITEXTMODELCMDS__
26 
27 #include "IPMUnknown.h"
28 #include "TextID.h"
29 #include "K2SmartPtr.h"
30 #include "ITextModel.h"
31 #include "IFontLockingData.h"
32 
33 class ICommand;
34 class WideString;
35 class AttributeBossList;
36 class ReplaceInfo;
37 class VOS_SavedData;
38 class PasteData;
39 class ILanguage;
40 class IParcel;
41 class ITextStoryThread;
42 class ITextParcelList;
43 class IFrameList;
44 class TextEditAction;
45 
52 class ITextModelCmds : public IPMUnknown
53 {
54  public:
55  enum { kDefaultIID = IID_ITEXTMODELCMDS };
56 
65  virtual ICommand* PasteCmd(TextIndex position, const boost::shared_ptr<PasteData>& data, bool16 ignoreAttributes = kFalse) = 0;
66 
70  virtual ICommand* PasteCmd(const RangeData& r, const boost::shared_ptr<PasteData>& data, bool16 ignoreAttributes = kFalse) = 0;
71 
72 
79  virtual ICommand* InsertCmd(TextIndex position, const boost::shared_ptr<WideString>& data, const ILanguage *language = nil ) = 0;
80 
84  virtual ICommand* InsertCmd(const RangeData& r, const boost::shared_ptr<WideString>& data, const ILanguage *language = nil ) = 0;
91  virtual ICommand* DeleteCmd(TextIndex start, int32 length, bool16 ignoreLock=kFalse) = 0;
92 
98  virtual ICommand* DeleteCmd( const RangeData& range, bool16 ignoreLock=kFalse) = 0;
99 
108  virtual ICommand* ReplaceCmd(TextIndex start,
109  int32 length,
110  const boost::shared_ptr<WideString> &insert,
111  const ILanguage *language = nil,
112  bool16 clearNonContinuingAttrs = kTrue) = 0;
113 
123  virtual ICommand* TypeTextCmd(TextIndex startPosition, TextIndex endPosition, const boost::shared_ptr<WideString>& insert, const ILanguage *language = nil ) = 0;
124 
133  virtual ICommand* TypeTextCmd(const RangeData& range, const boost::shared_ptr<WideString>& insert, const ILanguage *language = nil ) = 0;
134 
142  virtual ICommand* ApplyCmd(TextIndex start, int32 length, const boost::shared_ptr<AttributeBossList>& list, ClassID whichStrand) = 0;
143 
151  virtual ICommand* ApplyCmd( const RangeData& range, const boost::shared_ptr<AttributeBossList>& list, ClassID whichStrand) = 0;
152 
163  virtual ICommand* ApplyStyleCmd(TextIndex start, int32 length, UID stylerefid, ClassID whichStrand, bool16 replaceOverrides = kTrue, bool16 autoNextStyle = kFalse, bool16 keepOldStyleAsOverrides = kTrue) = 0;
164 
171  virtual ICommand* UnapplyStyleCmd(TextIndex start, int32 length, ClassID whichStrand) = 0;
172 
180  virtual ICommand* ClearOverridesCmd(TextIndex start, int32 length, const boost::shared_ptr<AttributeBossList>& these, ClassID whichStrand) = 0;
181 
189  virtual ICommand* UserApplyCmd(TextIndex start, int32 length, const boost::shared_ptr<AttributeBossList>& list, ClassID whichStrand) = 0;
190 
195  virtual ICommand* RegisterStrandCmd(UID strand) = 0;
196 
201  virtual ICommand* UnregisterStrandCmd(UID strand) = 0;
202 
212  virtual ICommand* ReplaceCmd(const boost::shared_ptr<ITextModel::ReplacementList>& replacementList,
213  const ILanguage *language = nil,
214  bool16 clearNonContinuingAttrs = kTrue) = 0;
215 
219  virtual TextEditAction* GetApplyTextStyle_Action (TextIndex start,
220  int32 len,
221  UID style,
222  const boost::shared_ptr<AttributeBossList>&overrides,
223  ClassID which,
224  bool16 destroyOverrides,
225  bool16 autoNextStyle, bool16 keepOldStyleAsOverrides = kTrue) = 0;
226 
227  virtual TextEditAction* GetReplaceText_Action (TextIndex start,
228  int32 oldLen,
229  const boost::shared_ptr<WideString>& insertData,
230  ILanguage *pLanguage,
231  bool16 clearNonContinuingAttrs = kTrue) = 0;
232 
233  virtual TextEditAction* GetUserApplyAttr_Action(TextIndex start,
234  int32 len,
235  UID style,
236  const boost::shared_ptr<AttributeBossList>& over,
237  ClassID which,
238  bool16 destroyLocalOverrides,
239  bool16 autoNextStyle,
240  bool16 keepOldStyleAsOverrides = kTrue,
241  IFontLockingData::FontLockLevel fontLocking = IFontLockingData::kAllowFontLockingWithOverride) = 0;
242 
243 };
244 #endif