# Cinder

# cinder::app::MouseEvent Class Reference

Represents a mouse event. More...

`#include <MouseEvent.h>`

List of all members.

## 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 }
## Public Member Functions
| MouseEvent ()
| MouseEvent (int aInitiator, int aX, int aY, unsigned int aModifiers, float aWheelIncrement, uint32_t aNativeModifiers)
int | getX () const
| Returns the X coordinate of the mouse event.
int | getY () const
| Returns the Y coordinate of the mouse event.
Vec2i | getPos () const
| Returns the coordinates of the mouse event.
bool | isLeft () const
| Returns whether the initiator for the event was the left mouse button.
bool | isRight () const
| Returns whether the initiator for the event was the right mouse button.
bool | isMiddle () const
| Returns whether the initiator for the event was the middle mouse button.
bool | isLeftDown () const
| Returns whether the left mouse button was pressed during the event.
bool | isRightDown () const
| Returns whether the right mouse button was pressed during the event.
bool | isMiddleDown () const
| Returns whether the middle mouse button was pressed during the event.
bool | isShiftDown () const
| Returns whether the Shift key was pressed during the event.
bool | isAltDown () const
| Returns whether the Alt (or Option) key was pressed during the event.
bool | isControlDown () const
| Returns whether the Control key was pressed during the event.
bool | isMetaDown () const
| Returns whether the meta key was pressed during the event. Maps to the Windows key on Windows and the Command key on Mac OS X.
bool | 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 | 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 | getNativeModifiers () const
| Returns the platform-native modifier mask.

## Detailed Description

Represents a mouse event.

## Member Enumeration Documentation

anonymous enum

Enumerator:

  LEFT_DOWN |
  RIGHT_DOWN |
  MIDDLE_DOWN |
  SHIFT_DOWN |
  ALT_DOWN |
  CTRL_DOWN |
  META_DOWN |
  ACCEL_DOWN |

## Constructor & Destructor Documentation

cinder::app::MouseEvent::MouseEvent | ( |  | ) |

cinder::app::MouseEvent::MouseEvent | ( | int | aInitiator,
|  | int | aX,
|  | int | aY,
|  | unsigned int | aModifiers,
|  | float | aWheelIncrement,
|  | uint32_t | aNativeModifiers |
| ) |  |  |

## Member Function Documentation

int cinder::app::MouseEvent::getX | ( |  | ) | const

Returns the X coordinate of the mouse event.

int cinder::app::MouseEvent::getY | ( |  | ) | const

Returns the Y coordinate of the mouse event.

Vec2i cinder::app::MouseEvent::getPos | ( |  | ) | const

Returns the coordinates of the mouse event.

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

Returns whether the meta key was pressed during the event. Maps to the Windows key on Windows and the Command key on Mac OS X.

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.

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

- include/cinder/app/MouseEvent.h