![]() |
SUMO - Simulation of Urban MObility
|
#include <GUIMainWindow.h>
Public Member Functions | |
void | addChild (FXMainWindow *child) |
void | addGLChild (GUIGlChildWindow *child) |
Adds a further child window to the list. More... | |
GUISUMOAbstractView * | getActiveView () 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 |
GUIGlChildWindow * | getViewByID (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< 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 | 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 GUIMainWindow * | getInstance () |
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 |
MFXMutex | 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 48 of file GUIMainWindow.h.
GUIMainWindow::GUIMainWindow | ( | FXApp * | a | ) |
Definition at line 55 of file GUIMainWindow.cpp.
References myBoldFont, myBottomDock, myInstance, myLeftDock, myRightDock, and myTopDock.
|
virtual |
Definition at line 81 of file GUIMainWindow.cpp.
References myBoldFont, myBottomDock, myLeftDock, myRightDock, and myTopDock.
|
inlineprotected |
Definition at line 183 of file GUIMainWindow.h.
References setWindowSizeAndPos(), and storeWindowSizeAndPos().
void GUIMainWindow::addChild | ( | FXMainWindow * | child | ) |
Definition at line 107 of file GUIMainWindow.cpp.
References MFXMutex::lock(), myTrackerLock, myTrackerWindows, and MFXMutex::unlock().
Referenced by GUIParameterTableWindow::closeBuilding(), and GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow().
void GUIMainWindow::addGLChild | ( | GUIGlChildWindow * | child | ) |
Adds a further child window to the list.
Definition at line 92 of file GUIMainWindow.cpp.
References myGLWindows.
GUISUMOAbstractView * GUIMainWindow::getActiveView | ( | ) | const |
get the active view or 0
Definition at line 191 of file GUIMainWindow.cpp.
References GUIGlChildWindow::getView(), and myMDIClient.
Referenced by GUIVehicle::drawOutsideNetwork(), and sendBlockingEvent().
FXFont * GUIMainWindow::getBoldFont | ( | ) |
Definition at line 145 of file GUIMainWindow.cpp.
References myBoldFont.
Referenced by GUIGlObject::buildPopupHeader(), GNEFrame::ACHierarchy::createPopUpMenu(), and getViews().
|
pure virtual |
Implemented in GNEApplicationWindow, and GUIApplicationWindow.
Referenced by getViews().
FXLabel & GUIMainWindow::getCartesianLabel | ( | ) |
Definition at line 170 of file GUIMainWindow.cpp.
References myCartesianCoordinate.
Referenced by setStatusBarText(), and GUISUMOAbstractView::updatePositionInformation().
|
pure virtual |
Implemented in GNEApplicationWindow, and GUIApplicationWindow.
Referenced by getViews(), and GUIParam_PopupMenuInterface::onCmdOpenTracker().
|
inlinevirtual |
Returns the delay (should be overwritten by subclasses if applicable)
Reimplemented in GUIApplicationWindow.
Definition at line 108 of file GUIMainWindow.h.
Referenced by GUISUMOAbstractView::getDelay(), and GUIViewTraffic::saveFrame().
FXLabel & GUIMainWindow::getGeoLabel | ( | ) |
Definition at line 176 of file GUIMainWindow.cpp.
References myGeoCoordinate.
Referenced by setStatusBarText(), and GUISUMOAbstractView::updatePositionInformation().
FXGLVisual * GUIMainWindow::getGLVisual | ( | ) | const |
Definition at line 164 of file GUIMainWindow.cpp.
References myGLVisual.
Referenced by getViews(), and GUISUMOViewParent::init().
|
static |
Definition at line 182 of file GUIMainWindow.cpp.
References myInstance.
Referenced by GUIVehicle::drawOutsideNetwork(), TraCIServerAPI_GUI::getNamedView(), GUITexturesHelper::getTextureID(), listTeleporting(), TraCIServerAPI_GUI::processGet(), GUIMessageWindow::setCursorPos(), and GUIRunThread::waitForSnapshots().
|
pure virtual |
Implemented in GNEApplicationWindow, and GUIApplicationWindow.
Referenced by getViews(), and GUIParam_PopupMenuInterface::onCmdOpenTracker().
GUIGlChildWindow * GUIMainWindow::getViewByID | ( | const std::string & | id | ) | const |
Definition at line 134 of file GUIMainWindow.cpp.
References myGLWindows.
Referenced by TraCIServerAPI_GUI::getNamedView(), and GUIMessageWindow::setCursorPos().
std::vector< std::string > GUIMainWindow::getViewIDs | ( | ) | const |
Definition at line 124 of file GUIMainWindow.cpp.
References myGLWindows.
Referenced by TraCIServerAPI_GUI::processGet(), and GUIMessageWindow::setCursorPos().
|
inline |
Definition at line 62 of file GUIMainWindow.h.
References getBoldFont(), getBuildGLCanvas(), getCurrentSimTime(), getGLVisual(), getTrackerInterval(), myGLWindows, and updateChildren().
Referenced by GUIRunThread::waitForSnapshots().
|
inline |
Definition at line 131 of file GUIMainWindow.h.
References myAmFullScreen.
Referenced by GUIViewTraffic::onDoubleClicked().
|
inline |
return whether the gui is in gaming mode
Definition at line 84 of file GUIMainWindow.h.
References myAmGaming.
Referenced by GUIApplicationWindow::handleEvent_SimulationLoaded(), GUISUMOViewParent::init(), GUISUMOAbstractView::onLeftBtnRelease(), GUISUMOAbstractView::onMouseWheel(), GUISUMOAbstractView::onRightBtnRelease(), and GUIViewTraffic::setColorScheme().
|
inline |
return whether to list internal structures
Definition at line 89 of file GUIMainWindow.h.
References myListInternal.
Referenced by GUISUMOViewParent::onCmdLocate().
|
inline |
return whether to list parking vehicles
Definition at line 94 of file GUIMainWindow.h.
References myListParking.
Referenced by GUIApplicationWindow::fillMenuBar(), and GUISUMOViewParent::onCmdLocate().
|
inline |
return whether to list teleporting vehicles
Definition at line 99 of file GUIMainWindow.h.
References getInstance(), and myListTeleporting.
Referenced by GUISUMOViewParent::onCmdLocate().
|
inlinevirtual |
Toggle full screen mode.
Reimplemented in GUIApplicationWindow.
Definition at line 127 of file GUIMainWindow.h.
Referenced by GUIViewTraffic::onDoubleClicked().
void GUIMainWindow::removeChild | ( | FXMainWindow * | child | ) |
Definition at line 115 of file GUIMainWindow.cpp.
References MFXMutex::lock(), myTrackerLock, myTrackerWindows, and MFXMutex::unlock().
Referenced by GUIDialog_Breakpoints::~GUIDialog_Breakpoints(), GUIDialog_GLChosenEditor::~GUIDialog_GLChosenEditor(), GUIDialog_GLObjChooser::~GUIDialog_GLObjChooser(), GUIParameterTableWindow::~GUIParameterTableWindow(), GUIParameterTracker::~GUIParameterTracker(), and GUITLLogicPhasesTrackerWindow::~GUITLLogicPhasesTrackerWindow().
void GUIMainWindow::removeGLChild | ( | GUIGlChildWindow * | child | ) |
removes the given child window from the list
Definition at line 98 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 136 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 119 of file GUIMainWindow.h.
References getActiveView(), and UNUSED_PARAMETER.
|
inlinevirtual |
Sets the delay of the parent application.
Reimplemented in GUIApplicationWindow.
Definition at line 114 of file GUIMainWindow.h.
Referenced by GUISUMOAbstractView::setDelay().
|
inlinevirtual |
Reimplemented in GNEApplicationWindow, and GUIApplicationWindow.
Definition at line 78 of file GUIMainWindow.h.
References getCartesianLabel(), and getGeoLabel().
Referenced by GUISUMOAbstractView::getObjectsInBoundary(), and GNEViewNet::setStatusBarText().
|
protected |
perform initial window positioning and sizing according to user options / previous call
Definition at line 201 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(), GUIMainWindow(), GNEApplicationWindow::handleEvent_NetworkLoaded(), and GUIApplicationWindow::handleEvent_SimulationLoaded().
|
protected |
record window position and size in registry
Definition at line 241 of file GUIMainWindow.cpp.
References myAmFullScreen.
Referenced by GUIMainWindow(), GUIApplicationWindow::loadConfigOrNet(), GNEApplicationWindow::loadConfigOrNet(), GUIApplicationWindow::onCmdQuit(), GNEApplicationWindow::onCmdQuit(), and GUIApplicationWindow::onCmdReload().
void GUIMainWindow::updateChildren | ( | ) |
Definition at line 151 of file GUIMainWindow.cpp.
References MFXMutex::lock(), MID_SIMSTEP, myMDIClient, myTrackerLock, myTrackerWindows, and MFXMutex::unlock().
Referenced by getViews(), GUIApplicationWindow::handleEvent_SimulationStep(), GUILaneSpeedTrigger::GUIManip_LaneSpeedTrigger::onCmdChangeOption(), GUITriggeredRerouter::GUIManip_TriggeredRerouter::onCmdChangeOption(), GUIDialog_GLChosenEditor::onCmdClear(), GUIDialog_GLChosenEditor::onCmdDeselect(), GUIApplicationWindow::onCmdEditChosen(), GUILaneSpeedTrigger::GUIManip_LaneSpeedTrigger::onCmdPreDef(), GUILaneSpeedTrigger::GUIManip_LaneSpeedTrigger::onCmdUserDef(), GUITriggeredRerouter::GUIManip_TriggeredRerouter::onCmdUserDef(), GUILaneSpeedTrigger::GUIManip_LaneSpeedTrigger::onUpdPreDef(), GUICalibrator::GUIManip_Calibrator::onUpdPreDef(), GUILaneSpeedTrigger::GUIManip_LaneSpeedTrigger::onUpdUserDef(), GUICalibrator::GUIManip_Calibrator::onUpdUserDef(), and GUITriggeredRerouter::GUIManip_TriggeredRerouter::onUpdUserDef().
|
protected |
whether to show the window in full screen mode
Definition at line 142 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 168 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 150 of file GUIMainWindow.h.
Referenced by getBoldFont(), GUIMainWindow(), and ~GUIMainWindow().
|
protected |
Definition at line 165 of file GUIMainWindow.h.
Referenced by GUIMainWindow(), and ~GUIMainWindow().
|
protected |
Labels for the current cartesian and geo-coordinate.
Definition at line 159 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::closeAllWindows(), GNEApplicationWindow::closeAllWindows(), GUIApplicationWindow::dependentBuild(), GNEApplicationWindow::dependentBuild(), and getCartesianLabel().
|
protected |
Definition at line 160 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::create(), GNEApplicationWindow::create(), GUIApplicationWindow::dependentBuild(), and GNEApplicationWindow::dependentBuild().
|
protected |
Definition at line 159 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::closeAllWindows(), GNEApplicationWindow::closeAllWindows(), GUIApplicationWindow::dependentBuild(), GNEApplicationWindow::dependentBuild(), and getGeoLabel().
|
protected |
Definition at line 160 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::create(), GNEApplicationWindow::create(), GUIApplicationWindow::dependentBuild(), and GNEApplicationWindow::dependentBuild().
|
protected |
The gl-visual used.
Definition at line 163 of file GUIMainWindow.h.
Referenced by getGLVisual(), GNEApplicationWindow::~GNEApplicationWindow(), and GUIApplicationWindow::~GUIApplicationWindow().
|
protected |
Definition at line 144 of file GUIMainWindow.h.
Referenced by addGLChild(), GUIApplicationWindow::closeAllWindows(), GNEApplicationWindow::closeAllWindows(), GNEApplicationWindow::getView(), getViewByID(), getViewIDs(), getViews(), GUIApplicationWindow::handleEvent_SimulationLoaded(), GUIApplicationWindow::onCmdEditViewport(), GUIApplicationWindow::onCmdEditViewScheme(), GUIApplicationWindow::onCmdNetedit(), GNEApplicationWindow::onCmdOpenSUMOGUI(), and removeGLChild().
|
staticprotected |
the singleton window instance
Definition at line 180 of file GUIMainWindow.h.
Referenced by getInstance(), and GUIMainWindow().
|
protected |
Definition at line 165 of file GUIMainWindow.h.
Referenced by GUIMainWindow(), and ~GUIMainWindow().
|
protected |
information whether the locator should list internal structures
Definition at line 171 of file GUIMainWindow.h.
Referenced by listInternal(), and GUIApplicationWindow::onCmdListInternal().
|
protected |
information whether the locator should list parking vehicles
Definition at line 174 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::fillMenuBar(), listParking(), and GUIApplicationWindow::onCmdListParking().
|
protected |
information whether the locator should list teleporting vehicles
Definition at line 177 of file GUIMainWindow.h.
Referenced by listTeleporting(), and GUIApplicationWindow::onCmdListTeleporting().
|
protected |
The multi view panel.
Definition at line 153 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::dependentBuild(), GNEApplicationWindow::dependentBuild(), GUIApplicationWindow::fillMenuBar(), getActiveView(), GUIApplicationWindow::getBuildGLCanvas(), GNEApplicationWindow::getBuildGLCanvas(), GUIApplicationWindow::onCmdEditChosen(), GUIApplicationWindow::onCmdFullScreen(), GUIApplicationWindow::onCmdGaming(), GNEApplicationWindow::onCmdLocate(), GUIApplicationWindow::onCmdLocate(), GUIApplicationWindow::onCmdOpenShapes(), GUIApplicationWindow::onCmdShowStats(), GNEApplicationWindow::onKeyPress(), GUIApplicationWindow::onKeyPress(), GNEApplicationWindow::onKeyRelease(), GUIApplicationWindow::onKeyRelease(), GUIApplicationWindow::openNewView(), GNEApplicationWindow::openNewView(), and updateChildren().
|
protected |
Definition at line 165 of file GUIMainWindow.h.
Referenced by GUIMainWindow(), and ~GUIMainWindow().
|
protected |
The status bar.
Definition at line 156 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::dependentBuild(), GNEApplicationWindow::dependentBuild(), GUIApplicationWindow::fillMenuBar(), GNEApplicationWindow::fillMenuBar(), GUIApplicationWindow::onCmdFullScreen(), GUIApplicationWindow::onCmdGaming(), GUIApplicationWindow::onCmdOpenRecent(), GNEApplicationWindow::onCmdOpenRecent(), GUIApplicationWindow::onCmdSaveState(), GUIApplicationWindow::onCmdStart(), GUIApplicationWindow::onCmdStep(), GUIApplicationWindow::openNewView(), GUIApplicationWindow::setStatusBarText(), and GNEApplicationWindow::setStatusBarText().
|
protected |
Definition at line 165 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::buildToolBars(), GUIApplicationWindow::dependentBuild(), GNEApplicationWindow::dependentBuild(), GUIMainWindow(), and ~GUIMainWindow().
|
protected |
A lock to make the removal and addition of trackers secure.
Definition at line 147 of file GUIMainWindow.h.
Referenced by addChild(), GUIApplicationWindow::closeAllWindows(), GNEApplicationWindow::closeAllWindows(), removeChild(), and updateChildren().
|
protected |
Definition at line 145 of file GUIMainWindow.h.
Referenced by addChild(), GUIApplicationWindow::closeAllWindows(), GNEApplicationWindow::closeAllWindows(), removeChild(), and updateChildren().