InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
CSelectableDialogController.h
1 //========================================================================================
2 //
3 // $File$
4 //
5 // Owner: 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 __CSelectableDialogController__
25 #define __CSelectableDialogController__
26 
27 #include "CDialogController.h"
28 
29 #ifdef WIDGET_BUILD
30 #endif
31 
32 class IActiveContext;
34 {
35 public:
36  // ----- Initialization -----
37 
39  virtual ~CSelectableDialogController();
40 
41  // ----- Dialog protocol -----
42 
43  virtual void ResetDialogFields(IActiveContext* myContext);
44 
45  virtual WidgetID ValidateDialogFields(IActiveContext* myContext);
46  // This function is called when the user clicks the "ok" (or equivalent)
47  // button. Override ValidateFields to check that the data in each
48  // dialog control is valid and within limits. It's up to the subclass
49  // to display an alert. If one or more of the fields have invalid data,
50  // return the WidgetID of the dialog item to select. If all fields are
51  // valid, return kDefaultWidgetId. When all fields are valid, the
52  // "ApplyFields" function will be called.
53 
54  virtual void ApplyDialogFields( IActiveContext* myContext, const WidgetID& widgetId);
55  // Should be overridden to retrieve data from the widgets in the
56  // dialog and apply it. The widget that caused the apply is passed
57  // in 'widgetId. By default the widget with id kOKButtonWidgetID causes
58  // an apply. Override Update to have others call ApplyFields.
59 
60  virtual void UserCancelled();
61  // This function is called when the user clicks the "cancel" button.
62  // Override if the dialog needs to know when this happens.
63 
64  virtual void ClosingDialog(IActiveContext* lastChanceToUseMyContext);
65  // In ClosingDialog, we unload any panels that were not auto loaded..
66 
67  // ----- Dialog helper methods -----
68 
69  virtual void SelectDialogWidget(const WidgetID& widgetId);
70 };
71 
72 
73 #endif