InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IDialogController.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: Dave Burnard (was Tom Taylor)
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 __IDialogController__
25 #define __IDialogController__
26 
27 #include "IPMUnknown.h"
28 #include "IControlView.h"
29 #include "ITriStateControlData.h"
30 #include "ITextValue.h"
31 #include "PMString.h"
32 
34 class IControlView;
35 class IPanelControlData;
36 class IDialog;
37 class IActiveContext;
38 
39 static const WidgetID kNoInvalidWidgets = 0;
40 
44 {
45 #if 0
46  friend class CSelectableDialogController;
47  friend class CDialogObserver;
48  friend class CDialog;
49  friend class CSelectableDialogSwitcher;
50 #endif
51 
52 public:
53  enum { kDefaultIID = IID_IDIALOGCONTROLLER };
54  // ---------------------------
57 
61  virtual void InitializeDialog(IActiveContext* context) = 0;
62  virtual IActiveContext* QueryDialogContext() = 0;
63 
73  virtual WidgetID ValidateDialog() = 0;
74 
75 
82  virtual void ApplyDialog(const WidgetID& widgetId) = 0;
83 
84 
91  virtual void ResetDialog() = 0;
92 
93 
97  virtual void UserCancelled() = 0;
98 
102  virtual void DialogClosing() = 0;
103 
104 
106 
107  // --------------------------------
110 
113  virtual bool16 HasBeenInitialized() const = 0;
114  //
115 
119  virtual void SetInitialized(bool16 initialized) = 0;
120 
121 
123 
124  // --------------------------------
127 
130  virtual void SetOwner(IControlView* ownerPanel) = 0;
131 
132 
138  virtual IControlView* GetOwner() const = 0;
139  //
140 
142 
143  // --------------------------------
146 
149  virtual void GetName(PMString& name) = 0;
150 
152 
153  // --------------------------------
156 
160  virtual void SetTextControlData(const WidgetID& widgetId, const PMString& text, const IPanelControlData* panel = nil, bool16 invalidate = kTrue, bool16 notifyOfChange = kTrue) = 0;
161 
165  virtual PMString GetTextControlData(const WidgetID& widgetId, const IPanelControlData* panel = nil) const = 0;
166 
167 
170  virtual void SetTextValue(const WidgetID& widgetId, const PMReal& value, const IPanelControlData* panel = nil, bool16 invalidate = kTrue, bool16 notifyOfChange = kTrue) = 0;
171 
174  virtual PMReal GetTextValue(const WidgetID& widgetId, const IPanelControlData* panel = nil, bool16 *outParsingError = nil,bool16 *outIsBlank = nil) const = 0;
175 
179  virtual void SetTextValueControlState(const WidgetID& widgetId, ITextValue::TextControlState controlState, const IPanelControlData* panel = nil, bool16 invalidate = kTrue, bool16 notifyOfChange = kTrue) = 0;
180 
184  virtual ITextValue::TextControlState GetTextValueControlState(const WidgetID& widgetId, const IPanelControlData* panel = nil) const = 0;
185 
186 
190  virtual void SetBooleanControlData(const WidgetID& widgetId, bool16 isChecked, const IPanelControlData* panel = nil, bool16 invalidate = kTrue, bool16 notifyOfChange = kTrue) = 0;
191 
194  virtual bool16 GetBooleanControlData(const WidgetID& widgetId, const IPanelControlData* panel = nil) const = 0;
195 
196 
200  virtual void SetTriStateControlData(const WidgetID& widgetId, ITriStateControlData::TriState triState, const IPanelControlData* panel = nil, bool16 invalidate = kTrue, bool16 notifyOfChange = kTrue) = 0;
201 
205  virtual void SetTriStateControlData(const WidgetID& widgetId, bool16 isSelected, const IPanelControlData* panel = nil, bool16 invalidate = kTrue, bool16 notifyOfChange = kTrue) = 0;
206 
210  virtual ITriStateControlData::TriState GetTriStateControlData(const WidgetID& widgetId, const IPanelControlData* panel = nil) const = 0;
211 
212 
215  virtual WidgetID GetSelectedClusterWidget(WidgetID cluster, const IPanelControlData* panel = nil) = 0;
216 
219  virtual void SetSelectedClusterWidget(WidgetID clusterId, WidgetID widgetToSelect, const IPanelControlData* panel = nil, bool16 invalidate = kTrue, bool16 notifyOfChange = kTrue) = 0;
220 
221 
224  virtual IStringListControlData* QueryListControlDataInterface(const WidgetID& widgetId, const IPanelControlData* panel = nil) const = 0;
225 
226 
229  virtual IPanelControlData* QueryIfNilElseAddRef(const IPanelControlData* panel) const = 0;
230 
234  virtual void SelectDialogWidget(const WidgetID& widgetId) = 0;
235 
238  virtual bool16 GetPreviewModeOn() = 0;
239 
242  virtual void SetPreviewModeOn(bool16 bOn) = 0;
244 
245 };
246 
247 #endif