Gel2D - The free/open source game creation suite

Public Member Functions
gel::GelMouseEvent Class Reference

Mouse event. More...

#include <gelEvent.h>

Inheritance diagram for gel::GelMouseEvent:
gel::GelEvent

List of all members.

Public Member Functions

 GelMouseEvent (EventType tp, MouseButton btn, MouseButton btns, GelPoint mpos, int whl, KeyModifier modifiers)
 Constructor.
MouseButton getButton () const
 Gets the mouse button that triggered this event.
MouseButton getButtons () const
 Gets all mouse buttons that were pressed at the time this event was triggered.
int getWheelDelta () const
 Gets the wheel delta.
GelPoint getCursorPos () const
 Get the mouse cursor position.
KeyModifier getModifiers () const
 Gets all modifier keys that were pressed.

Detailed Description

Mouse event.


Constructor & Destructor Documentation

gel::GelMouseEvent::GelMouseEvent ( EventType  tp,
MouseButton  btn,
MouseButton  btns,
GelPoint  mpos,
int  whl,
KeyModifier  modifiers 
)

Constructor.

The event type must be one of MouseButtonPress, MouseButtonRelease, MouseButtonDblClick, MouseWheel, or MouseMove.

Parameters:
tp: The event type.
btn: The mouse button that triggered the event.
btns: Bitwise OR combination of all mouse buttons pressed.
mpos: Mouse cursor position.
whl: Mouse wheel delta.
modifiers: Key modifiers.

Member Function Documentation

MouseButton gel::GelMouseEvent::getButton ( ) const [inline]

Gets the mouse button that triggered this event.

MouseButton gel::GelMouseEvent::getButtons ( ) const [inline]

Gets all mouse buttons that were pressed at the time this event was triggered.

int gel::GelMouseEvent::getWheelDelta ( ) const [inline]

Gets the wheel delta.

The wheel delta will, of course, be 0 if this is not a MouseWheel event.

Returns:
The mouse wheel delta.
GelPoint gel::GelMouseEvent::getCursorPos ( ) const [inline]

Get the mouse cursor position.

KeyModifier gel::GelMouseEvent::getModifiers ( ) const [inline]

Gets all modifier keys that were pressed.


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