![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GUIMainWindow.h>
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... | |
GUISUMOAbstractView * | getActiveView () 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... | |
GUIGlChildWindow * | getViewByID (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< SUMOTime > | retrieveBreakpoints () 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 GUIMainWindow * | getInstance () |
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 GUIMainWindow * | myInstance = nullptr |
the singleton window instance More... | |
Definition at line 44 of file GUIMainWindow.h.
GUIMainWindow::GUIMainWindow | ( | FXApp * | a | ) |
constructor
Definition at line 53 of file GUIMainWindow.cpp.
References myBoldFont, myBottomDock, myInstance, myLeftDock, myRightDock, and myTopDock.
|
virtual |
destructor
Definition at line 80 of file GUIMainWindow.cpp.
References myBoldFont, myBottomDock, myLeftDock, myRightDock, and myTopDock.
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().
void GUIMainWindow::addGLChild | ( | GUIGlChildWindow * | child | ) |
Adds a further child window to the list (GUIGlChildWindow)
Definition at line 91 of file GUIMainWindow.cpp.
References myGLWindows.
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().
FXFont * GUIMainWindow::getBoldFont | ( | ) |
get bold front
Definition at line 150 of file GUIMainWindow.cpp.
References myBoldFont.
Referenced by GUIGlObject::buildPopupHeader().
|
pure virtual |
get build GL Canvas (must be implemented in all children)
Implemented in GNEApplicationWindow, and GUIApplicationWindow.
FXLabel & GUIMainWindow::getCartesianLabel | ( | ) |
get cartesian label
Definition at line 181 of file GUIMainWindow.cpp.
References myCartesianCoordinate.
Referenced by GUISUMOAbstractView::updatePositionInformation().
|
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().
|
inlinevirtual |
Returns the delay (should be overwritten by subclasses if applicable)
Reimplemented in GUIApplicationWindow.
Definition at line 122 of file GUIMainWindow.h.
Referenced by GUISUMOAbstractView::getDelay(), and GUIViewTraffic::saveFrame().
FXLabel & GUIMainWindow::getGeoLabel | ( | ) |
get geo label
Definition at line 187 of file GUIMainWindow.cpp.
References myGeoCoordinate.
Referenced by GUISUMOAbstractView::updatePositionInformation().
FXGLVisual * GUIMainWindow::getGLVisual | ( | ) | const |
get GL Visual
Definition at line 175 of file GUIMainWindow.cpp.
References myGLVisual.
Referenced by GUISUMOViewParent::init().
|
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().
FXDockSite * GUIMainWindow::getTopDock | ( | ) |
|
pure virtual |
get tracker interval (must be implemented in all children)
Implemented in GNEApplicationWindow, and GUIApplicationWindow.
Referenced by GUIParam_PopupMenuInterface::onCmdOpenTracker(), and GUIParameterTableWindow::onLeftBtnPress().
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().
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().
const std::vector< GUIGlChildWindow * > & GUIMainWindow::getViews | ( | ) | const |
get views
Definition at line 156 of file GUIMainWindow.cpp.
References myGLWindows.
Referenced by GUIRunThread::waitForSnapshots().
|
inline |
Definition at line 147 of file GUIMainWindow.h.
References myAmFullScreen.
Referenced by GUIViewTraffic::onDoubleClicked().
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().
bool GUIMainWindow::listInternal | ( | ) | const |
return whether to list internal structures
Definition at line 199 of file GUIMainWindow.cpp.
References myListInternal.
Referenced by GUISUMOViewParent::onCmdLocate().
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().
bool GUIMainWindow::listTeleporting | ( | ) | const |
return whether to list teleporting vehicles
Definition at line 211 of file GUIMainWindow.cpp.
References myListTeleporting.
Referenced by GUISUMOViewParent::onCmdLocate().
|
inlinevirtual |
Toggle full screen mode.
Reimplemented in GUIApplicationWindow.
Definition at line 143 of file GUIMainWindow.h.
Referenced by GUIViewTraffic::onDoubleClicked().
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().
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().
|
inlinevirtual |
retrieve breakpoints if provided by the application
Reimplemented in GUIApplicationWindow.
Definition at line 152 of file GUIMainWindow.h.
Referenced by GUIViewTraffic::retrieveBreakpoints().
|
inlinevirtual |
Sends an event from the application thread to the GUI and waits until it is handled.
event | the event to send |
Reimplemented in GUIApplicationWindow.
Definition at line 135 of file GUIMainWindow.h.
References UNUSED_PARAMETER.
|
inlinevirtual |
Sets the breakpoints of the parent application.
Reimplemented in GUIApplicationWindow.
Definition at line 130 of file GUIMainWindow.h.
Referenced by GUISUMOAbstractView::setBreakpoints().
|
inlinevirtual |
Sets the delay of the parent application.
Reimplemented in GUIApplicationWindow.
Definition at line 127 of file GUIMainWindow.h.
Referenced by GUISUMOAbstractView::setDelay().
|
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().
|
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().
|
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().
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().
|
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().
|
protected |
information whether the gui is currently in gaming mode
Definition at line 190 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::handleEvent_SimulationStep(), isGaming(), GUIApplicationWindow::onCmdFullScreen(), GUIApplicationWindow::onCmdGaming(), and GUIApplicationWindow::updateTimeLCD().
|
protected |
Font used for popup-menu titles.
Definition at line 171 of file GUIMainWindow.h.
Referenced by getBoldFont(), GUIMainWindow(), and ~GUIMainWindow().
|
protected |
Definition at line 187 of file GUIMainWindow.h.
Referenced by GUIMainWindow(), and ~GUIMainWindow().
|
protected |
Labels for the current cartesian and geo-coordinate.
Definition at line 180 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::closeAllWindows(), GNEApplicationWindow::closeAllWindows(), GUIApplicationWindow::dependentBuild(), GNEApplicationWindow::dependentBuild(), and getCartesianLabel().
|
protected |
Definition at line 182 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::create(), GNEApplicationWindow::create(), GUIApplicationWindow::dependentBuild(), and GNEApplicationWindow::dependentBuild().
|
protected |
Definition at line 180 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::closeAllWindows(), GNEApplicationWindow::closeAllWindows(), GUIApplicationWindow::dependentBuild(), GNEApplicationWindow::dependentBuild(), and getGeoLabel().
|
protected |
Definition at line 182 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::create(), GNEApplicationWindow::create(), GUIApplicationWindow::dependentBuild(), and GNEApplicationWindow::dependentBuild().
|
protected |
The gl-visual used.
Definition at line 185 of file GUIMainWindow.h.
Referenced by getGLVisual(), GNEApplicationWindow::~GNEApplicationWindow(), and GUIApplicationWindow::~GUIApplicationWindow().
|
protected |
Definition at line 163 of file GUIMainWindow.h.
Referenced by addGLChild(), GUIApplicationWindow::closeAllWindows(), GNEApplicationWindow::closeAllWindows(), getViewByID(), getViewIDs(), getViews(), GUIApplicationWindow::handleEvent_SimulationLoaded(), GUIApplicationWindow::onCmdEditViewport(), GUIApplicationWindow::onCmdEditViewScheme(), GUIApplicationWindow::onCmdFullScreen(), GUIApplicationWindow::onCmdGaming(), GUIApplicationWindow::onCmdNetedit(), and removeGLChild().
|
staticprotected |
the singleton window instance
Definition at line 202 of file GUIMainWindow.h.
Referenced by getInstance(), and GUIMainWindow().
|
protected |
Definition at line 187 of file GUIMainWindow.h.
Referenced by GUIMainWindow(), and ~GUIMainWindow().
|
protected |
information whether the locator should list internal structures
Definition at line 193 of file GUIMainWindow.h.
Referenced by listInternal(), and GUIApplicationWindow::onCmdListInternal().
|
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().
|
protected |
information whether the locator should list teleporting vehicles
Definition at line 199 of file GUIMainWindow.h.
Referenced by listTeleporting(), and GUIApplicationWindow::onCmdListTeleporting().
|
protected |
The multi view panel.
Definition at line 174 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::dependentBuild(), GNEApplicationWindow::dependentBuild(), GUIApplicationWindow::fillMenuBar(), getActiveView(), GUIApplicationWindow::getBuildGLCanvas(), GNEApplicationWindow::handleEvent_NetworkLoaded(), GUIApplicationWindow::onCmdEditChosen(), GUIApplicationWindow::onCmdFullScreen(), GUIApplicationWindow::onCmdGaming(), GUIApplicationWindow::onCmdLocate(), GNEApplicationWindow::onCmdLocate(), GUIApplicationWindow::onCmdOpenEdgeData(), GUIApplicationWindow::onCmdOpenShapes(), GUIApplicationWindow::onCmdShowStats(), GUIApplicationWindow::onKeyPress(), GNEApplicationWindow::onKeyPress(), GUIApplicationWindow::onKeyRelease(), GNEApplicationWindow::onKeyRelease(), GUIApplicationWindow::openNewView(), and updateChildren().
|
protected |
Definition at line 187 of file GUIMainWindow.h.
Referenced by GUIMainWindow(), and ~GUIMainWindow().
|
protected |
The status bar.
Definition at line 177 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::dependentBuild(), GNEApplicationWindow::dependentBuild(), GUIApplicationWindow::fillMenuBar(), GNEApplicationWindow::fillMenuBar(), GUIApplicationWindow::onCmdFullScreen(), GUIApplicationWindow::onCmdGaming(), GUIApplicationWindow::onCmdOpenRecent(), GNEApplicationWindow::onCmdOpenRecent(), GUIApplicationWindow::onCmdStart(), GUIApplicationWindow::onCmdStep(), GUIApplicationWindow::openNewView(), GNEApplicationWindow::setStatusBarText(), and GUIApplicationWindow::setStatusBarText().
|
protected |
Definition at line 187 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::buildToolBars(), GUIApplicationWindow::dependentBuild(), getTopDock(), GUIMainWindow(), and ~GUIMainWindow().
|
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().
|
protected |
Definition at line 165 of file GUIMainWindow.h.
Referenced by addChild(), GUIApplicationWindow::closeAllWindows(), GNEApplicationWindow::closeAllWindows(), removeChild(), and updateChildren().