00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef __WDR_styledialg_H__
00013 #define __WDR_styledialg_H__
00014
00015
00016
00017 #ifndef WX_PRECOMP
00018 #include <wx/wx.h>
00019 #endif
00020
00021 #include <wx/statline.h>
00022 #include <wx/spinbutt.h>
00023 #include <wx/spinctrl.h>
00024 #include <wx/listctrl.h>
00025
00026 #include <wx/colordlg.h>
00027
00028 #include <wx/artbase/stylebase.h>
00029 #include <wx/canvas/layerinf.h>
00030 #include <wx/editor/strucdlg.h>
00031
00032
00033
00034 #define ID_STYLENAME 10000
00035 #define ID_BLUE 10002
00036 #define ID_SLIDER_RED 10007
00037 #define ID_SLIDER_GREEN 10008
00038 #define ID_SLIDER_BLUE 10009
00039 #define ID_RED 10004
00040 #define ID_GREEN 10005
00041 #define ID_FILLCOLOR 10006
00042 #define ID_STROKECOLOR 10019
00043 #define ID_TEXT 10010
00044 #define ID_PIXELWIDTH 10011
00045 #define ID_PIXELSTROKE 10012
00046 #define ID_STIPPLEBITMAP 10013
00047 #define ID_FILLSTYLE 10015
00048 #define ID_STROKESTYLE 10016
00049 #define ID_COLOURS 10017
00050 #define ID_MODEL_BUTTON_OK 10018
00051
00052
00053
00054
00055
00056
00057
00058
00059 class A2DEDITORDLLEXP a2dStyleDialog: public wxDialog
00060 {
00061 DECLARE_EVENT_TABLE()
00062
00063 public:
00064
00065 a2dStyleDialog( wxWindow *parent,long style = wxDEFAULT_DIALOG_STYLE, bool modal = false );
00066
00067 ~a2dStyleDialog();
00068
00069 void SetColor( wxSpinEvent& spinevent );
00070
00071 void ColorSelect( wxCommandEvent &event );
00072
00073 void OnSpinCtrlText(wxCommandEvent& event);
00074
00075 void OnSliderUpdate( wxScrollEvent &event );
00076
00077 void OnColourBitmap( wxCommandEvent& event );
00078
00079 void OnStippleBitmap( wxCommandEvent& event );
00080
00081 void OnFillStyle( wxCommandEvent &event );
00082
00083 void OnStrokeStyle( wxCommandEvent &event );
00084
00085 void OnPixelWidth( wxCommandEvent& event );
00086
00087 void OnPixelWidthSpin( wxSpinEvent& event );
00088
00089 void OnPixelStroke( wxCommandEvent& event );
00090
00091
00092 void OnCloseWindow( wxCloseEvent& event );
00093
00094 void OnActivate( wxActivateEvent& event);
00095
00096 void OnIdle( wxIdleEvent& idleEvent );
00097
00098 void SentStyle( bool fill = true, bool stroke = true );
00099
00100 a2dFill& GetFill() { return m_fill; }
00101 void SetFill( const a2dFill& fill );
00102
00103 a2dStroke& GetStroke() { return m_stroke; }
00104 void SetStroke( const a2dStroke& stroke );
00105
00106 protected:
00107
00108 void OnUndoEvent( a2dCommandProcessorEvent& event );
00109
00110 void OnDoEvent( a2dCommandProcessorEvent& event );
00111
00112 void OnSize(wxSizeEvent& WXUNUSED(event) );
00113
00114 void OnComEvent( a2dComEvent& event );
00115
00116 void CmOk( wxCommandEvent& event );
00117
00118 a2dFill m_fill;
00119 a2dFill m_oneColFill;
00120 a2dFill m_hatchTwoColFill;
00121 a2dFill m_PattFill;
00122 a2dFill m_linGrad;
00123 a2dFill m_radGrad;
00124 a2dFill m_dropGrad;
00125
00126 a2dStroke m_stroke;
00127 a2dStroke m_oneColStroke;
00128 a2dStroke m_pattStroke;
00129
00130 wxColour m_colorFill1;
00131
00132 wxColour m_colorFill2;
00133
00134 wxColour m_colorStroke;
00135
00136
00137 wxColour* m_color;
00138
00139 wxBitmap m_fillstippleb;
00140
00141 wxBitmapButton* m_colourfillshow;
00142 wxBitmapButton* m_colourstrokeshow;
00143 wxBitmapButton* m_fillstipple;
00144
00145 wxSlider* m_sliderred;
00146
00147 wxSlider* m_slidergreen;
00148
00149 wxSlider* m_sliderblue;
00150
00151 wxSpinCtrl* m_spinred;
00152
00153 wxSpinCtrl* m_spingreen;
00154
00155 wxSpinCtrl* m_spinblue;
00156
00157
00158
00159 wxColourData* m_cdata;
00160
00161
00162 wxColourDialog* m_cd;
00163
00164 FillPatterns* m_fillpatterns;
00165
00166 wxBitmap m_fillpatternmono;
00167
00168 wxChoice* m_fillstyles;
00169
00170 wxSpinCtrl* m_pixelwidth;
00171
00172 wxCheckBox* m_pixelstroke;
00173
00174 wxChoice* m_strokestyles;
00175
00176 bool m_skipspinevent;
00177
00178
00179 bool m_doSentCommand;
00180
00181 bool m_modal;
00182
00183 bool m_needsUpdate;
00184
00185 bool m_fillCommand;
00186 bool m_strokeCommand;
00187 };
00188
00189
00190 #endif
00191