SUMO - Simulation of Urban MObility
GUIApplicationWindow Class Reference

The main window of the SUMO-gui. More...

#include <GUIApplicationWindow.h>

Inheritance diagram for GUIApplicationWindow:
Inheritance graph
Collaboration diagram for GUIApplicationWindow:
Collaboration graph

Public Member Functions

void addChild (FXMDIChild *child, bool updateOnSimStep=true)
 Adds a further child window to the list. More...
 
void addChild (FXMainWindow *child, bool updateOnSimStep=true)
 
void addRecentFile (const FX::FXString &f, const bool isNet)
 
void dependentBuild ()
 
GUISUMOAbstractView * getActiveView () const
 get the active view or 0 More...
 
FXFont * getBoldFont ()
 
FXGLCanvas * getBuildGLCanvas () const
 
FXLabel & getCartesianLabel ()
 
SUMOTime getCurrentSimTime () const
 
FXCursor * getDefaultCursor ()
 
virtual double getDelay () const
 Returns the simulation delay. More...
 
FXLabel & getGeoLabel ()
 
FXGLVisual * getGLVisual () const
 
double getTrackerInterval () const
 
FXMDIChild * getViewByID (const std::string &id) const
 
std::vector< std::string > getViewIDs () const
 
 GUIApplicationWindow (FXApp *a, const std::string &configPattern)
 Constructor. More...
 
bool isGaming () const
 return whether the gui is in gaming mode More...
 
bool listInternal () const
 return whether to list internal structures More...
 
bool listParking () const
 return whether to list parking vehicles More...
 
bool listTeleporting () const
 return whether to list teleporting vehicles More...
 
void loadOnStartup ()
 
void removeChild (FXMDIChild *child)
 removes the given child window from the list More...
 
void removeChild (FXMainWindow *child)
 
virtual void sendBlockingEvent (GUIEvent *event)
 Sends an event from the application thread to the GUI and waits until it is handled. More...
 
virtual void setDelay (double delay)
 Sets the delay of the parent application. More...
 
void setStatusBarText (const std::string &text)
 
void updateChildren ()
 
virtual ~GUIApplicationWindow ()
 Destructor. More...
 
FOX-interactions

{

virtual void create ()
 Creates the main window (required by FOX) More...
 
virtual void detach ()
 Detaches the tool/menu bar. More...
 
Inter-thread event handling
virtual void eventOccured ()
 
void handleEvent_SimulationLoaded (GUIEvent *e)
 
void handleEvent_SimulationStep (GUIEvent *e)
 
void handleEvent_Message (GUIEvent *e)
 
void handleEvent_SimulationEnded (GUIEvent *e)
 
void handleEvent_Screenshot (GUIEvent *e)
 
FOX-callbacks
long onCmdOpenConfiguration (FXObject *, FXSelector, void *)
 Called on menu File->Open Configuration. More...
 
long onCmdOpenNetwork (FXObject *, FXSelector, void *)
 Called on menu File->Open Network. More...
 
long onCmdOpenShapes (FXObject *, FXSelector, void *)
 Called on menu File->Load Shapes. More...
 
long onCmdReload (FXObject *, FXSelector, void *)
 Called on reload. More...
 
long onCmdOpenRecent (FXObject *, FXSelector, void *)
 Called on opening a recent file. More...
 
long onCmdClose (FXObject *, FXSelector, void *)
 Called on menu File->Close. More...
 
long onCmdQuit (FXObject *, FXSelector, void *)
 Called by FOX if the application shall be closed. More...
 
long onCmdEditChosen (FXObject *, FXSelector, void *)
 Called on menu Edit->Edit Chosen. More...
 
long onCmdEditBreakpoints (FXObject *, FXSelector, void *)
 Called on menu Edit->Edit Breakpoints. More...
 
long onCmdHelp (FXObject *sender, FXSelector sel, void *ptr)
 called if the user selects help->Documentation More...
 
long onCmdNetedit (FXObject *, FXSelector, void *)
 Called on menu Edit->Netedit. More...
 
long onCmdAppSettings (FXObject *, FXSelector, void *)
 Opens the application settings menu (Settings->Application Settings...) More...
 
long onCmdGaming (FXObject *, FXSelector, void *)
 Toggle gaming mode. More...
 
long onCmdFullScreen (FXObject *, FXSelector, void *)
 Toggle full screen mode. More...
 
long onCmdListInternal (FXObject *, FXSelector, void *)
 Toggle listing of internal structures. More...
 
long onCmdListParking (FXObject *, FXSelector, void *)
 Toggle listing of parking vehicles. More...
 
long onCmdListTeleporting (FXObject *, FXSelector, void *)
 Toggle listing of teleporting vehicles. More...
 
long onCmdAbout (FXObject *, FXSelector, void *)
 Shows the about dialog. More...
 
long onCmdStart (FXObject *, FXSelector, void *)
 Called on "play". More...
 
long onCmdStop (FXObject *, FXSelector, void *)
 Called on "stop". More...
 
long onCmdStep (FXObject *, FXSelector, void *)
 Called on "step". More...
 
long onCmdTimeToggle (FXObject *, FXSelector, void *)
 Called on "time toggle". More...
 
long onCmdDelayToggle (FXObject *, FXSelector, void *)
 Called on "delay toggle". More...
 
long onCmdNewView (FXObject *, FXSelector, void *)
 Called if a new view shall be opened (2D view) More...
 
long onUpdOpen (FXObject *, FXSelector, void *)
 Determines whether opening is enabled. More...
 
long onUpdReload (FXObject *, FXSelector, void *)
 Determines whether reloading is enabled. More...
 
long onUpdOpenRecent (FXObject *, FXSelector, void *)
 Determines whether opening a recent file is enabled. More...
 
long onUpdAddView (FXObject *, FXSelector, void *)
 Determines whether adding a view is enabled. More...
 
long onUpdStart (FXObject *sender, FXSelector, void *ptr)
 Determines whether "play" is enabled. More...
 
long onUpdStop (FXObject *, FXSelector, void *)
 Determines whether "stop" is enabled. More...
 
long onUpdStep (FXObject *, FXSelector, void *)
 Determines whether "step" is enabled. More...
 
long onUpdNeedsSimulation (FXObject *, FXSelector, void *)
 Determines whether some buttons which require an active simulation may be shown. More...
 
long onCmdClearMsgWindow (FXObject *, FXSelector, void *)
 Called if the message window shall be cleared. More...
 
long onCmdLocate (FXObject *, FXSelector, void *)
 Called on menu commands from the Locator menu. More...
 
long onCmdShowStats (FXObject *, FXSelector, void *)
 Called on commands from the statistic buttons. More...
 
long onLoadThreadEvent (FXObject *, FXSelector, void *)
 Called on an event from the loading thread. More...
 
long onRunThreadEvent (FXObject *, FXSelector, void *)
 Called on an event from the simulation thread. More...
 
long onClipboardRequest (FXObject *sender, FXSelector sel, void *ptr)
 Somebody wants our clipped text. More...
 
long onKeyPress (FXObject *o, FXSelector sel, void *data)
 handle keys More...
 
long onKeyRelease (FXObject *o, FXSelector sel, void *data)
 

Static Public Member Functions

static GUIMainWindow * getInstance ()
 

Protected Member Functions

virtual void addToWindowsMenu (FXMenuPane *)
 
virtual void buildToolBars ()
 Builds the tool bar. More...
 
virtual void fillMenuBar ()
 Builds the menu bar. More...
 
 GUIApplicationWindow ()
 FOX needs this for static members. More...
 
void setWindowSizeAndPos ()
 perform initial window positioning and sizing according to user options / previous call More...
 

Protected Attributes

bool hadDependentBuild
 
SUMOTime myAlternateSimDelay
 The alternate simulation delay for toggling. More...
 
bool myAmFullScreen
 whether to show the window in full screen mode More...
 
bool myAmGaming
 information whether the gui is currently in gaming mode More...
 
bool myAmLoading
 information whether the gui is currently loading and the load-options shall be greyed out More...
 
FXFont * myBoldFont
 Font used for popup-menu titles. More...
 
FXDockSite * myBottomDock
 
FXLabel * myCartesianCoordinate
 Labels for the current cartesian and geo-coordinate. More...
 
FXHorizontalFrame * myCartesianFrame
 
std::string myConfigPattern
 Input file pattern. More...
 
FXMenuPane * myControlMenu
 
FXMenuPane * myEditMenu
 
FXCondition myEventCondition
 the semaphore when waiting for event completion More...
 
FXMutex myEventMutex
 the mutex for the waiting semaphore More...
 
MFXEventQue< GUIEvent * > myEvents
 List of got requests. More...
 
FXMenuPane * myFileMenu
 the submenus More...
 
FXLabel * myGeoCoordinate
 
FXHorizontalFrame * myGeoFrame
 
FXGLVisual * myGLVisual
 The gl-visual used. More...
 
bool myHaveNotifiedAboutSimEnd
 whether the simulation end was already announced More...
 
FXMenuPane * myHelpMenu
 
FXEX::FXLCDLabel * myLCDLabel
 the simulation step display More...
 
FXDockSite * myLeftDock
 
bool myListInternal
 information whether the locator should list internal structures More...
 
bool myListParking
 information whether the locator should list parking vehicles More...
 
bool myListTeleporting
 information whether the locator should list teleporting vehicles More...
 
GUILoadThread * myLoadThread
 
FXEX::FXThreadEvent myLoadThreadEvent
 io-event with the load-thread More...
 
FXMenuPane * myLocatorMenu
 
FXSplitter * myMainSplitter
 The splitter that divides the main window into vies and the log window. More...
 
FXMDIClient * myMDIClient
 The multi view panel. More...
 
FXMDIMenu * myMDIMenu
 The menu used for the MDI-windows. More...
 
FXMenuBar * myMenuBar
 The application menu bar. More...
 
FXToolBarShell * myMenuBarDrag
 
GUIMessageWindow * myMessageWindow
 A window to display messages, warnings and error in. More...
 
std::string myName
 
FXRecentFiles myRecentConfigs
 List of recent config files. More...
 
FXRecentFiles myRecentNets
 List of recent nets. More...
 
FXDockSite * myRightDock
 
GUIRunThread * myRunThread
 
FXEX::FXThreadEvent myRunThreadEvent
 io-event with the run-thread More...
 
FXMenuPane * mySelectByPermissions
 
FXMenuPane * mySettingsMenu
 
bool myShowTimeAsHMS
 whether to show time as hour:minute:second More...
 
FXRealSpinDial * mySimDelayTarget
 
std::vector< FXButton * > myStatButtons
 Buttons showing and running values and triggering statistic windows. More...
 
FXStatusBar * myStatusbar
 The status bar. More...
 
std::vector< FXMDIChild * > mySubWindows
 
FXToolBar * myToolBar1
 The application tool bar. More...
 
FXToolBar * myToolBar2
 
FXToolBar * myToolBar3
 
FXToolBar * myToolBar4
 
FXToolBar * myToolBar5
 
FXToolBarShell * myToolBarDrag1
 for some menu detaching fun More...
 
FXToolBarShell * myToolBarDrag2
 
FXToolBarShell * myToolBarDrag3
 
FXToolBarShell * myToolBarDrag4
 
FXToolBarShell * myToolBarDrag5
 
FXDockSite * myTopDock
 
MFXMutex myTrackerLock
 A lock to make the removal and addition of trackers secure. More...
 
std::vector< FXMainWindow * > myTrackerWindows
 
int myViewNumber
 The current view number. More...
 
bool myWasStarted
 
FXMenuPane * myWindowsMenu
 

Static Protected Attributes

static GUIMainWindow * myInstance = 0
 the singleton window instance More...
 

Private Member Functions

void checkGamingEvents ()
 handles additional game-related events More...
 
void closeAllWindows ()
 
void loadConfigOrNet (const std::string &file, bool isNet)
 
GUISUMOAbstractView * openNewView (GUISUMOViewParent::ViewType vt=GUISUMOViewParent::VIEW_2D_OPENGL)
 
void updateTimeLCD (SUMOTime time)
 updates the simulation time display More...
 

game related things

{

RandomDistributor< std::string > myJamSounds
 
RandomDistributor< std::string > myCollisionSounds
 
double myJamSoundTime
 waiting time after which vehicles trigger jam sounds More...
 
int myPreviousCollisionNumber
 
FXEX::FXLCDLabel * myWaitingTimeLabel
 performance indicators More...
 
FXEX::FXLCDLabel * myTimeLossLabel
 
SUMOTime myWaitingTime
 
SUMOTime myTimeLoss
 
FXToolBar * myToolBar6
 
FXToolBar * myToolBar7
 
FXToolBarShell * myToolBarDrag6
 
FXToolBarShell * myToolBarDrag7
 
static std::mt19937 myGamingRNG
 A random number generator used to choose a gaming sound. More...
 

Detailed Description

The main window of the SUMO-gui.

Beside views on the simulation, shown within a MDI-window, the main window may also have some further views (children) assigned which are stored within a separate list.

Definition at line 74 of file GUIApplicationWindow.h.

Constructor & Destructor Documentation

GUIApplicationWindow::GUIApplicationWindow ( FXApp *  a,
const std::string &  configPattern 
)

Constructor.

Parameters
[in]aThe FOX application
[in]configPatternThe pattern used for loading configurations

Definition at line 195 of file GUIApplicationWindow.cpp.

References GUIIconSubSys::initIcons().

GUIApplicationWindow::GUIApplicationWindow ( )
inlineprotected

FOX needs this for static members.

Definition at line 301 of file GUIApplicationWindow.h.

References buildToolBars(), and fillMenuBar().

Member Function Documentation

void GUIMainWindow::addChild ( FXMDIChild *  child,
bool  updateOnSimStep = true 
)
inherited

Adds a further child window to the list.

Definition at line 100 of file GUIMainWindow.cpp.

References GUIMainWindow::mySubWindows.

Referenced by GUIParameterTableWindow::closeBuilding(), and GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow().

void GUIMainWindow::addChild ( FXMainWindow *  child,
bool  updateOnSimStep = true 
)
inherited
void GUIApplicationWindow::addRecentFile ( const FX::FXString &  f,
const bool  isNet 
)

Definition at line 1572 of file GUIApplicationWindow.cpp.

References myRecentConfigs, and myRecentNets.

Referenced by GUILoadThread::run().

virtual void GUIApplicationWindow::addToWindowsMenu ( FXMenuPane *  )
inlineprotectedvirtual
void GUIApplicationWindow::detach ( )
virtual

Detaches the tool/menu bar.

Definition at line 347 of file GUIApplicationWindow.cpp.

References myMenuBarDrag, and myToolBarDrag1.

GUISUMOAbstractView * GUIMainWindow::getActiveView ( ) const
inherited

get the active view or 0

Definition at line 199 of file GUIMainWindow.cpp.

References GUIGlChildWindow::getView(), and GUIMainWindow::myMDIClient.

Referenced by GUIVehicle::drawOutsideNetwork(), and GUIMainWindow::sendBlockingEvent().

FXFont * GUIMainWindow::getBoldFont ( )
inherited
FXGLCanvas * GUIApplicationWindow::getBuildGLCanvas ( ) const
virtual

Implements GUIMainWindow.

Definition at line 1485 of file GUIApplicationWindow.cpp.

References GUIGlChildWindow::getBuildGLCanvas(), and GUIMainWindow::myMDIClient.

Referenced by openNewView().

FXLabel & GUIMainWindow::getCartesianLabel ( )
inherited
SUMOTime GUIApplicationWindow::getCurrentSimTime ( ) const
virtual
FXCursor * GUIApplicationWindow::getDefaultCursor ( )

Definition at line 1540 of file GUIApplicationWindow.cpp.

virtual double GUIApplicationWindow::getDelay ( ) const
inlinevirtual

Returns the simulation delay.

Returns
delay in milliseconds

Reimplemented from GUIMainWindow.

Definition at line 265 of file GUIApplicationWindow.h.

References FX::FXRealSpinDial::getValue(), and mySimDelayTarget.

FXLabel & GUIMainWindow::getGeoLabel ( )
inherited
FXGLVisual * GUIMainWindow::getGLVisual ( ) const
inherited

Definition at line 172 of file GUIMainWindow.cpp.

References GUIMainWindow::myGLVisual.

Referenced by GUISUMOViewParent::init().

double GUIApplicationWindow::getTrackerInterval ( ) const
virtual

Implements GUIMainWindow.

Definition at line 1552 of file GUIApplicationWindow.cpp.

References GUIGlobals::gTrackerInterval.

FXMDIChild * GUIMainWindow::getViewByID ( const std::string &  id) const
inherited
std::vector< std::string > GUIMainWindow::getViewIDs ( ) const
inherited
void GUIApplicationWindow::handleEvent_Message ( GUIEvent *  e)
void GUIApplicationWindow::handleEvent_Screenshot ( GUIEvent *  e)
bool GUIMainWindow::isGaming ( ) const
inlineinherited
bool GUIMainWindow::listInternal ( ) const
inlineinherited

return whether to list internal structures

Definition at line 92 of file GUIMainWindow.h.

References GUIMainWindow::myListInternal.

Referenced by GUISUMOViewParent::onCmdLocate().

bool GUIMainWindow::listParking ( ) const
inlineinherited

return whether to list parking vehicles

Definition at line 97 of file GUIMainWindow.h.

References GUIMainWindow::myListParking.

Referenced by fillMenuBar(), and GUISUMOViewParent::onCmdLocate().

bool GUIMainWindow::listTeleporting ( ) const
inlineinherited

return whether to list teleporting vehicles

Definition at line 102 of file GUIMainWindow.h.

References GUIMainWindow::getInstance(), and GUIMainWindow::myListTeleporting.

Referenced by GUISUMOViewParent::onCmdLocate().

void GUIApplicationWindow::loadConfigOrNet ( const std::string &  file,
bool  isNet 
)
private
void GUIApplicationWindow::loadOnStartup ( )

Definition at line 1558 of file GUIApplicationWindow.cpp.

References loadConfigOrNet().

Referenced by main().

long GUIApplicationWindow::onClipboardRequest ( FXObject *  sender,
FXSelector  sel,
void *  ptr 
)

Somebody wants our clipped text.

Definition at line 1150 of file GUIApplicationWindow.cpp.

References GUIUserIO::clipped.

long GUIApplicationWindow::onCmdAbout ( FXObject *  ,
FXSelector  ,
void *   
)

Shows the about dialog.

Definition at line 1142 of file GUIApplicationWindow.cpp.

References GUIDialog_AboutSUMO::create().

long GUIApplicationWindow::onCmdAppSettings ( FXObject *  ,
FXSelector  ,
void *   
)

Opens the application settings menu (Settings->Application Settings...)

Definition at line 1012 of file GUIApplicationWindow.cpp.

long GUIApplicationWindow::onCmdClearMsgWindow ( FXObject *  ,
FXSelector  ,
void *   
)

Called if the message window shall be cleared.

Definition at line 943 of file GUIApplicationWindow.cpp.

References GUIMessageWindow::clear(), and myMessageWindow.

long GUIApplicationWindow::onCmdClose ( FXObject *  ,
FXSelector  ,
void *   
)

Called on menu File->Close.

Definition at line 836 of file GUIApplicationWindow.cpp.

References closeAllWindows().

long GUIApplicationWindow::onCmdDelayToggle ( FXObject *  ,
FXSelector  ,
void *   
)
long GUIApplicationWindow::onCmdEditBreakpoints ( FXObject *  ,
FXSelector  ,
void *   
)

Called on menu Edit->Edit Breakpoints.

Definition at line 698 of file GUIApplicationWindow.cpp.

References GUIRunThread::getBreakpointLock(), GUIRunThread::getBreakpoints(), myRunThread, and GUIDialog_Breakpoints::show().

long GUIApplicationWindow::onCmdFullScreen ( FXObject *  ,
FXSelector  ,
void *   
)
long GUIApplicationWindow::onCmdHelp ( FXObject *  sender,
FXSelector  sel,
void *  ptr 
)

called if the user selects help->Documentation

Definition at line 707 of file GUIApplicationWindow.cpp.

References FXLinkLabel::fxexecute().

long GUIApplicationWindow::onCmdListInternal ( FXObject *  ,
FXSelector  ,
void *   
)

Toggle listing of internal structures.

Definition at line 1106 of file GUIApplicationWindow.cpp.

References GUIMainWindow::myListInternal.

long GUIApplicationWindow::onCmdListParking ( FXObject *  ,
FXSelector  ,
void *   
)

Toggle listing of parking vehicles.

Definition at line 1113 of file GUIApplicationWindow.cpp.

References GUIMainWindow::myListParking.

long GUIApplicationWindow::onCmdListTeleporting ( FXObject *  ,
FXSelector  ,
void *   
)

Toggle listing of teleporting vehicles.

Definition at line 1119 of file GUIApplicationWindow.cpp.

References GUIMainWindow::myListTeleporting.

long GUIApplicationWindow::onCmdLocate ( FXObject *  ,
FXSelector  sel,
void *   
)

Called on menu commands from the Locator menu.

Definition at line 990 of file GUIApplicationWindow.cpp.

References GUIMainWindow::myMDIClient, and GUISUMOViewParent::onCmdLocate().

long GUIApplicationWindow::onCmdNewView ( FXObject *  ,
FXSelector  ,
void *   
)

Called if a new view shall be opened (2D view)

Definition at line 1126 of file GUIApplicationWindow.cpp.

References openNewView(), GUISUMOViewParent::VIEW_2D_OPENGL, and GUISUMOViewParent::VIEW_3D_OSG.

long GUIApplicationWindow::onCmdOpenConfiguration ( FXObject *  ,
FXSelector  ,
void *   
)

Called on menu File->Open Configuration.

Definition at line 749 of file GUIApplicationWindow.cpp.

References gCurrentFolder, GUIIconSubSys::getIcon(), ICON_EMPTY, loadConfigOrNet(), myConfigPattern, and myRecentConfigs.

long GUIApplicationWindow::onCmdOpenNetwork ( FXObject *  ,
FXSelector  ,
void *   
)

Called on menu File->Open Network.

Definition at line 769 of file GUIApplicationWindow.cpp.

References gCurrentFolder, GUIIconSubSys::getIcon(), ICON_EMPTY, loadConfigOrNet(), and myRecentNets.

long GUIApplicationWindow::onCmdOpenRecent ( FXObject *  sender,
FXSelector  ,
void *  data 
)

Called on opening a recent file.

Definition at line 824 of file GUIApplicationWindow.cpp.

References loadConfigOrNet(), myAmLoading, myRecentNets, and GUIMainWindow::myStatusbar.

long GUIApplicationWindow::onCmdOpenShapes ( FXObject *  ,
FXSelector  ,
void *   
)
long GUIApplicationWindow::onCmdQuit ( FXObject *  ,
FXSelector  ,
void *   
)

Called by FOX if the application shall be closed.

Called either by FileMenu->Quit, the normal close-menu or SIGINT

Definition at line 646 of file GUIApplicationWindow.cpp.

References gCurrentFolder, myAlternateSimDelay, myAmFullScreen, and myShowTimeAsHMS.

long GUIApplicationWindow::onCmdReload ( FXObject *  ,
FXSelector  ,
void *   
)

Called on reload.

Definition at line 812 of file GUIApplicationWindow.cpp.

References closeAllWindows(), myAmLoading, myLoadThread, and setStatusBarText().

Referenced by handleEvent_SimulationEnded().

long GUIApplicationWindow::onCmdShowStats ( FXObject *  ,
FXSelector  ,
void *   
)

Called on commands from the statistic buttons.

Definition at line 1002 of file GUIApplicationWindow.cpp.

References GUINet::getGUIInstance(), GUINet::getParameterWindow(), GUIGlChildWindow::getView(), and GUIMainWindow::myMDIClient.

long GUIApplicationWindow::onCmdStart ( FXObject *  ,
FXSelector  ,
void *   
)
long GUIApplicationWindow::onCmdStep ( FXObject *  ,
FXSelector  ,
void *   
)
long GUIApplicationWindow::onCmdStop ( FXObject *  ,
FXSelector  ,
void *   
)

Called on "stop".

Definition at line 899 of file GUIApplicationWindow.cpp.

References myRunThread, and GUIRunThread::stop().

Referenced by handleEvent_SimulationEnded().

long GUIApplicationWindow::onCmdTimeToggle ( FXObject *  ,
FXSelector  ,
void *   
)
long GUIApplicationWindow::onKeyPress ( FXObject *  o,
FXSelector  sel,
void *  data 
)

handle keys

Definition at line 1616 of file GUIApplicationWindow.cpp.

References GUIMainWindow::myMDIClient, and GUISUMOViewParent::onKeyPress().

long GUIApplicationWindow::onKeyRelease ( FXObject *  o,
FXSelector  sel,
void *  data 
)
long GUIApplicationWindow::onLoadThreadEvent ( FXObject *  ,
FXSelector  ,
void *   
)

Called on an event from the loading thread.

Definition at line 1159 of file GUIApplicationWindow.cpp.

References eventOccured().

long GUIApplicationWindow::onRunThreadEvent ( FXObject *  ,
FXSelector  ,
void *   
)

Called on an event from the simulation thread.

Definition at line 1166 of file GUIApplicationWindow.cpp.

References eventOccured().

long GUIApplicationWindow::onUpdAddView ( FXObject *  sender,
FXSelector  ,
void *  ptr 
)

Determines whether adding a view is enabled.

Definition at line 871 of file GUIApplicationWindow.cpp.

References myAmLoading, myRunThread, and GUIRunThread::simulationAvailable().

long GUIApplicationWindow::onUpdNeedsSimulation ( FXObject *  sender,
FXSelector  ,
void *  ptr 
)

Determines whether some buttons which require an active simulation may be shown.

Definition at line 980 of file GUIApplicationWindow.cpp.

References myAmLoading, myRunThread, and GUIRunThread::simulationAvailable().

long GUIApplicationWindow::onUpdOpen ( FXObject *  sender,
FXSelector  ,
void *  ptr 
)

Determines whether opening is enabled.

Definition at line 843 of file GUIApplicationWindow.cpp.

References myAmLoading.

long GUIApplicationWindow::onUpdOpenRecent ( FXObject *  sender,
FXSelector  ,
void *  ptr 
)

Determines whether opening a recent file is enabled.

Definition at line 862 of file GUIApplicationWindow.cpp.

References myAmLoading.

long GUIApplicationWindow::onUpdReload ( FXObject *  sender,
FXSelector  ,
void *  ptr 
)

Determines whether reloading is enabled.

Definition at line 852 of file GUIApplicationWindow.cpp.

References GUILoadThread::getFileName(), myAmLoading, and myLoadThread.

long GUIApplicationWindow::onUpdStart ( FXObject *  sender,
FXSelector  ,
void *  ptr 
)

Determines whether "play" is enabled.

Definition at line 950 of file GUIApplicationWindow.cpp.

References myAmLoading, myRunThread, and GUIRunThread::simulationIsStartable().

long GUIApplicationWindow::onUpdStep ( FXObject *  sender,
FXSelector  ,
void *  ptr 
)

Determines whether "step" is enabled.

Definition at line 970 of file GUIApplicationWindow.cpp.

References myAmLoading, myRunThread, and GUIRunThread::simulationIsStepable().

long GUIApplicationWindow::onUpdStop ( FXObject *  sender,
FXSelector  ,
void *  ptr 
)

Determines whether "stop" is enabled.

Definition at line 960 of file GUIApplicationWindow.cpp.

References myAmLoading, myRunThread, and GUIRunThread::simulationIsStopable().

void GUIMainWindow::removeChild ( FXMainWindow *  child)
inherited
void GUIApplicationWindow::sendBlockingEvent ( GUIEvent *  event)
virtual

Sends an event from the application thread to the GUI and waits until it is handled.

Parameters
eventthe event to send

Reimplemented from GUIMainWindow.

Definition at line 1642 of file GUIApplicationWindow.cpp.

References MFXEventQue< T >::add(), myEventCondition, myEventMutex, myEvents, myRunThreadEvent, and FXEX::FXThreadEvent::signal().

Referenced by setDelay().

virtual void GUIApplicationWindow::setDelay ( double  delay)
inlinevirtual

Sets the delay of the parent application.

Reimplemented from GUIMainWindow.

Definition at line 271 of file GUIApplicationWindow.h.

References mySimDelayTarget, sendBlockingEvent(), and FX::FXRealSpinDial::setValue().

void GUIApplicationWindow::setStatusBarText ( const std::string &  text)
virtual
void GUIMainWindow::setWindowSizeAndPos ( )
protectedinherited

perform initial window positioning and sizing according to user options / previous call

Definition at line 208 of file GUIMainWindow.cpp.

References TplCheck::_str2int(), TplConvert::_str2int(), OptionsCont::getOptions(), OptionsCont::getStringVector(), OptionsCont::isSet(), MAX2(), MIN2(), and WRITE_ERROR.

Referenced by create(), GNEApplicationWindow::create(), and GUIMainWindow::GUIMainWindow().

void GUIApplicationWindow::updateTimeLCD ( SUMOTime  time)
private

Field Documentation

bool GUIApplicationWindow::hadDependentBuild
protected

Definition at line 383 of file GUIApplicationWindow.h.

Referenced by dependentBuild().

SUMOTime GUIApplicationWindow::myAlternateSimDelay
protected

The alternate simulation delay for toggling.

Definition at line 351 of file GUIApplicationWindow.h.

Referenced by create(), onCmdDelayToggle(), and onCmdQuit().

bool GUIApplicationWindow::myAmFullScreen
protected

whether to show the window in full screen mode

Definition at line 389 of file GUIApplicationWindow.h.

Referenced by onCmdFullScreen(), onCmdGaming(), and onCmdQuit().

bool GUIMainWindow::myAmGaming
protectedinherited

information whether the gui is currently in gaming mode

Definition at line 154 of file GUIMainWindow.h.

Referenced by handleEvent_SimulationStep(), GUIMainWindow::isGaming(), onCmdFullScreen(), onCmdGaming(), and updateTimeLCD().

bool GUIApplicationWindow::myAmLoading
protected

information whether the gui is currently loading and the load-options shall be greyed out

Definition at line 327 of file GUIApplicationWindow.h.

Referenced by handleEvent_SimulationLoaded(), loadConfigOrNet(), onCmdEditChosen(), onCmdOpenRecent(), onCmdReload(), onUpdAddView(), onUpdNeedsSimulation(), onUpdOpen(), onUpdOpenRecent(), onUpdReload(), onUpdStart(), onUpdStep(), and onUpdStop().

FXFont* GUIMainWindow::myBoldFont
protectedinherited

Font used for popup-menu titles.

Definition at line 136 of file GUIMainWindow.h.

Referenced by GUIMainWindow::getBoldFont(), GUIMainWindow::GUIMainWindow(), and GUIMainWindow::~GUIMainWindow().

FXDockSite * GUIMainWindow::myBottomDock
protectedinherited

Definition at line 151 of file GUIMainWindow.h.

Referenced by GUIMainWindow::GUIMainWindow(), and GUIMainWindow::~GUIMainWindow().

FXLabel* GUIMainWindow::myCartesianCoordinate
protectedinherited

Labels for the current cartesian and geo-coordinate.

Definition at line 145 of file GUIMainWindow.h.

Referenced by closeAllWindows(), GNEApplicationWindow::closeAllWindows(), dependentBuild(), GNEApplicationWindow::dependentBuild(), and GUIMainWindow::getCartesianLabel().

FXHorizontalFrame* GUIMainWindow::myCartesianFrame
protectedinherited
RandomDistributor<std::string> GUIApplicationWindow::myCollisionSounds
protected

Definition at line 403 of file GUIApplicationWindow.h.

Referenced by checkGamingEvents(), and handleEvent_SimulationLoaded().

std::string GUIApplicationWindow::myConfigPattern
protected

Input file pattern.

Definition at line 381 of file GUIApplicationWindow.h.

Referenced by onCmdOpenConfiguration().

FXMenuPane * GUIApplicationWindow::myControlMenu
protected

Definition at line 330 of file GUIApplicationWindow.h.

Referenced by create(), fillMenuBar(), and ~GUIApplicationWindow().

FXMenuPane * GUIApplicationWindow::myEditMenu
protected

Definition at line 330 of file GUIApplicationWindow.h.

Referenced by create(), fillMenuBar(), and ~GUIApplicationWindow().

FXCondition GUIApplicationWindow::myEventCondition
protected

the semaphore when waiting for event completion

Definition at line 398 of file GUIApplicationWindow.h.

Referenced by handleEvent_Screenshot(), and sendBlockingEvent().

FXMutex GUIApplicationWindow::myEventMutex
protected

the mutex for the waiting semaphore

Definition at line 395 of file GUIApplicationWindow.h.

Referenced by handleEvent_Screenshot(), and sendBlockingEvent().

MFXEventQue<GUIEvent*> GUIApplicationWindow::myEvents
protected

List of got requests.

Definition at line 354 of file GUIApplicationWindow.h.

Referenced by dependentBuild(), eventOccured(), sendBlockingEvent(), and ~GUIApplicationWindow().

FXMenuPane* GUIApplicationWindow::myFileMenu
protected

the submenus

Definition at line 330 of file GUIApplicationWindow.h.

Referenced by create(), fillMenuBar(), and ~GUIApplicationWindow().

std::mt19937 GUIApplicationWindow::myGamingRNG
staticprotected

A random number generator used to choose a gaming sound.

Definition at line 407 of file GUIApplicationWindow.h.

Referenced by checkGamingEvents().

FXLabel * GUIMainWindow::myGeoCoordinate
protectedinherited
FXHorizontalFrame * GUIMainWindow::myGeoFrame
protectedinherited
FXGLVisual* GUIMainWindow::myGLVisual
protectedinherited
bool GUIApplicationWindow::myHaveNotifiedAboutSimEnd
protected

whether the simulation end was already announced

Definition at line 392 of file GUIApplicationWindow.h.

Referenced by handleEvent_SimulationEnded(), and handleEvent_SimulationLoaded().

FXMenuPane * GUIApplicationWindow::myHelpMenu
protected

Definition at line 330 of file GUIApplicationWindow.h.

Referenced by create(), fillMenuBar(), and ~GUIApplicationWindow().

GUIMainWindow * GUIMainWindow::myInstance = 0
staticprotectedinherited

the singleton window instance

Definition at line 166 of file GUIMainWindow.h.

Referenced by GUIMainWindow::getInstance(), and GUIMainWindow::GUIMainWindow().

RandomDistributor<std::string> GUIApplicationWindow::myJamSounds
protected

Definition at line 402 of file GUIApplicationWindow.h.

Referenced by checkGamingEvents(), and handleEvent_SimulationLoaded().

double GUIApplicationWindow::myJamSoundTime
protected

waiting time after which vehicles trigger jam sounds

Definition at line 405 of file GUIApplicationWindow.h.

Referenced by checkGamingEvents(), and handleEvent_SimulationLoaded().

FXEX::FXLCDLabel* GUIApplicationWindow::myLCDLabel
protected

the simulation step display

Definition at line 366 of file GUIApplicationWindow.h.

Referenced by buildToolBars(), closeAllWindows(), handleEvent_SimulationLoaded(), onCmdGaming(), and updateTimeLCD().

FXDockSite * GUIMainWindow::myLeftDock
protectedinherited

Definition at line 151 of file GUIMainWindow.h.

Referenced by GUIMainWindow::GUIMainWindow(), and GUIMainWindow::~GUIMainWindow().

bool GUIMainWindow::myListInternal
protectedinherited

information whether the locator should list internal structures

Definition at line 157 of file GUIMainWindow.h.

Referenced by GUIMainWindow::listInternal(), and onCmdListInternal().

bool GUIMainWindow::myListParking
protectedinherited

information whether the locator should list parking vehicles

Definition at line 160 of file GUIMainWindow.h.

Referenced by fillMenuBar(), GUIMainWindow::listParking(), and onCmdListParking().

bool GUIMainWindow::myListTeleporting
protectedinherited

information whether the locator should list teleporting vehicles

Definition at line 163 of file GUIMainWindow.h.

Referenced by GUIMainWindow::listTeleporting(), and onCmdListTeleporting().

GUILoadThread* GUIApplicationWindow::myLoadThread
protected

the thread that loads simulations

Definition at line 315 of file GUIApplicationWindow.h.

Referenced by dependentBuild(), loadConfigOrNet(), onCmdReload(), onUpdReload(), and ~GUIApplicationWindow().

FXEX::FXThreadEvent GUIApplicationWindow::myLoadThreadEvent
protected

io-event with the load-thread

Definition at line 369 of file GUIApplicationWindow.h.

Referenced by dependentBuild().

FXMenuPane * GUIApplicationWindow::myLocatorMenu
protected

Definition at line 330 of file GUIApplicationWindow.h.

Referenced by create(), fillMenuBar(), and ~GUIApplicationWindow().

FXSplitter* GUIApplicationWindow::myMainSplitter
protected

The splitter that divides the main window into vies and the log window.

Definition at line 341 of file GUIApplicationWindow.h.

Referenced by dependentBuild().

FXMDIMenu* GUIApplicationWindow::myMDIMenu
protected

The menu used for the MDI-windows.

Definition at line 357 of file GUIApplicationWindow.h.

Referenced by dependentBuild(), and openNewView().

FXMenuBar* GUIApplicationWindow::myMenuBar
protected

The application menu bar.

Definition at line 360 of file GUIApplicationWindow.h.

Referenced by dependentBuild(), fillMenuBar(), onCmdFullScreen(), and onCmdGaming().

FXToolBarShell * GUIApplicationWindow::myMenuBarDrag
protected

Definition at line 344 of file GUIApplicationWindow.h.

Referenced by create(), dependentBuild(), and detach().

GUIMessageWindow* GUIApplicationWindow::myMessageWindow
protected

A window to display messages, warnings and error in.

Definition at line 338 of file GUIApplicationWindow.h.

Referenced by closeAllWindows(), dependentBuild(), fillMenuBar(), handleEvent_Message(), onCmdClearMsgWindow(), onCmdFullScreen(), and onCmdGaming().

std::string GUIApplicationWindow::myName
protected

the name of the simulation

Definition at line 312 of file GUIApplicationWindow.h.

int GUIApplicationWindow::myPreviousCollisionNumber
protected

Definition at line 408 of file GUIApplicationWindow.h.

Referenced by checkGamingEvents().

FXRecentFiles GUIApplicationWindow::myRecentConfigs
protected

List of recent config files.

Definition at line 375 of file GUIApplicationWindow.h.

Referenced by addRecentFile(), fillMenuBar(), and onCmdOpenConfiguration().

FXRecentFiles GUIApplicationWindow::myRecentNets
protected

List of recent nets.

Definition at line 378 of file GUIApplicationWindow.h.

Referenced by addRecentFile(), fillMenuBar(), onCmdOpenNetwork(), and onCmdOpenRecent().

FXDockSite * GUIMainWindow::myRightDock
protectedinherited

Definition at line 151 of file GUIMainWindow.h.

Referenced by GUIMainWindow::GUIMainWindow(), and GUIMainWindow::~GUIMainWindow().

FXEX::FXThreadEvent GUIApplicationWindow::myRunThreadEvent
protected

io-event with the run-thread

Definition at line 372 of file GUIApplicationWindow.h.

Referenced by dependentBuild(), and sendBlockingEvent().

FXMenuPane * GUIApplicationWindow::mySelectByPermissions
protected

Definition at line 330 of file GUIApplicationWindow.h.

Referenced by create(), fillMenuBar(), and ~GUIApplicationWindow().

FXMenuPane * GUIApplicationWindow::mySettingsMenu
protected

Definition at line 330 of file GUIApplicationWindow.h.

Referenced by create(), fillMenuBar(), and ~GUIApplicationWindow().

bool GUIApplicationWindow::myShowTimeAsHMS
protected

whether to show time as hour:minute:second

Definition at line 386 of file GUIApplicationWindow.h.

Referenced by create(), onCmdQuit(), onCmdTimeToggle(), and updateTimeLCD().

FXRealSpinDial* GUIApplicationWindow::mySimDelayTarget
protected
std::vector<FXButton*> GUIApplicationWindow::myStatButtons
protected

Buttons showing and running values and triggering statistic windows.

Definition at line 335 of file GUIApplicationWindow.h.

Referenced by closeAllWindows(), dependentBuild(), handleEvent_SimulationLoaded(), and handleEvent_SimulationStep().

SUMOTime GUIApplicationWindow::myTimeLoss
protected

Definition at line 414 of file GUIApplicationWindow.h.

Referenced by checkGamingEvents().

FXEX::FXLCDLabel* GUIApplicationWindow::myTimeLossLabel
protected

Definition at line 412 of file GUIApplicationWindow.h.

Referenced by buildToolBars(), checkGamingEvents(), and onCmdGaming().

FXToolBar* GUIApplicationWindow::myToolBar1
protected

The application tool bar.

Definition at line 363 of file GUIApplicationWindow.h.

Referenced by buildToolBars(), onCmdFullScreen(), and onCmdGaming().

FXToolBar * GUIApplicationWindow::myToolBar2
protected

Definition at line 363 of file GUIApplicationWindow.h.

Referenced by buildToolBars(), eventOccured(), onCmdFullScreen(), and onCmdGaming().

FXToolBar * GUIApplicationWindow::myToolBar3
protected

Definition at line 363 of file GUIApplicationWindow.h.

Referenced by buildToolBars(), eventOccured(), fillMenuBar(), and onCmdFullScreen().

FXToolBar * GUIApplicationWindow::myToolBar4
protected

Definition at line 363 of file GUIApplicationWindow.h.

Referenced by buildToolBars(), fillMenuBar(), onCmdFullScreen(), and onCmdGaming().

FXToolBar * GUIApplicationWindow::myToolBar5
protected

Definition at line 363 of file GUIApplicationWindow.h.

Referenced by buildToolBars(), onCmdFullScreen(), and onCmdGaming().

FXToolBar* GUIApplicationWindow::myToolBar6
protected
FXToolBar * GUIApplicationWindow::myToolBar7
protected
FXToolBarShell* GUIApplicationWindow::myToolBarDrag1
protected

for some menu detaching fun

Definition at line 344 of file GUIApplicationWindow.h.

Referenced by buildToolBars(), create(), detach(), and ~GUIApplicationWindow().

FXToolBarShell * GUIApplicationWindow::myToolBarDrag2
protected

Definition at line 344 of file GUIApplicationWindow.h.

Referenced by buildToolBars(), and create().

FXToolBarShell * GUIApplicationWindow::myToolBarDrag3
protected

Definition at line 344 of file GUIApplicationWindow.h.

Referenced by buildToolBars(), and create().

FXToolBarShell * GUIApplicationWindow::myToolBarDrag4
protected

Definition at line 344 of file GUIApplicationWindow.h.

Referenced by buildToolBars(), and create().

FXToolBarShell * GUIApplicationWindow::myToolBarDrag5
protected

Definition at line 344 of file GUIApplicationWindow.h.

Referenced by buildToolBars(), and create().

FXToolBarShell* GUIApplicationWindow::myToolBarDrag6
protected

Definition at line 416 of file GUIApplicationWindow.h.

Referenced by buildToolBars(), and create().

FXToolBarShell * GUIApplicationWindow::myToolBarDrag7
protected

Definition at line 416 of file GUIApplicationWindow.h.

Referenced by buildToolBars(), and create().

FXDockSite* GUIMainWindow::myTopDock
protectedinherited
MFXMutex GUIMainWindow::myTrackerLock
protectedinherited

A lock to make the removal and addition of trackers secure.

Definition at line 133 of file GUIMainWindow.h.

Referenced by GUIMainWindow::addChild(), closeAllWindows(), GNEApplicationWindow::closeAllWindows(), GUIMainWindow::removeChild(), and GUIMainWindow::updateChildren().

std::vector<FXMainWindow*> GUIMainWindow::myTrackerWindows
protectedinherited
int GUIApplicationWindow::myViewNumber
protected

The current view number.

Definition at line 324 of file GUIApplicationWindow.h.

Referenced by handleEvent_SimulationLoaded(), and openNewView().

SUMOTime GUIApplicationWindow::myWaitingTime
protected

Definition at line 413 of file GUIApplicationWindow.h.

Referenced by checkGamingEvents().

FXEX::FXLCDLabel* GUIApplicationWindow::myWaitingTimeLabel
protected

performance indicators

Definition at line 411 of file GUIApplicationWindow.h.

Referenced by buildToolBars(), checkGamingEvents(), and onCmdGaming().

bool GUIApplicationWindow::myWasStarted
protected

the information whether the simulation was started before

Definition at line 321 of file GUIApplicationWindow.h.

Referenced by handleEvent_SimulationLoaded(), onCmdStart(), and onCmdStep().

FXMenuPane * GUIApplicationWindow::myWindowsMenu
protected

Definition at line 330 of file GUIApplicationWindow.h.

Referenced by create(), fillMenuBar(), and ~GUIApplicationWindow().


The documentation for this class was generated from the following files: