wxPersistentBookCtrl Class Reference | wxWidgets

| Version: 3.2.11

Loading...
Searching...
No Matches
Public Member Functions | List of all members
wxPersistentBookCtrl Class Reference

`#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.2/wxWidgets3.2-3.2.11-1.x86_64/src/wxWidgets-3.2.11/interface/wx/persist/bookctrl.h>`

Inheritance diagram for wxPersistentBookCtrl:
[legend]

## Detailed Description

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.

See also
  wxPersistentTreeBookCtrl

## Public Member Functions
| wxPersistentBookCtrl (wxBookCtrlBase *book)
| Constructor.
virtual void | Save () const
| Save the currently selected page index.
virtual bool | Restore ()
| Restore the selected page index.
Public Member Functions inherited from wxPersistentWindow< wxBookCtrlBase >
| wxPersistentWindow (WindowType *win)
| Constructor for a persistent window object.
WindowType * | Get () const
virtual wxString | GetName () const
| Implements the base class pure virtual method using wxWindow::GetName().
Public Member Functions inherited from wxPersistentObject
| wxPersistentObject (void *obj)
| Constructor takes the object which we're associated with.
virtual | ~wxPersistentObject ()
| Trivial but virtual destructor.
void * | GetObject () const
| Return the associated object.
virtual wxString | GetKind () const =0
| Returns the string uniquely identifying the objects supported by this adapter.

## Additional Inherited Members
Public Types inherited from wxPersistentWindow< wxBookCtrlBase >
typedef wxBookCtrlBase | WindowType
| The type of the associated window.
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.
template<typename T>
bool | RestoreValue (const wxString &name, T *value)
| Restore a value saved by SaveValue().

## Constructor & Destructor Documentation

## ◆ wxPersistentBookCtrl()

wxPersistentBookCtrl::wxPersistentBookCtrl | ( | wxBookCtrlBase * | book | ) |

Constructor.

Parameters

  book | The associated book control.

## Member Function Documentation

## ◆ Restore()

virtual bool wxPersistentBookCtrl::Restore | ( |  | ) |
| 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.

## ◆ Save()

virtual void wxPersistentBookCtrl::Save | ( |  | ) | const
| virtual

Save the currently selected page index.

Implements wxPersistentObject.

Reimplemented in wxPersistentTreeBookCtrl.