]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/persist/bookctrl.h
Document that HasFocus() is new in 2.9.
[wxWidgets.git] / interface / wx / persist / bookctrl.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/persist/bookctrl.h
3 // Purpose: interface of wxPersistentBookCtrl
4 // Author: Vadim Zeitlin
5 // RCS-ID: $Id$
6 // Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 /**
11 Persistence adapter for wxBookCtrlBase.
12
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
15 is recreated.
16
17 @see wxPersistentTreeBookCtrl
18 */
19 class wxPersistentBookCtrl : public wxPersistentWindow<wxBookCtrlBase>
20 {
21 public:
22 /**
23 Constructor.
24
25 @param book
26 The associated book control.
27 */
28 wxPersistentBookCtrl(wxBookCtrlBase *book);
29
30 /**
31 Save the currently selected page index.
32 */
33 virtual void Save() const;
34
35 /**
36 Restore the selected page index.
37
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.
41 */
42 virtual bool Restore();
43 };
44
45 /// Overload allowing persistence adapter creation for wxBookCtrlBase-derived
46 /// objects.
47 wxPersistentObject *wxCreatePersistentObject(wxBookCtrlBase *book);