InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IPanelControlData.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Frits Habermann
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 __IPanelControlData__
25 #define __IPanelControlData__
26 
27 #include "PMTypes.h"
28 #include "widgetid.h"
29 #include "IControlView.h"
30 
33 class INTERFACE_DECL IPanelControlData : public IPMUnknown
34 {
35 public:
36  enum { kDefaultIID = IID_IPANELCONTROLDATA };
37 
38  // -----------------------
41 
45  virtual void AddWidget(IControlView *w, int32 at = -1, bool16 invalidate = kTrue) = 0;
46 
49  virtual void RemoveWidget(IControlView *w, bool16 invalidate = kTrue, bool16 deleteUID = kFalse) = 0;
50 
54  virtual void MoveWidget(IControlView *w, int32 at, bool16 invalidate = kTrue) = 0;
55 
58  virtual void RemoveWidget(int32 index, bool16 invalidate = kTrue, bool16 deleteUID = kFalse) = 0;
59 
62  virtual void ReleaseAll(bool16 deleteUID = kTrue) = 0;
63 
65 
66  // -----------------------
69 
72  virtual IControlView* GetWidget(int32 index) const = 0;
73 
74  enum {
75  kSearchLevel_Invalid = 0,
76  kSearchLevel_Self = 1,
77  kSearchLevel_SelfAndChildren = 2,
78  kSearchLevel_SelfChildrenAndGrandchildren = 3,
79  kSearchLevel_SelfChildrenGrandchildrenAndGreatgrandchildren = 4,
80 
81  kSearchLevel_AllDescendants = 9999,
82  };
83 
84 
88  virtual IControlView* FindWidget(const WidgetID& widgetId, int16 searchLevels = kSearchLevel_AllDescendants) const = 0;
89 
93  virtual IControlView* FindWidget(const SysPoint& windowPt, int16 searchLevels = kSearchLevel_AllDescendants) const = 0;
94 
97  virtual bool16 GetWidgetVisibleState(int32 index) const = 0;
98 
101  virtual bool16 IsWidgetInstantiated(int32 index) const = 0;
102 
105  virtual int32 GetIndex(const IControlView *w) const = 0;
106 
109  virtual int32 Length() const = 0;
111 
112 
113  // -----------------------
116 
120  virtual void WidgetAttributeChanged(IControlView* view, const WidgetAttributeID& id) = 0;
122 
123  // -----------------------
126 
129  virtual void SetKeyboardFocus(const WidgetID& widgetId) = 0;
131 
132  // -----------------------
135 
139  virtual void SetKeyboardFocus(const IControlView* widget) = 0;
141 
142 };
143 
144 #endif