00001 #ifndef _WX_LEGEND_DIALOG_H_
00002 #define _WX_LEGEND_DIALOG_H_
00003
00004 #include "../inc/Legend.h"
00005 #include <wx/spinctrl.h>
00006 #include "wxLegendCanvas.h"
00007
00008 class wxLegendDialog: public wxDialog
00009 {
00010
00011 public:
00012
00013 wxLegendDialog(const wxString& title, long style, FemViewer::Legend& legend, const wxSize& size = wxSize(300,400));
00014
00015 wxLegendDialog(const wxString& title, FemViewer::Legend& legend);
00016
00017 ~wxLegendDialog();
00018
00019 protected:
00020
00021 FemViewer::Legend& activeLegend;
00022 FemViewer::Legend newLegend;
00023
00024 wxLegendCanvas *m_canvas_active;
00025 wxLegendCanvas *m_canvas_new;
00026
00027
00028 wxTextCtrl *tcActiveMin;
00029 wxTextCtrl *tcActiveMax;
00030 wxTextCtrl *tcActiveStart;
00031 wxTextCtrl *tcActiveEnd;
00032
00033 wxSpinCtrl *scActiveRengNr;
00034 wxRadioBox *rbActiveLegType;
00035 wxCheckBox *cbActiveOutBlck;
00036
00037
00038
00039 wxTextCtrl *tcNewMin;
00040 wxTextCtrl *tcNewMax;
00041 wxTextCtrl *tcNewStart;
00042 wxTextCtrl *tcNewEnd;
00043
00044 wxSpinCtrl *scNewRengNr;
00045 wxRadioBox *rbNewLegType;
00046 wxCheckBox *cbNewOutBlck;
00047
00048
00049 wxButton *btnReset, *btnRefresh, *btnActive;
00050
00051 enum
00052 {
00053 ID_RADIOBOX,
00054 MenuColorCheckBox,
00055 ID_SPINCTRL,
00056 ResetPanels,
00057 PanelNewRefresh,
00058 PanelNewActive
00059 };
00060
00062 void SetActiveValues(const FemViewer::Legend & l);
00064 void SetNewValues(const FemViewer::Legend & l);
00065
00067 void OnPanelsResetToDefaults( wxCommandEvent &event);
00069 void OnPanelNewRefresh( wxCommandEvent &event );
00071 void OnPanelNewActive( wxCommandEvent &event );
00072
00073 void MsgBoxErr(const wxString & m, const wxString & t = wxT("Error") );
00074
00075 DECLARE_EVENT_TABLE()
00076
00077 };
00078
00079 #endif
00080