InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITextFocusManager.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Eric Menninga
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 __ITextFocusManager__
25 #define __ITextFocusManager__
26 
27 #include "IPMUnknown.h"
28 #include "TextID.h"
29 
30 //----------------------------------------------------------------------------------------
31 // Interface ITextFocusManager
32 //----------------------------------------------------------------------------------------
33 
34 class ITextFocus;
35 class RangeData;
36 
44 {
45 public:
46  enum { kDefaultIID = IID_ITEXTFOCUSMANAGER };
47 
51  {
52  kInvalidUpdateType = 0,
53  kInserted,
54  kDeleted,
55  kAppliedAttrs
56  };
57 
61  {
64 
65  FocusUpdateInfo(FocusUpdateType type, TextIndex start, int32 len)
66  :fUpdateType(type), fStart(start), fLen(len)
67  {}
68 
69  bool operator==(const FocusUpdateInfo&) const
70  { ASSERT_FAIL("appease K2Vector.Location"); return false; }
71 
72  FocusUpdateType fUpdateType;
73  TextIndex fStart;
74  int32 fLen;
75  };
76 
80 
81 
87  virtual ITextFocus* NewFocus( const RangeData& range, ClassID focusClass = kInvalidClass) = 0;
88 
93  virtual void AddFocus(ITextFocus* f) = 0;
94 
98  virtual void RemoveFocus(ITextFocus* f) = 0;
99 
102  virtual int32 GetFocusCount() const = 0;
103 
107  virtual ITextFocus * QueryNthFocus( int32 nAt ) = 0;
108 
113  virtual void Inserted(TextIndex start, int32 count, bool16 allowNotify = kTrue) = 0;
114 
119  virtual void Deleted(TextIndex start, int32 count, bool16 allowNotify = kTrue) = 0;
120 
125  virtual void AttributeApplied(TextIndex start, int32 count, bool16 allowNotify = kTrue) = 0;
126 
130  virtual void StoryThreadCreated(TextIndex at, int32 len) = 0;
131 
135  virtual void Update(const FocusUpdateInfoList& updateInfoList, bool16 allowNotify) = 0;
136 
137  virtual void DeRegisterTextFoci() = 0;
138 };
139 
140 #endif
141  // __ITextFocusManager__
142