00001 /* 00002 * Roadnav 00003 * 00004 * EditThemeDialog.h 00005 * 00006 * Copyright (c) 2004 - 2008 Richard L. Lynch <rllynch@users.sourceforge.net> 00007 * 00008 * This program is free software; you can redistribute it and/or 00009 * modify it under the terms of version 2 of the GNU General Public License 00010 * as published by the Free Software Foundation. 00011 * 00012 * This program is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program; if not, write to the Free Software 00019 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00020 */ 00021 00022 ////////////////////////////////////////////////////////////////////////////// 00023 /// \file 00024 /// 00025 /// Contains a dialog box used to edit a specific theme. 00026 /// 00027 ////////////////////////////////////////////////////////////////////////////// 00028 00029 #ifndef EDITTHEMEDIALOG_H 00030 #define EDITTHEMEDIALOG_H 00031 00032 #include <vector> 00033 00034 #include "ColorPickerControl.h" 00035 #include "libroadnav/MapAppearanceSettings.h" 00036 #include "libroadnav/MapData.h" 00037 00038 #define EDITTHEMEDIALOG_MAX_DETAILLEVELS 32 00039 00040 ////////////////////////////////////////////////////////////////////////////// 00041 /// 00042 /// \brief Implements a dialog box used to edit a specific theme 00043 /// 00044 ////////////////////////////////////////////////////////////////////////////// 00045 class EditThemeDialog : public wxDialog 00046 { 00047 public: 00048 EditThemeDialog(wxWindow * pParent, const wxString & strTheme, const MapAppearanceSettings & cTheme, IMapData * pMapData); 00049 00050 MapAppearanceSettings GetTheme(); 00051 wxString GetThemeName(); 00052 00053 private: 00054 void RecordSettings(); 00055 wxArrayString GetRecordTypeNames(); 00056 00057 void OnCheckBox(wxEvent & event); 00058 void OnOk(wxCommandEvent& event); 00059 void OnRecordTypeChange(wxCommandEvent & event); 00060 void OnDetailLevelChange(wxCommandEvent & event); 00061 00062 /// Map control data - mostly used to figure out what the detail levels are called 00063 IMapData * m_pMapData; 00064 00065 /// last record type that was selected 00066 int m_iLastRecordType; 00067 00068 /// Theme being edited 00069 MapAppearanceSettings m_Theme; 00070 00071 /// Name of theme being edited 00072 wxString m_strTheme; 00073 00074 /// Control containing name of theme being edited 00075 wxTextCtrl* m_pctlThemeName; 00076 00077 /// Contains which setting is being changed 00078 wxComboBox * m_pctlRecordType; 00079 00080 /// Label color selected 00081 ColorPickerControl * m_pctlLabelColor[EDITTHEMEDIALOG_MAX_DETAILLEVELS]; 00082 00083 /// Line color selected 00084 ColorPickerControl * m_pctlLineColor[EDITTHEMEDIALOG_MAX_DETAILLEVELS]; 00085 00086 /// Label visible checkbox 00087 wxCheckBox * m_pctlLabelVisible[EDITTHEMEDIALOG_MAX_DETAILLEVELS]; 00088 00089 /// Label font size text control 00090 wxTextCtrl * m_pctlLabelFontSize[EDITTHEMEDIALOG_MAX_DETAILLEVELS]; 00091 00092 /// Line visible checkbox 00093 wxCheckBox * m_pctlLineVisible[EDITTHEMEDIALOG_MAX_DETAILLEVELS]; 00094 00095 /// Line width text control 00096 wxTextCtrl * m_pctlLineWidth[EDITTHEMEDIALOG_MAX_DETAILLEVELS]; 00097 00098 DECLARE_EVENT_TABLE() 00099 }; 00100 00101 #endif
1.5.5