![]() |
SUMO - Simulation of Urban MObility
|
#include <GUIMainWindow.h>
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) |
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 |
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 GUIMainWindow * | getInstance () |
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 GUIMainWindow * | myInstance = 0 |
the singleton window instance More... | |
Definition at line 54 of file GUIMainWindow.h.
GUIMainWindow::GUIMainWindow | ( | FXApp * | a | ) |
Definition at line 64 of file GUIMainWindow.cpp.
References myBoldFont, myBottomDock, myInstance, myLeftDock, myRightDock, and myTopDock.
|
virtual |
Definition at line 89 of file GUIMainWindow.cpp.
References myBoldFont, myBottomDock, myLeftDock, myRightDock, and myTopDock.
|
inlineprotected |
Definition at line 167 of file GUIMainWindow.h.
References setWindowSizeAndPos().
void GUIMainWindow::addChild | ( | FXMDIChild * | child, |
bool | updateOnSimStep = true |
||
) |
Adds a further child window to the list.
Definition at line 100 of file GUIMainWindow.cpp.
References mySubWindows.
Referenced by GUIParameterTableWindow::closeBuilding(), and GUITLLogicPhasesTrackerWindow::GUITLLogicPhasesTrackerWindow().
void GUIMainWindow::addChild | ( | FXMainWindow * | child, |
bool | updateOnSimStep = true |
||
) |
Definition at line 115 of file GUIMainWindow.cpp.
References MFXMutex::lock(), myTrackerLock, myTrackerWindows, and MFXMutex::unlock().
GUISUMOAbstractView * GUIMainWindow::getActiveView | ( | ) | const |
get the active view or 0
Definition at line 199 of file GUIMainWindow.cpp.
References GUIGlChildWindow::getView(), and myMDIClient.
Referenced by GUIVehicle::drawOutsideNetwork(), and sendBlockingEvent().
FXFont * GUIMainWindow::getBoldFont | ( | ) |
Definition at line 153 of file GUIMainWindow.cpp.
References myBoldFont.
Referenced by GUIGlObject::buildPopupHeader(), GNEDeleteFrame::createPopUpMenu(), and GNEInspectorFrame::createPopUpMenu().
|
pure virtual |
Implemented in GNEApplicationWindow, and GUIApplicationWindow.
FXLabel & GUIMainWindow::getCartesianLabel | ( | ) |
Definition at line 178 of file GUIMainWindow.cpp.
References myCartesianCoordinate.
Referenced by setStatusBarText(), and GUISUMOAbstractView::updatePositionInformation().
|
pure virtual |
Implemented in GNEApplicationWindow, and GUIApplicationWindow.
Referenced by GUIParam_PopupMenuInterface::onCmdOpenTracker().
|
inlinevirtual |
Returns the delay (should be overwritten by subclasses if applicable)
Reimplemented in GUIApplicationWindow.
Definition at line 109 of file GUIMainWindow.h.
Referenced by GUISUMOAbstractView::getDelay(), and GUIViewTraffic::saveFrame().
FXLabel & GUIMainWindow::getGeoLabel | ( | ) |
Definition at line 184 of file GUIMainWindow.cpp.
References myGeoCoordinate.
Referenced by setStatusBarText(), and GUISUMOAbstractView::updatePositionInformation().
FXGLVisual * GUIMainWindow::getGLVisual | ( | ) | const |
Definition at line 172 of file GUIMainWindow.cpp.
References myGLVisual.
Referenced by GUISUMOViewParent::init().
|
static |
Definition at line 190 of file GUIMainWindow.cpp.
References myInstance.
Referenced by GUIVehicle::drawOutsideNetwork(), TraCIServerAPI_GUI::getNamedView(), GUITexturesHelper::getTextureID(), listTeleporting(), TraCIServerAPI_GUI::processGet(), TraCIServerAPI_GUI::processSet(), and GUIMessageWindow::setCursorPos().
FXMDIChild * GUIMainWindow::getViewByID | ( | const std::string & | id | ) | const |
Definition at line 142 of file GUIMainWindow.cpp.
References mySubWindows.
Referenced by TraCIServerAPI_GUI::getNamedView(), and GUIMessageWindow::setCursorPos().
std::vector< std::string > GUIMainWindow::getViewIDs | ( | ) | const |
Definition at line 132 of file GUIMainWindow.cpp.
References mySubWindows.
Referenced by TraCIServerAPI_GUI::processGet(), and GUIMessageWindow::setCursorPos().
|
inline |
return whether the gui is in gaming mode
Definition at line 85 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 90 of file GUIMainWindow.h.
References myListInternal.
Referenced by GUISUMOViewParent::onCmdLocate().
|
inline |
return whether to list parking vehicles
Definition at line 95 of file GUIMainWindow.h.
References myListParking.
Referenced by GUIApplicationWindow::fillMenuBar(), and GUISUMOViewParent::onCmdLocate().
|
inline |
return whether to list teleporting vehicles
Definition at line 100 of file GUIMainWindow.h.
References getInstance(), and myListTeleporting.
Referenced by GUISUMOViewParent::onCmdLocate().
void GUIMainWindow::removeChild | ( | FXMDIChild * | child | ) |
removes the given child window from the list
Definition at line 106 of file GUIMainWindow.cpp.
References mySubWindows.
Referenced by GNEViewParent::~GNEViewParent(), GUIDialog_Breakpoints::~GUIDialog_Breakpoints(), GUIDialog_GLChosenEditor::~GUIDialog_GLChosenEditor(), GUIDialog_GLObjChooser::~GUIDialog_GLObjChooser(), GUIParameterTableWindow::~GUIParameterTableWindow(), GUIParameterTracker::~GUIParameterTracker(), GUISUMOViewParent::~GUISUMOViewParent(), and GUITLLogicPhasesTrackerWindow::~GUITLLogicPhasesTrackerWindow().
void GUIMainWindow::removeChild | ( | FXMainWindow * | child | ) |
Definition at line 123 of file GUIMainWindow.cpp.
References MFXMutex::lock(), myTrackerLock, myTrackerWindows, and MFXMutex::unlock().
|
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 120 of file GUIMainWindow.h.
References getActiveView(), and UNUSED_PARAMETER.
Referenced by TraCIServerAPI_GUI::processSet().
|
inlinevirtual |
Sets the delay of the parent application.
Reimplemented in GUIApplicationWindow.
Definition at line 115 of file GUIMainWindow.h.
Referenced by GUISUMOAbstractView::setDelay().
|
inlinevirtual |
Reimplemented in GUIApplicationWindow, and GNEApplicationWindow.
Definition at line 79 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 208 of file GUIMainWindow.cpp.
References TplCheck::_str2int(), TplConvert::_str2int(), OptionsCont::getOptions(), OptionsCont::getStringVector(), OptionsCont::isSet(), MAX2(), MIN2(), and WRITE_ERROR.
Referenced by GNEApplicationWindow::create(), GUIApplicationWindow::create(), and GUIMainWindow().
void GUIMainWindow::updateChildren | ( | ) |
Definition at line 159 of file GUIMainWindow.cpp.
References MFXMutex::lock(), MID_SIMSTEP, myMDIClient, myTrackerLock, myTrackerWindows, and MFXMutex::unlock().
Referenced by 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 |
information whether the gui is currently in gaming mode
Definition at line 152 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 134 of file GUIMainWindow.h.
Referenced by getBoldFont(), GUIMainWindow(), and ~GUIMainWindow().
|
protected |
Definition at line 149 of file GUIMainWindow.h.
Referenced by GUIMainWindow(), and ~GUIMainWindow().
|
protected |
Labels for the current cartesian and geo-coordinate.
Definition at line 143 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::closeAllWindows(), GNEApplicationWindow::closeAllWindows(), GNEApplicationWindow::dependentBuild(), GUIApplicationWindow::dependentBuild(), and getCartesianLabel().
|
protected |
Definition at line 144 of file GUIMainWindow.h.
Referenced by GNEApplicationWindow::create(), GUIApplicationWindow::create(), GNEApplicationWindow::dependentBuild(), and GUIApplicationWindow::dependentBuild().
|
protected |
Definition at line 143 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::closeAllWindows(), GNEApplicationWindow::closeAllWindows(), GNEApplicationWindow::dependentBuild(), GUIApplicationWindow::dependentBuild(), and getGeoLabel().
|
protected |
Definition at line 144 of file GUIMainWindow.h.
Referenced by GNEApplicationWindow::create(), GUIApplicationWindow::create(), GNEApplicationWindow::dependentBuild(), and GUIApplicationWindow::dependentBuild().
|
protected |
The gl-visual used.
Definition at line 147 of file GUIMainWindow.h.
Referenced by getGLVisual(), GNEApplicationWindow::~GNEApplicationWindow(), and GUIApplicationWindow::~GUIApplicationWindow().
|
staticprotected |
the singleton window instance
Definition at line 164 of file GUIMainWindow.h.
Referenced by getInstance(), and GUIMainWindow().
|
protected |
Definition at line 149 of file GUIMainWindow.h.
Referenced by GUIMainWindow(), and ~GUIMainWindow().
|
protected |
information whether the locator should list internal structures
Definition at line 155 of file GUIMainWindow.h.
Referenced by listInternal(), and GUIApplicationWindow::onCmdListInternal().
|
protected |
information whether the locator should list parking vehicles
Definition at line 158 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::fillMenuBar(), listParking(), and GUIApplicationWindow::onCmdListParking().
|
protected |
information whether the locator should list teleporting vehicles
Definition at line 161 of file GUIMainWindow.h.
Referenced by listTeleporting(), and GUIApplicationWindow::onCmdListTeleporting().
|
protected |
The multi view panel.
Definition at line 137 of file GUIMainWindow.h.
Referenced by GNEApplicationWindow::dependentBuild(), GUIApplicationWindow::dependentBuild(), GUIApplicationWindow::fillMenuBar(), getActiveView(), GUIApplicationWindow::getBuildGLCanvas(), GNEApplicationWindow::getBuildGLCanvas(), GUIApplicationWindow::onCmdEditChosen(), GUIApplicationWindow::onCmdFullScreen(), GUIApplicationWindow::onCmdGaming(), GNEApplicationWindow::onCmdLocate(), GUIApplicationWindow::onCmdLocate(), GUIApplicationWindow::onCmdShowStats(), GNEApplicationWindow::onKeyPress(), GUIApplicationWindow::onKeyPress(), GNEApplicationWindow::onKeyRelease(), GUIApplicationWindow::onKeyRelease(), GUIApplicationWindow::openNewView(), GNEApplicationWindow::openNewView(), and updateChildren().
|
protected |
Definition at line 149 of file GUIMainWindow.h.
Referenced by GUIMainWindow(), and ~GUIMainWindow().
|
protected |
The status bar.
Definition at line 140 of file GUIMainWindow.h.
Referenced by GNEApplicationWindow::dependentBuild(), GUIApplicationWindow::dependentBuild(), GNEApplicationWindow::fillMenuBar(), GUIApplicationWindow::fillMenuBar(), GUIApplicationWindow::onCmdFullScreen(), GUIApplicationWindow::onCmdGaming(), GNEApplicationWindow::onCmdOpenRecent(), GUIApplicationWindow::onCmdOpenRecent(), GUIApplicationWindow::onCmdStart(), GUIApplicationWindow::onCmdStep(), GUIApplicationWindow::openNewView(), GNEApplicationWindow::setStatusBarText(), and GUIApplicationWindow::setStatusBarText().
|
protected |
Definition at line 128 of file GUIMainWindow.h.
Referenced by addChild(), GUIApplicationWindow::closeAllWindows(), GNEApplicationWindow::closeAllWindows(), GNEApplicationWindow::getView(), getViewByID(), getViewIDs(), GUIApplicationWindow::onCmdNetedit(), and removeChild().
|
protected |
Definition at line 149 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::buildToolBars(), GNEApplicationWindow::dependentBuild(), GUIApplicationWindow::dependentBuild(), GUIMainWindow(), and ~GUIMainWindow().
|
protected |
A lock to make the removal and addition of trackers secure.
Definition at line 131 of file GUIMainWindow.h.
Referenced by addChild(), GUIApplicationWindow::closeAllWindows(), GNEApplicationWindow::closeAllWindows(), removeChild(), and updateChildren().
|
protected |
Definition at line 129 of file GUIMainWindow.h.
Referenced by addChild(), GUIApplicationWindow::closeAllWindows(), GNEApplicationWindow::closeAllWindows(), removeChild(), and updateChildren().