#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 SaveField() and RestoreField() 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 | SaveField (const wxString &name, int value) const =0 |
Save a single field with the given value. More... | |
virtual bool | RestoreField (const wxString &name, int *value)=0 |
Try to restore a single field. More... | |
|
privatepure virtual |
Try to restore a single field.
Unlike for SaveField(), 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 |
|
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). |