InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITextCommandPostProcess.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: ekenning
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 __ITextCommandPostProcess__
25 #define __ITextCommandPostProcess__
26 
27 #include "IPMUnknown.h"
28 #include "IStrand.h"
29 #include "K2SmartPtr.h"
30 #include "TextID.h"
31 
32 
33 class WideString;
34 class AttributeBossList;
35 class PasteData;
36 class ITextModel;
37 class ILanguage;
38 class ICommand;
39 
44 {
45  public:
46  enum { kDefaultIID = IID_ITEXTEDITPOSTPROCESS };
47 
48  // allows service to postprocess text commands
49  virtual void InsertPostProcess(ITextModel* model, TextIndex position, const WideString* data, const ILanguage *pLanguage = nil ) = 0;
50  virtual void ReplacePostProcess(ITextModel* model, TextIndex position, int32 length, const WideString* data, const ILanguage *pLanguage = nil ) = 0;
51  virtual void DeletePostProcess(ITextModel* model, TextIndex position, int32 length) = 0;
52  virtual void ApplyStylePostProcess(ITextModel* model, TextIndex position, int32 length, UID styleRef, ClassID whichStrand) = 0;
53 
54  virtual void ApplyOverridesPostProcess(ITextModel* model, TextIndex position, int32 length, const AttributeBossList *attributes, ClassID whichStrand) = 0;
55  virtual void ClearOverridesPostProcess(ITextModel* model, TextIndex position, int32 length, const AttributeBossList *attributes, ClassID whichStrand) = 0;
56 
57  virtual void PastePostProcess(ITextModel* model, TextIndex position, const PasteData *data, int32 subrange) = 0;
58  virtual void ReplacePostProcess(ITextModel* model, const boost::shared_ptr<ITextModel::ReplacementList>& replList) = 0;
59 
60  // Begin/EndProcessCommand are called by UserApplyAttrCmd and UserTypeTextCmd to temporarily enable CJKTextPreProcessor and ScriptTextProcessor.
61  virtual void BeginProcessCommand( ICommand *cmd ) = 0;
62  virtual void EndProcessCommand( ICommand *cmd ) = 0;
63 };
64 
65 
66 #endif
67  // __ITextCommandPostProcess__