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

- Main Page
- Classes

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

All Classes Functions Variables Typedefs Enumerations Enumerator
Static Public Member Functions | Protected Member Functions | Static Protected Member Functions
gameplay::Button Class Reference

`#include <Button.h>`

Inheritance diagram for gameplay::Button:

List of all members.

## Static Public Member Functions

static Button * | create (const char *id, Theme::Style *style=NULL)

## Protected Member Functions

| Button ()
virtual | ~Button ()
void | initialize (const char *typeName, Theme::Style *style, Properties *properties)
const char * | getTypeName () const
const unsigned int | getDataBinding () const
void | setDataBinding (unsigned int dataBinding)

## Static Protected Member Functions

static Control * | create (Theme::Style *style, Properties *properties=NULL)

## Detailed Description

Defines a button control.

See also:
  http://gameplay3d.github.io/GamePlay/docs/file-formats.html#wiki-UI_Forms

## Constructor & Destructor Documentation

gameplay::Button::Button | ( |  | ) | `[protected]`

Constructor.

virtual gameplay::Button::~Button | ( |  | ) | `[protected, virtual]`

Destructor.

## Member Function Documentation

static Button* gameplay::Button::create | ( | const char * | id,
|  | Theme::Style * | style = `NULL`
| ) |  | `[static]`

Creates a new Button.

Parameters:

  id | The button ID.
  style | The button style (optional).

Returns:
  The new button.

Reimplemented from gameplay::Label.

Reimplemented in gameplay::RadioButton, and gameplay::CheckBox.

static Control* gameplay::Button::create | ( | Theme::Style * | style,
|  | Properties * | properties = `NULL`
| ) |  | `[static, protected]`

Create a button with a given style and properties.

Parameters:

  style | The style to apply to this button.
  properties | A properties object containing a definition of the button (optional).

Returns:
  The new button.

Reimplemented from gameplay::Label.

Reimplemented in gameplay::RadioButton, and gameplay::CheckBox.

const unsigned int gameplay::Button::getDataBinding | ( |  | ) | const`[protected]`

Gets the data binding index for this control.

Returns:
  The data binding index for control.

const char* gameplay::Button::getTypeName | ( |  | ) | const`[protected, virtual]`

Extends ScriptTarget::getTypeName() to return the type name of this class.

Child controls should override this function to return the correct type name.

Returns:
  The type name of this class: "Button"

See also:
  ScriptTarget::getTypeName()

Reimplemented from gameplay::Label.

Reimplemented in gameplay::RadioButton, and gameplay::CheckBox.

void gameplay::Button::initialize | ( | const char * | typeName,
|  | Theme::Style * | style,
|  | Properties * | properties
| ) |  | `[protected, virtual]`

See also:
  Control::initialize

Reimplemented from gameplay::Label.

Reimplemented in gameplay::RadioButton, and gameplay::CheckBox.

void gameplay::Button::setDataBinding | ( | unsigned int | dataBinding | ) | `[protected]`

Sets the data binding provider for this control.

Parameters:

  dataBinding | The data binding index for control.

All Classes Functions Variables Typedefs Enumerations Enumerator