SUMO - Simulation of Urban MObility
GUIMainWindow Class Referenceabstract

#include <GUIMainWindow.h>

Inheritance diagram for GUIMainWindow:
Inheritance graph
Collaboration diagram for GUIMainWindow:
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)
 
GUISUMOAbstractViewgetActiveView () const
 get the active view or 0 More...
 
FXFont * getBoldFont ()
 
virtual FXGLCanvas * getBuildGLCanvas () const =0
 
FXLabel & getCartesianLabel ()
 
virtual SUMOTime getCurrentSimTime () const =0
 
virtual double getDelay () const
 Returns the delay (should be overwritten by subclasses if applicable) More...
 
FXLabel & getGeoLabel ()
 
FXGLVisual * getGLVisual () const
 
virtual double getTrackerInterval () const =0
 
FXMDIChild * getViewByID (const std::string &id) const
 
std::vector< std::string > getViewIDs () const
 
 GUIMainWindow (FXApp *a)
 
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 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)
 Sets the delay of the parent application. More...
 
virtual void setStatusBarText (const std::string &)
 
void updateChildren ()
 
virtual ~GUIMainWindow ()
 

Static Public Member Functions

static GUIMainWindowgetInstance ()
 

Protected Member Functions

 GUIMainWindow ()
 
void setWindowSizeAndPos ()
 perform initial window positioning and sizing according to user options / previous call More...
 

Protected Attributes

bool myAmGaming
 information whether the gui is currently in gaming mode 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
 
FXLabel * myGeoCoordinate
 
FXHorizontalFrame * myGeoFrame
 
FXGLVisual * myGLVisual
 The gl-visual used. 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...
 
FXMDIClient * myMDIClient
 The multi view panel. More...
 
FXDockSite * myRightDock
 
FXStatusBar * myStatusbar
 The status bar. More...
 
std::vector< FXMDIChild * > mySubWindows
 
FXDockSite * myTopDock
 
MFXMutex myTrackerLock
 A lock to make the removal and addition of trackers secure. More...
 
std::vector< FXMainWindow * > myTrackerWindows
 

Static Protected Attributes

static GUIMainWindowmyInstance = 0
 the singleton window instance More...
 

Detailed Description

Definition at line 53 of file GUIMainWindow.h.

Constructor & Destructor Documentation

◆ GUIMainWindow() [1/2]

GUIMainWindow::GUIMainWindow ( FXApp *  a)

Definition at line 63 of file GUIMainWindow.cpp.

References myBoldFont, myBottomDock, myInstance, myLeftDock, myRightDock, and myTopDock.

◆ ~GUIMainWindow()

GUIMainWindow::~GUIMainWindow ( )
virtual

Definition at line 88 of file GUIMainWindow.cpp.

References myBoldFont, myBottomDock, myLeftDock, myRightDock, and myTopDock.

◆ GUIMainWindow() [2/2]

GUIMainWindow::GUIMainWindow ( )
inlineprotected

Definition at line 168 of file GUIMainWindow.h.

References setWindowSizeAndPos().

Member Function Documentation

◆ addChild() [1/2]

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

Adds a further child window to the list.

Definition at line 99 of file GUIMainWindow.cpp.

References mySubWindows.

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

◆ addChild() [2/2]

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

◆ getActiveView()

GUISUMOAbstractView * GUIMainWindow::getActiveView ( ) const

get the active view or 0

Definition at line 198 of file GUIMainWindow.cpp.

References GUIGlChildWindow::getView(), and myMDIClient.

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

◆ getBoldFont()

FXFont * GUIMainWindow::getBoldFont ( )

◆ getBuildGLCanvas()

virtual FXGLCanvas* GUIMainWindow::getBuildGLCanvas ( ) const
pure virtual

◆ getCartesianLabel()

FXLabel & GUIMainWindow::getCartesianLabel ( )

◆ getCurrentSimTime()

virtual SUMOTime GUIMainWindow::getCurrentSimTime ( ) const
pure virtual

◆ getDelay()

virtual double GUIMainWindow::getDelay ( ) const
inlinevirtual

Returns the delay (should be overwritten by subclasses if applicable)

Returns
parsed delay in milliseconds

Reimplemented in GUIApplicationWindow.

Definition at line 110 of file GUIMainWindow.h.

Referenced by GUISUMOAbstractView::getDelay(), and GUIViewTraffic::saveFrame().

◆ getGeoLabel()

FXLabel & GUIMainWindow::getGeoLabel ( )

◆ getGLVisual()

FXGLVisual * GUIMainWindow::getGLVisual ( ) const

Definition at line 171 of file GUIMainWindow.cpp.

References myGLVisual.

Referenced by GUISUMOViewParent::init().

◆ getInstance()

◆ getTrackerInterval()

virtual double GUIMainWindow::getTrackerInterval ( ) const
pure virtual

◆ getViewByID()

FXMDIChild * GUIMainWindow::getViewByID ( const std::string &  id) const

Definition at line 141 of file GUIMainWindow.cpp.

References mySubWindows.

Referenced by TraCIServerAPI_GUI::getNamedView(), and GUIMessageWindow::setCursorPos().

◆ getViewIDs()

std::vector< std::string > GUIMainWindow::getViewIDs ( ) const

Definition at line 131 of file GUIMainWindow.cpp.

References mySubWindows.

Referenced by TraCIServerAPI_GUI::processGet(), and GUIMessageWindow::setCursorPos().

◆ isGaming()

◆ listInternal()

bool GUIMainWindow::listInternal ( ) const
inline

return whether to list internal structures

Definition at line 91 of file GUIMainWindow.h.

References myListInternal.

Referenced by GUISUMOViewParent::onCmdLocate().

◆ listParking()

bool GUIMainWindow::listParking ( ) const
inline

return whether to list parking vehicles

Definition at line 96 of file GUIMainWindow.h.

References myListParking.

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

◆ listTeleporting()

bool GUIMainWindow::listTeleporting ( ) const
inline

return whether to list teleporting vehicles

Definition at line 101 of file GUIMainWindow.h.

References getInstance(), and myListTeleporting.

Referenced by GUISUMOViewParent::onCmdLocate().

◆ removeChild() [1/2]

◆ removeChild() [2/2]

void GUIMainWindow::removeChild ( FXMainWindow *  child)

◆ sendBlockingEvent()

virtual void GUIMainWindow::sendBlockingEvent ( GUIEvent event)
inlinevirtual

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

Parameters
eventthe event to send

Reimplemented in GUIApplicationWindow.

Definition at line 121 of file GUIMainWindow.h.

References getActiveView(), and UNUSED_PARAMETER.

◆ setDelay()

virtual void GUIMainWindow::setDelay ( double  )
inlinevirtual

Sets the delay of the parent application.

Reimplemented in GUIApplicationWindow.

Definition at line 116 of file GUIMainWindow.h.

Referenced by GUISUMOAbstractView::setDelay().

◆ setStatusBarText()

virtual void GUIMainWindow::setStatusBarText ( const std::string &  )
inlinevirtual

◆ setWindowSizeAndPos()

void GUIMainWindow::setWindowSizeAndPos ( )
protected

◆ updateChildren()

Field Documentation

◆ myAmGaming

bool GUIMainWindow::myAmGaming
protected

◆ myBoldFont

FXFont* GUIMainWindow::myBoldFont
protected

Font used for popup-menu titles.

Definition at line 135 of file GUIMainWindow.h.

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

◆ myBottomDock

FXDockSite * GUIMainWindow::myBottomDock
protected

Definition at line 150 of file GUIMainWindow.h.

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

◆ myCartesianCoordinate

FXLabel* GUIMainWindow::myCartesianCoordinate
protected

◆ myCartesianFrame

FXHorizontalFrame* GUIMainWindow::myCartesianFrame
protected

◆ myGeoCoordinate

◆ myGeoFrame

FXHorizontalFrame * GUIMainWindow::myGeoFrame
protected

◆ myGLVisual

FXGLVisual* GUIMainWindow::myGLVisual
protected

◆ myInstance

GUIMainWindow * GUIMainWindow::myInstance = 0
staticprotected

the singleton window instance

Definition at line 165 of file GUIMainWindow.h.

Referenced by getInstance(), and GUIMainWindow().

◆ myLeftDock

FXDockSite * GUIMainWindow::myLeftDock
protected

Definition at line 150 of file GUIMainWindow.h.

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

◆ myListInternal

bool GUIMainWindow::myListInternal
protected

information whether the locator should list internal structures

Definition at line 156 of file GUIMainWindow.h.

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

◆ myListParking

bool GUIMainWindow::myListParking
protected

information whether the locator should list parking vehicles

Definition at line 159 of file GUIMainWindow.h.

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

◆ myListTeleporting

bool GUIMainWindow::myListTeleporting
protected

information whether the locator should list teleporting vehicles

Definition at line 162 of file GUIMainWindow.h.

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

◆ myMDIClient

◆ myRightDock

FXDockSite * GUIMainWindow::myRightDock
protected

Definition at line 150 of file GUIMainWindow.h.

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

◆ myStatusbar

◆ mySubWindows

◆ myTopDock

◆ myTrackerLock

MFXMutex GUIMainWindow::myTrackerLock
protected

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

Definition at line 132 of file GUIMainWindow.h.

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

◆ myTrackerWindows

std::vector<FXMainWindow*> GUIMainWindow::myTrackerWindows
protected

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