#include <wx/persist/checkbox.h>
Inheritance diagram for wxPersistentCheckBox:Persistence adapter for wxCheckBox controls.
This adapter saves and restores the state of a wxCheckBox control,
Example of using it:
If the checkbox is checked, it will be checked again after the application restart.
Public Member Functions | |
| wxPersistentCheckBox (wxCheckBox *checkbox) | |
| Constructor. More... | |
| virtual void | Save () const |
| Save the current checkbox state. More... | |
| virtual bool | Restore () |
| Restore the previously saved checkbox state. More... | |
Public Member Functions inherited from wxPersistentWindow< wxCheckBox > | |
| wxPersistentWindow (WindowType *win) | |
| Constructor for a persistent window object. More... | |
| WindowType * | Get () const |
| virtual wxString | GetName () const |
| Implements the base class pure virtual method using wxWindow::GetName(). More... | |
Public Member Functions inherited from wxPersistentObject | |
| wxPersistentObject (void *obj) | |
| Constructor takes the object which we're associated with. More... | |
| virtual | ~wxPersistentObject () |
| Trivial but virtual destructor. More... | |
| void * | GetObject () const |
| Return the associated object. More... | |
| virtual wxString | GetKind () const =0 |
| Returns the string uniquely identifying the objects supported by this adapter. More... | |
Additional Inherited Members | |
Public Types inherited from wxPersistentWindow< wxCheckBox > | |
| typedef wxCheckBox | WindowType |
| The type of the associated window. More... | |
Protected Member Functions inherited from wxPersistentObject | |
| template<typename T > | |
| bool | SaveValue (const wxString &name, T value) const |
| Save the specified value using the given name. More... | |
| template<typename T > | |
| bool | RestoreValue (const wxString &name, T *value) |
| Restore a value saved by SaveValue(). More... | |
|
explicit |
Constructor.
Note that 3-state checkboxes are also supported.
| checkbox | The associated checkbox. |
|
virtual |
Restore the previously saved checkbox state.
If the saved index is valid, i.e. is wxCHK_UNCHECKED, wxCHK_CHECKED or wxCHK_UNDETERMINED if checkbox supports 3rd state, the checkbox state is set to the previously saved value (otherwise it is ignored).
Implements wxPersistentObject.
|
virtual |
Save the current checkbox state.
The state is saved as an integer value corresponding to the numeric value returned by wxCheckBox::Get3StateValue(). For unchecked and checked checkboxes this value is 0 and 1 respectively, as is customary.
Implements wxPersistentObject.