1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        wx/persist/toplevel.h
3 // Purpose:     interface of wxPersistentTLW
4 // Author:      Vadim Zeitlin
5 // Copyright:   (c) 2009 Vadim Zeitlin <vadim@wxwidgets.org>
6 // Licence:     wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8 
9 /**
10     Persistence adapter for wxTopLevelWindow.
11 
12     This adapter saves and restores the geometry (i.e. position and size) and
13     the state (iconized, maximized or normal) of top level windows. It can be
14     used with both wxFrame and wxDialog.
15 
16     Note that it does @em not save nor restore the window visibility.
17  */
18 class wxPersistentTLW : public wxPersistentWindow<wxTopLevelWindow>
19 {
20 public:
21     /**
22         Constructor.
23 
24         @param book
25             The associated window.
26      */
27     wxPersistentTLW(wxTopLevelWindow *book);
28 
29     /**
30         Save the current window geometry.
31      */
32     virtual void Save() const;
33 
34     /**
35         Restore the window geometry.
36      */
37     virtual bool Restore();
38 };
39 
40 /// Overload allowing persistence adapter creation for wxTopLevelWindow-derived
41 /// objects.
42 wxPersistentObject *wxCreatePersistentObject(wxTopLevelWindow *book);
43