SUMO - Simulation of Urban MObility
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
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.sourceforge.net/
12
// Copyright (C) 2001-2012 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>
37
#include <
microsim/trigger/MSLaneSpeedTrigger.h
>
38
#include <
utils/gui/globjects/GUIGlObject_AbstractAdd.h
>
39
#include <
utils/gui/globjects/GUIGLObjectPopupMenu.h
>
40
#include <
utils/foxtools/FXRealSpinDial.h
>
41
#include <
gui/GUIManipulator.h
>
42
43
44
// ===========================================================================
45
// class definitions
46
// ===========================================================================
53
class
GUILaneSpeedTrigger
54
:
public
MSLaneSpeedTrigger
,
55
public
GUIGlObject_AbstractAdd
{
56
public
:
63
GUILaneSpeedTrigger
(
const
std::string&
id
,
64
const
std::vector<MSLane*>& destLanes,
65
const
std::string& file);
66
67
69
~GUILaneSpeedTrigger
();
70
71
72
74
75
83
GUIGLObjectPopupMenu
*
getPopUpMenu
(
GUIMainWindow
& app,
84
GUISUMOAbstractView
& parent);
85
86
94
GUIParameterTableWindow
*
getParameterWindow
(
GUIMainWindow
& app,
95
GUISUMOAbstractView
& parent);
96
97
103
Boundary
getCenteringBoundary
()
const
;
104
105
110
void
drawGL
(
const
GUIVisualizationSettings
& s)
const
;
112
113
114
115
GUIManipulator
*
openManipulator
(
GUIMainWindow
& app,
116
GUISUMOAbstractView
& parent);
117
118
public
:
119
class
GUILaneSpeedTriggerPopupMenu
:
public
GUIGLObjectPopupMenu
{
120
FXDECLARE(
GUILaneSpeedTriggerPopupMenu
)
121
public
:
122
123
GUILaneSpeedTriggerPopupMenu
(
GUIMainWindow
& app,
124
GUISUMOAbstractView
& parent,
GUIGlObject
& o);
125
126
~GUILaneSpeedTriggerPopupMenu
();
127
129
long
onCmdOpenManip
(
FXObject
*, FXSelector,
void
*);
130
131
protected
:
132
GUILaneSpeedTriggerPopupMenu
() { }
133
134
};
135
136
class
GUIManip_LaneSpeedTrigger
:
public
GUIManipulator
{
137
FXDECLARE(
GUIManip_LaneSpeedTrigger
)
138
public
:
139
enum
{
140
MID_USER_DEF
= FXDialogBox::ID_LAST,
141
MID_PRE_DEF
,
142
MID_OPTION
,
143
MID_CLOSE
,
144
ID_LAST
145
};
147
GUIManip_LaneSpeedTrigger
(
GUIMainWindow
& app,
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
:
163
GUIMainWindow
*
myParent
;
164
165
FXint
myChosenValue
;
166
167
FXDataTarget
myChosenTarget
;
168
169
SUMOReal
mySpeed
;
170
171
FXDataTarget
mySpeedTarget
;
172
173
FXRealSpinDial*
myUserDefinedSpeed
;
174
175
FXComboBox*
myPredefinedValues
;
176
177
GUILaneSpeedTrigger
*
myObject
;
178
179
protected
:
180
GUIManip_LaneSpeedTrigger
() { }
181
182
};
183
184
private
:
186
typedef
std::vector<Position>
PosCont
;
187
189
typedef
std::vector<SUMOReal>
RotCont
;
190
191
private
:
193
PosCont
myFGPositions
;
194
196
RotCont
myFGRotations
;
197
199
Boundary
myBoundary
;
200
202
bool
myShowAsKMH
;
203
205
mutable
SUMOReal
myLastValue
;
206
208
mutable
std::string
myLastValueString
;
209
210
};
211
212
213
#endif
214
215
/****************************************************************************/
216
build
buildd
sumo-0.16.0~dfsg
src
guisim
GUILaneSpeedTrigger.h
Generated on Tue Apr 16 2013 01:32:16 for SUMO - Simulation of Urban MObility by
1.8.3.1