InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IFindChangeUtils.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner:
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 __IFindChangeUtils__
25 #define __IFindChangeUtils__
26 
27 #include "IPMUnknown.h"
28 
29 #include "WideString.h"
30 #include "K2Vector.h"
31 #include "CTextEnum.h"
32 #include "TextWalkerServiceProviderID.h"
33 
34 class IFindChangeOptions;
35 class ITextModel;
36 class AttributeBossList;
37 class PMString;
38 
43 const Text::GlyphID kAnyNotDefGlyphID = -2;
44 
46 {
47 public:
48  enum { kDefaultIID = IID_IFINDCHANGEUTILS };
49 
50  virtual void FindThisItem(const ITextModel* pModel, const WideString& findString,
51  TextIndex nPosition, TextIndex nEnd,
52  TextIndex& nFoundStart, TextIndex& nFoundEnd,
53  const IFindChangeOptions* pFindChangeOptions,
54  int32 allWildCardCount ) const = 0;
55 
56 
72  virtual bool16 SearchForGlyph(const ITextModel *pModel,
73  const IFindChangeOptions* option,
74  Text::GlyphID value,
75  TextIndex findStart,
76  TextIndex findEnd,
77  TextIndex& nFoundStart,
78  TextIndex& nFoundEnd) const = 0;
79 
80  virtual bool16 SearchForGrepText(const ITextModel *pModel,
81  bool16 caseSensitive,
82  bool16 widthSensitive,
83  bool16 kanaSensitive,
84  bool16 getEntireWord,
85  const WideString &findString,
86  TextIndex nPosition,
87  TextIndex nEnd,
88  TextIndex& nFoundStart,
89  TextIndex& nFoundEnd,
90  bool16 nestedStyles = kFalse,
91  bool16 searchBackwards = kFalse) const = 0;
92 
93  virtual bool16 SearchForRawText(const ITextModel *pModel,
94  bool16 caseSensitive,
95  bool16 widthSensitive,
96  bool16 kanaSensitive,
97  bool16 getEntireWord,
98  const WideString &findString,
99  TextIndex nPosition,
100  TextIndex nEnd,
101  TextIndex& nFoundStart,
102  TextIndex& nFoundEnd,
103  const bool16 diacritics = kFalse,
104  const bool16 kashidas = kFalse,
105  bool16 searchBackwards = kFalse) const = 0;
106 
107  virtual bool16 SearchForCharStyle(const ITextModel* pModel, const UID& charStyleUID,
108  TextIndex nFindStart, TextIndex nFindEnd,
109  TextIndex& nFoundStart, TextIndex& nFoundEnd,
110  bool16 searchBackwards = kFalse) const = 0;
111  virtual bool16 SearchForParaStyle(const ITextModel* pModel, const UID& paraStyleUID,
112  TextIndex nFindStart, TextIndex nFindEnd,
113  TextIndex& nFoundStart, TextIndex& nFoundEnd,
114  bool16 searchBackwards = kFalse) const = 0;
115  virtual bool16 SearchForAttributes(const ITextModel* pModel, const AttributeBossList* list,
116  TextIndex nFindStart, TextIndex nFindEnd,
117  TextIndex& nFoundStart, TextIndex& nFoundEnd,
118  bool16 searchBackwards = kFalse) const = 0;
119 
120  virtual bool16 SearchForROSFontGroup(const ITextModel* pModel, const AttributeBossList* list,
121  const PMString& registry, const PMString& ordering,
122  TextIndex nFindStart, TextIndex nFindEnd,
123  TextIndex& nFoundStart, TextIndex& nFoundEnd,
124  bool16 searchBackwards = kFalse) const = 0;
125 
126  virtual int32 SearchForAccessPath(const ITextModel *model,
127  K2Vector<WideString>& accessPaths,
128  TextIndex nFindStart,
129  TextIndex nFindEnd,
130  TextIndex& nFoundStart,
131  TextIndex& nFoundEnd,
132  bool16 searchBackwards = kFalse) const = 0;
133 
134  virtual void UnescapeGrepFindString(const WideString& inStr, WideString& out, bool16 ignoreWidth = kFalse) const = 0;
135 
136 };
137 
138 
139 #endif
140  // __IFindChangeUtils__