Public Types | Public Member Functions | Public Attributes | Static Public Attributes

a5::Mouse::Event Class Reference
[EventMouse]

Mouse event object. More...

#include <Mouse.hpp>

Inheritance diagram for a5::Mouse::Event:
Inheritance graph

List of all members.

Public Types

enum  Sub {
  Move = Type * 0x10000000 + 1,
  Down = Type * 0x10000000 + 2,
  Up = Type * 0x10000000 + 3,
  Warp = Type * 0x10000000 + 4,
  Enter = Type * 0x10000000 + 5,
  Leave = Type * 0x10000000 + 6
}
 

Event subtypes.

More...

Public Member Functions

unsigned int SubType () const
 Returns the subtype ID of the event.
 Event (const Event_Source *source_, Sub subtype_, ALLEGRO_DISPLAY *display_, int w_, int x_, int y_, int z_, int dw_, int dx_, int dy_, int dz_, Button button_)
 Creates a Mouse event.
unsigned int Type () const
 Returns the Type ID of the event Returns 0 (User_Type) for all user events.
 operator ALLEGRO_EVENT * () const
 Returns a pointer to the Allegro event.

Public Attributes

ALLEGRO_DISPLAY * display
 Display the mouse is using.
int w
 Current position of the horizontal scroll.
int x
 Current X coordinate of the mouse cursor.
int y
 Current Y coordinate of the mouse cursor.
int z
 Current position of the vertical scroll.
int dw
 Difference this event caused to the position of the horizontal scroll.
int dx
 Difference this event caused to the X coordinate of the mouse cursor.
int dy
 Difference this event caused to the Y coordinate of the mouse cursor.
int dz
 Difference this event caused to the position of the vertical scroll.
Button button
 Button that was clicked.
ALLEGRO_EVENT * raw
const Event_Sourcesource
 Pointer to the Event_Source that emitted the event.

Static Public Attributes

static const unsigned int Type = 0x00000004
static const unsigned int User_Type = 0x00000000

Detailed Description

Mouse event object.


Member Enumeration Documentation

Event subtypes.


Constructor & Destructor Documentation

a5::Mouse::Event::Event ( const Event_Source source_,
Sub  subtype_,
ALLEGRO_DISPLAY *  display_,
int  w_,
int  x_,
int  y_,
int  z_,
int  dw_,
int  dx_,
int  dy_,
int  dz_,
Button  button_ 
)

Creates a Mouse event.


Member Function Documentation

unsigned int a5::Mouse::Event::SubType (  )  const [virtual]

Returns the subtype ID of the event.

Reimplemented from a5::Event.

unsigned int a5::Event::Type (  )  const [inherited]

Returns the Type ID of the event Returns 0 (User_Type) for all user events.

a5::Event::operator ALLEGRO_EVENT * (  )  const [inherited]

Returns a pointer to the Allegro event.


Member Data Documentation

ALLEGRO_DISPLAY* a5::Mouse::Event::display

Display the mouse is using.

Current position of the horizontal scroll.

Current X coordinate of the mouse cursor.

Current Y coordinate of the mouse cursor.

Current position of the vertical scroll.

Difference this event caused to the position of the horizontal scroll.

Difference this event caused to the X coordinate of the mouse cursor.

Difference this event caused to the Y coordinate of the mouse cursor.

Difference this event caused to the position of the vertical scroll.

Button that was clicked.

const Event_Source* a5::Event::source [inherited]

Pointer to the Event_Source that emitted the event.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Defines