OBSOLETE CLASS. Please see the run time class information for an alternative type system.
wxTypeTree implements an explicit type hierarchy which can be useful for querying C++ types at run-time, usually by calling wxSubType using the wxObject::__type member.
A type is added to the global variable wxAllTypes; wxWindows adds its own standard types on initialization, in wxInitStandardTypes, but the application can add its own.
The standard wxWindows types, grouped by functionality, are:
wxTypeTree::wxTypeTree
wxTypeTree::AddType
wxTypeTree::GetName
void wxTypeTree(void)
Constructor. Used by wxWindows only, since there only one instance of this class.
void AddType(WXTYPE newType, WXTYPE parentType, char *name)
Adds a type to the hierarchy. newType is the type being registered, parentType is the parent type, and name is an identifier (which can used in error messages). The top (root) type is wxTYPE_ANY.
Example:
wxAllTypes.AddType(wxTYPE_WINDOW, wxTYPE_ANY, "window"); wxAllTypes.AddType(wxTYPE_PANEL, wxTYPE_WINDOW, "panel"); wxAllTypes.AddType(wxTYPE_CANVAS, wxTYPE_WINDOW, "canvas");
char * GetName(WXTYPE typ)
Gets a temporary pointer to the name of the given type, or NULL if the type is not found.