#include <wx/persist/bookctrl.h>
Persistence adapter for wxBookCtrlBase.
This adapter handles the selected page of wxBookCtrlBase, i.e. it saves its value when the associated book control is destroyed and restores it when it is recreated.
Public Member Functions | |
wxPersistentBookCtrl (wxBookCtrlBase *book) | |
Constructor. More... | |
virtual void | Save () const |
Save the currently selected page index. More... | |
virtual bool | Restore () |
Restore the selected page index. More... | |
![]() | |
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... | |
![]() | |
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 | |
![]() | |
typedef wxBookCtrlBase | WindowType |
The type of the associated window. More... | |
![]() | |
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 the value saved by Save(). More... | |
wxPersistentBookCtrl::wxPersistentBookCtrl | ( | wxBookCtrlBase * | book | ) |
Constructor.
book | The associated book control. |
|
virtual |
Restore the selected page index.
The book control must be initialized before calling this function, i.e. all of its pages should be already added to it – otherwise restoring the selection has no effect.
Implements wxPersistentObject.
Reimplemented in wxPersistentTreeBookCtrl.
|
virtual |
Save the currently selected page index.
Implements wxPersistentObject.
Reimplemented in wxPersistentTreeBookCtrl.