1 /////////////////////////////////////////////////////////////////////////////
2 // Name: contrib/samples/ogl/studio/dialogs.h
3 // Purpose: Miscellaneous dialogs
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _STUDIO_DIALOGS_H_
13 #define _STUDIO_DIALOGS_H_
16 #include "wx/notebook.h"
18 #include "wx/ogl/ogl.h" // base header of OGL, includes and adjusts wx/deprecated/setup.h
20 #if wxUSE_WX_RESOURCES
23 * Label editing dialog (about to become obsolete)
26 class csLabelEditingDialog
: public wxDialog
28 DECLARE_CLASS(csLabelEditingDialog
)
30 csLabelEditingDialog(wxWindow
* parent
);
32 void SetShapeLabel(const wxString
& label
);
33 inline wxString
GetShapeLabel() const { return m_label
; }
35 void OnOK(wxCommandEvent
& event
);
44 * Settings dialog (tabbed)
47 class csSettingsDialog
: public wxDialog
49 DECLARE_CLASS(csSettingsDialog
)
51 csSettingsDialog(wxWindow
* parent
);
53 void OnOK(wxCommandEvent
& event
);
55 virtual bool TransferDataToWindow();
56 virtual bool TransferDataFromWindow();
60 wxPanel
* m_generalSettings
;
61 wxPanel
* m_diagramSettings
;
62 wxNotebook
* m_notebook
;
67 #define ID_PROPERTY_NOTEBOOK 1000
68 #define ID_GENERAL_SETTINGS 1002
69 #define ID_DIAGRAM_SETTINGS 1003
72 * csGeneralShapePropertiesDialog
73 * Name, description etc.
76 class csGeneralShapePropertiesDialog
: public wxPanel
78 DECLARE_CLASS(csGeneralShapePropertiesDialog
)
80 csGeneralShapePropertiesDialog();
82 void SetShapeLabel(const wxString
& label
);
83 inline wxString
GetShapeLabel() const { return m_label
; }
92 * Shape properties dialog (tabbed)
95 class csShapePropertiesDialog
: public wxDialog
97 DECLARE_CLASS(csShapePropertiesDialog
)
99 csShapePropertiesDialog(wxWindow
* parent
, const wxString
& title
, wxPanel
* attributeDialog
, const wxString
& attributeDialogName
);
101 void OnOK(wxCommandEvent
& event
);
103 // Set some suitable defaults in the attribute dialogs (in the first instance,
104 // just set all wxChoices to the first element)
108 csGeneralShapePropertiesDialog
* GetGeneralPropertiesDialog() const { return m_generalPropertiesDialog
; }
113 // Attributes, specific to each shape
114 wxPanel
* m_attributeDialog
;
115 wxPanel
* m_alternativeAttributeDialog
;
117 // General properties, same for each shape, e.g. name/description
118 csGeneralShapePropertiesDialog
* m_generalPropertiesDialog
;
120 wxNotebook
* m_notebook
;
122 DECLARE_EVENT_TABLE()
125 #endif // wxUSE_WX_RESOURCES
127 #define ID_SHAPE_PROPERTY_NOTEBOOK 1000
129 //// Specific attribute-editing panel classes below here
132 * csThinRectangleDialog
135 class csThinRectangleDialog
: public wxPanel
137 DECLARE_CLASS(csThinRectangleDialog
)
139 csThinRectangleDialog();
141 DECLARE_EVENT_TABLE()
145 * csWideRectangleDialog
148 class csWideRectangleDialog
: public wxPanel
150 DECLARE_CLASS(csWideRectangleDialog
)
152 csWideRectangleDialog();
154 DECLARE_EVENT_TABLE()
161 class csTriangleDialog
: public wxPanel
163 DECLARE_CLASS(csTriangleDialog
)
167 DECLARE_EVENT_TABLE()
174 class csSemiCircleDialog
: public wxPanel
176 DECLARE_CLASS(csSemiCircleDialog
)
178 csSemiCircleDialog();
180 DECLARE_EVENT_TABLE()
187 class csCircleDialog
: public wxPanel
189 DECLARE_CLASS(csCircleDialog
)
193 DECLARE_EVENT_TABLE()
197 * csCircleShadowDialog
200 class csCircleShadowDialog
: public wxPanel
202 DECLARE_CLASS(csCircleShadowDialog
)
204 csCircleShadowDialog();
206 DECLARE_EVENT_TABLE()
213 class csOctagonDialog
: public wxPanel
215 DECLARE_CLASS(csOctagonDialog
)
219 DECLARE_EVENT_TABLE()
226 class csGroupDialog
: public wxPanel
228 DECLARE_CLASS(csGroupDialog
)
232 DECLARE_EVENT_TABLE()
239 class csTextBoxDialog
: public wxPanel
241 DECLARE_CLASS(csTextBoxDialog
)
245 DECLARE_EVENT_TABLE()
249 // _STUDIO_DIALOGS_H_