2009-01-30 16:38:29 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/persist/toplevel.h
|
|
|
|
// Purpose: interface of wxPersistentTLW
|
|
|
|
// Author: Vadim Zeitlin
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// 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 wxTopLevelWindow.
|
|
|
|
|
|
|
|
This adapter saves and restores the geometry (i.e. position and size) and
|
|
|
|
the state (iconized, maximized or normal) of top level windows. It can be
|
|
|
|
used with both wxFrame and wxDialog.
|
|
|
|
|
|
|
|
Note that it does @em not save nor restore the window visibility.
|
|
|
|
*/
|
|
|
|
class wxPersistentTLW : public wxPersistentWindow<wxTopLevelWindow>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
/**
|
|
|
|
Constructor.
|
|
|
|
|
|
|
|
@param book
|
|
|
|
The associated window.
|
|
|
|
*/
|
|
|
|
wxPersistentTLW(wxTopLevelWindow *book);
|
|
|
|
|
|
|
|
/**
|
|
|
|
Save the current window geometry.
|
|
|
|
*/
|
|
|
|
virtual void Save() const;
|
|
|
|
|
|
|
|
/**
|
|
|
|
Restore the window geometry.
|
|
|
|
*/
|
|
|
|
virtual bool Restore();
|
|
|
|
};
|
|
|
|
|
|
|
|
/// Overload allowing persistence adapter creation for wxTopLevelWindow-derived
|
|
|
|
/// objects.
|
|
|
|
wxPersistentObject *wxCreatePersistentObject(wxTopLevelWindow *book);
|