MouseEventPrivate.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2016 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 #ifndef _GAZEBO_MOUSEEVENT_PRIVATE_HH_
18 #define _GAZEBO_MOUSEEVENT_PRIVATE_HH_
19 
20 #include <ignition/math/Vector2.hh>
22 
23 namespace gazebo
24 {
25  namespace common
26  {
30  {
33  : pos(0, 0), prevPos(0, 0), pressPos(0, 0), scroll(0, 0),
34  moveScale(0.01), dragging(false), type(MouseEvent::NO_EVENT),
35  button(MouseEvent::NO_BUTTON), buttons(MouseEvent::NO_BUTTON),
36  shift(false), alt(false), control(false)
37  {}
38 
40  public: ignition::math::Vector2i pos;
41 
43  public: ignition::math::Vector2i prevPos;
44 
46  public: ignition::math::Vector2i pressPos;
47 
49  public: ignition::math::Vector2i scroll;
50 
52  public: float moveScale;
53 
55  public: bool dragging;
56 
59 
62 
64  public: unsigned int buttons;
65 
67  public: bool shift;
68 
70  public: bool alt;
71 
73  public: bool control;
74  };
75  }
76 }
77 #endif
ignition::math::Vector2i scroll
Scroll position.
Definition: MouseEventPrivate.hh:49
Generic description of a mouse event.
Definition: MouseEvent.hh:35
MouseEventPrivate()
Constructor.
Definition: MouseEventPrivate.hh:32
bool alt
Alt key press flag.
Definition: MouseEventPrivate.hh:70
MouseButton
Standard mouse buttons enumeration.
Definition: MouseEvent.hh:38
unsigned int buttons
State of the buttons when the event was generated.
Definition: MouseEventPrivate.hh:64
EventType
Mouse event types enumeration.
Definition: MouseEvent.hh:54
MouseEvent::EventType type
Event type.
Definition: MouseEventPrivate.hh:58
ignition::math::Vector2i pos
Mouse pointer position on the screen.
Definition: MouseEventPrivate.hh:40
float moveScale
Scaling factor.
Definition: MouseEventPrivate.hh:52
bool dragging
Flag for mouse drag motion.
Definition: MouseEventPrivate.hh:55
MouseEvent::MouseButton button
The button which caused the event.
Definition: MouseEventPrivate.hh:61
ignition::math::Vector2i prevPos
Previous position.
Definition: MouseEventPrivate.hh:43
ignition::math::Vector2i pressPos
Position of button press.
Definition: MouseEventPrivate.hh:46
bool control
Control key press flag.
Definition: MouseEventPrivate.hh:73
Definition: MouseEventPrivate.hh:29
bool shift
Shift key press flag.
Definition: MouseEventPrivate.hh:67