#include <GUIMainWindow.h>

Definition at line 44 of file GUIMainWindow.h.
Public Member Functions | |
| void | addChild (FXMainWindow *child, bool updateOnSimStep=true) |
| void | addChild (FXMDIChild *child, bool updateOnSimStep=true) |
| Adds a further child window to the list. | |
| FXFont * | getBoldFont () |
| virtual FXGLCanvas * | getBuildGLCanvas () const =0 |
| FXLabel & | getCartesianLabel () |
| virtual SUMOTime | getCurrentSimTime () const =0 |
| FXLabel & | getGeoLabel () |
| FXGLVisual * | getGLVisual () const |
| GUIMainWindow (FXApp *a) | |
| bool | isGaming () const throw () |
| virtual bool | loadSelection (const std::string &file, std::string &msg)=0 throw () |
| Loads a selection from a given file. | |
| void | removeChild (FXMainWindow *child) |
| void | removeChild (FXMDIChild *child) |
| removes the given child window from the list | |
| virtual void | setStatusBarText (const std::string &) |
| void | updateChildren () |
| virtual | ~GUIMainWindow () |
Protected Member Functions | |
| GUIMainWindow () | |
Protected Attributes | |
| bool | myAmGaming |
| information whether the gui is currently in gaming mode | |
| FXFont * | myBoldFont |
| Font used for popup-menu titles. | |
| FXDockSite * | myBottomDock |
| FXLabel * | myCartesianCoordinate |
| Labels for the current cartesian and geo-coordinate. | |
| FXHorizontalFrame * | myCartesianFrame |
| FXLabel * | myGeoCoordinate |
| FXHorizontalFrame * | myGeoFrame |
| FXGLVisual * | myGLVisual |
| The gl-visual used. | |
| FXDockSite * | myLeftDock |
| FXMDIClient * | myMDIClient |
| The multi view panel. | |
| FXDockSite * | myRightDock |
| bool | myRunAtBegin |
| FXStatusBar * | myStatusbar |
| The status bar. | |
| std::vector< FXMDIChild * > | mySubWindows |
| FXDockSite * | myTopDock |
| MFXMutex | myTrackerLock |
| A lock to make the removal and addition of trackers secure. | |
| std::vector< FXMainWindow * > | myTrackerWindows |
| GUIMainWindow::GUIMainWindow | ( | FXApp * | a | ) |
Definition at line 45 of file GUIMainWindow.cpp.
References myBoldFont, myBottomDock, myLeftDock, myRightDock, and myTopDock.
00046 : FXMainWindow(a,"SUMO-gui main window",NULL,NULL,DECOR_ALL,20,20,600,400), 00047 myGLVisual(new FXGLVisual(a, VISUAL_DOUBLEBUFFER|VISUAL_STEREO)), 00048 myRunAtBegin(false), myAmGaming(false) { 00049 00050 FXFontDesc fdesc; 00051 getApp()->getNormalFont()->getFontDesc(fdesc); 00052 fdesc.weight = FXFont::Bold; 00053 myBoldFont = new FXFont(getApp(), fdesc); 00054 00055 myTopDock=new FXDockSite(this,LAYOUT_SIDE_TOP|LAYOUT_FILL_X); 00056 myBottomDock=new FXDockSite(this,LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X); 00057 myLeftDock=new FXDockSite(this,LAYOUT_SIDE_LEFT|LAYOUT_FILL_Y); 00058 myRightDock=new FXDockSite(this,LAYOUT_SIDE_RIGHT|LAYOUT_FILL_Y); 00059 }
| GUIMainWindow::~GUIMainWindow | ( | ) | [virtual] |
Definition at line 62 of file GUIMainWindow.cpp.
References myBoldFont, myBottomDock, myLeftDock, myRightDock, and myTopDock.
00062 { 00063 delete myBoldFont; 00064 delete myTopDock; 00065 delete myBottomDock; 00066 delete myLeftDock; 00067 delete myRightDock; 00068 }
| GUIMainWindow::GUIMainWindow | ( | ) | [inline, protected] |
| void GUIMainWindow::addChild | ( | FXMainWindow * | child, | |
| bool | updateOnSimStep = true | |||
| ) |
Definition at line 89 of file GUIMainWindow.cpp.
References MFXMutex::lock(), myTrackerLock, myTrackerWindows, and MFXMutex::unlock().
00089 { 00090 myTrackerLock.lock(); 00091 myTrackerWindows.push_back(child); 00092 myTrackerLock.unlock(); 00093 }
| void GUIMainWindow::addChild | ( | FXMDIChild * | child, | |
| bool | updateOnSimStep = true | |||
| ) |
Adds a further child window to the list.
Definition at line 73 of file GUIMainWindow.cpp.
References mySubWindows.
Referenced by GUIParameterTableWindow::closeBuilding(), and GUIParameterTracker::GUIParameterTracker().
00073 { 00074 mySubWindows.push_back(child); 00075 }
| FXFont * GUIMainWindow::getBoldFont | ( | ) |
Definition at line 107 of file GUIMainWindow.cpp.
References myBoldFont.
00107 { 00108 return myBoldFont; 00109 }
| virtual FXGLCanvas* GUIMainWindow::getBuildGLCanvas | ( | ) | const [pure virtual] |
Implemented in GUIApplicationWindow.
| FXLabel & GUIMainWindow::getCartesianLabel | ( | ) |
Definition at line 132 of file GUIMainWindow.cpp.
References myCartesianCoordinate.
Referenced by GUISUMOAbstractView::updatePositionInformation().
00132 { 00133 return *myCartesianCoordinate; 00134 }
| virtual SUMOTime GUIMainWindow::getCurrentSimTime | ( | ) | const [pure virtual] |
| FXLabel & GUIMainWindow::getGeoLabel | ( | ) |
Definition at line 138 of file GUIMainWindow.cpp.
References myGeoCoordinate.
Referenced by GUISUMOAbstractView::updatePositionInformation().
00138 { 00139 return *myGeoCoordinate; 00140 }
| FXGLVisual * GUIMainWindow::getGLVisual | ( | ) | const |
Definition at line 126 of file GUIMainWindow.cpp.
References myGLVisual.
Referenced by GUISUMOViewParent::init().
00126 { 00127 return myGLVisual; 00128 }
| bool GUIMainWindow::isGaming | ( | ) | const throw () |
Definition at line 144 of file GUIMainWindow.cpp.
References myAmGaming.
Referenced by GUISUMOAbstractView::onLeftBtnRelease().
00144 { 00145 return myAmGaming; 00146 }
| virtual bool GUIMainWindow::loadSelection | ( | const std::string & | file, | |
| std::string & | msg | |||
| ) | throw () [pure virtual] |
Loads a selection from a given file.
| [in] | file | The file to load the selection from |
| [out] | msg | The error message |
Implemented in GUIApplicationWindow.
Referenced by GUIDialog_GLChosenEditor::onCmdLoad().
| void GUIMainWindow::removeChild | ( | FXMainWindow * | child | ) |
Definition at line 97 of file GUIMainWindow.cpp.
References MFXMutex::lock(), myTrackerLock, myTrackerWindows, and MFXMutex::unlock().
00097 { 00098 myTrackerLock.lock(); 00099 std::vector<FXMainWindow*>::iterator i = 00100 std::find(myTrackerWindows.begin(), myTrackerWindows.end(), child); 00101 myTrackerWindows.erase(i); 00102 myTrackerLock.unlock(); 00103 }
| void GUIMainWindow::removeChild | ( | FXMDIChild * | child | ) |
removes the given child window from the list
Definition at line 79 of file GUIMainWindow.cpp.
References mySubWindows.
Referenced by GUIDialog_Breakpoints::~GUIDialog_Breakpoints(), GUIDialog_GLChosenEditor::~GUIDialog_GLChosenEditor(), GUIDialog_GLObjChooser::~GUIDialog_GLObjChooser(), GUIParameterTableWindow::~GUIParameterTableWindow(), GUIParameterTracker::~GUIParameterTracker(), GUISUMOViewParent::~GUISUMOViewParent(), and GUITLLogicPhasesTrackerWindow::~GUITLLogicPhasesTrackerWindow().
00079 { 00080 std::vector<FXMDIChild*>::iterator i = 00081 std::find(mySubWindows.begin(), mySubWindows.end(), child); 00082 if (i!=mySubWindows.end()) { 00083 mySubWindows.erase(i); 00084 } 00085 }
| virtual void GUIMainWindow::setStatusBarText | ( | const std::string & | ) | [inline, virtual] |
| void GUIMainWindow::updateChildren | ( | ) |
Definition at line 113 of file GUIMainWindow.cpp.
References MFXMutex::lock(), MID_SIMSTEP, myMDIClient, myTrackerLock, myTrackerWindows, and MFXMutex::unlock().
Referenced by GUIApplicationWindow::handleEvent_SimulationStep(), GUITriggeredRerouter::GUIManip_TriggeredRerouter::onCmdChangeOption(), GUILaneSpeedTrigger::GUIManip_LaneSpeedTrigger::onCmdChangeOption(), GUIEmitter::GUIManip_TriggeredEmitter::onCmdChangeOption(), GUIDialog_GLChosenEditor::onCmdClear(), GUIDialog_GLChosenEditor::onCmdDeselect(), GUILaneSpeedTrigger::GUIManip_LaneSpeedTrigger::onCmdPreDef(), GUITriggeredRerouter::GUIManip_TriggeredRerouter::onCmdUserDef(), GUILaneSpeedTrigger::GUIManip_LaneSpeedTrigger::onCmdUserDef(), GUIEmitter::GUIManip_TriggeredEmitter::onCmdUserDef(), GUILaneSpeedTrigger::GUIManip_LaneSpeedTrigger::onUpdPreDef(), GUITriggeredRerouter::GUIManip_TriggeredRerouter::onUpdUserDef(), GUILaneSpeedTrigger::GUIManip_LaneSpeedTrigger::onUpdUserDef(), and GUIEmitter::GUIManip_TriggeredEmitter::onUpdUserDef().
00113 { 00114 // inform views 00115 myMDIClient->forallWindows(this, FXSEL(SEL_COMMAND, MID_SIMSTEP), 0); 00116 // inform other windows 00117 myTrackerLock.lock(); 00118 for (size_t i=0; i<myTrackerWindows.size(); i++) { 00119 myTrackerWindows[i]->handle(this,FXSEL(SEL_COMMAND,MID_SIMSTEP), 0); 00120 } 00121 myTrackerLock.unlock(); 00122 }
bool GUIMainWindow::myAmGaming [protected] |
information whether the gui is currently in gaming mode
Definition at line 108 of file GUIMainWindow.h.
Referenced by isGaming(), and GUIApplicationWindow::onCmdGaming().
FXFont* GUIMainWindow::myBoldFont [protected] |
Font used for popup-menu titles.
Definition at line 87 of file GUIMainWindow.h.
Referenced by getBoldFont(), GUIMainWindow(), and ~GUIMainWindow().
FXDockSite * GUIMainWindow::myBottomDock [protected] |
Definition at line 103 of file GUIMainWindow.h.
Referenced by GUIMainWindow(), and ~GUIMainWindow().
FXLabel* GUIMainWindow::myCartesianCoordinate [protected] |
Labels for the current cartesian and geo-coordinate.
Definition at line 96 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::closeAllWindows(), GUIApplicationWindow::dependentBuild(), and getCartesianLabel().
FXHorizontalFrame* GUIMainWindow::myCartesianFrame [protected] |
Definition at line 97 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::create(), and GUIApplicationWindow::dependentBuild().
FXLabel * GUIMainWindow::myGeoCoordinate [protected] |
Definition at line 96 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::closeAllWindows(), GUIApplicationWindow::dependentBuild(), and getGeoLabel().
FXHorizontalFrame * GUIMainWindow::myGeoFrame [protected] |
Definition at line 97 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::create(), and GUIApplicationWindow::dependentBuild().
FXGLVisual* GUIMainWindow::myGLVisual [protected] |
The gl-visual used.
Definition at line 101 of file GUIMainWindow.h.
Referenced by getGLVisual(), and GUIApplicationWindow::~GUIApplicationWindow().
FXDockSite * GUIMainWindow::myLeftDock [protected] |
Definition at line 103 of file GUIMainWindow.h.
Referenced by GUIMainWindow(), and ~GUIMainWindow().
FXMDIClient* GUIMainWindow::myMDIClient [protected] |
The multi view panel.
Definition at line 90 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::dependentBuild(), GUIApplicationWindow::fillMenuBar(), GUIApplicationWindow::getBuildGLCanvas(), GUIApplicationWindow::openNewView(), and updateChildren().
FXDockSite * GUIMainWindow::myRightDock [protected] |
Definition at line 103 of file GUIMainWindow.h.
Referenced by GUIMainWindow(), and ~GUIMainWindow().
bool GUIMainWindow::myRunAtBegin [protected] |
Definition at line 105 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::handleEvent_SimulationLoaded(), and GUIApplicationWindow::loadOnStartup().
FXStatusBar* GUIMainWindow::myStatusbar [protected] |
The status bar.
Definition at line 93 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::dependentBuild(), GUIApplicationWindow::fillMenuBar(), GUIApplicationWindow::onCmdOpenRecent(), GUIApplicationWindow::onCmdStart(), GUIApplicationWindow::onCmdStep(), GUIApplicationWindow::openNewView(), and GUIApplicationWindow::setStatusBarText().
std::vector<FXMDIChild*> GUIMainWindow::mySubWindows [protected] |
Definition at line 81 of file GUIMainWindow.h.
Referenced by addChild(), GUIApplicationWindow::closeAllWindows(), and removeChild().
FXDockSite* GUIMainWindow::myTopDock [protected] |
Definition at line 103 of file GUIMainWindow.h.
Referenced by GUIApplicationWindow::buildToolBars(), GUIApplicationWindow::dependentBuild(), GUIMainWindow(), and ~GUIMainWindow().
MFXMutex GUIMainWindow::myTrackerLock [protected] |
A lock to make the removal and addition of trackers secure.
Definition at line 84 of file GUIMainWindow.h.
Referenced by addChild(), GUIApplicationWindow::closeAllWindows(), removeChild(), and updateChildren().
std::vector<FXMainWindow*> GUIMainWindow::myTrackerWindows [protected] |
Definition at line 82 of file GUIMainWindow.h.
Referenced by addChild(), GUIApplicationWindow::closeAllWindows(), removeChild(), and updateChildren().
1.5.6