]> git.saurik.com Git - wxWidgets.git/blob - contrib/samples/ogl/studio/dialogs.h
use WX_DEFINE_ARRAY_PTR for anarray of pointers (fixes Sun CC warning)
[wxWidgets.git] / contrib / samples / ogl / studio / dialogs.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: dialogs.h
3 // Purpose: Miscellaneous dialogs
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 12/07/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence:
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _STUDIO_DIALOGS_H_
13 #define _STUDIO_DIALOGS_H_
14
15 #if defined(__GNUG__) && !defined(__APPLE__)
16 // #pragma interface
17 #endif
18
19 #include <wx/wx.h>
20 #include <wx/notebook.h>
21
22 #include <wx/ogl/ogl.h> // base header of OGL, includes and adjusts wx/deprecated/setup.h
23
24 #if wxUSE_WX_RESOURCES
25
26 /*
27 * Label editing dialog (about to become obsolete)
28 */
29
30 class csLabelEditingDialog: public wxDialog
31 {
32 DECLARE_CLASS(csLabelEditingDialog)
33 public:
34 csLabelEditingDialog(wxWindow* parent);
35
36 void SetShapeLabel(const wxString& label);
37 inline wxString GetShapeLabel() const { return m_label; }
38
39 void OnOK(wxCommandEvent& event);
40
41 protected:
42 wxString m_label;
43
44 DECLARE_EVENT_TABLE()
45 };
46
47 /*
48 * Settings dialog (tabbed)
49 */
50
51 class csSettingsDialog: public wxDialog
52 {
53 DECLARE_CLASS(csSettingsDialog)
54 public:
55 csSettingsDialog(wxWindow* parent);
56
57 void OnOK(wxCommandEvent& event);
58
59 virtual bool TransferDataToWindow();
60 virtual bool TransferDataFromWindow();
61
62 protected:
63
64 wxPanel* m_generalSettings;
65 wxPanel* m_diagramSettings;
66 wxNotebook* m_notebook;
67
68 DECLARE_EVENT_TABLE()
69 };
70
71 #define ID_PROPERTY_NOTEBOOK 1000
72 #define ID_GENERAL_SETTINGS 1002
73 #define ID_DIAGRAM_SETTINGS 1003
74
75 /*
76 * csGeneralShapePropertiesDialog
77 * Name, description etc.
78 */
79
80 class csGeneralShapePropertiesDialog: public wxPanel
81 {
82 DECLARE_CLASS(csGeneralShapePropertiesDialog)
83 public:
84 csGeneralShapePropertiesDialog();
85
86 void SetShapeLabel(const wxString& label);
87 inline wxString GetShapeLabel() const { return m_label; }
88
89 protected:
90 wxString m_label;
91
92 DECLARE_EVENT_TABLE()
93 };
94
95 /*
96 * Shape properties dialog (tabbed)
97 */
98
99 class csShapePropertiesDialog: public wxDialog
100 {
101 DECLARE_CLASS(csShapePropertiesDialog)
102 public:
103 csShapePropertiesDialog(wxWindow* parent, const wxString& title, wxPanel* attributeDialog, const wxString& attributeDialogName);
104
105 void OnOK(wxCommandEvent& event);
106
107 // Set some suitable defaults in the attribute dialogs (in the first instance,
108 // just set all wxChoices to the first element)
109 void SetDefaults();
110
111 // Accessors
112 csGeneralShapePropertiesDialog* GetGeneralPropertiesDialog() const { return m_generalPropertiesDialog; }
113
114
115 protected:
116
117 // Attributes, specific to each shape
118 wxPanel* m_attributeDialog;
119 wxPanel* m_alternativeAttributeDialog;
120
121 // General properties, same for each shape, e.g. name/description
122 csGeneralShapePropertiesDialog* m_generalPropertiesDialog;
123
124 wxNotebook* m_notebook;
125
126 DECLARE_EVENT_TABLE()
127 };
128
129 #endif // wxUSE_WX_RESOURCES
130
131 #define ID_SHAPE_PROPERTY_NOTEBOOK 1000
132
133 //// Specific attribute-editing panel classes below here
134
135 /*
136 * csThinRectangleDialog
137 */
138
139 class csThinRectangleDialog: public wxPanel
140 {
141 DECLARE_CLASS(csThinRectangleDialog)
142 public:
143 csThinRectangleDialog();
144
145 DECLARE_EVENT_TABLE()
146 };
147
148 /*
149 * csWideRectangleDialog
150 */
151
152 class csWideRectangleDialog: public wxPanel
153 {
154 DECLARE_CLASS(csWideRectangleDialog)
155 public:
156 csWideRectangleDialog();
157
158 DECLARE_EVENT_TABLE()
159 };
160
161 /*
162 * csTriangleDialog
163 */
164
165 class csTriangleDialog: public wxPanel
166 {
167 DECLARE_CLASS(csTriangleDialog)
168 public:
169 csTriangleDialog();
170
171 DECLARE_EVENT_TABLE()
172 };
173
174 /*
175 * csSemiCircleDialog
176 */
177
178 class csSemiCircleDialog: public wxPanel
179 {
180 DECLARE_CLASS(csSemiCircleDialog)
181 public:
182 csSemiCircleDialog();
183
184 DECLARE_EVENT_TABLE()
185 };
186
187 /*
188 * csCircleDialog
189 */
190
191 class csCircleDialog: public wxPanel
192 {
193 DECLARE_CLASS(csCircleDialog)
194 public:
195 csCircleDialog();
196
197 DECLARE_EVENT_TABLE()
198 };
199
200 /*
201 * csCircleShadowDialog
202 */
203
204 class csCircleShadowDialog: public wxPanel
205 {
206 DECLARE_CLASS(csCircleShadowDialog)
207 public:
208 csCircleShadowDialog();
209
210 DECLARE_EVENT_TABLE()
211 };
212
213 /*
214 * csOctagonDialog
215 */
216
217 class csOctagonDialog: public wxPanel
218 {
219 DECLARE_CLASS(csOctagonDialog)
220 public:
221 csOctagonDialog();
222
223 DECLARE_EVENT_TABLE()
224 };
225
226 /*
227 * csGroupDialog
228 */
229
230 class csGroupDialog: public wxPanel
231 {
232 DECLARE_CLASS(csGroupDialog)
233 public:
234 csGroupDialog();
235
236 DECLARE_EVENT_TABLE()
237 };
238
239 /*
240 * csTextBoxDialog
241 */
242
243 class csTextBoxDialog: public wxPanel
244 {
245 DECLARE_CLASS(csTextBoxDialog)
246 public:
247 csTextBoxDialog();
248
249 DECLARE_EVENT_TABLE()
250 };
251
252 #endif
253 // _STUDIO_DIALOGS_H_