Public Types | Public Member Functions | Protected Member Functions

wit::Event Class Reference

#include <wit/event.h>

List of all members.

Public Types

enum  Type {
  Joystick, Analog, Motion, Pointer,
  PointerLeave, ButtonPress, ButtonRelease, User = 256
}

Public Member Functions

int type () const

Protected Member Functions

 Event (int type)

Detailed Description

This is the base class for all events handled by the WIT framework. It is not intended to be instantiated directly.

Custom events provided by user code should inherit from Event and provide a type greater than or equal to Event::User.

See also:
wit::EventHandler::event()

Definition at line 10 of file event.h.


Member Enumeration Documentation

Enumerator:
Joystick 

The event was generated by changing the position of an analog joystick.

Analog 

The event was generated by changing the pressure on an analog button.

Motion 

The event was generated by the motion sensor of a Wii Remote or Nunchuk.

Pointer 

The event was generated by the infrared sensor of a Wii Remote.

PointerLeave 

The event was generated by the pointer moving out of a hotspot.

ButtonPress 

The event was generated by pressing a non-analog button or by fully depressing an analog button.

ButtonRelease 

The event was generated by releasing a non-analog button or by releasing a fully-depressed analog button,

User 

Base value for user-defined events.

Definition at line 12 of file event.h.


Constructor & Destructor Documentation

wit::Event::Event ( int  type ) [protected]

Constructs an event with the specified type.

Note that this constructor has protected visibility: the Event class cannot be cannot be instantiated directly, only subclassed.

Definition at line 22 of file event.cpp.


Member Function Documentation

int wit::Event::type (  ) const

Returns the type of the event.

Definition at line 30 of file event.cpp.


The documentation for this class was generated from the following files: