クラス | |
class | wxPersistenceManager |
Provides support for automatically saving and restoring object properties to persistent storage. More... | |
class | wxPersistentObject |
Base class for persistent object adapters. More... | |
Functions | |
template<class T > | |
wxPersistentObject * | wxCreatePersistentObject (T *obj) |
Function used to create the correct persistent adapter for the given type of objects. | |
template<class T > | |
bool | wxPersistentRegisterAndRestore (T *obj, const wxString &name=wxString()) |
A shorter synonym for wxPersistenceManager::RegisterAndRestore(). |
wxPersistentObject* wxCreatePersistentObject | ( | T * | obj | ) |
Function used to create the correct persistent adapter for the given type of objects.
To be precise, there is no such template function definition but there are overloads of wxCreatePersistentObject() taking different object types for all wxWidgets classes supporting persistence. And you may also define your own overloads to integrate your custom classes with wxWidgets persistence framework.
Include file:
#include <wx/persist.h>
bool wxPersistentRegisterAndRestore | ( | T * | obj, |
const wxString & | name = wxString() |
||
) |
A shorter synonym for wxPersistenceManager::RegisterAndRestore().
This function simply calls wxPersistenceManager::RegisterAndRestore() but using it results in slightly shorter code as it calls wxPersistenceManager::Get() internally. As an additional convenience, this function can also set the window name.
For the implementation reasons, this function must be used instead of the template method when using Microsoft Visual C++ 6 compiler.
obj | wxWindow-derived object to register with persistence manager and to try to restore the settings for. |
name | If not empty, obj name is changed to the provided value before registering it. |
Include file:
#include <wx/persist.h>