SUMO - Simulation of Urban MObility
GUILaneSpeedTrigger.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
19 // Changes the speed allowed on a set of lanes (gui version)
20 /****************************************************************************/
21 #ifndef GUILaneSpeedTrigger_h
22 #define GUILaneSpeedTrigger_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <vector>
35 #include <string>
40 #include <gui/GUIManipulator.h>
41 
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
53  : public MSLaneSpeedTrigger,
55 public:
62  GUILaneSpeedTrigger(const std::string& id,
63  const std::vector<MSLane*>& destLanes,
64  const std::string& file);
65 
66 
69 
70 
71 
73 
74 
83  GUISUMOAbstractView& parent);
84 
85 
94  GUISUMOAbstractView& parent);
95 
96 
103 
104 
109  void drawGL(const GUIVisualizationSettings& s) const;
111 
112 
113 
115  GUISUMOAbstractView& parent);
116 
117 public:
120  public:
121 
123  GUISUMOAbstractView& parent, GUIGlObject& o);
124 
126 
128  long onCmdOpenManip(FXObject*, FXSelector, void*);
129 
130  protected:
132 
133  };
134 
136  FXDECLARE(GUIManip_LaneSpeedTrigger)
137  public:
138  enum {
139  MID_USER_DEF = FXDialogBox::ID_LAST,
143  ID_LAST
144  };
147  const std::string& name, GUILaneSpeedTrigger& o,
148  int xpos, int ypos);
149 
151  virtual ~GUIManip_LaneSpeedTrigger();
152 
153  long onCmdOverride(FXObject*, FXSelector, void*);
154  long onCmdClose(FXObject*, FXSelector, void*);
155  long onCmdUserDef(FXObject*, FXSelector, void*);
156  long onUpdUserDef(FXObject*, FXSelector, void*);
157  long onCmdPreDef(FXObject*, FXSelector, void*);
158  long onUpdPreDef(FXObject*, FXSelector, void*);
159  long onCmdChangeOption(FXObject*, FXSelector, void*);
160 
161  private:
163 
165 
166  FXDataTarget myChosenTarget;
167 
168  double mySpeed;
169 
170  FXDataTarget mySpeedTarget;
171 
172  FXRealSpinDial* myUserDefinedSpeed;
173 
174  FXComboBox* myPredefinedValues;
175 
177 
178  protected:
180 
181  };
182 
183 private:
185  typedef std::vector<Position> PosCont;
186 
188  typedef std::vector<double> RotCont;
189 
190 private:
192  PosCont myFGPositions;
193 
195  RotCont myFGRotations;
196 
199 
202 
204  mutable double myLastValue;
205 
207  mutable std::string myLastValueString;
208 
209 };
210 
211 
212 #endif
213 
214 /****************************************************************************/
215 
PosCont myFGPositions
The positions in full-geometry mode.
long onCmdOpenManip(FXObject *, FXSelector, void *)
Called if the object&#39;s manipulator shall be shown.
Stores the information about how to visualize structures.
std::vector< Position > PosCont
Definition of a positions container.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
double myLastValue
Storage for last value to avoid string recomputation.
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:47
Changes the speed allowed on a set of lanes.
GUILaneSpeedTrigger(const std::string &id, const std::vector< MSLane *> &destLanes, const std::string &file)
Constructor.
Boundary myBoundary
The boundary of this rerouter.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
std::string myLastValueString
Storage for speed string to avoid recomputation.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
RotCont myFGRotations
The rotations in full-geometry mode.
bool myShowAsKMH
The information whether the speed shall be shown in m/s or km/h.
The popup menu of a globject.
GUIManipulator * openManipulator(GUIMainWindow &app, GUISUMOAbstractView &parent)
Changes the speed allowed on a set of lanes (gui version)
A window containing a gl-object&#39;s parameter.
std::vector< double > RotCont
Definition of a rotation container.