a panel displaying programmatically generated gui elements to manipulate mmOptions Since storing of data is mixed in with gui elements, this is a very delicate place to apply changes to. More...
#include <battleroommmoptionstab.h>
Inherits wxScrolledWindow.

Public Member Functions | |
| BattleroomMMOptionsTab (BattleType *battle, wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(500, 300), long style=wxTAB_TRAVERSAL) | |
| ~BattleroomMMOptionsTab () | |
| void | UpdateOptControls (wxString controlName) |
| void | OnReloadControls (OptionsWrapper::GameOption flag) |
| relaod single category | |
| void | OnReloadControls () |
| reload all categories | |
| void | UpdatePresetList () |
| void | OnButton (wxCommandEvent &event) |
| void | OnLoadPreset (wxCommandEvent &event) |
| void | OnSavePreset (wxCommandEvent &event) |
| void | OnDeletePreset (wxCommandEvent &event) |
| void | OnSetModDefaultPreset (wxCommandEvent &event) |
| void | OnInfoButton (wxCommandEvent &event) |
| BattleType * | GetBattle () |
| void | SetBattle (BattleType *battle) |
Protected Types | |
| typedef BattleroomMMOptionsTab < BattleType > | ThisType |
| typedef std::map< wxString, wxCheckBox * > | chkBoxMap |
| typedef std::map< wxString, wxComboBox * > | comboBoxMap |
| typedef std::map< wxString, SlSpinCtrlDouble< ThisType > * > | spinCtrlMap |
| typedef std::map< wxString, wxTextCtrl * > | textCtrlMap |
| typedef std::map< wxString, wxStaticText * > | staticTextMap |
| typedef std::map< wxString, wxButton * > | buttonMap |
| typedef std::map< wxString, wxString > | nameInfoMap |
Protected Member Functions | |
| void | setupOptionsSizer (wxBoxSizer *parent_sizer, OptionsWrapper::GameOption optFlag) |
| setup toplevel sizer per GameOption with all child sizers ( sections ) | |
| int | setupOptionsSectionSizer (const mmOptionSection §ion, wxBoxSizer *parent_sizer, OptionsWrapper::GameOption optFlag) |
| generate Gui elements from loaded MMoptions for all values in all option maps create a control (pointer), set the controls name to the option key and add it to the appropiate map and sizer. | |
| wxButton * | getButton (const wxWindowID id, const wxString &name) |
Event handlers | |
| void | OnComBoxChange (wxCommandEvent &) |
| void | OnChkBoxChange (wxCommandEvent &) |
| void | OnTextCtrlChange (wxCommandEvent &event) |
| void | OnSpinCtrlDoubleChange (SlSpinDoubleEvent &event) |
Protected Attributes | |
| BattleType * | m_battle |
| wxBoxSizer * | m_main_sizer |
| wxStaticBoxSizer * | m_mod_options_sizer |
| wxBoxSizer * | m_mod_layout |
| wxStaticBoxSizer * | m_map_options_sizer |
| wxBoxSizer * | m_map_layout |
| wxBoxSizer * | m_map_mod_container |
| wxButton * | m_load_btn |
| wxButton * | m_save_btn |
| wxButton * | m_delete_btn |
| wxButton * | m_default_btn |
| wxComboBox * | m_options_preset_sel |
| OptionsWrapper * | m_mapmodoptions |
| chkBoxMap | m_chkbox_map |
| map control name <-> info (description) | |
| comboBoxMap | m_combox_map |
| spinCtrlMap | m_spinctrl_map |
| textCtrlMap | m_textctrl_map |
| staticTextMap | m_statictext_map |
| buttonMap | m_button_map |
| nameInfoMap | m_name_info_map |
Friends | |
| class | SlSpinCtrlDouble< ThisType > |
a panel displaying programmatically generated gui elements to manipulate mmOptions Since storing of data is mixed in with gui elements, this is a very delicate place to apply changes to.
If there's ever any need / desire to refactor this, EXTENSIVE testing should be applied afterwards!
There's one map per control type, storing the mapping between name and pointer, where name has the format optionFlag (decimal) + seperator + mmOptionKey
That way we can use the inverse mapping in the event handlers to go from the name of event-generating gui element to the mmOptionKey that needs to be changed.
Definition at line 38 of file battleroommmoptionstab.h.
typedef std::map<wxString,wxButton*> BattleroomMMOptionsTab< BattleType >::buttonMap [protected] |
Definition at line 96 of file battleroommmoptionstab.h.
typedef std::map<wxString,wxCheckBox*> BattleroomMMOptionsTab< BattleType >::chkBoxMap [protected] |
Definition at line 86 of file battleroommmoptionstab.h.
typedef std::map<wxString,wxComboBox*> BattleroomMMOptionsTab< BattleType >::comboBoxMap [protected] |
Definition at line 88 of file battleroommmoptionstab.h.
typedef std::map<wxString,wxString> BattleroomMMOptionsTab< BattleType >::nameInfoMap [protected] |
Definition at line 98 of file battleroommmoptionstab.h.
typedef std::map<wxString,SlSpinCtrlDouble<ThisType> * > BattleroomMMOptionsTab< BattleType >::spinCtrlMap [protected] |
Definition at line 90 of file battleroommmoptionstab.h.
typedef std::map<wxString,wxStaticText*> BattleroomMMOptionsTab< BattleType >::staticTextMap [protected] |
Definition at line 94 of file battleroommmoptionstab.h.
typedef std::map<wxString,wxTextCtrl*> BattleroomMMOptionsTab< BattleType >::textCtrlMap [protected] |
Definition at line 92 of file battleroommmoptionstab.h.
typedef BattleroomMMOptionsTab<BattleType> BattleroomMMOptionsTab< BattleType >::ThisType [protected] |
Definition at line 81 of file battleroommmoptionstab.h.
| BattleroomMMOptionsTab< BattleType >::BattleroomMMOptionsTab | ( | BattleType * | battle, | |
| wxWindow * | parent, | |||
| wxWindowID | id = wxID_ANY, |
|||
| const wxPoint & | pos = wxDefaultPosition, |
|||
| const wxSize & | size = wxSize( 500,300 ), |
|||
| long | style = wxTAB_TRAVERSAL | |||
| ) | [inline] |
Definition at line 48 of file battleroommmoptionstab.cpp.
| BattleroomMMOptionsTab< BattleType >::~BattleroomMMOptionsTab | ( | ) | [inline] |
Definition at line 116 of file battleroommmoptionstab.cpp.
| BattleType * BattleroomMMOptionsTab< BattleType >::GetBattle | ( | ) | [inline] |
Definition at line 621 of file battleroommmoptionstab.cpp.
| wxButton * BattleroomMMOptionsTab< BattleType >::getButton | ( | const wxWindowID | id, | |
| const wxString & | name | |||
| ) | [inline, protected] |
Definition at line 162 of file battleroommmoptionstab.cpp.
| void BattleroomMMOptionsTab< BattleType >::OnButton | ( | wxCommandEvent & | event | ) | [inline] |
Definition at line 559 of file battleroommmoptionstab.cpp.
| void BattleroomMMOptionsTab< BattleType >::OnChkBoxChange | ( | wxCommandEvent & | event | ) | [inline, protected] |
Definition at line 308 of file battleroommmoptionstab.cpp.
| void BattleroomMMOptionsTab< BattleType >::OnComBoxChange | ( | wxCommandEvent & | event | ) | [inline, protected] |
Definition at line 326 of file battleroommmoptionstab.cpp.
| void BattleroomMMOptionsTab< BattleType >::OnDeletePreset | ( | wxCommandEvent & | event | ) | [inline] |
Definition at line 529 of file battleroommmoptionstab.cpp.
| void BattleroomMMOptionsTab< BattleType >::OnInfoButton | ( | wxCommandEvent & | event | ) | [inline] |
Definition at line 573 of file battleroommmoptionstab.cpp.
| void BattleroomMMOptionsTab< BattleType >::OnLoadPreset | ( | wxCommandEvent & | event | ) | [inline] |
Definition at line 497 of file battleroommmoptionstab.cpp.
| void BattleroomMMOptionsTab< BattleType >::OnReloadControls | ( | ) | [inline] |
reload all categories
Definition at line 489 of file battleroommmoptionstab.cpp.
| void BattleroomMMOptionsTab< BattleType >::OnReloadControls | ( | OptionsWrapper::GameOption | flag | ) | [inline] |
relaod single category
Definition at line 447 of file battleroommmoptionstab.cpp.
| void BattleroomMMOptionsTab< BattleType >::OnSavePreset | ( | wxCommandEvent & | event | ) | [inline] |
Definition at line 513 of file battleroommmoptionstab.cpp.
| void BattleroomMMOptionsTab< BattleType >::OnSetModDefaultPreset | ( | wxCommandEvent & | event | ) | [inline] |
Definition at line 539 of file battleroommmoptionstab.cpp.
| void BattleroomMMOptionsTab< BattleType >::OnSpinCtrlDoubleChange | ( | SlSpinDoubleEvent & | event | ) | [inline, protected] |
Definition at line 364 of file battleroommmoptionstab.cpp.
| void BattleroomMMOptionsTab< BattleType >::OnTextCtrlChange | ( | wxCommandEvent & | event | ) | [inline, protected] |
Definition at line 346 of file battleroommmoptionstab.cpp.
| void BattleroomMMOptionsTab< BattleType >::SetBattle | ( | BattleType * | battle | ) | [inline] |
Definition at line 591 of file battleroommmoptionstab.cpp.
| int BattleroomMMOptionsTab< BattleType >::setupOptionsSectionSizer | ( | const mmOptionSection & | section, | |
| wxBoxSizer * | parent_sizer, | |||
| OptionsWrapper::GameOption | optFlag | |||
| ) | [inline, protected] |
generate Gui elements from loaded MMoptions for all values in all option maps create a control (pointer), set the controls name to the option key and add it to the appropiate map and sizer.
Definition at line 170 of file battleroommmoptionstab.cpp.
| void BattleroomMMOptionsTab< BattleType >::setupOptionsSizer | ( | wxBoxSizer * | parent_sizer, | |
| OptionsWrapper::GameOption | optFlag | |||
| ) | [inline, protected] |
setup toplevel sizer per GameOption with all child sizers ( sections )
Definition at line 122 of file battleroommmoptionstab.cpp.
| void BattleroomMMOptionsTab< BattleType >::UpdateOptControls | ( | wxString | controlName | ) | [inline] |
Definition at line 381 of file battleroommmoptionstab.cpp.
| void BattleroomMMOptionsTab< BattleType >::UpdatePresetList | ( | ) | [inline] |
Definition at line 550 of file battleroommmoptionstab.cpp.
friend class SlSpinCtrlDouble< ThisType > [friend] |
Definition at line 83 of file battleroommmoptionstab.h.
BattleType* BattleroomMMOptionsTab< BattleType >::m_battle [protected] |
Definition at line 63 of file battleroommmoptionstab.h.
buttonMap BattleroomMMOptionsTab< BattleType >::m_button_map [protected] |
Definition at line 105 of file battleroommmoptionstab.h.
chkBoxMap BattleroomMMOptionsTab< BattleType >::m_chkbox_map [protected] |
map control name <-> info (description)
Definition at line 100 of file battleroommmoptionstab.h.
comboBoxMap BattleroomMMOptionsTab< BattleType >::m_combox_map [protected] |
Definition at line 101 of file battleroommmoptionstab.h.
wxButton* BattleroomMMOptionsTab< BattleType >::m_default_btn [protected] |
Definition at line 75 of file battleroommmoptionstab.h.
wxButton* BattleroomMMOptionsTab< BattleType >::m_delete_btn [protected] |
Definition at line 74 of file battleroommmoptionstab.h.
wxButton* BattleroomMMOptionsTab< BattleType >::m_load_btn [protected] |
Definition at line 72 of file battleroommmoptionstab.h.
wxBoxSizer* BattleroomMMOptionsTab< BattleType >::m_main_sizer [protected] |
Definition at line 65 of file battleroommmoptionstab.h.
wxBoxSizer* BattleroomMMOptionsTab< BattleType >::m_map_layout [protected] |
Definition at line 69 of file battleroommmoptionstab.h.
wxBoxSizer* BattleroomMMOptionsTab< BattleType >::m_map_mod_container [protected] |
Definition at line 70 of file battleroommmoptionstab.h.
wxStaticBoxSizer* BattleroomMMOptionsTab< BattleType >::m_map_options_sizer [protected] |
Definition at line 68 of file battleroommmoptionstab.h.
OptionsWrapper* BattleroomMMOptionsTab< BattleType >::m_mapmodoptions [protected] |
Definition at line 78 of file battleroommmoptionstab.h.
wxBoxSizer* BattleroomMMOptionsTab< BattleType >::m_mod_layout [protected] |
Definition at line 67 of file battleroommmoptionstab.h.
wxStaticBoxSizer* BattleroomMMOptionsTab< BattleType >::m_mod_options_sizer [protected] |
Definition at line 66 of file battleroommmoptionstab.h.
nameInfoMap BattleroomMMOptionsTab< BattleType >::m_name_info_map [protected] |
Definition at line 106 of file battleroommmoptionstab.h.
wxComboBox* BattleroomMMOptionsTab< BattleType >::m_options_preset_sel [protected] |
Definition at line 76 of file battleroommmoptionstab.h.
wxButton* BattleroomMMOptionsTab< BattleType >::m_save_btn [protected] |
Definition at line 73 of file battleroommmoptionstab.h.
spinCtrlMap BattleroomMMOptionsTab< BattleType >::m_spinctrl_map [protected] |
Definition at line 102 of file battleroommmoptionstab.h.
staticTextMap BattleroomMMOptionsTab< BattleType >::m_statictext_map [protected] |
Definition at line 104 of file battleroommmoptionstab.h.
textCtrlMap BattleroomMMOptionsTab< BattleType >::m_textctrl_map [protected] |
Definition at line 103 of file battleroommmoptionstab.h.
1.6.3