Eclipse SUMO - Simulation of Urban MObility
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GUILaneSpeedTrigger.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
20// Changes the speed allowed on a set of lanes (gui version)
21/****************************************************************************/
22#pragma once
23#include <config.h>
24
25#include <vector>
26#include <string>
31#include <gui/GUIManipulator.h>
32
33
34// ===========================================================================
35// class definitions
36// ===========================================================================
44 : public MSLaneSpeedTrigger,
46public:
53 GUILaneSpeedTrigger(const std::string& id,
54 const std::vector<MSLane*>& destLanes,
55 const std::string& file);
56
59
61
62
71
80
82 double getExaggeration(const GUIVisualizationSettings& s) const;
83
90
95 void drawGL(const GUIVisualizationSettings& s) const;
97
99
100public:
103 public:
104
106
108
110 long onCmdOpenManip(FXObject*, FXSelector, void*);
111
112 protected:
114
115 };
116
119 public:
120 enum {
121 MID_USER_DEF = FXDialogBox::ID_LAST,
125 ID_LAST
126 };
129 const std::string& name, GUILaneSpeedTrigger& o,
130 int xpos, int ypos);
131
134
135 long onCmdClose(FXObject*, FXSelector, void*);
136 long onCmdUserDef(FXObject*, FXSelector, void*);
137 long onUpdUserDef(FXObject*, FXSelector, void*);
138 long onCmdPreDef(FXObject*, FXSelector, void*);
139 long onUpdPreDef(FXObject*, FXSelector, void*);
140 long onCmdChangeOption(FXObject*, FXSelector, void*);
141
142 private:
144
146
147 FXDataTarget myChosenTarget;
148
149 double mySpeed;
150
151 FXDataTarget mySpeedTarget;
152
153 FXRealSpinner* myUserDefinedSpeed;
154
156
158
159 protected:
160 FOX_CONSTRUCTOR(GUIManip_LaneSpeedTrigger)
161 };
162
163private:
165 typedef std::vector<Position> PosCont;
166
168 typedef std::vector<double> RotCont;
169
170private:
173
176
179
182
184 mutable double myLastValue;
185
187 mutable std::string myLastValueString;
188
189};
A class that stores a 2D geometrical boundary.
Definition Boundary.h:39
The popup menu of a globject.
long onCmdOpenManip(FXObject *, FXSelector, void *)
Called if the object's manipulator shall be shown.
long onCmdClose(FXObject *, FXSelector, void *)
long onCmdChangeOption(FXObject *, FXSelector, void *)
long onUpdPreDef(FXObject *, FXSelector, void *)
long onCmdUserDef(FXObject *, FXSelector, void *)
long onCmdPreDef(FXObject *, FXSelector, void *)
long onUpdUserDef(FXObject *, FXSelector, void *)
Changes the speed allowed on a set of lanes (gui version)
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
void drawGL(const GUIVisualizationSettings &s) const
Draws the object.
std::vector< double > RotCont
Definition of a rotation container.
std::string myLastValueString
Storage for speed string to avoid recomputation.
GUIManipulator * openManipulator(GUIMainWindow &app, GUISUMOAbstractView &parent)
Boundary getCenteringBoundary() const
Returns the boundary to which the view shall be centered in order to show the object.
GUIGLObjectPopupMenu * getPopUpMenu(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own popup-menu.
bool myShowAsKMH
The information whether the speed shall be shown in m/s or km/h.
PosCont myFGPositions
The positions in full-geometry mode.
RotCont myFGRotations
The rotations in full-geometry mode.
double myLastValue
Storage for last value to avoid string recomputation.
std::vector< Position > PosCont
Definition of a positions container.
Boundary myBoundary
The boundary of this rerouter.
double getExaggeration(const GUIVisualizationSettings &s) const
return exaggeration associated with this GLObject
A window containing a gl-object's parameter.
Stores the information about how to visualize structures.
Changes the speed allowed on a set of lanes.