17#ifndef _GAZEBO_MOUSEEVENT_HH_
18#define _GAZEBO_MOUSEEVENT_HH_
20#include <ignition/math/Vector2.hh>
28 class MouseEventPrivate;
84 public: ignition::math::Vector2i
Pos()
const;
88 public:
void SetPos(
const ignition::math::Vector2i &_pos);
93 public:
void SetPos(
const int _x,
const int _y);
97 public: ignition::math::Vector2i
PrevPos()
const;
101 public:
void SetPrevPos(
const ignition::math::Vector2i &_pos);
123 public: ignition::math::Vector2i
Scroll()
const;
127 public:
void SetScroll(
const ignition::math::Vector2i &_scroll);
208 private: MouseEventPrivate *dataPtr;
common
Definition FuelModelDatabase.hh:37
Generic description of a mouse event.
Definition MouseEvent.hh:36
void SetScroll(const ignition::math::Vector2i &_scroll)
Set the scroll position.
ignition::math::Vector2i Pos() const
Get mouse pointer position on the screen.
void SetMoveScale(const float _scale)
Set the scaling factor.
void SetPrevPos(const int _x, const int _y)
Set the previous position.
void SetPressPos(const ignition::math::Vector2i &_pos)
Set the position of button press.
bool Shift() const
Get the shift key press flag.
EventType Type() const
Get the event type.
EventType
Mouse event types enumeration.
Definition MouseEvent.hh:55
@ SCROLL
Scroll event.
Definition MouseEvent.hh:69
@ NO_EVENT
No event.
Definition MouseEvent.hh:57
@ PRESS
Press event.
Definition MouseEvent.hh:63
@ RELEASE
Release event.
Definition MouseEvent.hh:66
@ MOVE
Move event.
Definition MouseEvent.hh:60
void SetPos(const ignition::math::Vector2i &_pos)
Set mouse pointer position on the screen.
MouseEvent & operator=(const MouseEvent &_other)
Assignment operator.
void SetShift(const bool _shift) const
Set the shift key press flag.
void SetPressPos(const int _x, const int _y)
Set the position of button press.
void SetType(const EventType _type) const
Set the event type.
void SetButton(const MouseEvent::MouseButton _button) const
Set the button which caused the event.
void SetAlt(const bool _alt)
Set the alt key press flag.
bool Control() const
Get the control key press flag.
void SetControl(const bool _control) const
Set the control key press flag.
void SetPrevPos(const ignition::math::Vector2i &_pos)
Set the previous position.
void SetPos(const int _x, const int _y)
Set mouse pointer position on the screen.
MouseEvent(const MouseEvent &_other)
Copy constructor.
ignition::math::Vector2i PrevPos() const
Get the previous position.
void SetDragging(const bool _dragging)
Set the flag for mouse drag motion.
ignition::math::Vector2i Scroll() const
Get the scroll position.
float MoveScale() const
Get the scaling factor.
unsigned int Buttons() const
Get the state of the buttons when the event was generated.
ignition::math::Vector2i PressPos() const
Get the position of button press.
MouseButton
Standard mouse buttons enumeration.
Definition MouseEvent.hh:39
@ MIDDLE
Middle button.
Definition MouseEvent.hh:47
@ NO_BUTTON
No button.
Definition MouseEvent.hh:41
@ LEFT
Left button.
Definition MouseEvent.hh:44
@ RIGHT
Right button.
Definition MouseEvent.hh:50
MouseEvent::MouseButton Button() const
Get the button which caused this event.
bool Dragging() const
Get the flag for mouse drag motion.
void SetButtons(const unsigned int &_buttons)
Set the state of the buttons when the event was generated.
virtual ~MouseEvent()
Destructor.
void SetScroll(const int _x, const int _y)
Set the scroll position.
bool Alt() const
Get the alt key press flag.
Forward declarations for the common classes.
Definition Animation.hh:27