#include <OptionThemes.h>


Public Member Functions | |
| mapThemeOption (IMapData *pMapData, ThemeManager *pThemeManager) | |
| mapThemeOption constructor | |
| void | DoDisplay (wxOptionSizer *sizer, wxWindow *parent) |
| you should override the following functions: | |
| void | OnWindowDestroy () |
| When this is called, then you should save out any values stored in controls, as they will be destroyed soon. | |
| bool | DoSave () |
| Ok was pressed . | |
| bool | Enable (bool enable) |
| Enable/disable any controls that need to be enabled/disabled. | |
Private Member Functions | |
| void | OnAdd (wxCommandEvent &event) |
| Add was pressed . | |
| void | OnEdit (wxCommandEvent &event) |
| Edit was pressed . | |
| void | OnRemove (wxCommandEvent &event) |
| Remove was pressed . | |
| int | EditTheme (wxString &strTheme, MapAppearanceSettings &theme) |
| Edit the theme. | |
| void | RefreshComboBoxes (const wxString &strRenameFrom=wxT(""), const wxString &strRenameTo=wxT("")) |
| The list of theme names has changed. | |
Private Attributes | |
| wxListBox * | m_pctlThemeList |
| List of all themes. | |
| wxComboBox * | m_pctlNightTheme |
| Theme used at night. | |
| wxString | m_nightTheme |
| wxComboBox * | m_pctlDayTheme |
| Theme used during the day. | |
| wxString | m_dayTheme |
| wxComboBox * | m_pctlPhotoTheme |
| Theme used in aerial photo mode. | |
| wxString | m_photoTheme |
| wxRadioBox * | m_pctlThemeUsage |
| Always day/always night/switch at sunrise and sunset. | |
| ThemeManager::ThemeUsage | m_themeUsage |
| IMapData * | m_pMapData |
| Map control data. | |
| ThemeManager * | m_pParentThemeManager |
| Parent's theme manager. | |
| ThemeManager | m_ThemeManager |
| Currently being edited theme manager. | |
Definition at line 40 of file OptionThemes.h.
| mapThemeOption::mapThemeOption | ( | IMapData * | pMapData, | |
| ThemeManager * | pThemeManager | |||
| ) |
| void mapThemeOption::DoDisplay | ( | wxOptionSizer * | sizer, | |
| wxWindow * | parent | |||
| ) | [virtual] |
you should override the following functions:
This is called when the option is going to be displayed. You should add your controls to a sizer, and then wait for OnWindowDestroy() to be called. If you need to get the value of a control (ie, a textbox), then you should keep pointers to them around. However, do not delete the controls, since they are owned by the parent dialog and will be automatically deleted.
| sizer | is a wxOptionSizer that has two columns that your controls should be added to | |
| parent | is a reference to the parent window that you should pass to your child controls. |
Implements wxOption.
Definition at line 70 of file OptionThemes.cpp.
| void mapThemeOption::OnWindowDestroy | ( | ) | [virtual] |
When this is called, then you should save out any values stored in controls, as they will be destroyed soon.
Implements wxOption.
Definition at line 158 of file OptionThemes.cpp.
| bool mapThemeOption::DoSave | ( | ) | [virtual] |
Ok was pressed .
. save the settings
Implements wxOption.
Definition at line 172 of file OptionThemes.cpp.
| bool mapThemeOption::Enable | ( | bool | enable | ) | [inline, virtual] |
Enable/disable any controls that need to be enabled/disabled.
Don't bother doing this with static labels, that just seems like it would be annoying and useless.
Implements wxOption.
Definition at line 48 of file OptionThemes.h.
| void mapThemeOption::OnAdd | ( | wxCommandEvent & | event | ) | [private] |
| void mapThemeOption::OnEdit | ( | wxCommandEvent & | event | ) | [private] |
| void mapThemeOption::OnRemove | ( | wxCommandEvent & | event | ) | [private] |
Remove was pressed .
. remove the selected theme, provided it is not the last one.
Definition at line 246 of file OptionThemes.cpp.
| int mapThemeOption::EditTheme | ( | wxString & | strTheme, | |
| MapAppearanceSettings & | theme | |||
| ) | [private] |
| void mapThemeOption::RefreshComboBoxes | ( | const wxString & | strRenameFrom = wxT(""), |
|
| const wxString & | strRenameTo = wxT("") | |||
| ) | [private] |
The list of theme names has changed.
.. refresh all the combo boxes
Definition at line 293 of file OptionThemes.cpp.
wxListBox* mapThemeOption::m_pctlThemeList [private] |
wxComboBox* mapThemeOption::m_pctlNightTheme [private] |
wxString mapThemeOption::m_nightTheme [private] |
Definition at line 63 of file OptionThemes.h.
wxComboBox* mapThemeOption::m_pctlDayTheme [private] |
wxString mapThemeOption::m_dayTheme [private] |
Definition at line 67 of file OptionThemes.h.
wxComboBox* mapThemeOption::m_pctlPhotoTheme [private] |
wxString mapThemeOption::m_photoTheme [private] |
Definition at line 71 of file OptionThemes.h.
wxRadioBox* mapThemeOption::m_pctlThemeUsage [private] |
Definition at line 75 of file OptionThemes.h.
IMapData* mapThemeOption::m_pMapData [private] |
ThemeManager mapThemeOption::m_ThemeManager [private] |
1.5.5