]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/persist/toplevel.h
supporting alignment in single line controls, see #14452
[wxWidgets.git] / interface / wx / persist / toplevel.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/persist/toplevel.h
3 // Purpose: interface of wxPersistentTLW
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 wxTopLevelWindow.
12
13 This adapter saves and restores the geometry (i.e. position and size) and
14 the state (iconized, maximized or normal) of top level windows. It can be
15 used with both wxFrame and wxDialog.
16
17 Note that it does @em not save nor restore the window visibility.
18 */
19 class wxPersistentTLW : public wxPersistentWindow<wxTopLevelWindow>
20 {
21 public:
22 /**
23 Constructor.
24
25 @param book
26 The associated window.
27 */
28 wxPersistentTLW(wxTopLevelWindow *book);
29
30 /**
31 Save the current window geometry.
32 */
33 virtual void Save() const;
34
35 /**
36 Restore the window geometry.
37 */
38 virtual bool Restore();
39 };
40
41 /// Overload allowing persistence adapter creation for wxTopLevelWindow-derived
42 /// objects.
43 wxPersistentObject *wxCreatePersistentObject(wxTopLevelWindow *book);