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
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
virtual
long
onUpdStart
(
FXObject
*, FXSelector,
void
*);
205
207
long
onUpdStop
(
FXObject
*, FXSelector,
void
*);
208
210
long
onUpdStep
(
FXObject
*, FXSelector,
void
*);
211
213
long
onUpdEditChosen
(
FXObject
* sender, FXSelector,
void
* ptr);
214
216
virtual
long
onUpdEditBreakpoints
(
FXObject
*, FXSelector,
void
*);
217
219
long
onCmdClearMsgWindow
(
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
*
myWindowsMenu
, *
myHelpMenu
;
280
282
GUIMessageWindow
*
myMessageWindow
;
283
285
FXSplitter*
myMainSplitter
;
286
288
FXToolBarShell*
myToolBarDrag1
, *
myToolBarDrag2
, *
myToolBarDrag3
,
289
*
myToolBarDrag4
, *
myToolBarDrag5
,
290
*
myMenuBarDrag
;
291
293
FXRealSpinDial
*
mySimDelayTarget
;
294
296
SUMOTime
myAlternateSimDelay
;
297
299
MFXEventQue
myEvents
;
300
302
FXMDIMenu*
myMDIMenu
;
303
305
FXMenuBar*
myMenuBar
;
306
308
FXToolBar*
myToolBar1
, *
myToolBar2
, *
myToolBar3
, *
myToolBar4
, *
myToolBar5
;
309
311
FXEX::FXLCDLabel
*
myLCDLabel
;
312
314
FXEX::FXThreadEvent
myLoadThreadEvent
;
315
317
FXEX::FXThreadEvent
myRunThreadEvent
;
318
320
FXRecentFiles
myRecentConfigs
;
321
323
FXRecentFiles
myRecentNets
;
324
326
std::string
myConfigPattern
;
327
328
bool
hadDependentBuild
;
329
331
bool
myShowTimeAsHMS
;
332
333
};
334
335
336
#endif
337
338
/****************************************************************************/
339
build
buildd
sumo-0.18~dfsg
src
gui
GUIApplicationWindow.h
Generated on Wed Oct 23 2013 01:15:08 for SUMO - Simulation of Urban MObility by
1.8.4