All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
BoxMaker.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2014 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 _BOXMAKER_HH_
18 #define _BOXMAKER_HH_
19 
20 #include <string>
21 #include "gazebo/math/Vector2i.hh"
23 #include "gazebo/util/system.hh"
24 
25 namespace gazebo
26 {
27  namespace msgs
28  {
29  class Visual;
30  }
31 
34  namespace gui
35  {
38 
42  {
44  public: BoxMaker();
45 
47  public: virtual ~BoxMaker();
48 
50  public: virtual void Start(const rendering::UserCameraPtr _camera);
51 
53  public: virtual void Stop();
54 
56  public: virtual bool IsActive() const;
57 
59  public: virtual void OnMousePush(const common::MouseEvent &_event);
60 
62  public: virtual void OnMouseRelease(const common::MouseEvent &_event);
63 
65  public: virtual void OnMouseDrag(const common::MouseEvent &_event);
66 
68  public: virtual void OnMouseMove(const common::MouseEvent &_event);
69 
72  public: std::string GetSDFString();
73 
75  private: virtual void CreateTheEntity();
76  private: int state;
77  private: bool leftMousePressed;
78  private: math::Vector2i mousePushPos, mouseReleasePos;
79  private: msgs::Visual *visualMsg;
80 
81  private: static unsigned int counter;
82  };
83  }
84 }
85 #endif
Generic description of a mouse event.
Definition: MouseEvent.hh:32
Generic integer x, y vector.
Definition: Vector2i.hh:39
to make a box
Definition: BoxMaker.hh:41
to make an entity base class
Definition: EntityMaker.hh:41
boost::shared_ptr< UserCamera > UserCameraPtr
Definition: RenderTypes.hh:84
#define GAZEBO_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system.hh:48