Go to the documentation of this file.
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);
106 public:
void SetPrevPos(
const int _x,
const int _y);
110 public: ignition::math::Vector2i PressPos()
const;
114 public:
void SetPressPos(
const ignition::math::Vector2i &_pos);
119 public:
void SetPressPos(
const int _x,
const int _y);
123 public: ignition::math::Vector2i Scroll()
const;
127 public:
void SetScroll(
const ignition::math::Vector2i &_scroll);
132 public:
void SetScroll(
const int _x,
const int _y);
136 public:
float MoveScale()
const;
140 public:
void SetMoveScale(
const float _scale);
145 public:
bool Dragging()
const;
149 public:
void SetDragging(
const bool _dragging);
153 public: EventType Type()
const;
157 public:
void SetType(
const EventType _type)
const;
170 public:
unsigned int Buttons()
const;
175 public:
void SetButtons(
const unsigned int &_buttons);
179 public:
bool Shift()
const;
183 public:
void SetShift(
const bool _shift)
const;
187 public:
bool Alt()
const;
191 public:
void SetAlt(
const bool _alt);
195 public:
bool Control()
const;
199 public:
void SetControl(
const bool _control)
const;
208 private: MouseEventPrivate *dataPtr;
Middle button.
Definition: MouseEvent.hh:47
MouseEvent & operator=(const MouseEvent &_other)
Assignment operator.
Right button.
Definition: MouseEvent.hh:50
ignition::math::Vector2i PrevPos() const
Get the previous position.
MouseButton
Standard mouse buttons enumeration.
Definition: MouseEvent.hh:38
Forward declarations for the common classes.
Definition: Animation.hh:26
EventType Type() const
Get the event type.
ignition::math::Vector2i Scroll() const
Get the scroll position.
void SetControl(const bool _control) const
Set the control key press flag.
Scroll event.
Definition: MouseEvent.hh:69
No event.
Definition: MouseEvent.hh:57
No button.
Definition: MouseEvent.hh:41
ignition::math::Vector2i Pos() const
Get mouse pointer position on the screen.
void SetButton(const MouseEvent::MouseButton _button) const
Set the button which caused the event.
void SetScroll(const ignition::math::Vector2i &_scroll)
Set the scroll position.
void SetButtons(const unsigned int &_buttons)
Set the state of the buttons when the event was generated.
Left button.
Definition: MouseEvent.hh:44
Release event.
Definition: MouseEvent.hh:66
Press event.
Definition: MouseEvent.hh:63
MouseEvent::MouseButton Button() const
Get the button which caused this event.
void SetMoveScale(const float _scale)
Set the scaling factor.
bool Control() const
Get the control key press flag.
void SetAlt(const bool _alt)
Set the alt key press flag.
void SetPressPos(const ignition::math::Vector2i &_pos)
Set the position of button press.
bool Alt() const
Get the alt key press flag.
void SetType(const EventType _type) const
Set the event type.
unsigned int Buttons() const
Get the state of the buttons when the event was generated.
float MoveScale() const
Get the scaling factor.
void SetDragging(const bool _dragging)
Set the flag for mouse drag motion.
void SetPos(const ignition::math::Vector2i &_pos)
Set mouse pointer position on the screen.
EventType
Mouse event types enumeration.
Definition: MouseEvent.hh:54
virtual ~MouseEvent()
Destructor.
Move event.
Definition: MouseEvent.hh:60
bool Shift() const
Get the shift key press flag.
void SetShift(const bool _shift) const
Set the shift key press flag.
Generic description of a mouse event.
Definition: MouseEvent.hh:35
void SetPrevPos(const ignition::math::Vector2i &_pos)
Set the previous position.
ignition::math::Vector2i PressPos() const
Get the position of button press.
bool Dragging() const
Get the flag for mouse drag motion.