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