98#define MIN_DRAW_DELAY 20
135 FXMAPFUNC(SEL_COMMAND,
MID_NEW_OSGVIEW, GUIApplicationWindow::onCmdNewOSG),
219FXIMPLEMENT(
GUIApplicationWindow, FXMainWindow, GUIApplicationWindowMap, ARRAYNUMBER(GUIApplicationWindowMap))
231 myLoadThread(nullptr), myRunThread(nullptr),
234 myGuiSettingsFileMTime(-2),
235 myAlternateSimDelay(0.),
236 myRecentNetworksAndConfigs(a,
"files"),
237 myConfigPattern(configPattern),
238 hadDependentBuild(false),
239 myShowTimeAsHMS(false),
240 myHaveNotifiedAboutSimEnd(false),
243 myPreviousCollisionNumber(0),
246 myEmergencyVehicleCount(0),
254 a->setTooltipTime(1000000000);
255 a->setTooltipPause(1000000000);
287 button->setBackColor(FXRGBA(253, 255, 206, 255));
293 myGeoCoordinate =
new FXLabel(
myGeoFrame,
TL(
"N/A\t\tOriginal coordinate (before coordinate transformation in netconvert)"),
nullptr, LAYOUT_CENTER_Y);
340 gCurrentFolder = getApp()->reg().readStringEntry(
"SETTINGS",
"basedir",
"");
341 FXMainWindow::create();
359 FXint textWidth = getApp()->getNormalFont()->getTextWidth(
"8", 1) * 24;
366 show(PLACEMENT_DEFAULT);
368 if (getApp()->reg().readIntEntry(
"SETTINGS",
"maximized", 0) == 1) {
372 myShowTimeAsHMS = (getApp()->reg().readIntEntry(
"gui",
"timeasHMS", 0) == 1);
374 const std::string& onlineMaps = getApp()->reg().readStringEntry(
"gui",
"onlineMaps",
"");
375 for (
const std::string& entry :
StringTokenizer(onlineMaps,
"\n").getVector()) {
380 myOnlineMaps[
"GeoHack"] =
"https://geohack.toolforge.org/geohack.php?params=%lat;%lon_scale:1000";
381 myOnlineMaps[
"GoogleSat"] =
"https://www.google.com/maps?ll=%lat,%lon&t=h&z=18";
382 myOnlineMaps[
"OSM"] =
"https://www.openstreetmap.org/?mlat=%lat&mlon=%lon&zoom=18&layers=M";
427 FXMainWindow::detach();
439 TL(
"New Window"),
"Ctrl+Shift+N",
TL(
"Open a new sumo-gui window."),
443 TL(
"&Open Simulation..."),
"Ctrl+O",
TL(
"Open a simulation (Configuration file)."),
446 TL(
"Open &Network..."),
"Ctrl+N",
TL(
"Open a network."),
449 TL(
"Open Shapes "),
"Ctrl+P",
TL(
"Load POIs and Polygons for visualization."),
452 TL(
"Open EdgeData "),
"Ctrl+U",
TL(
"Load edge related data for visualization."),
455 TL(
"&Reload"),
"Ctrl+R",
TL(
"Reloads the simulation / the network."),
458 TL(
"Quick-Reload"),
"Ctrl+0",
TL(
"Reloads the simulation (but not network)."),
462 TL(
"Save Configuration"),
"Ctrl+Shift+S",
TL(
"Save current options as a configuration file."),
465 TL(
"Close"),
"Ctrl+W",
TL(
"Close the simulation."),
468 FXMenuSeparator* sep1 =
new FXMenuSeparator(
myFileMenu);
469 sep1->setSelector(FXRecentFiles::ID_ANYFILES);
487 TL(
"&Quit"),
"Ctrl+Q",
TL(
"Quit the Application."),
493 for (
const auto& vehicleClass : vehicleClasses) {
500 TL(
"Edit Selected..."),
"Ctrl+E",
TL(
"Opens a dialog for editing the list of selected items."),
503 TL(
"Select lanes which allow...\t\tOpens a menu for selecting a vehicle class by which to selected lanes."),
507 TL(
"Edit Breakpoints"),
"Ctrl+B",
TL(
"Opens a dialog for editing breakpoints."),
510 TL(
"Edit Visualisation"),
"F9",
TL(
"Opens a dialog for editing visualization settings."),
513 TL(
"Edit Viewport"),
"Ctrl+I",
TL(
"Opens a dialog for editing viewing area, zoom and rotation."),
517 TL(
"Open in netedit"),
"Ctrl+T",
TL(
"Opens the netedit application with the current network."),
524 TL(
"Application Settings"),
"Ctrl+H",
TL(
"Open a Dialog for Application Settings editing."),
527 TL(
"Gaming Mode\tCtrl+G\tToggle gaming mode on/off."),
530 TL(
"Full Screen Mode"),
"Ctrl+F",
TL(
"Toggle full screen mode on/off."),
537 TL(
"&Junctions"),
"Shift+J",
TL(
"Open a Dialog for Locating a Junction."),
540 TL(
"&Edges"),
"Shift+E",
TL(
"Open a Dialog for Locating an Edge."),
543 TL(
"&Vehicles"),
"Shift+V",
TL(
"Open a Dialog for Locating a Vehicle."),
546 TL(
"&Persons"),
"Shift+P",
TL(
"Open a Dialog for Locating a Person."),
549 TL(
"&Container"),
"Shift+C",
TL(
"Open a Dialog for Locating a Container."),
552 TL(
"&TLS"),
"Shift+T",
TL(
"Open a Dialog for Locating a Traffic Light."),
555 TL(
"&Additional"),
"Shift+A",
TL(
"Open a Dialog for Locating an Additional Structure."),
558 TL(
"P&oI"),
"Shift+O",
TL(
"Open a Dialog for Locating a Point of Interest."),
561 TL(
"Po&lygon"),
"Shift+L",
TL(
"Open a Dialog for Locating a Polygon."),
565 TL(
"Show Internal Structures\t\tShow internal junctions and streets in locator dialog."),
568 TL(
"Show Parking Vehicles\t\tShow parking vehicles in locator dialog."),
572 TL(
"Show vehicles outside the road network\t\tShow vehicles that are teleporting or driving remote-controlled outside the road network in locator dialog."),
581 TL(
"Run"),
"A,space",
TL(
"Start/ Resume the simulation."),
584 TL(
"Stop"),
"S,space",
TL(
"Halt the simulation."),
587 TL(
"Step"),
"D",
TL(
"Perform one simulation step."),
590 TL(
"Delay+"),
"PgUp",
TL(
"Increase simulation step delay."),
nullptr,
this,
MID_DELAY_INC);
592 TL(
"Delay-"),
"PgDn",
TL(
"Decrease simulation step delay."),
nullptr,
this,
MID_DELAY_DEC);
594 TL(
"Save"),
"",
TL(
"Save the current simulation state to a file."),
597 TL(
"Load"),
"",
TL(
"Load simulation state for the current network from file."),
604 TL(
"Show Status Line\t\tToggle the Status Bar on/off."),
607 TL(
"Show Message Window\t\tToggle the Message Window on/off."),
610 TL(
"Show Simulation Time\t\tToggle the Simulation Time on/off."),
613 TL(
"Show Simulation Delay\t\tToggle the Simulation Delay Entry on/off."),
618 TL(
"Tile &Horizontally"),
"",
"",
621 TL(
"Tile &Vertically"),
"",
"",
624 TL(
"Cascade"),
"",
"",
628 TL(
"&Close"),
"",
"",
630 FXMenuSeparator* sep2 =
new FXMenuSeparator(
myWindowMenu);
632 sep2->setSelector(FXMDIClient::ID_MDI_ANY);
641 TL(
"Clear Message Window"),
"",
TL(
"Clear the message window."),
736 new FXLabel(
myToolBar8,
TL(
"Scale Traffic:\t\tScale traffic from flows and vehicles that are loaded incrementally from route files."),
nullptr, LAYOUT_TOP | LAYOUT_LEFT);
761 new FXLabel(
myToolBar6,
TL(
"Waiting Time:\t\tTime spent waiting accumulated for all vehicles"),
nullptr, LAYOUT_TOP | LAYOUT_LEFT);
773 new FXLabel(
myToolBar7,
TL(
"Time Loss:\t\tTime lost due to being unable to drive with maximum speed for all vehicles"),
nullptr, LAYOUT_TOP | LAYOUT_LEFT);
785 new FXLabel(
myToolBar9,
TL(
"Distance (km):\t\tTotal distance driven by DRT vehicles"),
nullptr, LAYOUT_TOP | LAYOUT_LEFT);
797 new FXLabel(
myToolBar10,
TL(
"Emergency Vehicle waiting time:\t\tTime spent waiting accumulated for emergency vehicles"),
nullptr, LAYOUT_TOP | LAYOUT_LEFT);
811 getApp()->reg().writeStringEntry(
"SETTINGS",
"basedir",
gCurrentFolder.text());
812 getApp()->reg().writeIntEntry(
"SETTINGS",
"maximized", isMaximized() ? 1 : 0);
813 getApp()->reg().writeIntEntry(
"gui",
"timeasHMS",
myShowTimeAsHMS ? 1 : 0);
822 FXMenuCommand* mc =
dynamic_cast<FXMenuCommand*
>(menu);
823 if (mc->getText() ==
"Edit Selected...") {
832 const std::vector<MSLane*>& lanes = (*i)->getLanes();
833 for (std::vector<MSLane*>::const_iterator it = lanes.begin(); it != lanes.end(); ++it) {
920 FXRegistry reg(
"SUMO netedit",
"netedit");
927 std::string netedit =
"netedit";
928 const char* sumoPath = getenv(
"SUMO_HOME");
929 if (sumoPath !=
nullptr) {
930 std::string newPath = std::string(sumoPath) +
"/bin/netedit";
932 netedit =
"\"" + newPath +
"\"";
941 cmd =
"start /B \"\" " + cmd;
952 FXRegistry reg(
"SUMO sumo-gui",
"sumo-gui");
953 std::string sumo_gui =
"sumo-gui";
954 const char* sumoPath = getenv(
"SUMO_HOME");
955 if (sumoPath !=
nullptr) {
956 std::string newPath = std::string(sumoPath) +
"/bin/sumo_gui";
958 sumo_gui =
"\"" + newPath +
"\"";
961 std::string cmd = sumo_gui;
967 cmd =
"start /B \"\" " + cmd;
979 FXFileDialog opendialog(
this,
TL(
"Open Simulation Configuration"));
981 opendialog.setSelectMode(SELECTFILE_EXISTING);
986 if (opendialog.execute()) {
988 std::string file = opendialog.getFilename().text();
999 FXFileDialog opendialog(
this,
TL(
"Open Network"));
1001 opendialog.setSelectMode(SELECTFILE_EXISTING);
1002 opendialog.setPatternList(
"SUMO nets (*.net.xml,*.net.xml.gz)\nAll files (*)");
1006 if (opendialog.execute()) {
1008 std::string file = opendialog.getFilename().text();
1019 FXFileDialog opendialog(
this,
TL(
"Open Shapes"));
1021 opendialog.setSelectMode(SELECTFILE_EXISTING);
1022 opendialog.setPatternList(
"Additional files (*.xml,*.xml.gz)\nAll files (*)");
1026 if (opendialog.execute()) {
1028 std::string file = opendialog.getFilename().text();
1049 FXFileDialog opendialog(
this,
TL(
"Open EdgeData"));
1051 opendialog.setSelectMode(SELECTFILE_EXISTING);
1052 opendialog.setPatternList(
"EdgeData files (*.xml,*.xml.gz)\nAll files (*)");
1056 if (opendialog.execute()) {
1058 std::string file = opendialog.getFilename().text();
1077 getApp()->beginWaitCursor();
1102 myStatusbar->getStatusLine()->setText(
TL(
"Already loading!"));
1105 std::string file((
const char*)ptr);
1114 FXFileDialog opendialog(
this,
TL(
"Save SUMO Configuration"));
1116 opendialog.setSelectMode(SELECTFILE_ANY);
1117 opendialog.setPatternList(
"Config (*.sumocfg)");
1125 opendialog.getPatternText(opendialog.getCurrentPattern()).after(
'.').before(
')')).text();
1147 sender->handle(
this,
1148 myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1156 sender->handle(
this,
1158 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1166 sender->handle(
this,
1167 myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1175 sender->handle(
this,
1177 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1187 myStatusbar->getStatusLine()->setText(
TL(
"No simulation loaded!"));
1196 getApp()->forceRefresh();
1204 getApp()->forceRefresh();
1213 myStatusbar->getStatusLine()->setText(
TL(
"No simulation loaded!"));
1229 FXFileDialog opendialog(
this,
TL(
"Save Simulation State"));
1231 opendialog.setSelectMode(SELECTFILE_ANY);
1232 opendialog.setPatternList(
"GZipped State (*.xml.gz)\nXML State (*.xml)");
1241 opendialog.getPatternText(opendialog.getCurrentPattern()).after(
'.').before(
')')).text();
1250 FXFileDialog opendialog(
this,
TL(
"Load Simulation State"));
1252 opendialog.setSelectMode(SELECTFILE_ANY);
1253 opendialog.setPatternList(
"GZipped State (*.xml.gz)\nXML State (*.xml)");
1257 if (opendialog.execute() && FXStat::exists(opendialog.getFilename())) {
1259 const std::string file = opendialog.getFilename().text();
1264 setStatusBarText(
"Failed to load state from '" + file +
"' (" + e.what() +
")");
1348 sender->handle(
this,
1350 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1361 sender->handle(
this,
1363 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1374 sender->handle(
this,
1376 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1385 sender->handle(
this, disable ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1433 d->show(PLACEMENT_OWNER);
1517 getApp()->reg().writeIntEntry(
"SETTINGS",
"x", getX());
1518 getApp()->reg().writeIntEntry(
"SETTINGS",
"y", getY());
1519 getApp()->reg().writeIntEntry(
"SETTINGS",
"width", getWidth());
1520 getApp()->reg().writeIntEntry(
"SETTINGS",
"height", getHeight());
1522 setDecorations(DECOR_NONE);
1523 place(PLACEMENT_MAXIMIZED);
1543 place(PLACEMENT_VISIBLE);
1544 setDecorations(DECOR_ALL);
1549 setWidth(getApp()->reg().readIntEntry(
"SETTINGS",
"width", 600));
1550 setHeight(getApp()->reg().readIntEntry(
"SETTINGS",
"height", 400));
1551 setX(getApp()->reg().readIntEntry(
"SETTINGS",
"x", 150));
1552 setY(getApp()->reg().readIntEntry(
"SETTINGS",
"y", 150));
1587GUIApplicationWindow::onCmdNewOSG(FXObject*, FXSelector,
void*) {
1598 about->show(PLACEMENT_OWNER);
1606 hall->show(PLACEMENT_OWNER);
1612 FXEvent*
event = (FXEvent*)ptr;
1614 setDNDData(FROM_CLIPBOARD, event->target,
string);
1662 FXComboBox* sCombo = v->getColoringSchemesCombo();
1665 sCombo->setCurrentItem(index);
1694 if (ec->
myNet ==
nullptr) {
1725 if (ec->
mySettingsFiles.size() > 0 && (!
myIsReload || myGuiSettingsFileMTime < mTime || ec->mySettingsFiles.size() > 1)) {
1739 if (view ==
nullptr) {
1747 sCombo->setCurrentItem(index);
1778 std::vector<SUMOTime> breakpoints;
1783 breakpoints.push_back(t);
1785 std::sort(breakpoints.begin(), breakpoints.end());
1793 setTitle(
"SUMO Interactive Traffic Light");
1795 setTitle(
"SUMO Interactive Demand-Responsive-Transport");
1804 off.
set(getApp()->reg().readRealEntry(
"viewport",
"x"),
1805 getApp()->reg().readRealEntry(
"viewport",
"y"),
1806 getApp()->reg().readRealEntry(
"viewport",
"z"));
1814 (*it)->setText(
"-");
1823 getApp()->endWaitCursor();
1837 if (t - myLastStepEventMillis < MIN_DRAW_DELAY && myRunThread->simulationIsStopable()) {
1846 if (backlog > running) {
1876 getApp()->forceRefresh();
1909 "\nDo you want to close all open files and views?";
1910 FXuint answer = FXMessageBox::question(
this, MBOX_YES_NO,
TL(
"Simulation ended"),
"%s", text.c_str());
1924#ifdef HAVE_DANGEROUS_SOUNDS
1927 for (; it != end; ++it) {
1997 getApp()->beginWaitCursor();
2012 myStatusbar->getStatusLine()->setText(
TL(
"No simulation loaded!"));
2022 if (caption ==
"") {
2025 FXuint opts = MDI_TRACKING;
2029 if (oldView !=
nullptr) {
2061 (*it)->setText(
"-");
2076 for (FXMainWindow*
const window : trackerWindows) {
2100 return getApp()->getDefaultCursor(DEF_ARROW_CURSOR);
2129 myStatusbar->getStatusLine()->setText(text.c_str());
2130 myStatusbar->getStatusLine()->setNormalText(text.c_str());
2159 std::ostringstream str;
2160 str << std::setfill(
'0');
2168 str << std::setw(2);
2169 str << time / 3600000 <<
'-';
2171 str << std::setw(2) << time / 60000 <<
'-';
2174 str << std::setw(2) << time / 1000;
2175 if (!hideFraction) {
2176 str <<
'.' << std::setw(3) << time % 1000;
2183 if (press !=
nullptr) {
2186 if (release !=
nullptr) {
2193 FXEvent* e = (FXEvent*) ptr;
2196 if (e->code == FX::KEY_Page_Up) {
2198 }
else if (e->code == FX::KEY_Page_Down) {
2202 const bool ignoreSimple =
myAmGaming && (e->state & (CONTROLMASK | SHIFTMASK | ALTMASK)) == 0;
2203 const long handled = ignoreSimple ? 0 : FXMainWindow::onKeyPress(o, sel, ptr);
2204 if (handled == 0 &&
myMDIClient->numChildren() > 0) {
2209 if (!ignoreSimple) {
2223 const long handled = FXMainWindow::onKeyRelease(o, sel, ptr);
2224 if (handled == 0 &&
myMDIClient->numChildren() > 0) {
2225 FXEvent* e = (FXEvent*) ptr;
2258const std::vector<SUMOTime>
@ MID_HOTKEY_CTRL_Q_CLOSE
Main window closes.
@ ID_RUNTHREAD_EVENT
The Simulation execution thread.
@ MID_LOCATEPERSON
Locate person - button.
@ MID_LISTINTERNAL
Locator configuration - menu entry.
@ MID_NEW_MICROVIEW
Open a new microscopic view.
@ MID_LOCATEJUNCTION
Locate junction - button.
@ MID_OPEN_CONFIG
Open configuration - ID.
@ MID_HOTKEY_CTRL_W_CLOSESIMULATION
Close simulation - ID.
@ MID_HOTKEY_CTRL_D_SINGLESIMULATIONSTEP_OPENDEMANDELEMENTS
Perform a single simulation step in SUMO and open Demand Elements in NETEDIT.
@ MID_HOTKEY_F9_EDIT_VIEWSCHEME
open edit scheme menu
@ MID_LOCATEPOLY
Locate polygons - button.
@ MID_HOTKEY_CTRL_J_TOGGLEDRAWJUNCTIONSHAPE
toggle draw junction shape
@ MID_TRACI_STATUS
update traci status
@ MID_HOTKEY_CTRL_SHIFT_S_SAVENETWORK_AS
save network as
@ MID_CHANGELOG
changelog button
@ MID_HOTKEY_CTRL_B_EDITBREAKPOINT_OPENDATAELEMENTS
Edit simulation breakpoints in SUMO and open Data Elements in NETEDIT.
@ MID_HOTKEY_F1_ONLINEDOCUMENTATION
open online documentation
@ MID_HOTKEY_CTRL_R_RELOAD
Reload the previously loaded simulation.
@ MID_HOTKEY_CTRL_S_STOPSIMULATION_SAVENETWORK
Stop the simulation in SUMO and save network in NETEDIT.
@ MID_LOCATEADD
Locate additional structure - button.
@ MID_LOCATEPOI
Locate poi - button.
@ MID_OPEN_NETWORK
Open network - ID.
@ MID_SIMLOAD
(quick)-load state from file
@ MID_DEMAND_SCALE
scale traffic
@ MID_HOTKEY_CTRL_I_EDITVIEWPORT
Open viewport editor.
@ MID_RECENTFILE
Loads a file previously loaded.
@ MID_APPSETTINGS
Application settings - menu entry.
@ MID_HOTKEY_CTRL_SHIFT_N_NEWWINDOW
Open a New Window.
@ MID_HOTKEY_SHIFT_F11_HALLOFFAME
show the hall of fame dialog
@ MID_NETEDIT
Open in netedit.
@ MID_CLEARMESSAGEWINDOW
Clear simulation output.
@ MID_OPEN_EDGEDATA
Load edge data for visualization.
@ MID_HOTKEY_CTRL_F_FULSCREENMODE
Fullscreen mode - menu entry.
@ MID_SIMSAVE
Save state to file.
@ MID_TUTORIAL
tutorial button
@ MID_HOTKEY_CTRL_G_GAMINGMODE_TOGGLEGRID
Toggle Gaming mode in SUMO and grid in NETEDIT.
@ MID_SHOWNETSTATS
Show network statistics.
@ ID_LOADTHREAD_EVENT
The loading thread.
@ MID_EDITCHOSEN
Open editor for selections.
@ MID_SHOWPERSONSTATS
Show person statistics.
@ MID_DELAY_TOGGLE
toggle delay between alternative value
@ MID_HOTKEYS
hotkeys button
@ MID_TIMELINK_BREAKPOINT
Set breakpionts from messages - Option.
@ MID_HOTKEY_ALT_F4_CLOSE
Main window closes.
@ MID_TIME_TOGGLE
toggle time display mode
@ MID_LOCATEEDGE
Locate edge - button.
@ MID_HOTKEY_CTRL_A_STARTSIMULATION_OPENADDITIONALS
Start the simulation in SUMO and open Additionals Elements in NETEDIT.
@ MID_DELAY_DEC
decrease sim delay
@ MID_LOCATEVEHICLE
Locate vehicle - button.
@ MID_LOCATETLS
Locate TLS - button.
@ MID_NEW_OSGVIEW
Open a new microscopic 3D view.
@ MID_HOTKEY_F12_ABOUT
open about dialog
@ MID_DELAY_INC
increase sim delay
@ MID_HOTKEY_CTRL_QUICK_RELOAD
Quick-Reload the previously loaded simulation (keep the net)
@ MID_SHOWVEHSTATS
Show vehicle statistics.
@ MID_HOTKEY_CTRL_P
Load additional file with poi and polygons.
@ MID_WINDOW
Main window-ID.
@ MID_LOCATECONTAINER
Locate container - button.
FXDEFMAP(GUIApplicationWindow) GUIApplicationWindowMap[]
GUICompleteSchemeStorage gSchemeStorage
#define GUIDesignSpinDial
#define GUIDesignToolBarGrip
design for toolbar grip (used to change the position of toolbar with mouse)
#define GUIDesignButtonStatusBarFixed
button rectangular with thick and raise frame with a width of 100
#define GUIDesignMDIButtonLeft
#define GUIDesignToolBarRaisedSameTop
design for first toolbar shell positioned in the same position of dock
#define GUIDesignButtonToolbar
little button with icon placed in navigation toolbar
#define GUIDesignHorizontalFrameStatusBar
Horizontal frame used in status bar.
#define GUIDesignToolBar
design for default toolbar
#define GUIDesignSplitter
#define GUIDesignSplitterMDI
MDI Splitter.
#define GUIDesignToolbarMenuBar
#define GUIDesignToolBarRaisedNextTop
design for first toolbar shell positioned in the next-top position of dock
#define GUIDesignButtonToolbarText
#define GUIDesignMDIButtonRight
MDIButton oriented to right.
#define GUIDesignStatusBar
design used in status bar
@ SIMULATION_ENDED
Send when the simulation is over;.
@ MESSAGE_OCCURRED
send when a message occured
@ GLDEBUG_OCCURRED
send when a gldebug occured
@ ERROR_OCCURRED
send when a error occured
@ SIMULATION_STEP
send when a simulation step has been performed
@ ADD_VIEW
Send when a new should be opened (via TraCI)
@ CLOSE_VIEW
Send when a view should be closed (via TraCI)
@ SIMULATION_LOADED
send when a simulation has been loaded
@ STATUS_OCCURRED
send when a status change occured
@ DEBUG_OCCURRED
send when a debug occured
@ WARNING_OCCURRED
send when a warning occured
GUISelectedStorage gSelected
A global holder of selected objects.
FXString gCurrentFolder
The folder used as last.
std::vector< std::string > & split(const std::string &s, char delim, std::vector< std::string > &elems)
#define WRITE_MESSAGE(msg)
std::string time2string(SUMOTime t)
convert SUMOTime to string
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_EMERGENCY
public emergency vehicles
const double SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Base (microsim) event class.
void setSelector(FXSelector sel)
set the selector
void setTarget(FXObject *tgt)
set the target
static bool isReadable(std::string path)
Checks whether the given file is readable.
static void resetFont()
to be called when the font context is invalidated
The main window of the SUMO-gui.
long onCmdDelayInc(FXObject *, FXSelector, void *)
Called on "delay inc".
long onUpdReload(FXObject *, FXSelector, void *)
Determines whether reloading is enabled.
long onCmdShowStats(FXObject *, FXSelector, void *)
Called on commands from the statistic buttons.
FXToolBarShell * myToolBarDrag2
long onCmdTimeToggle(FXObject *, FXSelector, void *)
Called on "time toggle".
virtual void sendBlockingEvent(GUIEvent *event)
Sends an event from the application thread to the GUI and waits until it is handled.
GUIDialog_Breakpoints * myBreakpointDialog
FXEX::MFXThreadEvent myLoadThreadEvent
io-event with the load-thread
void handleEvent_Message(GUIEvent *e)
GUILoadThread * myLoadThread
the thread that loads simulations
void handleEvent_SimulationEnded(GUIEvent *e)
FXMenuCheck * myGamingModeCheckbox
menu checkbox to activate game mode
int myViewNumber
The current view number.
FXToolBarShell * myToolBarDrag4
long onCmdAbout(FXObject *, FXSelector, void *)
Shows the about dialog.
long onClipboardRequest(FXObject *sender, FXSelector sel, void *ptr)
Somebody wants our clipped text.
long onUpdTraCIStatus(FXObject *, FXSelector, void *)
Determines whether traci is active.
long onUpdStep(FXObject *, FXSelector, void *)
Determines whether "step" is enabled.
bool myAmLoading
information whether the gui is currently loading and the load-options shall be greyed out
long onCmdAppSettings(FXObject *, FXSelector, void *)
Opens the application settings menu (Settings->Application Settings...)
long onKeyPress(FXObject *o, FXSelector sel, void *data)
handle keys
void handleEvent_SimulationLoaded(GUIEvent *e)
FXToolBarShell * myToolBarDrag9
FXRealSpinner * mySimDelaySpinner
long onCmdChangelog(FXObject *sender, FXSelector sel, void *ptr)
called if the user selects help->Changelog
void handleEvent_SimulationStep(GUIEvent *e)
bool myHaveNotifiedAboutSimEnd
whether the simulation end was already announced
void setStatusBarText(const std::string &text)
get status bar text (can be implemented in children)
FXToolBarShell * myToolBarDrag10
void addRecentFile(const FX::FXString &f)
long onCmdStop(FXObject *, FXSelector, void *)
Called on "stop".
virtual void setDelay(double delay)
Sets the delay of the parent application.
MFXLCDLabel * myTimeLossLabel
double myJamSoundTime
waiting time after which vehicles trigger jam sounds
FXMenuPane * myControlMenu
FXRealSpinner * myDemandScaleSpinner
the demand scale
long onCmdTutorial(FXObject *sender, FXSelector sel, void *ptr)
called if the user selects help->Tutorial
MFXLCDLabel * myEmergencyVehicleLabel
FXToolBarShell * myToolBarDrag7
double mySimDelay
the simulation delay in milliseconds
SUMOTime getCurrentSimTime() const
get current sim time (must be implemented in all children)
long onUpdAddView(FXObject *, FXSelector, void *)
Determines whether adding a view is enabled.
FXToolBarShell * myToolBarDrag1
for some menu detaching fun
long onCmdEditViewScheme(FXObject *, FXSelector, void *)
Called on menu Edit->Visualization.
long onRunThreadEvent(FXObject *, FXSelector, void *)
Called on an event from the simulation thread.
MFXLCDLabel * myTotalDistanceLabel
SUMOTime myEmergencyVehicleCount
FXCursor * getDefaultCursor()
MFXRecentNetworks myRecentNetworksAndConfigs
List of recent networks and configs.
void checkGamingEventsDRT()
FXMDIMenu * myMDIMenu
The menu used for the MDI-windows.
void updateTimeLCDTooltip()
long onCmdListTeleporting(FXObject *, FXSelector, void *)
Toggle listing of teleporting vehicles.
long onCmdNewWindow(FXObject *, FXSelector, void *)
Called on menu File->New Window.
long onCmdStep(FXObject *, FXSelector, void *)
Called on "step".
FXMutex myEventMutex
the mutex for the waiting semaphore
FXMenuPane * mySelectByPermissions
double getTrackerInterval() const
get tracker interval (must be implemented in all children)
long onCmdClose(FXObject *, FXSelector, void *)
Called on menu File->Close.
virtual void buildToolBars()
Builds the tool bar.
long onCmdDelayToggle(FXObject *, FXSelector, void *)
Called on "delay toggle".
FXMenuPane * myFileMenu
the submenus
long onCmdStart(FXObject *, FXSelector, void *)
Called on "play".
GUIMessageWindow * myMessageWindow
A window to display messages, warnings and error in.
void loadConfigOrNet(const std::string &file)
FXToolBar * myToolBar1
The application tool bar.
FXMenuPane * mySettingsMenu
bool myWasStarted
the information whether the simulation was started before
virtual void addToWindowsMenu(FXMenuPane *)
FXSplitter * myMainSplitter
The splitter that divides the main window into views and the log window.
long onCmdListParking(FXObject *, FXSelector, void *)
Toggle listing of parking vehicles.
void loadOnStartup(const bool wait=false)
long onCmdListInternal(FXObject *, FXSelector, void *)
Toggle listing of internal structures.
bool myTLSGame
current game mode
FXEX::MFXThreadEvent myRunThreadEvent
io-event with the run-thread
void dependentBuild(const bool isLibsumo)
long onCmdFullScreen(FXObject *, FXSelector, void *)
Toggle full screen mode.
GUIApplicationWindow(FXApp *a, const std::string &configPattern)
Constructor.
long onCmdEditBreakpoints(FXObject *, FXSelector, void *)
Called on menu Edit->Edit Breakpoints.
long onCmdOpenShapes(FXObject *, FXSelector, void *)
Called on menu File->Load Shapes.
FXToolBarShell * myMenuBarDrag
const std::vector< SUMOTime > retrieveBreakpoints() const
retrieve breakpoints if provided by the application
long onCmdQuit(FXObject *, FXSelector, void *)
Called by FOX if the application shall be closed.
FXToolBarShell * myToolBarDrag8
long onUpdStart(FXObject *sender, FXSelector, void *ptr)
Determines whether "play" is enabled.
GUISUMOAbstractView * openNewView(GUISUMOViewParent::ViewType vt=GUISUMOViewParent::VIEW_2D_OPENGL, std::string caption="")
FXGLCanvas * getBuildGLCanvas() const
get build GL Canvas (must be implemented in all children)
RandomDistributor< std::string > myJamSounds
long onCmdNewView(FXObject *, FXSelector, void *)
Called if a new view shall be opened (2D view)
GUIRunThread * myRunThread
the thread that runs simulations
long onCmdClearMsgWindow(FXObject *, FXSelector, void *)
Called if the message window shall be cleared.
long onCmdToggleDrawJunctionShape(FXObject *, FXSelector, void *)
Toggle draw junction shape.
long onCmdNetedit(FXObject *, FXSelector, void *)
Called on menu Edit->Netedit.
virtual void create()
Creates the main window (required by FOX)
std::map< int, Command * > myHotkeyPress
custom hotkeys
FXToolBarShell * myToolBarDrag5
MFXLCDLabel * myWaitingTimeLabel
performance indicators
long onCmdDemandScale(FXObject *, FXSelector, void *)
Called on "demand scale".
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
RandomDistributor< std::string > myCollisionSounds
FXMenuCascade * mySelectLanesMenuCascade
the menu cascades
long onCmdOpenNetwork(FXObject *, FXSelector, void *)
Called on menu File->Open Network.
std::string myConfigPattern
Input file pattern.
virtual void setBreakpoints(const std::vector< SUMOTime > &breakpoints)
Sets the breakpoints of the parent application.
long onCmdLoadState(FXObject *, FXSelector, void *)
Called on "save state".
int myPreviousCollisionNumber
long onCmdEditChosen(FXObject *, FXSelector, void *)
Called on menu Edit->Edit Chosen.
virtual void detach()
Detaches the tool/menu bar.
long onCmdDelayDec(FXObject *, FXSelector, void *)
Called on "delay dec".
long onCmdOpenRecent(FXObject *, FXSelector, void *)
Called on opening a recent file.
long onUpdOpenRecent(FXObject *, FXSelector, void *)
Determines whether opening a recent file is enabled.
MFXSynchQue< GUIEvent * > myEvents
List of got requests.
bool myShowTimeAsHMS
whether to show time as hour:minute:second
FXMenuPane * myWindowMenu
double myAlternateSimDelay
The alternate simulation delay in milliseconds for toggling.
long onUpdStop(FXObject *, FXSelector, void *)
Determines whether "stop" is enabled.
FXDataTarget * mySimDelayTarget
long onCmdSaveConfig(FXObject *, FXSelector, void *)
Called on menu File->Close.
FXMenuPane * myLocatorMenu
void updateTimeLCD(SUMOTime time)
updates the simulation time display
long onCmdSaveState(FXObject *, FXSelector, void *)
Called on "save state".
std::map< int, Command * > myHotkeyRelease
FXToolBarShell * myToolBarDrag3
long onLoadThreadEvent(FXObject *, FXSelector, void *)
Called on an event from the loading thread.
long onCmdReload(FXObject *, FXSelector, void *)
Called on reload.
long onUpdNeedsSimulation(FXObject *, FXSelector, void *)
Determines whether some buttons which require an active simulation may be shown.
long onUpdOpen(FXObject *, FXSelector, void *)
Determines whether opening is enabled.
long onCmdHallOfFame(FXObject *, FXSelector, void *)
Shows the Hall of Fame dialog.
long onCmdLocate(FXObject *, FXSelector, void *)
Called on menu commands from the Locator menu.
FXToolBarShell * myToolBarDrag6
long long myGuiSettingsFileMTime
last modification time of the gui setting file
FXSlider * mySimDelaySlider
long onCmdOpenConfiguration(FXObject *, FXSelector, void *)
Called on menu File->Open Configuration.
long onCmdOpenEdgeData(FXObject *, FXSelector, void *)
Called on menu File->Load EdgeData.
long onCmdEditViewport(FXObject *, FXSelector, void *)
Called on menu Edit->Viewport.
MFXLCDLabel * myLCDLabel
the simulation step display
FXMenuBar * myMenuBar
The application menu bar.
static std::mt19937 myGamingRNG
A random number generator used to choose a gaming sound.
long onCmdHotkeys(FXObject *sender, FXSelector sel, void *ptr)
called if the user selects help->Hotkeys
long myLastStepEventMillis
last time the simulation view was redrawn due to a simStep
virtual ~GUIApplicationWindow()
Destructor.
long onCmdHelp(FXObject *sender, FXSelector sel, void *ptr)
called if the user selects help->Documentation
void addHotkey(int key, Command *press, Command *release)
register custom hotkey action
virtual void fillMenuBar()
Builds the menu bar.
bool myIsReload
whether we are reloading the simulation
std::vector< FXButton * > myStatButtons
Buttons showing and running values and triggering statistic windows.
virtual void eventOccurred()
void checkGamingEvents()
handles additional game-related events
long onCmdQuickReload(FXObject *, FXSelector, void *)
Called on quick-reload.
long onCmdGaming(FXObject *, FXSelector, void *)
Toggle gaming mode.
void clearDecals()
Clear the default decals.
void saveViewport(const double x, const double y, const double z, const double rot)
Makes the given viewport the default.
static void initCursors(FXApp *a)
Initiate GUICursorSubSys.
static FXMenuTitle * buildFXMenuTitle(FXComposite *p, const std::string &text, FXIcon *icon, FXMenuPane *menuPane)
build menu title
static FXMenuCommand * buildFXMenuCommandRecentFile(FXComposite *p, const std::string &text, FXObject *tgt, FXSelector sel)
build menu command (for recent files)
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel)
build menu command
static FXMenuCommand * buildFXMenuCommandShortcut(FXComposite *p, const std::string &text, const std::string &shortcut, const std::string &info, FXIcon *icon, FXObject *tgt, FXSelector sel)
build menu command
The application's "About" - dialog.
void create()
Creates the widget.
The dialog to change the application (gui) settings.
Editor for simulation breakpoints.
Editor for the list of chosen objects.
The SUMO User Conference "Hall of Fame" - dialog / easter egg.
void create()
Creates the widget.
const std::string & getCaption() const
const std::string & getSchemeName() const
const std::string & getCaption() const
const std::string & getMsg() const
Returns the message.
Event sent when the the simulation is over.
MSNet::SimulationState getReason() const
Returns the reason the simulation has ended due.
SUMOTime getTimeStep() const
Returns the time step the simulation has ended at.
const SUMOTime myBegin
the time the simulation shall start with
GUINet * myNet
the loaded net
const std::vector< std::string > mySettingsFiles
the name of the settings file to load
const bool myOsgView
whether to load the OpenSceneGraph view
const SUMOTime myEnd
the time the simulation shall end with
const bool myViewportFromRegistry
whether loading viewport from registry
const std::string myFile
the name of the loaded file
GUIEventType getOwnType() const
returns the event type
virtual void create()
create GUIGlChildWindow
GUISUMOAbstractView * getView() const
return GUISUMOAbstractView
virtual FXGLCanvas * getBuildGLCanvas() const
get build GL Canvas
GUIGlID getGlID() const
Returns the numerical id of the object.
static double gTrackerInterval
the aggregation period for tracker windows in seconds
static bool gRunAfterLoad
the simulation shall start direct after loading
static bool gQuitOnEnd
the window shall be closed when the simulation has ended
static bool gDemoAutoReload
the simulation shall reload when it has ended (demo)
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
static void initIcons(FXApp *a)
Initiate GUIIconSubSys.
static void close()
close GUIIconSubSys
Representation of a lane in the micro simulation (gui-version)
void loadConfigOrNet(const std::string &file)
begins the loading of the given file
const std::string & getFileName() const
void setWindowSizeAndPos()
perform initial window positioning and sizing according to user options / previous call
bool myListParking
information whether the locator should list parking vehicles
void removeViewByID(const std::string &id)
std::vector< FXMainWindow * > myTrackerWindows
list of tracker windows
bool myListTeleporting
information whether the locator should list teleporting vehicles
FXLabel * myCartesianCoordinate
Labels for the current cartesian, geo-coordinate and test coordinates.
std::map< std::string, std::string > myOnlineMaps
online mapping services for the context menu
MFXStaticToolTip * myStaticTooltipMenu
static toolTip used in menus
FXMDIClient * myMDIClient
The multi view panel.
FXHorizontalFrame * myTraCiFrame
frames for coordinates
bool listParking() const
return whether to list parking vehicles
FXHorizontalFrame * myGeoFrame
FXHorizontalFrame * myTestFrame
FXHorizontalFrame * myCartesianFrame
FXLabel * myTestCoordinate
FXMutex myTrackerLock
A lock to make the removal and addition of trackers secure.
FXDockSite * myTopDock
dock sites
bool myListInternal
information whether the locator should list internal structures
void storeWindowSizeAndPos()
record window position and size in registry
bool myAmFullScreen
FOX need this.
FXLabel * myGeoCoordinate
FXStatusBar * myStatusbar
The status bar.
void updateChildren(int msg=MID_SIMSTEP)
update childrens
FXGLVisual * myGLVisual
The gl-visual used.
bool myAmGaming
information whether the gui is currently in gaming mode
std::vector< GUIGlChildWindow * > myGLWindows
list of GLWindows
A logging window for the gui.
void addSeparator()
Adds a a separator to this log window.
void clear()
Clears the window.
void appendMsg(GUIEventType eType, const std::string &msg)
Adds new text to the window.
MSTransportableControl & getPersonControl() override
Returns the person control.
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own parameter window.
static GUINet * getGUIInstance()
Returns the pointer to the unique instance of GUINet (singleton).
MSTransportableControl & getContainerControl() override
Returns the container control.
virtual double getXPos() const =0
Returns the x-offset of the field to show stored in this changer.
virtual double getYPos() const =0
Returns the y-offset of the field to show stored in this changer.
virtual double getZPos() const =0
Returns the camera height corresponding to the current zoom factor.
void setActive(int scheme)
virtual bool simulationIsStartable() const
virtual bool simulationIsStepable() const
std::vector< SUMOTime > & getBreakpoints()
virtual bool init(GUINet *net, SUMOTime start, SUMOTime end)
initialises the thread with the new simulation
FXMutex & getBreakpointLock()
SUMOTime getSimEndTime() const
virtual bool simulationIsStopable() const
bool simulationAvailable() const
void prepareDestruction()
void addDecals(const std::vector< Decal > &decals)
add decals
const GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings (read only)
GUIPerspectiveChanger & getChanger() const
get changer
virtual void setViewportFromToRot(const Position &lookFrom, const Position &lookAt, double rotation)
applies the given viewport settings
GUIVisualizationSettings * editVisualisationSettings() const
edit visualization settings (allow modify VisualizationSetings, use carefully)
virtual void copyViewportTo(GUISUMOAbstractView *view)
copy the viewport to the given view
FXComboBox * getColoringSchemesCombo()
get coloring schemes combo
virtual bool setColorScheme(const std::string &)
set color scheme
A single child window which contains a view of the simulation area.
ViewType
Available view types.
@ VIEW_3D_OSG
plain 3D OSG view (
@ VIEW_2D_OPENGL
plain 2D openGL view (
virtual GUISUMOAbstractView * init(FXGLCanvas *share, GUINet &net, ViewType type)
"Initialises" this window by building the contents
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
void setToolBarVisibility(const bool value)
about toggled gaming status
long onKeyPress(FXObject *o, FXSelector sel, void *data)
handle keys
void clear()
Clears the list of selected objects.
void select(GUIGlID id, bool update=true)
Adds the object with the given id.
An XML-handler for visualisation schemes.
double getDelay() const
Returns the parsed delay.
const std::string & getSettingName() const
RandomDistributor< std::string > getEventDistribution(const std::string &id)
const std::string & getViewType() const
Returns the parsed view type.
void applyViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
const std::vector< SUMOTime > & getBreakpoints() const
Returns the parsed breakpoints.
void setSnapshots(GUISUMOAbstractView *view) const
Makes a snapshot if it has been parsed.
const std::vector< GUISUMOAbstractView::Decal > & getDecals() const
Returns the parsed decals.
Storage for geometrical objects extended by mutexes.
static void buildSUMOAccelerators(GUIApplicationWindow *GUIApp)
build SUMO Accelerators
static void alterSUMOAccelerator(GUIApplicationWindow *GUIApp, GUIShortcut keysym, long)
static void clearTextures()
clears loaded textures
static std::string clipped
bool drawJunctionShape
whether the shape of the junction should be drawn
GUIColorer laneColorer
The lane colorer.
A widget which has the seven-segment display used as the drawing object for each letter in the label....
void setVertical(const FXint len)
set segment vertical length - must be more than twice the segment width
void setGroove(const FXint w)
set groove width - must be less than segment width
void setThickness(const FXint w)
set segment width - must be less than half the segment length
void setToolTipText(const FXString &text)
set tooltip text
void setText(FXString lbl)
manipulate text in LCD label
void setHorizontal(const FXint len)
set segment horizontal length - must be more than twice the segment width
void setFgColor(FXColor clr)
set forground color
static FXint fxexecute(FXString link)
static void sleep(long ms)
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
static FXString getTitleText(const FXString &appname, FXString filename="")
Returns the title text in dependance to an optional file name.
static FXbool userPermitsOverwritingWhenFileExists(FXWindow *const parent, const FXString &file)
Returns true if either the file given by its name does not exist or the user allows overwriting it.
static FXString assureExtension(const FXString &filename, const FXString &defaultExtension)
Corrects missing extension.
SUMOVehicleClass getVClass() const
Returns the vehicle's access class.
bool isStopped() const
Returns whether the vehicle is at a stop.
static const MSEdgeVector & getAllEdges()
Returns all edges with a numerical id.
int getWaitingVehicleNo() const
Returns the number of waiting vehicles.
SVCPermissions getPermissions() const
Returns the vehicle class permissions for this lane.
double getVehicleMaxSpeed(const SUMOTrafficObject *const veh) const
Returns the lane's maximum speed, given a vehicle's speed limit adaptation.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
@ SIMSTATE_LOADING
The simulation is loading.
@ SIMSTATE_ERROR_IN_SIM
An error occurred during the simulation step.
static std::string getStateMessage(SimulationState state)
Returns the message to show if a certain state occurs.
SUMOTime loadState(const std::string &fileName)
load state from file and return new time
void quickReload()
reset state to the beginning without reloading the network
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
bool hasContainers() const
Returns whether containers are simulated.
bool hasPersons() const
Returns whether persons are simulated.
MSInsertionControl & getInsertionControl()
Returns the insertion control.
ShapeContainer & getShapeContainer()
Returns the shapes container.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
static void saveState(const std::string &file, SUMOTime step, bool usePrefix=true)
Saves the current state.
int getRunningNumber() const
Returns the number of build and inserted, but not yet deleted transportables.
int getWaitingForVehicleNumber() const
Returns the number of transportables waiting for a ride.
The class responsible for building and deletion of vehicles.
int getRunningVehicleNo() const
Returns the number of build and inserted, but not yet deleted vehicles.
void setScale(double scale)
sets the demand scaling factor
int getCollisionCount() const
return the number of collisions
std::map< std::string, SUMOVehicle * >::const_iterator constVehIt
Definition of the internal vehicles map iterator.
constVehIt loadedVehBegin() const
Returns the begin of the internal vehicle map.
constVehIt loadedVehEnd() const
Returns the end of the internal vehicle map.
Representation of a vehicle in the micro simulation.
bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
const MSLane * getLane() const
Returns the lane the vehicle is on.
double getSpeed() const
Returns the vehicle's current speed.
The XML-Handler for shapes loading network loading.
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
bool isDefault(const std::string &name) const
Returns the information whether the named option has still the default value.
void writeConfiguration(std::ostream &os, const bool filled, const bool complete, const bool addComments, const std::string &relativeTo="", const bool forceRelative=false, const bool inComment=false) const
Writes the configuration.
static OptionsCont & getOptions()
Retrieves the options.
A point in 2D or 3D with translation and scaling methods.
void set(double x, double y)
set positions x and y
double x() const
Returns the x-position.
double y() const
Returns the y-position.
static const RGBColor GREEN
static const RGBColor RED
named colors
double getOverallProb() const
Return the sum of the probabilites assigned to the members.
T get(SumoRNG *which=nullptr) const
Draw a sample of the distribution.
std::vector< std::string > getVector()
return vector of strings
static std::string transcodeToLocal(const std::string &utf8String)
convert a string from UTF-8 to the local codepage
A few system-specific functions.
static unsigned long runHiddenCommand(const std::string &cmd)
run a shell command without popping up any windows (particuarly on win32)
static long long getModifiedTime(const std::string &fname)
static long getCurrentMillis()
Returns the current time in milliseconds.
static TraCIServer * getInstance()
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false, const bool isRoute=false)
Runs the given handler on the given file; returns if everything's ok.