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.sourceforge.net/
13
// Copyright (C) 2001-2012 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
onCmdNewView
(
FXObject
*, FXSelector,
void
*);
179
180
#ifdef HAVE_OSG
181
182
long
onCmdNewOSG(
FXObject
*,FXSelector,
void
*);
183
#endif
184
186
long
onUpdOpen
(
FXObject
*, FXSelector,
void
*);
187
189
long
onUpdReload
(
FXObject
*, FXSelector,
void
*);
190
192
long
onUpdOpenRecent
(
FXObject
*, FXSelector,
void
*);
193
195
long
onUpdAddView
(
FXObject
*, FXSelector,
void
*);
196
198
virtual
long
onUpdStart
(
FXObject
*, FXSelector,
void
*);
199
201
long
onUpdStop
(
FXObject
*, FXSelector,
void
*);
202
204
long
onUpdStep
(
FXObject
*, FXSelector,
void
*);
205
207
long
onUpdEditChosen
(
FXObject
* sender, FXSelector,
void
* ptr);
208
210
virtual
long
onUpdEditBreakpoints
(
FXObject
*, FXSelector,
void
*);
211
213
long
onCmdClearMsgWindow
(
FXObject
*, FXSelector,
void
*);
214
216
long
onLoadThreadEvent
(
FXObject
*, FXSelector,
void
*);
217
219
long
onRunThreadEvent
(
FXObject
*, FXSelector,
void
*);
220
222
long
onClipboardRequest
(
FXObject
* sender, FXSelector sel,
void
* ptr);
224
225
protected
:
226
virtual
void
addToWindowsMenu
(
FXMenuPane
*) { }
227
228
private
:
230
void
load
(
const
std::string& file,
bool
isNet,
bool
isReload =
false
);
231
233
void
closeAllWindows
();
234
235
237
GUISUMOAbstractView
*
openNewView
(
GUISUMOViewParent::ViewType
vt=
GUISUMOViewParent::VIEW_2D_OPENGL
);
238
239
protected
:
241
GUIApplicationWindow
() { }
242
243
protected
:
245
virtual
void
fillMenuBar
();
246
248
virtual
void
buildToolBars
();
249
250
protected
:
252
std::string
myName
;
253
255
GUILoadThread
*
myLoadThread
;
256
258
GUIRunThread
*
myRunThread
;
259
261
bool
myWasStarted
;
262
264
size_t
myViewNumber
;
265
267
bool
myAmLoading
;
268
270
FXMenuPane
*
myFileMenu
, *
myEditMenu
, *
mySettingsMenu
,
271
*
myWindowsMenu
, *
myHelpMenu
;
272
274
GUIMessageWindow
*
myMessageWindow
;
275
277
FXSplitter*
myMainSplitter
;
278
280
FXToolBarShell*
myToolBarDrag1
, *
myToolBarDrag2
, *
myToolBarDrag3
,
281
*
myToolBarDrag4
, *
myToolBarDrag5
,
282
*
myMenuBarDrag
;
283
285
FXRealSpinDial
*
mySimDelayTarget
;
286
288
FXdouble
mySimDelay
;
289
291
MFXEventQue
myEvents
;
292
294
FXMDIMenu*
myMDIMenu
;
295
297
FXMenuBar*
myMenuBar
;
298
300
FXToolBar*
myToolBar1
, *
myToolBar2
, *
myToolBar3
, *
myToolBar4
, *
myToolBar5
;
301
303
FXEX::FXLCDLabel
*
myLCDLabel
;
304
306
FXEX::FXThreadEvent
myLoadThreadEvent
;
307
309
FXEX::FXThreadEvent
myRunThreadEvent
;
310
312
FXRecentFiles
myRecentConfigs
;
313
315
FXRecentFiles
myRecentNets
;
316
318
std::string
myConfigPattern
;
319
320
bool
hadDependentBuild
;
321
322
323
};
324
325
326
#endif
327
328
/****************************************************************************/
329
var
build
temp
tmp.znCyBrHNjL
4.0-0-0
sumo
sumo-0.15.0~dfsg
src
gui
GUIApplicationWindow.h
Generated on Mon Mar 24 2014 09:53:09 for SUMO - Simulation of Urban MObility by
1.8.1.2