wxArt2D
layerdlg.h
Go to the documentation of this file.
1 /*! \file wx/canvas/layerdlg.h
2  \brief layer dialog for changing layer settings.
3  \author Klaas Holwerda
4 
5  Copyright: 2000-2004 (c) Klaas Holwerda
6 
7  Licence: wxWidgets Licence
8 
9  RCS-ID: $Id: layerdlg.h,v 1.17 2008/10/30 23:18:09 titato Exp $
10 */
11 
12 
13 #ifndef __LAYERDLG_H__
14 #define __LAYERDLG_H__
15 
16 #ifndef WX_PRECOMP
17 #include "wx/wx.h"
18 #endif
19 
20 #include <wx/canvas/strucdlg.h>
21 
22 #include <wx/colordlg.h>
23 
24 
25 //! Dialog for displaying/editing layers and properties of layers.
26 /*!
27  This class is used to show a layerproperties dialog, in which the layernames, layernumber, visibility, select/read,
28  fillcolour, border, pattern and mapping can be set.
29 */
30 class A2DCANVASDLLEXP LayerPropertiesDialog : public wxDialog
31 {
32 public:
33 
34  // Constructor.
35  LayerPropertiesDialog( a2dHabitat* habitat, wxFrame* parent, a2dLayers* layersetup, const wxString& title = wxT( "LayerProperties" ),
36  long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDIALOG_NO_PARENT ,
37  const wxString& name = _T( "Layer_Properties_Dialog" ) );
38 
39  // Destructor.
41 
42  // initialize the controls with the right values
43  void FillControls( int start );
44 
45  //! get the values from the controls and store them
46  void StoreControls( unsigned int start, unsigned int nrLayers = 10 );
47 
48  // Initialize
49  void Init( a2dLayers* layersetup );
50 
51  //close/hide window if HIDE-button is pressed.
52  void CmHide( wxCommandEvent& );
53 
54  //! sort order
55  void CmSort( wxCommandEvent& );
56 
57  // Close window if CANCEL-button is pressed.
58  void CmCancel( wxCommandEvent& );
59 
60  // Restore original settings for active view when RESTORE-button is pressed.
61  void CmRestore( wxCommandEvent& );
62 
63  //! save layers settings in dialog to file
64  void CmSaveToFile( wxCommandEvent& WXUNUSED( event ) );
65 
66  //! load layers settings in dialog from file
67  void CmLoadFromFile( wxCommandEvent& WXUNUSED( event ) );
68 
69  void CmVisible( wxCommandEvent& );
70 
71  // Set read properties.
72  void CmRead( wxCommandEvent& );
73 
74  // Set outline properties.
75  void CmOutLine( wxCommandEvent& );
76 
77  // Go to previous set of layers if PREVIOUS-button is pressed.
78  void CmPrev( wxCommandEvent& );
79 
80  // Go to next set of layers if NEXT-button is pressed.
81  void CmNext( wxCommandEvent& );
82 
83  // Select layer.
84  void CmSelect( wxCommandEvent& );
85 
86  //! changed local setup which is shown in dialog and compared with the controlled external setup
88 
89  // pointer to the layer setup of the active view.
90  a2dSmrtPtr<a2dLayers> m_layersetup;
91 
92  // pointer to the cloned layer setup in order to restore when canceling.
93  a2dSmrtPtr<a2dLayers> m_backuplayersetup;
94 
95  // will increase or decrease with 10 (ten layers on the screen).
96  int m_startvalue;
97 
98  wxButton* m_buttonSORT;
99 
100  // wxWindows class.
101  wxButton* m_buttonHIDE;
102 
103  // wxWindows class.
104  wxButton* m_buttonCANCEL;
105 
106  // wxWindows class.
107  wxButton* m_buttonVISIBLE;
108 
109  // wxWindows class.
110  wxButton* m_buttonREAD;
111 
112  wxButton* m_buttonOutLine;
113 
114  // wxWindows class.
115  wxButton* m_buttonSELECT;
116 
117  // wxWindows class.
118  wxButton* m_buttonPREV;
119 
120  // wxWindows class.
121  wxButton* m_buttonNEXT;
122 
123  // wxWindows class.
124  wxButton* m_buttonRESTORE;
125 
126  wxButton* m_buttonSAVETOFILE;
127 
128  wxButton* m_buttonLOADFROMFILE;
129 
130 protected:
131 
132  a2dLayerInfo* GetLocalLayerInfo( int i );
133  a2dLayerInfo* GetDocLayerInfo( int i );
134 
135  void OnCloseWindow( wxCloseEvent& WXUNUSED( event ) );
136 
137  void OnComEvent( a2dComEvent& event );
138 
139  void OnDoEvent( a2dCommandProcessorEvent& event );
140 
141  void OnChar( wxKeyEvent& event );
142 
143  void OnCharHook( wxKeyEvent& event );
144 
145  void Cm_NumberBox( wxEvent& event );
146 
147  void Cm_VisibleBox( wxEvent& event );
148 
149  void Cm_SelectBox( wxEvent& event );
150 
151  void Cm_ReadBox( wxEvent& event );
152 
153  void Cm_OutLineBox( wxEvent& event );
154 
155  void Cm_LayerName( wxEvent& event );
156 
157  void Cm_B_BitB( wxEvent& event );
158 
159  void Cm_F_BitB( wxEvent& event );
160 
161  void Cm_P_BitB( wxEvent& event );
162 
163  void Cm_InMap( wxEvent& event );
164 
165  void Cm_OutMap( wxEvent& event );
166 
167  // Pointer to parent window.
168  wxFrame* m_parent;
169 
170  // wxWindows class, layer number edit control.
171  wxButton* m_numberbox[10];
172 
173  // wxWindows class, layer name edit control.
174  wxTextCtrl* m_namebox[10];
175 
176  // wxWindows class, layer visible checkbox control.
177  wxCheckBox* m_visiblebox[10];
178 
179  // wxWindows class, layer selectable checkbox control.
180  wxCheckBox* m_selectablebox[10];
181 
182  // wxWindows class, layer readlayer checkbox control.
183  wxCheckBox* m_outlinebox[10];
184 
185  // wxWindows class, layer readlayer checkbox control.
186  wxCheckBox* m_readlayerbox[10];
187 
188  // wxWindows class, layer fill color buttons.
189  wxButton* m_fillbut[10];
190 
191  // wxWindows class, layer border color buttons.
192  wxButton* m_borderbut[10];
193 
194  // wxWindows class, layer pattern color buttons.
195  wxBitmapButton* m_patternbut[10];
196 
197  // wxWindows class, mapping for gds in.
198  wxTextCtrl* m_gdsinmap[10];
199 
200  // wxWindows class, mapping for gds out.
201  wxTextCtrl* m_gdsoutmap[10];
202 
203  // wxWindows class.
204  wxStaticText* m_numberlabel;
205 
206  // wxWindows class.
207  wxStaticText* m_namelabel;
208 
209  // wxWindows class.
210  wxStaticText* m_availablelabel;
211 
212  // wxWindows class.
213  wxStaticText* m_visiblelabel;
214 
215  // wxWindows class.
216  wxStaticText* m_selectablelabel;
217 
218  // wxWindows class.
219  wxStaticText* m_outlinelabel;
220 
221  // wxWindows class.
222  wxStaticText* m_readlayerlabel;
223 
224  // wxWindows class.
225  wxStaticText* m_filllabel;
226 
227  // wxWindows class.
228  wxStaticText* m_borderlabel;
229 
230  // wxWindows class.
231  wxStaticText* m_patternlabel;
232 
233  // wxWindows class.
234  wxStaticText* m_mappinglabel;
235 
236  wxBitmap* m_p_bitm[10];
237 
238  //!the choosen pattern.
239  int m_patterns[10];
240 
241  // wxWindows class, the brush.
242  wxBrush* m_brush;
243 
244  // wxWindows class, to help construct the colour dialog.
245  wxColourData* m_cdata;
246 
247  // wxWindows class, the colour dialog.
248  wxColourDialog* m_cd;
249 
250  FillPatterns* m_fillpatterns;
251 
252  wxDateTime m_dialogLastUpdate;
253 
254  bool m_onorder;
255 
256  a2dHabitat* m_habitat;
257 
258  // Declare used events.
259  DECLARE_EVENT_TABLE()
260 
261 
262 };
263 
264 #endif
265 
a2dSmrtPtr< a2dLayers > m_controlslayersetup
changed local setup which is shown in dialog and compared with the controlled external setup ...
Definition: layerdlg.h:87
contains the layer properties for one layer,
Definition: layerinf.h:41
defines common settinsg for a habitat for a set of a2dCameleons.
Definition: canglob.h:439
Dialog for displaying/editing layers and properties of layers.
Definition: layerdlg.h:30
for choosing a a2dCanvasObject from a list.
Event sent to a2dCommandProcessor.
Definition: comevt.h:701
see a2dComEvent
Definition: gen.h:371
layerdlg.h Source File -- Sun Oct 12 2014 17:04:21 -- Sun Oct 12 2014 -- 1.8.5 -- wxArt2D -- . -- Main Page Reference Documentation