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
GUIApplicationWindow.h
Go to the documentation of this file.
1
/****************************************************************************/
10
// The main window of the SUMO-gui.
11
/****************************************************************************/
12
// SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
13
// Copyright (C) 2001-2014 DLR (http://www.dlr.de/) and contributors
14
/****************************************************************************/
15
//
16
// This file is part of SUMO.
17
// SUMO is free software: you can redistribute it and/or modify
18
// it under the terms of the GNU General Public License as published by
19
// the Free Software Foundation, either version 3 of the License, or
20
// (at your option) any later version.
21
//
22
/****************************************************************************/
23
#ifndef GUIApplicationWindow_h
24
#define GUIApplicationWindow_h
25
26
27
// ===========================================================================
28
// included modules
29
// ===========================================================================
30
#ifdef _MSC_VER
31
#include <
windows_config.h
>
32
#else
33
#include <
config.h
>
34
#endif
35
36
#include <string>
37
#include <vector>
38
#include <iostream>
39
#include <fx.h>
40
#include <
utils/foxtools/MFXEventQue.h
>
41
#include <
utils/foxtools/FXThreadEvent.h
>
42
#include <
utils/foxtools/MFXInterThreadEventClient.h
>
43
#include <
utils/foxtools/FXRealSpinDial.h
>
44
#include <
utils/foxtools/FXLCDLabel.h
>
45
#include <
utils/gui/windows/GUIMainWindow.h
>
46
#include <
utils/common/ValueRetriever.h
>
47
#include <
utils/common/ValueSource.h
>
48
#include <
utils/common/RandomDistributor.h
>
49
#include "
GUISUMOViewParent.h
"
50
51
52
// ===========================================================================
53
// class declarations
54
// ===========================================================================
55
class
GUILoadThread
;
56
class
GUIRunThread
;
57
class
GUIMessageWindow
;
58
class
GUIEvent
;
59
class
GUIParameterTracker
;
60
class
GUIParameterTableWindow
;
61
62
63
// ===========================================================================
64
// class definition
65
// ===========================================================================
74
class
GUIApplicationWindow
:
75
public
GUIMainWindow
,
public
MFXInterThreadEventClient
{
76
// FOX-declarations
77
FXDECLARE(
GUIApplicationWindow
)
78
public
:
79
84
GUIApplicationWindow
(FXApp* a,
const
std::string& configPattern);
85
86
88
virtual
~GUIApplicationWindow
();
89
90
93
95
virtual
void
create
();
96
98
virtual
void
detach
();
100
101
void
loadOnStartup
();
102
103
104
void
dependentBuild
(
bool
game);
105
106
void
setStatusBarText
(
const
std::string&);
107
108
FXGLCanvas
*
getBuildGLCanvas
()
const
;
109
SUMOTime
getCurrentSimTime
()
const
;
110
111
FXCursor*
getDefaultCursor
();
112
113
114
115
118
119
virtual
void
eventOccured
();
120
void
handleEvent_SimulationLoaded
(
GUIEvent
* e);
121
void
handleEvent_SimulationStep
(
GUIEvent
* e);
122
void
handleEvent_Message
(
GUIEvent
* e);
123
void
handleEvent_SimulationEnded
(
GUIEvent
* e);
125
126
127
130
132
long
onCmdOpenConfiguration
(
FXObject
*, FXSelector,
void
*);
133
135
long
onCmdOpenNetwork
(
FXObject
*, FXSelector,
void
*);
136
138
long
onCmdReload
(
FXObject
*, FXSelector,
void
*);
139
141
long
onCmdOpenRecent
(
FXObject
*, FXSelector,
void
*);
142
144
long
onCmdClose
(
FXObject
*, FXSelector,
void
*);
145
149
long
onCmdQuit
(
FXObject
*, FXSelector,
void
*);
150
152
long
onCmdEditChosen
(
FXObject
*, FXSelector,
void
*);
153
155
long
onCmdEditBreakpoints
(
FXObject
*, FXSelector,
void
*);
156
158
long
onCmdAppSettings
(
FXObject
*, FXSelector,
void
*);
159
161
long
onCmdGaming
(
FXObject
*, FXSelector,
void
*);
162
164
long
onCmdListInternal
(
FXObject
*, FXSelector,
void
*);
165
167
long
onCmdAbout
(
FXObject
*, FXSelector,
void
*);
168
170
long
onCmdStart
(
FXObject
*, FXSelector,
void
*);
171
173
long
onCmdStop
(
FXObject
*, FXSelector,
void
*);
174
176
long
onCmdStep
(
FXObject
*, FXSelector,
void
*);
177
179
long
onCmdTimeToggle
(
FXObject
*, FXSelector,
void
*);
180
182
long
onCmdDelayToggle
(
FXObject
*, FXSelector,
void
*);
183
185
long
onCmdNewView
(
FXObject
*, FXSelector,
void
*);
186
187
#ifdef HAVE_OSG
188
189
long
onCmdNewOSG(
FXObject
*, FXSelector,
void
*);
190
#endif
191
193
long
onUpdOpen
(
FXObject
*, FXSelector,
void
*);
194
196
long
onUpdReload
(
FXObject
*, FXSelector,
void
*);
197
199
long
onUpdOpenRecent
(
FXObject
*, FXSelector,
void
*);
200
202
long
onUpdAddView
(
FXObject
*, FXSelector,
void
*);
203
205
long
onUpdStart
(
FXObject
* sender, FXSelector,
void
* ptr);
206
208
long
onUpdStop
(
FXObject
*, FXSelector,
void
*);
209
211
long
onUpdStep
(
FXObject
*, FXSelector,
void
*);
212
214
long
onUpdNeedsSimulation
(
FXObject
*, FXSelector,
void
*);
215
217
long
onCmdClearMsgWindow
(
FXObject
*, FXSelector,
void
*);
218
220
long
onCmdLocate
(
FXObject
*, FXSelector,
void
*);
221
223
long
onLoadThreadEvent
(
FXObject
*, FXSelector,
void
*);
224
226
long
onRunThreadEvent
(
FXObject
*, FXSelector,
void
*);
227
229
long
onClipboardRequest
(
FXObject
* sender, FXSelector sel,
void
* ptr);
231
232
protected
:
233
virtual
void
addToWindowsMenu
(
FXMenuPane
*) { }
234
235
private
:
237
void
load
(
const
std::string& file,
bool
isNet,
bool
isReload =
false
);
238
240
void
closeAllWindows
();
241
243
void
updateTimeLCD
(
SUMOTime
time);
244
246
GUISUMOAbstractView
*
openNewView
(
GUISUMOViewParent::ViewType
vt =
GUISUMOViewParent::VIEW_2D_OPENGL
);
247
249
void
checkGamingEvents
();
250
251
protected
:
253
GUIApplicationWindow
() { }
254
255
protected
:
257
virtual
void
fillMenuBar
();
258
260
virtual
void
buildToolBars
();
261
262
protected
:
264
std::string
myName
;
265
267
GUILoadThread
*
myLoadThread
;
268
270
GUIRunThread
*
myRunThread
;
271
273
bool
myWasStarted
;
274
276
size_t
myViewNumber
;
277
279
bool
myAmLoading
;
280
282
FXMenuPane
*
myFileMenu
, *
myEditMenu
, *
mySelectByPermissions
, *
mySettingsMenu
,
283
*
myLocatorMenu
, *
myControlMenu
,
284
*
myWindowsMenu
, *
myHelpMenu
;
285
287
GUIMessageWindow
*
myMessageWindow
;
288
290
FXSplitter*
myMainSplitter
;
291
293
FXToolBarShell*
myToolBarDrag1
, *
myToolBarDrag2
, *
myToolBarDrag3
,
294
*
myToolBarDrag4
, *
myToolBarDrag5
, *
myMenuBarDrag
;
295
297
FXRealSpinDial
*
mySimDelayTarget
;
298
300
SUMOTime
myAlternateSimDelay
;
301
303
MFXEventQue
myEvents
;
304
306
FXMDIMenu*
myMDIMenu
;
307
309
FXMenuBar*
myMenuBar
;
310
312
FXToolBar*
myToolBar1
, *
myToolBar2
, *
myToolBar3
, *
myToolBar4
, *
myToolBar5
;
313
315
FXEX::FXLCDLabel
*
myLCDLabel
;
316
318
FXEX::FXThreadEvent
myLoadThreadEvent
;
319
321
FXEX::FXThreadEvent
myRunThreadEvent
;
322
324
FXRecentFiles
myRecentConfigs
;
325
327
FXRecentFiles
myRecentNets
;
328
330
std::string
myConfigPattern
;
331
332
bool
hadDependentBuild
;
333
335
bool
myShowTimeAsHMS
;
336
337
340
RandomDistributor<std::string>
myJamSounds
;
342
SUMOReal
myJamSoundTime
;
344
static
MTRand
myGamingRNG
;
345
347
FXEX::FXLCDLabel
*
myWaitingTimeLabel
;
348
FXEX::FXLCDLabel
*
myTimeLossLabel
;
349
SUMOTime
myWaitingTime
;
350
SUMOTime
myTimeLoss
;
351
FXToolBar*
myToolBar6
, *
myToolBar7
;
352
FXToolBarShell*
myToolBarDrag6
, *
myToolBarDrag7
;
354
355
};
356
357
358
#endif
359
360
/****************************************************************************/
361
tmp
buildd
sumo-0.21.0+dfsg
src
gui
GUIApplicationWindow.h
Generated on Thu Nov 20 2014 19:49:53 for SUMO - Simulation of Urban MObility by
1.8.1.2