#include <ControlFactory.h>
Public Types | |
typedef Control *(* | ControlActivator )(Theme::Style *, Properties *) |
Public Member Functions | |
bool | registerCustomControl (const char *typeName, ControlActivator activator) |
void | unregisterCustomControl (const char *typeName) |
Static Public Member Functions | |
static ControlFactory * | getInstance () |
Defines a factory for creating core controls and registered custom controls.
typedef Control*(* gameplay::ControlFactory::ControlActivator)(Theme::Style *, Properties *) |
The activator interface for controls that are created.
static ControlFactory* gameplay::ControlFactory::getInstance | ( | ) | [static] |
Gets the single instance of the control factory used to create controls and register/unregister custom controls.
bool gameplay::ControlFactory::registerCustomControl | ( | const char * | typeName, |
ControlActivator | activator | ||
) |
Registers a custom control and specify the activator.
typeName | The name of the custom control type to register. |
activator | The activator for applying the style, properties and theme to the control. |
void gameplay::ControlFactory::unregisterCustomControl | ( | const char * | typeName | ) |
Unregisters a custom control and specify the activator.
typeName | The name of the custom control type to unregister. |