overview wiki api reference download
 All Classes Functions Variables Typedefs Enumerations Enumerator
Public Types | Public Member Functions | Static Public Member Functions
gameplay::ControlFactory Class Reference

#include <ControlFactory.h>

List of all members.

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 ControlFactorygetInstance ()

Detailed Description

Defines a factory for creating core controls and registered custom controls.


Member Typedef Documentation

The activator interface for controls that are created.


Member Function Documentation

Gets the single instance of the control factory used to create controls and register/unregister custom controls.

Returns:
The instance of the ControlFactory.
bool gameplay::ControlFactory::registerCustomControl ( const char *  typeName,
ControlActivator  activator 
)

Registers a custom control and specify the activator.

Parameters:
typeNameThe name of the custom control type to register.
activatorThe activator for applying the style, properties and theme to the control.
Returns:
true if the control was successfully registered.
void gameplay::ControlFactory::unregisterCustomControl ( const char *  typeName)

Unregisters a custom control and specify the activator.

Parameters:
typeNameThe name of the custom control type to unregister.
 All Classes Functions Variables Typedefs Enumerations Enumerator