]> git.saurik.com Git - wxWidgets.git/blame - contrib/samples/ogl/studio/dialogs.h
Document wxTextCtrl::XYToPosition, PositionToXY and GetLineLength change
[wxWidgets.git] / contrib / samples / ogl / studio / dialogs.h
CommitLineData
1fc25a89
JS
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
ab7ce33c 15#if defined(__GNUG__) && !defined(__APPLE__)
1fc25a89
JS
16// #pragma interface
17#endif
18
19#include <wx/wx.h>
20#include <wx/notebook.h>
21
cecdcad1
WS
22#include <wx/ogl/ogl.h> // base header of OGL, includes and adjusts wx/deprecated/setup.h
23
24#if wxUSE_WX_RESOURCES
25
1fc25a89
JS
26/*
27 * Label editing dialog (about to become obsolete)
28 */
29
30class csLabelEditingDialog: public wxDialog
31{
32DECLARE_CLASS(csLabelEditingDialog)
33public:
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
41protected:
42 wxString m_label;
43
44DECLARE_EVENT_TABLE()
45};
46
47/*
48 * Settings dialog (tabbed)
49 */
50
51class csSettingsDialog: public wxDialog
52{
53DECLARE_CLASS(csSettingsDialog)
54public:
55 csSettingsDialog(wxWindow* parent);
56
57 void OnOK(wxCommandEvent& event);
58
59 virtual bool TransferDataToWindow();
60 virtual bool TransferDataFromWindow();
61
62protected:
63
64 wxPanel* m_generalSettings;
65 wxPanel* m_diagramSettings;
66 wxNotebook* m_notebook;
67
68DECLARE_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
80class csGeneralShapePropertiesDialog: public wxPanel
81{
82DECLARE_CLASS(csGeneralShapePropertiesDialog)
83public:
84 csGeneralShapePropertiesDialog();
85
86 void SetShapeLabel(const wxString& label);
87 inline wxString GetShapeLabel() const { return m_label; }
88
89protected:
90 wxString m_label;
91
92DECLARE_EVENT_TABLE()
93};
94
95/*
96 * Shape properties dialog (tabbed)
97 */
98
99class csShapePropertiesDialog: public wxDialog
100{
101DECLARE_CLASS(csShapePropertiesDialog)
102public:
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();
cecdcad1 110
1fc25a89
JS
111// Accessors
112 csGeneralShapePropertiesDialog* GetGeneralPropertiesDialog() const { return m_generalPropertiesDialog; }
113
114
115protected:
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
126DECLARE_EVENT_TABLE()
127};
128
cecdcad1
WS
129#endif // wxUSE_WX_RESOURCES
130
1fc25a89
JS
131#define ID_SHAPE_PROPERTY_NOTEBOOK 1000
132
133//// Specific attribute-editing panel classes below here
134
135/*
136 * csThinRectangleDialog
137 */
138
139class csThinRectangleDialog: public wxPanel
140{
141DECLARE_CLASS(csThinRectangleDialog)
142public:
143 csThinRectangleDialog();
144
145DECLARE_EVENT_TABLE()
146};
147
148/*
149 * csWideRectangleDialog
150 */
151
152class csWideRectangleDialog: public wxPanel
153{
154DECLARE_CLASS(csWideRectangleDialog)
155public:
156 csWideRectangleDialog();
157
158DECLARE_EVENT_TABLE()
159};
160
161/*
162 * csTriangleDialog
163 */
164
165class csTriangleDialog: public wxPanel
166{
167DECLARE_CLASS(csTriangleDialog)
168public:
169 csTriangleDialog();
170
171DECLARE_EVENT_TABLE()
172};
173
174/*
175 * csSemiCircleDialog
176 */
177
178class csSemiCircleDialog: public wxPanel
179{
180DECLARE_CLASS(csSemiCircleDialog)
181public:
182 csSemiCircleDialog();
183
184DECLARE_EVENT_TABLE()
185};
186
187/*
188 * csCircleDialog
189 */
190
191class csCircleDialog: public wxPanel
192{
193DECLARE_CLASS(csCircleDialog)
194public:
195 csCircleDialog();
196
197DECLARE_EVENT_TABLE()
198};
199
200/*
201 * csCircleShadowDialog
202 */
203
204class csCircleShadowDialog: public wxPanel
205{
206DECLARE_CLASS(csCircleShadowDialog)
207public:
208 csCircleShadowDialog();
209
210DECLARE_EVENT_TABLE()
211};
212
213/*
214 * csOctagonDialog
215 */
216
217class csOctagonDialog: public wxPanel
218{
219DECLARE_CLASS(csOctagonDialog)
220public:
221 csOctagonDialog();
222
223DECLARE_EVENT_TABLE()
224};
225
226/*
227 * csGroupDialog
228 */
229
230class csGroupDialog: public wxPanel
231{
232DECLARE_CLASS(csGroupDialog)
233public:
234 csGroupDialog();
235
236DECLARE_EVENT_TABLE()
237};
238
239/*
240 * csTextBoxDialog
241 */
242
243class csTextBoxDialog: public wxPanel
244{
245DECLARE_CLASS(csTextBoxDialog)
246public:
247 csTextBoxDialog();
248
249DECLARE_EVENT_TABLE()
250};
251
1fc25a89
JS
252#endif
253 // _STUDIO_DIALOGS_H_