InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ISelectableDialogSwitcher.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 __ISelectableDialogSwitcher__
25 #define __ISelectableDialogSwitcher__
26 
27 #include "IPMUnknown.h"
28 #include "IControlView.h"
29 
30 class IControlView;
31 class IPanelControlData;
32 class PMString;
33 class IListControlData;
34 class IDialog;
35 class IPanelCreator;
36 
37 // Constants used by auto-resizing selectable dialogs.
38 const int32 kMinGroupBoxHeight = 130; // Minimum height of groupbox.
39 const int32 kGroupBorderOffset = 15; // Y offset between bottom of dialog panel and group border widget in main panel.
40 const int32 kWindowGroupOffset = 12; // Y offset between bottom of group border widget and the window.
41 
59 {
60 public:
61  enum { kDefaultIID = IID_ISELECTABLEDIALOGSWITCHER };
62 
63  enum {kNextPanel = -1, kPreviousPanel = -2};
64 
69  virtual void SwitchDialogPanel(int32 dialogNumber, bool16 validate = kTrue) = 0;
70 
73  virtual void SwitchDialogPanelByID(WidgetID panelsWidgetID) = 0;
74 
78  virtual void AddDialogPanel(IControlView* dialogPanel, const PMString& panelName, int32 at = -1, bool16 autoVisible = kTrue) = 0;
79 
82  virtual IControlView* GetDialogPanel(WidgetID panelsWidgetID) = 0;
83 
86  virtual void SetDialogServiceID(const ServiceID& dialogServiceID,
87  const WidgetID dialogGroupPanelWidgetID = kDialogGroupPanelWidgetID,
88  const WidgetID dialogSelectionWidgetID = kSelectDialogSelectionWidgetID,
89  const WidgetID dialogTitleTextWidgetID = kSelectDialogTitleTextWidgetID) = 0;
90 
93  virtual ServiceID GetDialogServiceID() const = 0;
94 
97  virtual WidgetID GetGroupPanelWidgetID() const = 0;
98 
101  virtual WidgetID GetSelectionListWidgetID() const = 0;
102 
105  virtual WidgetID GetTitleTextWidgetID() const = 0;
106 
107 
111 
114  virtual void LoadDialogPanels() = 0;
115 
118  virtual void ShowDialogPanel(const WidgetID panelWidgetID, const bool16 show = kTrue) = 0;
119 
120 
123  virtual void HideNonAutoShownPanels() = 0;
124 
127  virtual int32 GetCurrentPanelIndex() const = 0;
128 
131  virtual WidgetID GetPanelWidgetID(int32 index) const = 0;
132 
135  virtual bool16 GetAutoResizable() const = 0;
136 
139  virtual void SetAutoResizable(const bool16 bAutoSize) = 0;
140 
141 
144  virtual void RemoveDialogPanel(IControlView* dialogPanel) = 0;
145 
148  virtual int32 GetDialogPanelIndex(WidgetID panelWidgetID) const = 0;
149 
152  virtual int32 GetNumDialogPanels() const = 0;
153 
156  virtual void UnloadDialogPanels() = 0;
157 
158  /* gives the keyboard focus to the selected list */
159  virtual bool16 SetKeyFocusToSelectionList() = 0;
160 };
161 
162 #endif