Eclipse SUMO - Simulation of Urban MObility
GUIMainWindow Class Referenceabstract

#include <GUIMainWindow.h>

Inheritance diagram for GUIMainWindow:
[legend]
Collaboration diagram for GUIMainWindow:
[legend]

Public Member Functions

void addChild (FXMainWindow *child)
 Adds a further child window to the list (FXMainWindow) More...
 
void addGLChild (GUIGlChildWindow *child)
 Adds a further child window to the list (GUIGlChildWindow) More...
 
GUISUMOAbstractViewgetActiveView () const
 get the active view or 0 More...
 
FXFont * getBoldFont ()
 get bold front More...
 
virtual FXGLCanvas * getBuildGLCanvas () const =0
 get build GL Canvas (must be implemented in all children) More...
 
FXLabel & getCartesianLabel ()
 get cartesian label More...
 
virtual SUMOTime getCurrentSimTime () const =0
 get current sim time (must be implemented in all children) More...
 
virtual double getDelay () const
 Returns the delay (should be overwritten by subclasses if applicable) More...
 
FXLabel & getGeoLabel ()
 get geo label More...
 
FXGLVisual * getGLVisual () const
 get GL Visual More...
 
FXDockSite * getTopDock ()
 get top dock More...
 
virtual double getTrackerInterval () const =0
 get tracker interval (must be implemented in all children) More...
 
GUIGlChildWindowgetViewByID (const std::string &id) const
 get specific view by ID More...
 
std::vector< std::string > getViewIDs () const
 get view IDs More...
 
const std::vector< GUIGlChildWindow * > & getViews () const
 get views More...
 
 GUIMainWindow (FXApp *a)
 constructor More...
 
bool isFullScreen ()
 
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...
 
virtual long onCmdFullScreen (FXObject *, FXSelector, void *)
 Toggle full screen mode. More...
 
void removeChild (FXMainWindow *child)
 removes the given child window from the list (FXMainWindow) More...
 
void removeGLChild (GUIGlChildWindow *child)
 removes the given child window from the list (GUIGlChildWindow) More...
 
virtual const std::vector< SUMOTimeretrieveBreakpoints () const
 retrieve breakpoints if provided by the application More...
 
virtual void sendBlockingEvent (GUIEvent *event)
 Sends an event from the application thread to the GUI and waits until it is handled. More...
 
virtual void setBreakpoints (const std::vector< SUMOTime > &)
 Sets the breakpoints of the parent application. More...
 
virtual void setDelay (double)
 Sets the delay of the parent application. More...
 
virtual void setStatusBarText (const std::string &)
 get status bar text (can be implemented in children) More...
 
void updateChildren ()
 update childrens More...
 
virtual ~GUIMainWindow ()
 destructor More...
 

Static Public Member Functions

static GUIMainWindowgetInstance ()
 get instance More...
 

Protected Member Functions

void setWindowSizeAndPos ()
 perform initial window positioning and sizing according to user options / previous call More...
 
void storeWindowSizeAndPos ()
 record window position and size in registry More...
 

Protected Attributes

bool myAmFullScreen
 fox need this More...
 
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...
 
std::vector< GUIGlChildWindow * > myGLWindows
 
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...
 
FXDockSite * myTopDock
 
FXMutex myTrackerLock
 A lock to make the removal and addition of trackers secure. More...
 
std::vector< FXMainWindow * > myTrackerWindows
 

Static Protected Attributes

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

Detailed Description

Definition at line 44 of file GUIMainWindow.h.

Constructor & Destructor Documentation

◆ GUIMainWindow()

GUIMainWindow::GUIMainWindow ( FXApp *  a)

constructor

Definition at line 53 of file GUIMainWindow.cpp.

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

◆ ~GUIMainWindow()

GUIMainWindow::~GUIMainWindow ( )
virtual

destructor

Definition at line 80 of file GUIMainWindow.cpp.

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

Member Function Documentation

◆ addChild()

void GUIMainWindow::addChild ( FXMainWindow *  child)

Adds a further child window to the list (FXMainWindow)

Definition at line 106 of file GUIMainWindow.cpp.

References myTrackerLock, and myTrackerWindows.

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

Here is the caller graph for this function:

◆ addGLChild()

void GUIMainWindow::addGLChild ( GUIGlChildWindow child)

Adds a further child window to the list (GUIGlChildWindow)

Definition at line 91 of file GUIMainWindow.cpp.

References myGLWindows.

◆ getActiveView()

GUISUMOAbstractView * GUIMainWindow::getActiveView ( ) const

get the active view or 0

Definition at line 226 of file GUIMainWindow.cpp.

References GUIGlChildWindow::getView(), and myMDIClient.

Referenced by GUIVehicle::drawOutsideNetwork().

Here is the caller graph for this function:

◆ getBoldFont()

FXFont * GUIMainWindow::getBoldFont ( )

get bold front

Definition at line 150 of file GUIMainWindow.cpp.

References myBoldFont.

Referenced by GUIGlObject::buildPopupHeader().

Here is the caller graph for this function:

◆ getBuildGLCanvas()

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

get build GL Canvas (must be implemented in all children)

Implemented in GNEApplicationWindow, and GUIApplicationWindow.

◆ getCartesianLabel()

FXLabel & GUIMainWindow::getCartesianLabel ( )

get cartesian label

Definition at line 181 of file GUIMainWindow.cpp.

References myCartesianCoordinate.

Referenced by GUISUMOAbstractView::updatePositionInformation().

Here is the caller graph for this function:

◆ getCurrentSimTime()

virtual SUMOTime GUIMainWindow::getCurrentSimTime ( ) const
pure virtual

get current sim time (must be implemented in all children)

Implemented in GNEApplicationWindow, and GUIApplicationWindow.

Referenced by GUIParam_PopupMenuInterface::onCmdOpenTracker(), and GUIParameterTableWindow::onLeftBtnPress().

Here is the caller graph for this function:

◆ 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 122 of file GUIMainWindow.h.

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

Here is the caller graph for this function:

◆ getGeoLabel()

FXLabel & GUIMainWindow::getGeoLabel ( )

get geo label

Definition at line 187 of file GUIMainWindow.cpp.

References myGeoCoordinate.

Referenced by GUISUMOAbstractView::updatePositionInformation().

Here is the caller graph for this function:

◆ getGLVisual()

FXGLVisual * GUIMainWindow::getGLVisual ( ) const

get GL Visual

Definition at line 175 of file GUIMainWindow.cpp.

References myGLVisual.

Referenced by GUISUMOViewParent::init().

Here is the caller graph for this function:

◆ getInstance()

GUIMainWindow * GUIMainWindow::getInstance ( void  )
static

get instance

Definition at line 217 of file GUIMainWindow.cpp.

References myInstance.

Referenced by GUIVehicle::drawOutsideNetwork(), TraCIServerAPI_GUI::getNamedView(), GUITexturesHelper::getTextureID(), TraCIServerAPI_GUI::processGet(), GUIMessageWindow::setCursorPos(), and GUIRunThread::waitForSnapshots().

Here is the caller graph for this function:

◆ getTopDock()

FXDockSite * GUIMainWindow::getTopDock ( )

get top dock

Definition at line 123 of file GUIMainWindow.cpp.

References myTopDock.

◆ getTrackerInterval()

virtual double GUIMainWindow::getTrackerInterval ( ) const
pure virtual

get tracker interval (must be implemented in all children)

Implemented in GNEApplicationWindow, and GUIApplicationWindow.

Referenced by GUIParam_PopupMenuInterface::onCmdOpenTracker(), and GUIParameterTableWindow::onLeftBtnPress().

Here is the caller graph for this function:

◆ getViewByID()

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

get specific view by ID

Definition at line 139 of file GUIMainWindow.cpp.

References myGLWindows.

Referenced by TraCIServerAPI_GUI::getNamedView().

Here is the caller graph for this function:

◆ getViewIDs()

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

get view IDs

Definition at line 129 of file GUIMainWindow.cpp.

References myGLWindows.

Referenced by TraCIServerAPI_GUI::processGet().

Here is the caller graph for this function:

◆ getViews()

const std::vector< GUIGlChildWindow * > & GUIMainWindow::getViews ( ) const

get views

Definition at line 156 of file GUIMainWindow.cpp.

References myGLWindows.

Referenced by GUIRunThread::waitForSnapshots().

Here is the caller graph for this function:

◆ isFullScreen()

bool GUIMainWindow::isFullScreen ( )
inline

Definition at line 147 of file GUIMainWindow.h.

References myAmFullScreen.

Referenced by GUIViewTraffic::onDoubleClicked().

Here is the caller graph for this function:

◆ isGaming()

bool GUIMainWindow::isGaming ( ) const

return whether the gui is in gaming mode

Definition at line 193 of file GUIMainWindow.cpp.

References myAmGaming.

Referenced by GUISUMOViewParent::init(), GUISUMOAbstractView::onLeftBtnRelease(), GUISUMOAbstractView::onMouseWheel(), GUISUMOAbstractView::onRightBtnRelease(), and GUIViewTraffic::setColorScheme().

Here is the caller graph for this function:

◆ listInternal()

bool GUIMainWindow::listInternal ( ) const

return whether to list internal structures

Definition at line 199 of file GUIMainWindow.cpp.

References myListInternal.

Referenced by GUISUMOViewParent::onCmdLocate().

Here is the caller graph for this function:

◆ listParking()

bool GUIMainWindow::listParking ( ) const

return whether to list parking vehicles

Definition at line 205 of file GUIMainWindow.cpp.

References myListParking.

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

Here is the caller graph for this function:

◆ listTeleporting()

bool GUIMainWindow::listTeleporting ( ) const

return whether to list teleporting vehicles

Definition at line 211 of file GUIMainWindow.cpp.

References myListTeleporting.

Referenced by GUISUMOViewParent::onCmdLocate().

Here is the caller graph for this function:

◆ onCmdFullScreen()

virtual long GUIMainWindow::onCmdFullScreen ( FXObject *  ,
FXSelector  ,
void *   
)
inlinevirtual

Toggle full screen mode.

Reimplemented in GUIApplicationWindow.

Definition at line 143 of file GUIMainWindow.h.

Referenced by GUIViewTraffic::onDoubleClicked().

Here is the caller graph for this function:

◆ removeChild()

void GUIMainWindow::removeChild ( FXMainWindow *  child)

removes the given child window from the list (FXMainWindow)

Definition at line 114 of file GUIMainWindow.cpp.

References myTrackerLock, and myTrackerWindows.

Referenced by GUIDialog_Breakpoints::~GUIDialog_Breakpoints(), GUIDialog_ChooserAbstract::~GUIDialog_ChooserAbstract(), GUIDialog_GLChosenEditor::~GUIDialog_GLChosenEditor(), GUIParameterTableWindow::~GUIParameterTableWindow(), GUIParameterTracker::~GUIParameterTracker(), and GUITLLogicPhasesTrackerWindow::~GUITLLogicPhasesTrackerWindow().

Here is the caller graph for this function:

◆ removeGLChild()

void GUIMainWindow::removeGLChild ( GUIGlChildWindow child)

removes the given child window from the list (GUIGlChildWindow)

Definition at line 97 of file GUIMainWindow.cpp.

References myGLWindows.

Referenced by GNEViewParent::~GNEViewParent(), and GUISUMOViewParent::~GUISUMOViewParent().

Here is the caller graph for this function:

◆ retrieveBreakpoints()

virtual const std::vector<SUMOTime> GUIMainWindow::retrieveBreakpoints ( ) const
inlinevirtual

retrieve breakpoints if provided by the application

Reimplemented in GUIApplicationWindow.

Definition at line 152 of file GUIMainWindow.h.

Referenced by GUIViewTraffic::retrieveBreakpoints().

Here is the caller graph for this function:

◆ 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 135 of file GUIMainWindow.h.

References UNUSED_PARAMETER.

◆ setBreakpoints()

virtual void GUIMainWindow::setBreakpoints ( const std::vector< SUMOTime > &  )
inlinevirtual

Sets the breakpoints of the parent application.

Reimplemented in GUIApplicationWindow.

Definition at line 130 of file GUIMainWindow.h.

Referenced by GUISUMOAbstractView::setBreakpoints().

Here is the caller graph for this function:

◆ setDelay()

virtual void GUIMainWindow::setDelay ( double  )
inlinevirtual

Sets the delay of the parent application.

Reimplemented in GUIApplicationWindow.

Definition at line 127 of file GUIMainWindow.h.

Referenced by GUISUMOAbstractView::setDelay().

Here is the caller graph for this function:

◆ setStatusBarText()

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

get status bar text (can be implemented in children)

Reimplemented in GUIApplicationWindow, and GNEApplicationWindow.

Definition at line 96 of file GUIMainWindow.h.

Referenced by GUISUMOAbstractView::getObjectsInBoundary(), and GNEViewNet::setStatusBarText().

Here is the caller graph for this function:

◆ setWindowSizeAndPos()

void GUIMainWindow::setWindowSizeAndPos ( )
protected

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

Definition at line 236 of file GUIMainWindow.cpp.

References OptionsCont::getOptions(), OptionsCont::getStringVector(), OptionsCont::isSet(), MAX2(), MIN2(), StringUtils::toInt(), toString(), and WRITE_ERROR.

Referenced by GUIApplicationWindow::create(), GNEApplicationWindow::create(), GNEApplicationWindow::handleEvent_NetworkLoaded(), and GUIApplicationWindow::handleEvent_SimulationLoaded().

Here is the caller graph for this function:

◆ storeWindowSizeAndPos()

void GUIMainWindow::storeWindowSizeAndPos ( )
protected

record window position and size in registry

Definition at line 276 of file GUIMainWindow.cpp.

References myAmFullScreen.

Referenced by GUIApplicationWindow::loadConfigOrNet(), GNEApplicationWindow::loadConfigOrNet(), GUIApplicationWindow::onCmdQuit(), GNEApplicationWindow::onCmdQuit(), and GUIApplicationWindow::onCmdReload().

Here is the caller graph for this function:

◆ updateChildren()

void GUIMainWindow::updateChildren ( )

update childrens

Definition at line 162 of file GUIMainWindow.cpp.

References MID_SIMSTEP, myMDIClient, myTrackerLock, and myTrackerWindows.

Referenced by GUIApplicationWindow::handleEvent_SimulationStep(), GUIDialog_GLChosenEditor::onCmdClear(), GUIDialog_GLChosenEditor::onCmdDeselect(), and GUIApplicationWindow::onCmdEditChosen().

Here is the caller graph for this function:

Field Documentation

◆ myAmFullScreen

bool GUIMainWindow::myAmFullScreen
protected

fox need this

whether to show the window in full screen mode

Definition at line 161 of file GUIMainWindow.h.

Referenced by isFullScreen(), GUIApplicationWindow::onCmdFullScreen(), GUIApplicationWindow::onCmdGaming(), and storeWindowSizeAndPos().

◆ myAmGaming

bool GUIMainWindow::myAmGaming
protected

◆ myBoldFont

FXFont* GUIMainWindow::myBoldFont
protected

Font used for popup-menu titles.

Definition at line 171 of file GUIMainWindow.h.

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

◆ myBottomDock

FXDockSite * GUIMainWindow::myBottomDock
protected

Definition at line 187 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

◆ myGLWindows

◆ myInstance

GUIMainWindow * GUIMainWindow::myInstance = nullptr
staticprotected

the singleton window instance

Definition at line 202 of file GUIMainWindow.h.

Referenced by getInstance(), and GUIMainWindow().

◆ myLeftDock

FXDockSite * GUIMainWindow::myLeftDock
protected

Definition at line 187 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 193 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 196 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 199 of file GUIMainWindow.h.

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

◆ myMDIClient

◆ myRightDock

FXDockSite * GUIMainWindow::myRightDock
protected

Definition at line 187 of file GUIMainWindow.h.

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

◆ myStatusbar

◆ myTopDock

FXDockSite* GUIMainWindow::myTopDock
protected

◆ myTrackerLock

FXMutex GUIMainWindow::myTrackerLock
protected

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

Definition at line 168 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: