2009-01-30 16:38:29 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/persist/treebook.h
|
|
|
|
// Purpose: interface of wxPersistentTreeBook
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// Copyright: (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
|
2010-07-13 09:29:13 -04:00
|
|
|
// Licence: wxWindows licence
|
2009-01-30 16:38:29 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/**
|
|
|
|
Persistence adapter for wxTreebook.
|
|
|
|
|
|
|
|
This adapter saves and restores the expanded branches of the wxTreeCtrl
|
|
|
|
used by wxTreebook, in addition to saving and restoring the selection as
|
|
|
|
implemented by the base wxPersistentBookCtrl class.
|
|
|
|
*/
|
2012-02-15 10:40:14 -05:00
|
|
|
class wxPersistentTreeBookCtrl : public wxPersistentBookCtrl
|
2009-01-30 16:38:29 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Constructor.
|
|
|
|
|
|
|
|
@param book
|
|
|
|
The associated tree book control.
|
|
|
|
*/
|
2012-02-15 10:40:14 -05:00
|
|
|
wxPersistentTreeBookCtrl(wxTreebook *book);
|
2009-01-30 16:38:29 -05:00
|
|
|
|
|
|
|
/**
|
|
|
|
Save the currently opened branches.
|
|
|
|
*/
|
|
|
|
virtual void Save() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
Restore the opened branches.
|
|
|
|
|
|
|
|
The book control must be initialized before calling this function, i.e.
|
|
|
|
all of its pages should be already added to it.
|
|
|
|
*/
|
|
|
|
virtual bool Restore();
|
|
|
|
};
|
|
|
|
|
|
|
|
/// Overload allowing persistence adapter creation for wxTreebook objects.
|
|
|
|
wxPersistentObject *wxCreatePersistentObject(wxTreebook *book);
|