00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef __STRUCDLG_H__
00014 #define __STRUCDLG_H__
00015
00016 #ifndef WX_PRECOMP
00017 #include "wx/wx.h"
00018 #endif
00019
00020 #include "wx/canvas/canmod.h"
00021 #include "wx/editor/sttool.h"
00022
00023
00024
00025
00026 class A2DEDITORDLLEXP a2dCanvasObjectsDialog: public wxDialog
00027 {
00028 public:
00029
00030
00031 a2dCanvasObjectsDialog(wxWindow* parent, a2dCanvasDocument* document, bool structOnly = true, bool modal = false, long style= (wxCAPTION));
00032
00033
00034 a2dCanvasObjectsDialog(wxWindow* parent, a2dCanvasObjectList* total, bool modal = false, long style= (wxCAPTION));
00035
00036 bool Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style, const wxString& name );
00037
00038
00039 ~a2dCanvasObjectsDialog();
00040
00041
00042 a2dCanvasObject* GetCanvasObject();
00043
00044
00045 void Init( a2dCanvasObjectList* objects );
00046
00047 void Init( a2dCanvasDocument* document );
00048
00049 protected:
00050
00051
00052 void CmOk( wxCommandEvent& );
00053
00054
00055 void CmApply( wxCommandEvent& );
00056
00057
00058 void CmCancel( wxCommandEvent& );
00059
00060
00061 void OnChangedDocument( a2dCommandEvent& event );
00062
00063 void OnCloseWindow(wxCloseEvent& WXUNUSED(event) );
00064
00065 void OnComEvent( a2dComEvent& event );
00066
00067 void OnDoEvent( a2dCommandProcessorEvent& event );
00068
00069 bool m_modal;
00070
00071 wxPanel* m_panel;
00072
00073 wxStaticBox* m_gb;
00074
00075 wxStaticText* m_mess1;
00076
00077 wxStaticText* m_mess2;
00078
00079 wxListBox* m_listbox;
00080
00081 wxButton* m_button1;
00082
00083 wxButton* m_button2;
00084
00085 wxWindow* m_parent;
00086
00087
00088 a2dCanvasObjectList* m_structurelist;
00089
00090
00091 a2dCanvasObject* m_object;
00092
00093 a2dCanvasDocument* m_document;
00094
00095
00096 DECLARE_EVENT_TABLE()
00097 };
00098
00099
00100 class A2DEDITORDLLEXP CanvasFillDialog: public wxDialog
00101 {
00102 public:
00103
00104
00105 CanvasFillDialog(wxFrame* parent);
00106 a2dFillStyle GetStyle(){return m_style;};
00107 void CmOk( wxCommandEvent& );
00108 void CmCancel( wxCommandEvent& );
00109 void OnCloseWindow(wxCloseEvent& event);
00110
00111 DECLARE_EVENT_TABLE()
00112
00113 protected:
00114
00115 wxChoice* m_choice;
00116 wxButton* m_button1;
00117 wxButton* m_button2;
00118
00119 a2dFillStyle m_style;
00120 };
00121
00122
00123 class A2DEDITORDLLEXP PenDialog: public wxDialog
00124 {
00125 public:
00126
00127
00128 PenDialog(wxFrame* parent);
00129 a2dStrokeStyle GetStyle(){return m_style;};
00130 void CmOk( wxCommandEvent& );
00131 void CmCancel( wxCommandEvent& );
00132 void OnCloseWindow(wxCloseEvent& event);
00133
00134 DECLARE_EVENT_TABLE()
00135
00136 protected:
00137
00138 wxChoice* m_choice;
00139 wxButton* m_button1;
00140 wxButton* m_button2;
00141
00142 a2dStrokeStyle m_style;
00143 };
00144
00145
00146 class A2DEDITORDLLEXP LogicalFunction: public wxDialog
00147 {
00148 public:
00149
00150
00151 LogicalFunction(wxFrame* parent);
00152 int GetLogicalFunction(){return m_function;};
00153 void CmOk( wxCommandEvent& );
00154 void CmCancel( wxCommandEvent& );
00155 void OnCloseWindow(wxCloseEvent& event);
00156
00157 DECLARE_EVENT_TABLE()
00158
00159 protected:
00160
00161 wxChoice* m_choice;
00162 wxButton* m_button1;
00163 wxButton* m_button2;
00164
00165 int m_function;
00166 };
00167
00168 #define NR_PATTERNS 72
00169
00170
00171
00172 class A2DEDITORDLLEXP FillPatterns
00173 {
00174 public:
00175 FillPatterns();
00176 ~FillPatterns();
00177
00178 wxBitmap* GetPattern(short patternnr);
00179 private:
00180
00181
00182 wxBitmap* m_fillbitmaps[NR_PATTERNS];
00183 };
00184
00185
00186 class A2DEDITORDLLEXP PatternDialog: public wxDialog
00187 {
00188
00189 public:
00190
00191 PatternDialog(wxWindow* parent,FillPatterns* fills, const wxString& title,long style =0 , const wxString& name = wxT("main_pattern_dlg"));
00192
00193 ~PatternDialog();
00194
00195 void OnActivate( wxActivateEvent& event);
00196
00197 protected:
00198
00199
00200 void OnCloseWindow(wxCloseEvent& event);
00201
00202
00203 void Cm_P_BitB(wxEvent& event);
00204
00205 wxColour* ltowxc(long colour);
00206
00207 wxPanel* m_panel1;
00208
00209 wxScrolledWindow* m_scroll;
00210
00211
00212 wxWindow* m_parent;
00213
00214
00215 wxBitmapButton* m_patternbut[NR_PATTERNS];
00216
00217
00218 int m_choosen;
00219
00220
00221 DECLARE_EVENT_TABLE()
00222
00223 };
00224
00225 #endif
00226