SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUILaneSpeedTrigger.h
Go to the documentation of this file.
1 /****************************************************************************/
9 // Changes the speed allowed on a set of lanes (gui version)
10 /****************************************************************************/
11 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
12 // Copyright (C) 2001-2014 DLR (http://www.dlr.de/) and contributors
13 /****************************************************************************/
14 //
15 // This file is part of SUMO.
16 // SUMO is free software: you can redistribute it and/or modify
17 // it under the terms of the GNU General Public License as published by
18 // the Free Software Foundation, either version 3 of the License, or
19 // (at your option) any later version.
20 //
21 /****************************************************************************/
22 #ifndef GUILaneSpeedTrigger_h
23 #define GUILaneSpeedTrigger_h
24 
25 
26 // ===========================================================================
27 // included modules
28 // ===========================================================================
29 #ifdef _MSC_VER
30 #include <windows_config.h>
31 #else
32 #include <config.h>
33 #endif
34 
35 #include <vector>
36 #include <string>
41 #include <gui/GUIManipulator.h>
42 
43 
44 // ===========================================================================
45 // class definitions
46 // ===========================================================================
54  : public MSLaneSpeedTrigger,
56 public:
63  GUILaneSpeedTrigger(const std::string& id,
64  const std::vector<MSLane*>& destLanes,
65  const std::string& file);
66 
67 
70 
71 
72 
74 
75 
84  GUISUMOAbstractView& parent);
85 
86 
95  GUISUMOAbstractView& parent);
96 
97 
104 
105 
110  void drawGL(const GUIVisualizationSettings& s) const;
112 
113 
114 
116  GUISUMOAbstractView& parent);
117 
118 public:
121  public:
122 
124  GUISUMOAbstractView& parent, GUIGlObject& o);
125 
127 
129  long onCmdOpenManip(FXObject*, FXSelector, void*);
130 
131  protected:
133 
134  };
135 
137  FXDECLARE(GUIManip_LaneSpeedTrigger)
138  public:
139  enum {
140  MID_USER_DEF = FXDialogBox::ID_LAST,
145  };
148  const std::string& name, GUILaneSpeedTrigger& o,
149  int xpos, int ypos);
150 
152  virtual ~GUIManip_LaneSpeedTrigger();
153 
154  long onCmdOverride(FXObject*, FXSelector, void*);
155  long onCmdClose(FXObject*, FXSelector, void*);
156  long onCmdUserDef(FXObject*, FXSelector, void*);
157  long onUpdUserDef(FXObject*, FXSelector, void*);
158  long onCmdPreDef(FXObject*, FXSelector, void*);
159  long onUpdPreDef(FXObject*, FXSelector, void*);
160  long onCmdChangeOption(FXObject*, FXSelector, void*);
161 
162  private:
164 
166 
167  FXDataTarget myChosenTarget;
168 
170 
171  FXDataTarget mySpeedTarget;
172 
173  FXRealSpinDial* myUserDefinedSpeed;
174 
175  FXComboBox* myPredefinedValues;
176 
178 
179  protected:
181 
182  };
183 
184 private:
186  typedef std::vector<Position> PosCont;
187 
189  typedef std::vector<SUMOReal> RotCont;
190 
191 private:
194 
197 
200 
203 
206 
208  mutable std::string myLastValueString;
209 
210 };
211 
212 
213 #endif
214 
215 /****************************************************************************/
216 
std::vector< SUMOReal > RotCont
Definition of a rotation container.
long onCmdClose(FXObject *, FXSelector, void *)
long onCmdUserDef(FXObject *, FXSelector, void *)
PosCont myFGPositions
The positions in full-geometry mode.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
long onCmdOpenManip(FXObject *, FXSelector, void *)
Called if the object's manipulator shall be shown.
Stores the information about how to visualize structures.
long onCmdChangeOption(FXObject *, FXSelector, void *)
long onCmdOverride(FXObject *, FXSelector, void *)
long onUpdPreDef(FXObject *, FXSelector, void *)
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
std::vector< Position > PosCont
Definition of a positions container.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
A class that stores a 2D geometrical boundary.
Definition: Boundary.h:48
Changes the speed allowed on a set of lanes.
long onUpdUserDef(FXObject *, FXSelector, void *)
Boundary myBoundary
The boundary of this rerouter.
long onCmdPreDef(FXObject *, FXSelector, void *)
std::string myLastValueString
Storage for speed string to avoid recomputation.
GUILaneSpeedTrigger(const std::string &id, const std::vector< MSLane * > &destLanes, const std::string &file)
Constructor.
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)
#define SUMOReal
Definition: config.h:215
Changes the speed allowed on a set of lanes (gui version)
A window containing a gl-object's parameter.
SUMOReal myLastValue
Storage for last value to avoid string recomputation.