#include <wx/toplevel.h>
Class used with SaveGeometry() and RestoreToGeometry().
This is an abstract base class, i.e. to use it you must define a derived class implementing the pure virtual SaveValue() and RestoreValue() methods.
For example, if you wished to store the window geometry in a database, you could derive a class saving fields such as "width" or "height" in a table in this database and restoring them from it later.
Private Member Functions | |
| virtual bool | SaveValue (const wxString &name, int value)=0 |
| Save a single field with the given value. | |
| virtual bool | SaveString (const wxString &name, const wxString &value) |
| Save a single field with the given string value. | |
| virtual bool | RestoreValue (const wxString &name, int *value) const =0 |
| Try to restore a single field. | |
| virtual bool | RestoreString (const wxString &name, wxString *value) const |
| Try to restore a single string-valued field. | |
|
privatevirtual |
Try to restore a single string-valued field.
This function is similar to RestoreValue(), but is currently only used when using wxGTK with Wayland XDG session management protocol and so can be left unimplemented when not targeting this platform.
| name | uniquely identifies the field. |
| value | non-null pointer to the value to be filled by this function. |
|
privatepure virtual |
Try to restore a single field.
Unlike for SaveValue(), returning false from this function may indicate that the value simply wasn't present and doesn't prevent RestoreToGeometry() from continuing with trying to restore the other values.
| name | uniquely identifies the field |
| value | non-null pointer to the value to be filled by this function |
|
privatevirtual |
Save a single field with the given string value.
This function is similar to SaveValue(), but is currently only used when using wxGTK with Wayland XDG session management protocol and so can be left unimplemented when not targeting this platform.
| name | uniquely identifies the field but is otherwise arbitrary. |
| value | value of the field, currently always non-empty. |
|
privatepure virtual |
Save a single field with the given value.
Note that if this function returns false, SaveGeometry() supposes that saving the geometry failed and returns false itself, without even trying to save anything else.
| name | uniquely identifies the field but is otherwise arbitrary. |
| value | value of the field (can be positive or negative, i.e. it can't be assumed that a value like -1 is invalid). |