|  | 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
gameplay::Control::Listener Class Reference

`#include <Control.h>`

List of all members.

## Public Types

enum | EventType { PRESS = 0x01, RELEASE = 0x02, CLICK = 0x04, VALUE_CHANGED = 0x08, TEXT_CHANGED = 0x10, MIDDLE_CLICK = 0x20, RIGHT_CLICK = 0x40, FOCUS_GAINED = 0x200, FOCUS_LOST = 0x400 }

## Public Member Functions

virtual void | controlEvent (Control *control, EventType evt)=0

## Detailed Description

Implement Control::Listener and call Control::addListener() in order to listen for events on controls.

## Member Enumeration Documentation

enum gameplay::Control::Listener::EventType

Defines the Listener's event types.

Enumerator:

  PRESS | Mouse-down or touch-press event.
  RELEASE | Mouse-up or touch-release event.
  CLICK | Event triggered after consecutive PRESS and RELEASE events take place within the bounds of a control.
  VALUE_CHANGED | Event triggered when the value of a slider, check box, or radio button changes.
  TEXT_CHANGED | Event triggered when the contents of a text box are modified.
  MIDDLE_CLICK | Event triggered when a control is clicked with the middle mouse button.
  RIGHT_CLICK | Event triggered when a control is clicked with the right mouse button.
  FOCUS_GAINED | Event triggered when a control gains focus.
  FOCUS_LOST | Event triggered when a control loses focus.

## Member Function Documentation

virtual void gameplay::Control::Listener::controlEvent | ( | Control * | control,
|  | EventType | evt
| ) |  | `[pure virtual]`

Method called by controls when an event is triggered.

Parameters:

  control | The control triggering the event.
  evt | The event triggered.

All Classes Functions Variables Typedefs Enumerations Enumerator