mapThemeOption Class Reference

Implements the map themes option. More...

#include <OptionThemes.h>

Inheritance diagram for mapThemeOption:

Inheritance graph
[legend]
Collaboration diagram for mapThemeOption:

Collaboration graph
[legend]

List of all members.

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.
ThemeManagerm_pParentThemeManager
 Parent's theme manager.
ThemeManager m_ThemeManager
 Currently being edited theme manager.


Detailed Description

Implements the map themes option.

Definition at line 40 of file OptionThemes.h.


Constructor & Destructor Documentation

mapThemeOption::mapThemeOption ( IMapData *  pMapData,
ThemeManager pThemeManager 
)

mapThemeOption constructor

Definition at line 55 of file OptionThemes.cpp.


Member Function Documentation

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.

Parameters:
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]

Add was pressed .

. create a new theme and edit it

Definition at line 191 of file OptionThemes.cpp.

void mapThemeOption::OnEdit ( wxCommandEvent &  event  )  [private]

Edit was pressed .

. edit the selected theme

Definition at line 222 of file OptionThemes.cpp.

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]

Edit the theme.

Definition at line 272 of file OptionThemes.cpp.

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.


Member Data Documentation

wxListBox* mapThemeOption::m_pctlThemeList [private]

List of all themes.

Definition at line 59 of file OptionThemes.h.

wxComboBox* mapThemeOption::m_pctlNightTheme [private]

Theme used at night.

Definition at line 62 of file OptionThemes.h.

wxString mapThemeOption::m_nightTheme [private]

Definition at line 63 of file OptionThemes.h.

wxComboBox* mapThemeOption::m_pctlDayTheme [private]

Theme used during the day.

Definition at line 66 of file OptionThemes.h.

wxString mapThemeOption::m_dayTheme [private]

Definition at line 67 of file OptionThemes.h.

wxComboBox* mapThemeOption::m_pctlPhotoTheme [private]

Theme used in aerial photo mode.

Definition at line 70 of file OptionThemes.h.

wxString mapThemeOption::m_photoTheme [private]

Definition at line 71 of file OptionThemes.h.

wxRadioBox* mapThemeOption::m_pctlThemeUsage [private]

Always day/always night/switch at sunrise and sunset.

Definition at line 74 of file OptionThemes.h.

Definition at line 75 of file OptionThemes.h.

IMapData* mapThemeOption::m_pMapData [private]

Map control data.

Definition at line 78 of file OptionThemes.h.

Parent's theme manager.

Definition at line 81 of file OptionThemes.h.

Currently being edited theme manager.

Definition at line 84 of file OptionThemes.h.


The documentation for this class was generated from the following files:

Generated on Sun Jul 27 17:26:15 2008 for Roadnav by  doxygen 1.5.5