InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPageItemBoundsList.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: jargast
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 __IPageItemBoundsList__
25 #define __IPageItemBoundsList__
26 
27 #include "IPMUnknown.h"
28 #include "GenericID.h"
29 #include "PMRect.h"
30 #include "UIDList.h"
31 #include "IHierarchy.h"
32 
33 // Return kTrue to abort the operation, kFalse to continue..
34 typedef bool8 (*PageItemIntersectCallback)(const UIDRef& uidRef, void *data);
35 
40 {
41 public:
42  enum { kDefaultIID = IID_IPAGEITEMBOUNDSLIST };
43 
48  virtual void Add (IPMUnknown* iUnknown, int32 at) = 0;
49 
55  virtual void Move (IPMUnknown* iUnknown, int32 from, int32 to) = 0;
56 
61  virtual void Remove (IPMUnknown* iUnknown, int32 at) = 0;
62 
67  virtual bool16 Invalidate (IPMUnknown* iUnknown) = 0;
68 
72  virtual bool16 InvalidateAll () = 0;
73 
77  virtual int32 Length() const = 0;
78 
83  virtual PMRect GetNthBounds (int32 n) const = 0;
84 
91  virtual UIDList GetIntersectingItems (const PMRect& rect, UID uidBelowThis = kInvalidUID) const = 0;
92 
99  virtual void GetIntersectingItems (const PMRect& rect, PageItemIntersectCallback callback, void *data) const = 0;
100 
101 
102 
103 #if 0
104  class iterator
105  {
106  friend class PageItemBoundsList;
107  public:
108  bool16 operator==(const iterator& rhs) const { return n == rhs.n;}
109  bool16 operator!=(const iterator& rhs) const { return !(*this == rhs);}
110 
111 
112  private:
113  UIDRef operator*() const;
114  iterator& operator++();
116  PageItemBoundsList* p;
117  int32 n, length;
118  PMRect r;
119 
120  iterator();
121  iterator( PageItemBoundsList* p, const PMRect& r, int32 n, int32 l);
122  };
123 
124  virtual iterator begin( const PMRect& rect) = 0;
125  virtual iterator end( const PMRect& rect) = 0;
126 // virtual UIDRef next( iterator& i) = 0;
127 #endif
128 };
129 
130 
131 #endif