|  | overview |  | wiki |  | api reference |  | download

- Main Page
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

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 ControlFactory * | getInstance ()

## Detailed Description

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

## Member Typedef Documentation

typedef Control*(* gameplay::ControlFactory::ControlActivator)(Theme::Style *, Properties *)

The activator interface for controls that are created.

## Member Function Documentation

static ControlFactory* gameplay::ControlFactory::getInstance | ( |  | ) | `[static]`

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:

  typeName | The name of the custom control type to register.
  activator | The 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:

  typeName | The name of the custom control type to unregister.

All Classes Functions Variables Typedefs Enumerations Enumerator