#include <wxOptionsDialog.h>


Public Member Functions | |
| buttonOption (const wxString &name) | |
| buttonOption * | Add (wxOption *option) |
| void | DoDisplay (wxOptionSizer *sizer, wxWindow *parent) |
| you should override the following functions: | |
| void | OnClick (wxCommandEvent &event) |
| bool | DoSave () |
| Save any values to the config that needs to be saved. | |
| bool | Enable (bool enable) |
| Enable/disable any controls that need to be enabled/disabled. | |
| void | OnWindowDestroy () |
| When this is called, then you should save out any values stored in controls, as they will be destroyed soon. | |
| void | SetParent (wxOptionGroup *parent) |
| This is only here so that some options can create subgroups of the current wxOptionGroup. | |
| ~buttonOption () | |
Private Attributes | |
| wxButton * | m_button |
| wxOptionGroup * | m_group |
| wxOptionsDialog * | m_parentDlg |
Like an optionGroup, but can be present inside a set of options. It should be noted that this option MUST be used with an wxOptionsDialog window, since it cheats in regards to the whole object-oriented paradigm... heh
The way this works is it hides an wxOptionGroup inside of it, and redirects calls to the wxOptionGroup when necessary. The key cheating part is when it simulates a button press on the parent dialog by calling OnMenuClick with a pointer to the group that is hidden by this group.
Definition at line 94 of file wxOptionsDialog.h.
| buttonOption::buttonOption | ( | const wxString & | name | ) | [inline] |
Definition at line 96 of file wxOptionsDialog.h.
| buttonOption::~buttonOption | ( | ) | [inline] |
Definition at line 140 of file wxOptionsDialog.h.
| buttonOption* buttonOption::Add | ( | wxOption * | option | ) | [inline] |
Definition at line 101 of file wxOptionsDialog.h.
| void buttonOption::DoDisplay | ( | wxOptionSizer * | sizer, | |
| wxWindow * | parent | |||
| ) | [inline, 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 103 of file wxOptionsDialog.h.
| void buttonOption::OnClick | ( | wxCommandEvent & | event | ) | [inline] |
Definition at line 116 of file wxOptionsDialog.h.
| bool buttonOption::DoSave | ( | ) | [inline, virtual] |
Save any values to the config that needs to be saved.
Please note that this will _not_ always be called. It is only called if DoDisplay() was called for your option
Implements wxOption.
Definition at line 127 of file wxOptionsDialog.h.
| bool buttonOption::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 136 of file wxOptionsDialog.h.
| void buttonOption::OnWindowDestroy | ( | ) | [inline, 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 137 of file wxOptionsDialog.h.
| void buttonOption::SetParent | ( | wxOptionGroup * | parent | ) | [inline, virtual] |
This is only here so that some options can create subgroups of the current wxOptionGroup.
.. its a huge hack, see buttonOption for more information
Reimplemented from wxOption.
Definition at line 138 of file wxOptionsDialog.h.
wxButton* buttonOption::m_button [private] |
Definition at line 140 of file wxOptionsDialog.h.
wxOptionGroup* buttonOption::m_group [private] |
Definition at line 145 of file wxOptionsDialog.h.
wxOptionsDialog* buttonOption::m_parentDlg [private] |
Definition at line 146 of file wxOptionsDialog.h.
1.5.5