![]() |
Cinder
0.9.1
|
#include <MouseEvent.h>
Inherits cinder::app::Event.
Public Types | |
enum | { LEFT_DOWN = 0x0001, RIGHT_DOWN = 0x0002, MIDDLE_DOWN = 0x0004, SHIFT_DOWN = 0x0008, ALT_DOWN = 0x0010, CTRL_DOWN = 0x0020, META_DOWN = 0x0040, ACCEL_DOWN = CTRL_DOWN } |
Public Member Functions | |
MouseEvent () | |
MouseEvent (const WindowRef &win, int initiator, int x, int y, unsigned int modifiers, float wheelIncrement, uint32_t nativeModifiers) | |
int | getX () const |
int | getY () const |
const ivec2 & | getPos () const |
void | setPos (const ivec2 &pos) |
bool | isLeft () const |
bool | isRight () const |
bool | isMiddle () const |
bool | isLeftDown () const |
bool | isRightDown () const |
bool | isMiddleDown () const |
bool | isShiftDown () const |
bool | isAltDown () const |
bool | isControlDown () const |
bool | isMetaDown () const |
bool | isAccelDown () const |
float | getWheelIncrement () const |
uint32_t | getNativeModifiers () const |
bool | isHandled () const |
void | setHandled (bool handled=true) |
WindowRef | getWindow () const |
void | setWindow (const WindowRef &window) |
Public Attributes | |
bool | mHandled |
WindowRef | mWindow |
Protected Attributes | |
int | mInitiator |
ivec2 | mPos |
unsigned int | mModifiers |
float | mWheelIncrement |
uint32_t | mNativeModifiers |
Represents a mouse event.
anonymous enum |
cinder::app::MouseEvent::MouseEvent | ( | ) |
cinder::app::MouseEvent::MouseEvent | ( | const WindowRef & | win, |
int | initiator, | ||
int | x, | ||
int | y, | ||
unsigned int | modifiers, | ||
float | wheelIncrement, | ||
uint32_t | nativeModifiers | ||
) |
int cinder::app::MouseEvent::getX | ( | ) | const |
Returns the X coordinate of the mouse event, measured in points.
int cinder::app::MouseEvent::getY | ( | ) | const |
Returns the Y coordinate of the mouse event, measured in points.
const ivec2& cinder::app::MouseEvent::getPos | ( | ) | const |
Returns the coordinates of the mouse event measured in points.
void cinder::app::MouseEvent::setPos | ( | const ivec2 & | pos | ) |
Sets the coordinates of the mouse event, measured in points.
bool cinder::app::MouseEvent::isLeft | ( | ) | const |
Returns whether the initiator for the event was the left mouse button.
bool cinder::app::MouseEvent::isRight | ( | ) | const |
Returns whether the initiator for the event was the right mouse button.
bool cinder::app::MouseEvent::isMiddle | ( | ) | const |
Returns whether the initiator for the event was the middle mouse button.
bool cinder::app::MouseEvent::isLeftDown | ( | ) | const |
Returns whether the left mouse button was pressed during the event.
bool cinder::app::MouseEvent::isRightDown | ( | ) | const |
Returns whether the right mouse button was pressed during the event.
bool cinder::app::MouseEvent::isMiddleDown | ( | ) | const |
Returns whether the middle mouse button was pressed during the event.
bool cinder::app::MouseEvent::isShiftDown | ( | ) | const |
Returns whether the Shift key was pressed during the event.
bool cinder::app::MouseEvent::isAltDown | ( | ) | const |
Returns whether the Alt (or Option) key was pressed during the event.
bool cinder::app::MouseEvent::isControlDown | ( | ) | const |
Returns whether the Control key was pressed during the event.
bool cinder::app::MouseEvent::isMetaDown | ( | ) | const |
bool cinder::app::MouseEvent::isAccelDown | ( | ) | const |
Returns whether the accelerator key was pressed during the event. Maps to the Control key on Windows and the Command key on Mac OS X.
float cinder::app::MouseEvent::getWheelIncrement | ( | ) | const |
Returns the number of detents the user has wheeled through. Positive values correspond to wheel-up and negative to wheel-down.
uint32_t cinder::app::MouseEvent::getNativeModifiers | ( | ) | const |
Returns the platform-native modifier mask.
|
inherited |
Returns whether this event has been marked as handled by one of its slots, terminating the normal iteration of the event's slots.
|
inherited |
Marks the event as handled, terminating the normal iteration of the event's slots.
|
inherited |
Returns the Window in which the MouseEvent occurred.
|
inherited |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inherited |
|
inherited |