Eclipse SUMO - Simulation of Urban MObility
GUIMainWindow Class Referenceabstract

#include <GUIMainWindow.h>

Inheritance diagram for GUIMainWindow:
Collaboration diagram for GUIMainWindow:

Public Member Functions

void addChild (FXMainWindow *child)
 
void addGLChild (GUIGlChildWindow *child)
 Adds a further child window to the list. More...
 
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
 
GUIGlChildWindowgetViewByID (const std::string &id) const
 
std::vector< std::string > getViewIDs () const
 
const std::vector< GUIGlChildWindow * > & getViews () const
 
 GUIMainWindow (FXApp *a)
 
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)
 
void removeGLChild (GUIGlChildWindow *child)
 removes the given child window from the list 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 &)
 
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...
 
void storeWindowSizeAndPos ()
 record window position and size in registry More...
 

Protected Attributes

bool myAmFullScreen
 whether to show the window in full screen mode 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 47 of file GUIMainWindow.h.

Constructor & Destructor Documentation

◆ GUIMainWindow() [1/2]

GUIMainWindow::GUIMainWindow ( FXApp *  a)

Definition at line 55 of file GUIMainWindow.cpp.

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

◆ ~GUIMainWindow()

GUIMainWindow::~GUIMainWindow ( )
virtual

Definition at line 82 of file GUIMainWindow.cpp.

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

◆ GUIMainWindow() [2/2]

GUIMainWindow::GUIMainWindow ( )
inlineprotected

Definition at line 186 of file GUIMainWindow.h.

Member Function Documentation

◆ addChild()

void GUIMainWindow::addChild ( FXMainWindow *  child)

◆ addGLChild()

void GUIMainWindow::addGLChild ( GUIGlChildWindow child)

Adds a further child window to the list.

Definition at line 93 of file GUIMainWindow.cpp.

References myGLWindows.

◆ getActiveView()

GUISUMOAbstractView * GUIMainWindow::getActiveView ( ) const

get the active view or 0

Definition at line 192 of file GUIMainWindow.cpp.

References GUIGlChildWindow::getView(), and myMDIClient.

Referenced by GUIVehicle::drawOutsideNetwork().

◆ getBoldFont()

FXFont * GUIMainWindow::getBoldFont ( )

Definition at line 146 of file GUIMainWindow.cpp.

References myBoldFont.

Referenced by GUIGlObject::buildPopupHeader().

◆ getBuildGLCanvas()

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

◆ getCartesianLabel()

FXLabel & GUIMainWindow::getCartesianLabel ( )

Definition at line 171 of file GUIMainWindow.cpp.

References myCartesianCoordinate.

Referenced by GUISUMOAbstractView::updatePositionInformation().

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

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

◆ getGeoLabel()

FXLabel & GUIMainWindow::getGeoLabel ( )

Definition at line 177 of file GUIMainWindow.cpp.

References myGeoCoordinate.

Referenced by GUISUMOAbstractView::updatePositionInformation().

◆ getGLVisual()

FXGLVisual * GUIMainWindow::getGLVisual ( ) const

Definition at line 165 of file GUIMainWindow.cpp.

References myGLVisual.

Referenced by GUISUMOViewParent::init().

◆ getInstance()

◆ getTrackerInterval()

virtual double GUIMainWindow::getTrackerInterval ( ) const
pure virtual

◆ getViewByID()

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

Definition at line 135 of file GUIMainWindow.cpp.

References myGLWindows.

Referenced by TraCIServerAPI_GUI::getNamedView().

◆ getViewIDs()

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

Definition at line 125 of file GUIMainWindow.cpp.

References myGLWindows.

Referenced by TraCIServerAPI_GUI::processGet().

◆ getViews()

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

Definition at line 61 of file GUIMainWindow.h.

References myGLWindows.

Referenced by GUIRunThread::waitForSnapshots().

◆ isFullScreen()

bool GUIMainWindow::isFullScreen ( )
inline

Definition at line 134 of file GUIMainWindow.h.

References myAmFullScreen.

Referenced by GUIViewTraffic::onDoubleClicked().

◆ isGaming()

bool GUIMainWindow::isGaming ( ) const
inline

◆ listInternal()

bool GUIMainWindow::listInternal ( ) const
inline

return whether to list internal structures

Definition at line 88 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 93 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 98 of file GUIMainWindow.h.

References myListTeleporting.

Referenced by GUISUMOViewParent::onCmdLocate().

◆ onCmdFullScreen()

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

Toggle full screen mode.

Reimplemented in GUIApplicationWindow.

Definition at line 130 of file GUIMainWindow.h.

Referenced by GUIViewTraffic::onDoubleClicked().

◆ removeChild()

◆ removeGLChild()

void GUIMainWindow::removeGLChild ( GUIGlChildWindow child)

removes the given child window from the list

Definition at line 99 of file GUIMainWindow.cpp.

References myGLWindows.

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

◆ retrieveBreakpoints()

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

retrieve breakpoints if provided by the application

Reimplemented in GUIApplicationWindow.

Definition at line 139 of file GUIMainWindow.h.

Referenced by GUIViewTraffic::retrieveBreakpoints().

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

Referenced by GUISUMOAbstractView::setBreakpoints().

◆ setDelay()

virtual void GUIMainWindow::setDelay ( double  )
inlinevirtual

Sets the delay of the parent application.

Reimplemented in GUIApplicationWindow.

Definition at line 113 of file GUIMainWindow.h.

Referenced by GUISUMOAbstractView::setDelay().

◆ setStatusBarText()

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

◆ setWindowSizeAndPos()

void GUIMainWindow::setWindowSizeAndPos ( )
protected

◆ storeWindowSizeAndPos()

void GUIMainWindow::storeWindowSizeAndPos ( )
protected

◆ updateChildren()

Field Documentation

◆ myAmFullScreen

bool GUIMainWindow::myAmFullScreen
protected

whether to show the window in full screen mode

Definition at line 145 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 153 of file GUIMainWindow.h.

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

◆ myBottomDock

FXDockSite * GUIMainWindow::myBottomDock
protected

Definition at line 168 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 183 of file GUIMainWindow.h.

Referenced by getInstance(), and GUIMainWindow().

◆ myLeftDock

FXDockSite * GUIMainWindow::myLeftDock
protected

Definition at line 168 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 174 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 177 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 180 of file GUIMainWindow.h.

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

◆ myMDIClient

◆ myRightDock

FXDockSite * GUIMainWindow::myRightDock
protected

Definition at line 168 of file GUIMainWindow.h.

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

◆ myStatusbar

◆ myTopDock

◆ myTrackerLock

FXMutex GUIMainWindow::myTrackerLock
protected

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

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