6#include "fifechan/events/mouseevent.hpp"
12#include "fifechan/platform.hpp"
15#include "fifechan/events/inputevent.hpp"
39 "Type must be valid" &&
40 (type == MouseEvent::Type::Pressed || type == MouseEvent::Type::Released ||
41 type == MouseEvent::Type::Moved || type == MouseEvent::Type::WheelMovedDown ||
42 type == MouseEvent::Type::WheelMovedUp || type == MouseEvent::Type::WheelMovedRight ||
43 type == MouseEvent::Type::WheelMovedLeft || type == MouseEvent::Type::Clicked ||
44 type == MouseEvent::Type::Entered || type == MouseEvent::Type::Exited ||
45 type == MouseEvent::Type::Dragged));
47 "Button must be valid" && (button == MouseEvent::Button::Empty || button == MouseEvent::Button::Left ||
48 button == MouseEvent::Button::Right || button == MouseEvent::Button::Middle ||
49 button == MouseEvent::Button::X1 || button == MouseEvent::Button::X2));
50 assert(
"Click count must be non-negative" && clickCount >= 0);
int getClickCount() const
Gets the number of clicks generated with the same button.
int getX() const
Gets the x coordinate of the mouse event.
int mClickCount
The number of clicks generated with the same button.
MouseEvent::Button mButton
Holds the button of the mouse event.
MouseEvent::Type getType() const
Gets the type of the event.
Button
Mouse button types.
int mY
Holds the y-coordinate of the mouse event.
MouseEvent::Type mType
Holds the type of the mouse event.
int getY() const
Gets the y coordinate of the mouse event.
MouseEvent::Button getButton() const
Gets the button of the mouse event.
MouseEvent(Widget *source, Widget *distributor, bool isShiftPressed, bool isControlPressed, bool isAltPressed, bool isMetaPressed, MouseEvent::Type type, MouseEvent::Button button, int x, int y, int clickCount)
Constructor.
int mX
Holds the x-coordinate of the mouse event.
Used replacement tokens by configure_file():