00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef __LAYERDLG_H__
00014 #define __LAYERDLG_H__
00015
00016 #ifndef WX_PRECOMP
00017 #include "wx/wx.h"
00018 #endif
00019
00020 #include <wx/editor/strucdlg.h>
00021
00022 #include <wx/colordlg.h>
00023
00024
00025
00026
00027
00028
00029
00030 class A2DEDITORDLLEXP LayerPropertiesDialog : public wxDialog
00031 {
00032 public:
00033
00034
00035 LayerPropertiesDialog( wxFrame* parent, a2dLayers* layersetup, const wxString& title = wxT("LayerProperties"),
00036 long style = wxDEFAULT_DIALOG_STYLE |wxRESIZE_BORDER | wxDIALOG_NO_PARENT ,
00037 const wxString& name = _T("Layer_Properties_Dialog") );
00038
00039
00040 ~LayerPropertiesDialog();
00041
00042
00043 void FillControls(int start);
00044
00045
00046 void StoreControls( unsigned int start, unsigned int nrLayers = 10 );
00047
00048
00049 void Init( a2dLayers* layersetup );
00050
00051
00052 void CmHide(wxCommandEvent &);
00053
00054
00055 void CmSort(wxCommandEvent &);
00056
00057
00058 void CmCancel(wxCommandEvent &);
00059
00060
00061 void CmRestore(wxCommandEvent &);
00062
00063
00064 void CmSaveToFile(wxCommandEvent& WXUNUSED(event));
00065
00066
00067 void CmLoadFromFile( wxCommandEvent& WXUNUSED(event) );
00068
00069 void CmVisible(wxCommandEvent &);
00070
00071
00072 void CmRead(wxCommandEvent &);
00073
00074
00075 void CmOutLine(wxCommandEvent &);
00076
00077
00078 void CmPrev(wxCommandEvent &);
00079
00080
00081 void CmNext(wxCommandEvent &);
00082
00083
00084 void CmSelect(wxCommandEvent &);
00085
00086
00087 a2dSmrtPtr<a2dLayers> m_controlslayersetup;
00088
00089
00090 a2dSmrtPtr<a2dLayers> m_layersetup;
00091
00092
00093 a2dSmrtPtr<a2dLayers> m_backuplayersetup;
00094
00095
00096 int m_startvalue;
00097
00098 wxButton* m_buttonSORT;
00099
00100
00101 wxButton* m_buttonHIDE;
00102
00103
00104 wxButton* m_buttonCANCEL;
00105
00106
00107 wxButton* m_buttonVISIBLE;
00108
00109
00110 wxButton* m_buttonREAD;
00111
00112 wxButton* m_buttonOutLine;
00113
00114
00115 wxButton* m_buttonSELECT;
00116
00117
00118 wxButton* m_buttonPREV;
00119
00120
00121 wxButton* m_buttonNEXT;
00122
00123
00124 wxButton* m_buttonRESTORE;
00125
00126 wxButton* m_buttonSAVETOFILE;
00127
00128 wxButton* m_buttonLOADFROMFILE;
00129
00130 protected:
00131
00132 a2dLayerInfo* GetLocalLayerInfo( int i );
00133 a2dLayerInfo* GetDocLayerInfo( int i );
00134
00135 wxTimer* m_timerAvailable;
00136
00137 void OnTimerAvailable( wxTimerEvent &event );
00138
00139 void OnCloseWindow(wxCloseEvent& WXUNUSED(event));
00140
00141 void OnChangedDocument( a2dCommandEvent& event );
00142
00143 void OnComEvent( a2dComEvent& event );
00144
00145 void OnDoEvent( a2dCommandProcessorEvent& event );
00146
00147 void OnChar(wxKeyEvent& event);
00148
00149 void OnCharHook(wxKeyEvent& event);
00150
00151 void Cm_NumberBox(wxEvent& event);
00152
00153 void Cm_VisibleBox(wxEvent& event);
00154
00155 void Cm_SelectBox(wxEvent& event);
00156
00157 void Cm_ReadBox(wxEvent& event);
00158
00159 void Cm_OutLineBox(wxEvent& event);
00160
00161 void Cm_LayerName(wxEvent& event);
00162
00163 void Cm_B_BitB(wxEvent& event);
00164
00165 void Cm_F_BitB(wxEvent& event);
00166
00167 void Cm_P_BitB(wxEvent& event);
00168
00169 void Cm_InMap(wxEvent& event);
00170
00171 void Cm_OutMap(wxEvent& event);
00172
00173
00174 wxFrame* m_parent;
00175
00176
00177 wxButton* m_numberbox[10];
00178
00179
00180 wxTextCtrl* m_namebox[10];
00181
00182
00183 wxCheckBox* m_visiblebox[10];
00184
00185
00186 wxCheckBox* m_selectablebox[10];
00187
00188
00189 wxCheckBox* m_outlinebox[10];
00190
00191
00192 wxCheckBox* m_readlayerbox[10];
00193
00194
00195 wxButton* m_fillbut[10];
00196
00197
00198 wxButton* m_borderbut[10];
00199
00200
00201 wxBitmapButton* m_patternbut[10];
00202
00203
00204 wxTextCtrl* m_gdsinmap[10];
00205
00206
00207 wxTextCtrl* m_gdsoutmap[10];
00208
00209
00210 wxStaticText* m_numberlabel;
00211
00212
00213 wxStaticText* m_namelabel;
00214
00215
00216 wxStaticText* m_availablelabel;
00217
00218
00219 wxStaticText* m_visiblelabel;
00220
00221
00222 wxStaticText* m_selectablelabel;
00223
00224
00225 wxStaticText* m_outlinelabel;
00226
00227
00228 wxStaticText* m_readlayerlabel;
00229
00230
00231 wxStaticText* m_filllabel;
00232
00233
00234 wxStaticText* m_borderlabel;
00235
00236
00237 wxStaticText* m_patternlabel;
00238
00239
00240 wxStaticText* m_mappinglabel;
00241
00242 wxBitmap* m_p_bitm[10];
00243
00244
00245 int m_patterns[10];
00246
00247
00248 wxBrush* m_brush;
00249
00250
00251 wxColourData* m_cdata;
00252
00253
00254 wxColourDialog* m_cd;
00255
00256 FillPatterns* m_fillpatterns;
00257
00258 wxDateTime m_dialogLastUpdate;
00259
00260 bool m_onorder;
00261
00262
00263 DECLARE_EVENT_TABLE()
00264
00265
00266 };
00267
00268 #endif
00269