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-2013 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 "
GUISUMOViewParent.h
"
49
50
51
// ===========================================================================
52
// class declarations
53
// ===========================================================================
54
class
GUILoadThread
;
55
class
GUIRunThread
;
56
class
GUIMessageWindow
;
57
class
GUIEvent
;
58
class
GUIParameterTracker
;
59
class
GUIParameterTableWindow
;
60
61
62
// ===========================================================================
63
// class definition
64
// ===========================================================================
73
class
GUIApplicationWindow
:
74
public
GUIMainWindow
,
public
MFXInterThreadEventClient
{
75
// FOX-declarations
76
FXDECLARE(
GUIApplicationWindow
)
77
public
:
78
83
GUIApplicationWindow
(FXApp* a,
const
std::string& configPattern);
84
85
87
virtual
~GUIApplicationWindow
();
88
89
92
94
virtual
void
create
();
95
97
virtual
void
detach
();
99
100
void
loadOnStartup
();
101
102
103
void
dependentBuild
(
bool
game);
104
105
void
setStatusBarText
(
const
std::string&);
106
107
FXGLCanvas
*
getBuildGLCanvas
()
const
;
108
SUMOTime
getCurrentSimTime
()
const
;
109
110
FXCursor*
getDefaultCursor
();
111
112
113
114
117
118
virtual
void
eventOccured
();
119
void
handleEvent_SimulationLoaded
(
GUIEvent
* e);
120
void
handleEvent_SimulationStep
(
GUIEvent
* e);
121
void
handleEvent_Message
(
GUIEvent
* e);
122
void
handleEvent_SimulationEnded
(
GUIEvent
* e);
124
125
126
129
131
long
onCmdOpenConfiguration
(
FXObject
*, FXSelector,
void
*);
132
134
long
onCmdOpenNetwork
(
FXObject
*, FXSelector,
void
*);
135
137
long
onCmdReload
(
FXObject
*, FXSelector,
void
*);
138
140
long
onCmdOpenRecent
(
FXObject
*, FXSelector,
void
*);
141
143
long
onCmdClose
(
FXObject
*, FXSelector,
void
*);
144
148
long
onCmdQuit
(
FXObject
*, FXSelector,
void
*);
149
151
long
onCmdEditChosen
(
FXObject
*, FXSelector,
void
*);
152
154
long
onCmdEditBreakpoints
(
FXObject
*, FXSelector,
void
*);
155
157
long
onCmdAppSettings
(
FXObject
*, FXSelector,
void
*);
158
160
long
onCmdGaming
(
FXObject
*, FXSelector,
void
*);
161
163
long
onCmdListInternal
(
FXObject
*, FXSelector,
void
*);
164
166
long
onCmdAbout
(
FXObject
*, FXSelector,
void
*);
167
169
long
onCmdStart
(
FXObject
*, FXSelector,
void
*);
170
172
long
onCmdStop
(
FXObject
*, FXSelector,
void
*);
173
175
long
onCmdStep
(
FXObject
*, FXSelector,
void
*);
176
178
long
onCmdTimeToggle
(
FXObject
*, FXSelector,
void
*);
179
181
long
onCmdDelayToggle
(
FXObject
*, FXSelector,
void
*);
182
184
long
onCmdNewView
(
FXObject
*, FXSelector,
void
*);
185
186
#ifdef HAVE_OSG
187
188
long
onCmdNewOSG(
FXObject
*, FXSelector,
void
*);
189
#endif
190
192
long
onUpdOpen
(
FXObject
*, FXSelector,
void
*);
193
195
long
onUpdReload
(
FXObject
*, FXSelector,
void
*);
196
198
long
onUpdOpenRecent
(
FXObject
*, FXSelector,
void
*);
199
201
long
onUpdAddView
(
FXObject
*, FXSelector,
void
*);
202
204
long
onUpdStart
(
FXObject
* sender, FXSelector,
void
* ptr);
205
207
long
onUpdStop
(
FXObject
*, FXSelector,
void
*);
208
210
long
onUpdStep
(
FXObject
*, FXSelector,
void
*);
211
213
long
onUpdNeedsSimulation
(
FXObject
*, FXSelector,
void
*);
214
216
long
onCmdClearMsgWindow
(
FXObject
*, FXSelector,
void
*);
217
219
long
onCmdLocate
(
FXObject
*, FXSelector,
void
*);
220
222
long
onLoadThreadEvent
(
FXObject
*, FXSelector,
void
*);
223
225
long
onRunThreadEvent
(
FXObject
*, FXSelector,
void
*);
226
228
long
onClipboardRequest
(
FXObject
* sender, FXSelector sel,
void
* ptr);
230
231
protected
:
232
virtual
void
addToWindowsMenu
(
FXMenuPane
*) { }
233
234
private
:
236
void
load
(
const
std::string& file,
bool
isNet,
bool
isReload =
false
);
237
239
void
closeAllWindows
();
240
242
void
updateTimeLCD
(
const
SUMOTime
time);
243
245
GUISUMOAbstractView
*
openNewView
(
GUISUMOViewParent::ViewType
vt =
GUISUMOViewParent::VIEW_2D_OPENGL
);
246
247
protected
:
249
GUIApplicationWindow
() { }
250
251
protected
:
253
virtual
void
fillMenuBar
();
254
256
virtual
void
buildToolBars
();
257
258
protected
:
260
std::string
myName
;
261
263
GUILoadThread
*
myLoadThread
;
264
266
GUIRunThread
*
myRunThread
;
267
269
bool
myWasStarted
;
270
272
size_t
myViewNumber
;
273
275
bool
myAmLoading
;
276
278
FXMenuPane
*
myFileMenu
, *
myEditMenu
, *
mySettingsMenu
,
279
*
myLocatorMenu
, *
myControlMenu
,
280
*
myWindowsMenu
, *
myHelpMenu
;
281
283
GUIMessageWindow
*
myMessageWindow
;
284
286
FXSplitter*
myMainSplitter
;
287
289
FXToolBarShell*
myToolBarDrag1
, *
myToolBarDrag2
, *
myToolBarDrag3
,
290
*
myToolBarDrag4
, *
myToolBarDrag5
,
291
*
myMenuBarDrag
;
292
294
FXRealSpinDial
*
mySimDelayTarget
;
295
297
SUMOTime
myAlternateSimDelay
;
298
300
MFXEventQue
myEvents
;
301
303
FXMDIMenu*
myMDIMenu
;
304
306
FXMenuBar*
myMenuBar
;
307
309
FXToolBar*
myToolBar1
, *
myToolBar2
, *
myToolBar3
, *
myToolBar4
, *
myToolBar5
;
310
312
FXEX::FXLCDLabel
*
myLCDLabel
;
313
315
FXEX::FXThreadEvent
myLoadThreadEvent
;
316
318
FXEX::FXThreadEvent
myRunThreadEvent
;
319
321
FXRecentFiles
myRecentConfigs
;
322
324
FXRecentFiles
myRecentNets
;
325
327
std::string
myConfigPattern
;
328
329
bool
hadDependentBuild
;
330
332
bool
myShowTimeAsHMS
;
333
334
};
335
336
337
#endif
338
339
/****************************************************************************/
340
home
delphi
sumo
src
gui
GUIApplicationWindow.h
Generated by
1.8.2