InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ISpellingDataStrand.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: hhorton
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 _H_SPELLINGDATASTRAND
25 #define _H_SPELLINGDATASTRAND
26 
27 #include "IPMUnknown.h"
28 #include "LinguisticID.h"
29 
31 typedef enum SpellingState {kSpellingUnchecked = -1, kSpellingCorrect, kSpellingError, kIncorrectWord, kUncapitalizedWord, kGrammarError, kRepeatedWord, kUncapitalizedStartOfSentence,
33  kNoteAnchor, kDeletedText} SpellingState;
34 
35 
36 class ITextModel;
37 
42 {
43 public:
44  enum { kDefaultIID = IID_ISPELLINGDATASTRAND };
45 
50  virtual void MarkInsertDamage(TextIndex start, int32 length) = 0;
51 
57  virtual void MarkDeleteDamage(TextIndex start, int32 length, bool16 paraStrandAfter = kTrue) = 0;
58 
64  virtual int32 MarkPasteDamage(TextIndex start, int32 length) = 0;
65 
71  virtual void MarkChangeDamage(TextIndex start, int32 length, bool16 addOneToLength = kFalse) = 0;
72 
77  virtual void MarkGeometryDamage(TextIndex start, int32 length) = 0;
78 
83  virtual void MarkRegenDamage(TextIndex start, int32 length) = 0;
84 
89  virtual void MarkContentDamage(TextIndex start, int32 length) = 0;
90 
97  virtual void SetSpellingDataState(TextIndex startpos, int32 numchars, SpellingState spellingState, ITextModel* model) = 0;
98 
105  virtual SpellingState GetSpellingDataRun(TextIndex position, int32 *count, TextIndex *runBegin = nil) = 0;
106 
111  virtual void SetDamageStart(ITextModel* model, TextIndex t) = 0;
112 
116  virtual TextIndex GetDamageStart(void) = 0;
117 
121  virtual void SetNumErrors(int32 n) = 0;
122 
126  virtual int32 GetNumErrors(void) = 0;
127 };
128 
134 {
135 public:
136  enum { kDefaultIID = IID_ISPELLINGSTATECMDDATA };
137 
145  virtual void Set(UIDRef& spellingDataStrandRef, UIDRef& modelRef, SpellingState spellingState, TextIndex start, int32 length) = 0;
146 
150  virtual void GetSpellingStrandRef(UIDRef& ref) = 0;
151 
155  virtual void GetModelRef(UIDRef& ref) = 0;
156 
160  virtual void GetSpellingState(SpellingState& spellingState) = 0;
161 
165  virtual void GetStartTextIndex(TextIndex& start) = 0;
166 
170  virtual void GetLength(int32& length) = 0;
171 };
172 
173 #endif