InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITextWalkerScope.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Habib Khalfallah
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 __ITextWalkerScope__
25 #define __ITextWalkerScope__
26 #include "TextWalkerServiceProviderID.h"
27 #include "ITextModel.h"
28 #include "ITextFocus.h"
29 #include "PMTextUtils.h"
30 
35 {
36 public:
37  enum { kDefaultIID = IID_ITEXTWALKERSCOPE};
38 
41 
49  virtual bool16 LockScope(LockType lockType) const = 0;
50 
56  virtual bool16 UnlockScope() const = 0;
57 
63  virtual bool16 IsLocked() const = 0;
64 
70  virtual bool16 IsEmpty() const = 0;
71 
77  virtual void SetNextDoc(const UIDRef& doc) = 0;
78 
84  virtual void SetNextStory(UID story) = 0;
85 
91  virtual void SetNextRange(const Text::StoryRangeList* list) = 0;
92 
100  virtual bool16 RemoveDoc(const UIDRef& doc) = 0;
101 
110  virtual bool16 RemoveStory(const UIDRef& doc, UID story) = 0;
111 
117  virtual int32 GetCharTotal() const = 0;
118 
126  virtual const UIDRef& GetCursorDoc(void *token) const = 0;
127 
135  virtual UID GetCursorStory(void *token) const = 0;
136 
150  virtual ITextFocus* GetCursorRange(void *token, bool16 *pAdjustable = nil,
151  int32* pCharOffset = nil, bool16 searchBackwards=kFalse) const = 0;
152 
161  virtual bool16 AdjustRangeToStoryStart(void *token, int32 delta) = 0;
162 
171  virtual bool16 AdjustRangeToStoryEnd(void *token, int32 delta) = 0;
172 
184  virtual bool16 ExtendRangeToEndOfStory(void *token) = 0;
185 
196  virtual bool16 ExtendRangeToStory(void *token) = 0;
197 
205  virtual bool16 MoveToNextDoc(void *token) const = 0;
206 
214  virtual bool16 MoveToNextStory(void *token) const = 0;
215 
223  virtual bool16 MoveToNextRange(void *token) const = 0;
224 
232  virtual void* GetNewCursor(void * basedOn = nil) const = 0;
233 
241  virtual bool16 ReleaseCursor(void * token) const = 0;
242 
249  virtual void SetPosition(void *token, TextIndex nPosition) = 0;
250 
258  virtual TextIndex GetPosition(void *token) const = 0;
259 
267  virtual void SetClientSelection(void *token, TextIndex nStart, int32 nLength) = 0;
268 
278  virtual ITextFocus* GetClientSelection(void *token, TextIndex& start, int32& length) const = 0;
279 
286  virtual void AllowClientSelectionSetRange(void *token, bool16 bAllow) = 0;
287 
293  virtual void ClearClientSelection(void *token) = 0;
294 };
295 
296 #endif