]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/persist/treebook.h
Move wxInfoBar to core library from adv.
[wxWidgets.git] / interface / wx / persist / treebook.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/persist/treebook.h
3 // Purpose: interface of wxPersistentTreeBook
4 // Author: Vadim Zeitlin
5 // RCS-ID: $Id$
6 // Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
7 // Licence: wxWindows license
8 /////////////////////////////////////////////////////////////////////////////
9
10 /**
11 Persistence adapter for wxTreebook.
12
13 This adapter saves and restores the expanded branches of the wxTreeCtrl
14 used by wxTreebook, in addition to saving and restoring the selection as
15 implemented by the base wxPersistentBookCtrl class.
16 */
17 class wxPersistentTreeBook : public wxPersistentBookCtrl
18 {
19 public:
20 /**
21 Constructor.
22
23 @param book
24 The associated tree book control.
25 */
26 wxPersistentTreeBook(wxTreebook *book);
27
28 /**
29 Save the currently opened branches.
30 */
31 virtual void Save() const;
32
33 /**
34 Restore the opened branches.
35
36 The book control must be initialized before calling this function, i.e.
37 all of its pages should be already added to it.
38 */
39 virtual bool Restore();
40 };
41
42 /// Overload allowing persistence adapter creation for wxTreebook objects.
43 wxPersistentObject *wxCreatePersistentObject(wxTreebook *book);