Version: 2.9.4
Public Types | Public Member Functions
wxPersistentWindow< T > Class Template Reference

#include </home/zeitlin/src/wx/github/interface/wx/persist/window.h>

Inheritance diagram for wxPersistentWindow< T >:

Detailed Description

template<class T>
class wxPersistentWindow< T >

Base class for persistent windows.

Compared to wxPersistentObject this class does three things:

Public Types

typedef T WindowType
 The type of the associated window.

Public Member Functions

 wxPersistentWindow (WindowType *win)
 Constructor for a persistent window object.
WindowTypeGet () const
virtual wxString GetName () const
 Implements the base class pure virtual method using wxWindow::GetName().

List of all members.


Member Typedef Documentation

template<class T>
typedef T wxPersistentWindow< T >::WindowType

The type of the associated window.


Constructor & Destructor Documentation

template<class T>
wxPersistentWindow< T >::wxPersistentWindow ( WindowType win)

Constructor for a persistent window object.

The constructor uses wxEvtHandler::Connect() to catch wxWindowDestroyEvent generated when the window is destroyed and call wxPersistenceManager::SaveAndUnregister() when this happens. This ensures that the window properties are saved and that this object itself is deleted when the window is.


Member Function Documentation

template<class T>
WindowType* wxPersistentWindow< T >::Get ( ) const [inline]
template<class T>
virtual wxString wxPersistentWindow< T >::GetName ( ) const [virtual]

Implements the base class pure virtual method using wxWindow::GetName().

Notice that window names are usually not unique while this function must return a unique (at least among the objects of this type) string. Because of this you need to specify a non-default window name in its constructor when creating it or explicitly call wxWindow::SetName() before saving or restoring persistent properties.

Implements wxPersistentObject.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines