toplevel.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. Persistence adapter for wxTopLevelWindow.
  10. This adapter saves and restores the geometry (i.e. position and size) and
  11. the state (iconized, maximized or normal) of top level windows. It can be
  12. used with both wxFrame and wxDialog.
  13. Note that it does @em not save nor restore the window visibility.
  14. */
  15. class wxPersistentTLW : public wxPersistentWindow<wxTopLevelWindow>
  16. {
  17. public:
  18. /**
  19. Constructor.
  20. @param book
  21. The associated window.
  22. */
  23. wxPersistentTLW(wxTopLevelWindow *book);
  24. /**
  25. Save the current window geometry.
  26. */
  27. virtual void Save() const;
  28. /**
  29. Restore the window geometry.
  30. */
  31. virtual bool Restore();
  32. };
  33. /// Overload allowing persistence adapter creation for wxTopLevelWindow-derived
  34. /// objects.
  35. wxPersistentObject *wxCreatePersistentObject(wxTopLevelWindow *book);