]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/persist/bookctrl.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/persist/bookctrl.h
3 // Purpose: interface of wxPersistentBookCtrl
4 // Author: Vadim Zeitlin
6 // Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
7 // Licence: wxWindows license
8 /////////////////////////////////////////////////////////////////////////////
11 Persistence adapter for wxBookCtrlBase.
13 This adapter handles the selected page of wxBookCtrlBase, i.e. it saves its
14 value when the associated book control is destroyed and restores it when it
17 @see wxPersistentTreeBookCtrl
19 class wxPersistentBookCtrl
: public wxPersistentWindow
<wxBookCtrlBase
>
26 The associated book control.
28 wxPersistentBookCtrl(wxBookCtrlBase
*book
);
31 Save the currently selected page index.
33 virtual void Save() const;
36 Restore the selected page index.
38 The book control must be initialized before calling this function, i.e.
39 all of its pages should be already added to it -- otherwise restoring
40 the selection has no effect.
42 virtual bool Restore();
45 /// Overload allowing persistence adapter creation for wxBookCtrlBase-derived
47 wxPersistentObject
*wxCreatePersistentObject(wxBookCtrlBase
*book
);