76#define MIN_DRAW_DELAY 20
117 FXMAPFUNC(SEL_COMMAND,
MID_NEW_OSGVIEW, GUIApplicationWindow::onCmdNewOSG),
221FXIMPLEMENT(
GUIApplicationWindow, FXMainWindow, GUIApplicationWindowMap, ARRAYNUMBER(GUIApplicationWindowMap))
234 myFileMenuRecentNetworks(new FXMenuPane(this)),
235 myFileMenuRecentConfigs(new FXMenuPane(this)),
236 myRecentNetworks(a,
"networks"),
237 myRecentConfigs(a,
"configs"),
238 myConfigPattern(configPattern),
245 a->setTooltipTime(1000000000);
246 a->setTooltipPause(1000000000);
265 gLanguage = getApp()->reg().readStringEntry(
"gui",
"language",
"C");
286 button->setBackColor(FXRGBA(253, 255, 206, 255));
292 myGeoCoordinate =
new FXLabel(
myGeoFrame, (
TL(
"N/A") + std::string(
"\t\t") +
TL(
"Original coordinate (before coordinate transformation in netconvert)")).c_str(),
nullptr, LAYOUT_CENTER_Y);
336 gCurrentFolder = getApp()->reg().readStringEntry(
"SETTINGS",
"basedir",
"");
337 FXMainWindow::create();
355 FXint textWidth = getApp()->getNormalFont()->getTextWidth(
"8", 1) * 24;
362 show(PLACEMENT_DEFAULT);
364 if (getApp()->reg().readIntEntry(
"SETTINGS",
"maximized", 0) == 1) {
368 myShowTimeAsHMS = (getApp()->reg().readIntEntry(
"gui",
"timeasHMS", 0) == 1);
370 const std::string& onlineMaps = getApp()->reg().readStringEntry(
"gui",
"onlineMaps",
"");
371 for (
const std::string& entry :
StringTokenizer(onlineMaps,
"\n").getVector()) {
376 myOnlineMaps[
"GeoHack"] =
"https://geohack.toolforge.org/geohack.php?params=%lat;%lon_scale:1000";
377 myOnlineMaps[
"GoogleSat"] =
"https://www.google.com/maps?ll=%lat,%lon&t=h&z=18";
378 myOnlineMaps[
"OSM"] =
"https://www.openstreetmap.org/?mlat=%lat&mlon=%lon&zoom=18&layers=M";
428 FXMainWindow::detach();
446 TL(
"New Window"),
"Ctrl+Shift+N",
TL(
"Open a new sumo-gui window."),
450 TL(
"&Open Simulation..."),
"Ctrl+O",
TL(
"Open a simulation (Configuration file)."),
453 TL(
"Open &Network..."),
"Ctrl+N",
TL(
"Open a network."),
456 TL(
"Open Shapes "),
"Ctrl+P",
TL(
"Load POIs and Polygons for visualization."),
459 TL(
"Open EdgeData "),
"Ctrl+U",
TL(
"Load edge related data for visualization."),
462 TL(
"&Reload"),
"Ctrl+R",
TL(
"Reloads the simulation / the network."),
465 TL(
"Quick-Reload"),
"Ctrl+0",
TL(
"Reloads the simulation (but not network)."),
469 TL(
"Save Configuration"),
"Ctrl+Shift+S",
TL(
"Save current options as a configuration file."),
472 TL(
"Close"),
"Ctrl+W",
TL(
"Close the simulation."),
480 TL(
"&Quit"),
"Ctrl+Q",
TL(
"Quit the Application."),
485 for (
const auto& vehicleClass : vehicleClasses) {
491 TL(
"Edit Selected..."),
"Ctrl+E",
TL(
"Opens a dialog for editing the list of selected items."),
494 (
TL(
"Select lanes which allow...") + std::string(
"\t\t") +
TL(
"Opens a menu for selecting a vehicle class by which to selected lanes.")).c_str(),
498 TL(
"Edit Breakpoints"),
"Ctrl+B",
TL(
"Opens a dialog for editing breakpoints."),
501 TL(
"Edit Visualisation"),
"F9",
TL(
"Opens a dialog for editing visualization settings."),
504 TL(
"Edit Viewport"),
"Ctrl+I",
TL(
"Opens a dialog for editing viewing area, zoom and rotation."),
508 TL(
"Open network in netedit"),
"Ctrl+T",
TL(
"Opens current network in NETEDIT."),
517 TL(
"Application Settings"),
"Ctrl+H",
TL(
"Open a Dialog for Application Settings editing."),
520 TL(
"Gaming Mode\tCtrl+G\tToggle gaming mode on/off."),
523 TL(
"Full Screen Mode"),
"Ctrl+F",
TL(
"Toggle full screen mode on/off."),
529 TL(
"&Junctions"),
"Shift+J",
TL(
"Open a Dialog for Locating a Junction."),
532 TL(
"&Edges"),
"Shift+E",
TL(
"Open a Dialog for Locating an Edge."),
535 TL(
"&Vehicles"),
"Shift+V",
TL(
"Open a Dialog for Locating a Vehicle."),
538 TL(
"&Persons"),
"Shift+P",
TL(
"Open a Dialog for Locating a Person."),
541 TL(
"&Container"),
"Shift+C",
TL(
"Open a Dialog for Locating a Container."),
544 TL(
"&TLS"),
"Shift+T",
TL(
"Open a Dialog for Locating a Traffic Light."),
547 TL(
"&Additional"),
"Shift+A",
TL(
"Open a Dialog for Locating an Additional Structure."),
550 TL(
"P&oI"),
"Shift+O",
TL(
"Open a Dialog for Locating a Point of Interest."),
553 TL(
"Po&lygon"),
"Shift+L",
TL(
"Open a Dialog for Locating a Polygon."),
557 (
TL(
"Show Internal Structures") + std::string(
"\t\t") +
TL(
"Show internal junctions and streets in locator dialog.")).c_str(),
560 (
TL(
"Show Parking Vehicles") + std::string(
"\t\t") +
TL(
"Show parking vehicles in locator dialog.")).c_str(),
564 (
TL(
"Show vehicles outside the road network") + std::string(
"\t\t") +
TL(
"Show vehicles that are teleporting or driving remote-controlled outside the road network in locator dialog.")).c_str(),
572 TL(
"Run"),
"A,space",
TL(
"Start/ Resume the simulation."),
575 TLC(
"Simulation",
"Stop"),
"S,space",
TL(
"Halt the simulation."),
578 TL(
"Step"),
"D",
TL(
"Perform one simulation step."),
581 TL(
"Delay+"),
"PgUp",
TL(
"Increase simulation step delay."),
nullptr,
this,
MID_DELAY_INC);
583 TL(
"Delay-"),
"PgDn",
TL(
"Decrease simulation step delay."),
nullptr,
this,
MID_DELAY_DEC);
585 TL(
"Save"),
"",
TL(
"Save the current simulation state to a file."),
588 TL(
"Load"),
"",
TL(
"Load simulation state for the current network from file."),
598 TL(
"Tile &Horizontally"),
"",
"",
601 TL(
"Tile &Vertically"),
"",
"",
604 TL(
"Cascade"),
"",
"",
608 TL(
"&Close"),
"",
"",
610 FXMenuSeparator* sep2 =
new FXMenuSeparator(
myWindowMenu);
612 sep2->setSelector(FXMDIClient::ID_MDI_ANY);
622 (
TL(
"Show Status Line") + std::string(
"\t\t") +
TL(
"Toggle the Status Bar on/off.")).c_str(),
625 (
TL(
"Show Message Window") + std::string(
"\t\t") +
TL(
"Toggle the Message Window on/off.")).c_str(),
628 (
TL(
"Show Simulation Time") + std::string(
"\t\t") +
TL(
"Toggle the Simulation Time on/off.")).c_str(),
631 (
TL(
"Show Simulation Delay") + std::string(
"\t\t") +
TL(
"Toggle the Simulation Delay Entry on/off.")).c_str(),
637 TL(
"Clear Message Window"),
"",
TL(
"Clear the message window."),
735 new FXLabel(
myToolBar8, (
TL(
"Scale Traffic:") + std::string(
"\t\t") +
TL(
"Scale traffic from flows and vehicles that are loaded incrementally from route files.")).c_str(),
nullptr, LAYOUT_TOP | LAYOUT_LEFT);
760 new FXLabel(
myToolBar6, (
TL(
"Waiting Time:") + std::string(
"\t\t") +
TL(
"Time spent waiting accumulated for all vehicles")).c_str(),
nullptr, LAYOUT_TOP | LAYOUT_LEFT);
771 new FXLabel(
myToolBar7, (
TL(
"Time Loss:") + std::string(
"\t\t") +
TL(
"Time lost due to being unable to drive with maximum speed for all vehicles")).c_str(),
nullptr, LAYOUT_TOP | LAYOUT_LEFT);
782 new FXLabel(
myToolBar9, (
TL(
"Distance (km):") + std::string(
"\t\t") +
TL(
"Total distance driven by DRT vehicles")).c_str(),
nullptr, LAYOUT_TOP | LAYOUT_LEFT);
793 new FXLabel(
myToolBar10, (
TL(
"Emergency Vehicle waiting time:") + std::string(
"\t\t") +
TL(
"Time spent waiting accumulated for emergency vehicles")).c_str(),
nullptr, LAYOUT_TOP | LAYOUT_LEFT);
817 new FXMenuSeparator(fileMenuRecentNetworks);
823 new FXMenuCascade(fileMenu,
TL(
"Recent Networks"),
nullptr, fileMenuRecentNetworks);
840 new FXMenuSeparator(fileMenuRecentConfigs);
846 new FXMenuCascade(fileMenu,
TL(
"Recent Configs"),
nullptr, fileMenuRecentConfigs);
853 getApp()->reg().writeStringEntry(
"SETTINGS",
"basedir",
gCurrentFolder.text());
854 getApp()->reg().writeIntEntry(
"SETTINGS",
"maximized", isMaximized() ? 1 : 0);
855 getApp()->reg().writeIntEntry(
"gui",
"timeasHMS",
myShowTimeAsHMS ? 1 : 0);
865 FXMenuCommand* mc =
dynamic_cast<FXMenuCommand*
>(menu);
866 if (mc->getText() ==
"Edit Selected...") {
875 const std::vector<MSLane*>& lanes = (*i)->getLanes();
876 for (std::vector<MSLane*>::const_iterator it = lanes.begin(); it != lanes.end(); ++it) {
963 FXRegistry reg(
"SUMO netedit",
"netedit");
970 std::string netedit =
"netedit";
971 const char* sumoPath = getenv(
"SUMO_HOME");
972 if (sumoPath !=
nullptr) {
973 std::string newPath = std::string(sumoPath) +
"/bin/netedit";
975 netedit =
"\"" + newPath +
"\"";
984 cmd =
"start /B \"\" " + cmd;
998 FXRegistry reg(
"SUMO netedit",
"netedit");
1005 std::string netedit =
"netedit";
1006 const char* sumoPath = getenv(
"SUMO_HOME");
1007 if (sumoPath !=
nullptr) {
1008 std::string newPath = std::string(sumoPath) +
"/bin/netedit";
1010 netedit =
"\"" + newPath +
"\"";
1019 cmd =
"start /B \"\" " + cmd;
1032 return sender->handle(
this, FXSEL(SEL_COMMAND, ID_DISABLE), ptr);
1034 return sender->handle(
this,
OptionsCont::getOptions().isSet(
"configuration-file") ? FXSEL(SEL_COMMAND, ID_ENABLE) : FXSEL(SEL_COMMAND, ID_DISABLE), ptr);
1041 FXRegistry reg(
"SUMO sumo-gui",
"sumo-gui");
1042 std::string sumo_gui =
"sumo-gui";
1043 const char* sumoPath = getenv(
"SUMO_HOME");
1044 if (sumoPath !=
nullptr) {
1045 std::string newPath = std::string(sumoPath) +
"/bin/sumo_gui";
1047 sumo_gui =
"\"" + newPath +
"\"";
1050 std::string cmd = sumo_gui;
1056 cmd =
"start /B \"\" " + cmd;
1068 FXFileDialog opendialog(
this,
TL(
"Open Simulation Configuration"));
1070 opendialog.setSelectMode(SELECTFILE_EXISTING);
1075 if (opendialog.execute()) {
1077 std::string file = opendialog.getFilename().text();
1088 FXFileDialog opendialog(
this,
TL(
"Open Network"));
1090 opendialog.setSelectMode(SELECTFILE_EXISTING);
1091 opendialog.setPatternList(
"SUMO nets (*.net.xml,*.net.xml.gz)\nAll files (*)");
1095 if (opendialog.execute()) {
1097 std::string file = opendialog.getFilename().text();
1108 FXFileDialog opendialog(
this,
TL(
"Open Shapes"));
1110 opendialog.setSelectMode(SELECTFILE_EXISTING);
1111 opendialog.setPatternList(
"Additional files (*.xml,*.xml.gz)\nAll files (*)");
1115 if (opendialog.execute()) {
1117 std::string file = opendialog.getFilename().text();
1139 FXFileDialog opendialog(
this,
TL(
"Open EdgeData"));
1141 opendialog.setSelectMode(SELECTFILE_EXISTING);
1142 opendialog.setPatternList(
"EdgeData files (*.xml,*.xml.gz)\nAll files (*)");
1146 if (opendialog.execute()) {
1148 std::string file = opendialog.getFilename().text();
1168 getApp()->beginWaitCursor();
1173 if (sender ==
nullptr) {
1197 myStatusbar->getStatusLine()->setText(
TL(
"Already loading!"));
1200 std::string file((
const char*)ptr);
1209 FXFileDialog opendialog(
this,
TL(
"Save SUMO Configuration"));
1211 opendialog.setSelectMode(SELECTFILE_ANY);
1212 opendialog.setPatternList(
"Config (*.sumocfg)");
1220 opendialog.getPatternText(opendialog.getCurrentPattern()).after(
'.').before(
')')).text();
1242 sender->handle(
this,
1243 myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1251 sender->handle(
this,
1253 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1261 sender->handle(
this,
1262 myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1270 sender->handle(
this,
1272 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1282 myStatusbar->getStatusLine()->setText(
TL(
"No simulation loaded!"));
1291 getApp()->forceRefresh();
1299 getApp()->forceRefresh();
1308 myStatusbar->getStatusLine()->setText(
TL(
"No simulation loaded!"));
1324 FXFileDialog opendialog(
this,
TL(
"Save Simulation State"));
1326 opendialog.setSelectMode(SELECTFILE_ANY);
1327 opendialog.setPatternList(
"GZipped State (*.xml.gz)\nXML State (*.xml)");
1336 opendialog.getPatternText(opendialog.getCurrentPattern()).after(
'.').before(
')')).text();
1346 FXFileDialog opendialog(
this,
TL(
"Load Simulation State"));
1348 opendialog.setSelectMode(SELECTFILE_ANY);
1349 opendialog.setPatternList(
"GZipped State (*.xml.gz)\nXML State (*.xml)");
1353 if (opendialog.execute() && FXStat::exists(opendialog.getFilename())) {
1355 const std::string file = opendialog.getFilename().text();
1444 sender->handle(
this,
1446 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1458 sender->handle(
this,
1460 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1472 sender->handle(
this,
1474 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1483 sender->handle(
this, disable ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1531 d->show(PLACEMENT_OWNER);
1627 getApp()->reg().writeIntEntry(
"SETTINGS",
"x", getX());
1628 getApp()->reg().writeIntEntry(
"SETTINGS",
"y", getY());
1629 getApp()->reg().writeIntEntry(
"SETTINGS",
"width", getWidth());
1630 getApp()->reg().writeIntEntry(
"SETTINGS",
"height", getHeight());
1632 setDecorations(DECOR_NONE);
1633 place(PLACEMENT_MAXIMIZED);
1653 place(PLACEMENT_VISIBLE);
1654 setDecorations(DECOR_ALL);
1659 setWidth(getApp()->reg().readIntEntry(
"SETTINGS",
"width", 600));
1660 setHeight(getApp()->reg().readIntEntry(
"SETTINGS",
"height", 400));
1661 setX(getApp()->reg().readIntEntry(
"SETTINGS",
"x", 150));
1662 setY(getApp()->reg().readIntEntry(
"SETTINGS",
"y", 150));
1697GUIApplicationWindow::onCmdNewOSG(FXObject*, FXSelector,
void*) {
1709 feedback->show(PLACEMENT_OWNER);
1718 about->show(PLACEMENT_OWNER);
1727 hall->show(PLACEMENT_OWNER);
1733 FXEvent*
event = (FXEvent*)ptr;
1735 setDNDData(FROM_CLIPBOARD, event->target,
string);
1783 FXComboBox* sCombo = v->getColoringSchemesCombo();
1786 sCombo->setCurrentItem(index);
1815 if (ec->
myNet ==
nullptr) {
1849 if (ec->
mySettingsFiles.size() > 0 && (!
myIsReload || myGuiSettingsFileMTime < mTime || ec->mySettingsFiles.size() > 1)) {
1861 if (view ==
nullptr) {
1869 sCombo->setCurrentItem(index);
1899 std::vector<SUMOTime> breakpoints;
1904 breakpoints.push_back(t);
1906 std::sort(breakpoints.begin(), breakpoints.end());
1914 setTitle(
"SUMO Interactive Traffic Light");
1916 setTitle(
"SUMO Interactive Demand-Responsive-Transport");
1925 off.
set(getApp()->reg().readRealEntry(
"viewport",
"x"),
1926 getApp()->reg().readRealEntry(
"viewport",
"y"),
1927 getApp()->reg().readRealEntry(
"viewport",
"z"));
1935 (*it)->setText(
"-");
1944 getApp()->endWaitCursor();
1958 if (t - myLastStepEventMillis < MIN_DRAW_DELAY && myRunThread->simulationIsStopable()) {
1967 if (backlog > running) {
1997 getApp()->forceRefresh();
2031 TLF(
"Simulation ended at time: %. (%)",
2036 "\nDo you want to close all open files and views?";
2037 FXuint answer = FXMessageBox::question(
this, MBOX_YES_NO,
TL(
"Simulation ended"),
"%s", text.c_str());
2055#ifdef HAVE_DANGEROUS_SOUNDS
2058 for (; it != end; ++it) {
2129 getApp()->beginWaitCursor();
2144 myStatusbar->getStatusLine()->setText(
TL(
"No simulation loaded!"));
2154 if (caption ==
"") {
2157 FXuint opts = MDI_TRACKING;
2161 if (oldView !=
nullptr) {
2193 (*it)->setText(
"-");
2208 for (FXMainWindow*
const window : trackerWindows) {
2232 return getApp()->getDefaultCursor(DEF_ARROW_CURSOR);
2261 myStatusbar->getStatusLine()->setText(text.c_str());
2262 myStatusbar->getStatusLine()->setNormalText(text.c_str());
2309 std::ostringstream str;
2310 str << std::setfill(
'0');
2318 str << std::setw(2);
2319 str << time / 3600000 <<
'-';
2321 str << std::setw(2) << time / 60000 <<
'-';
2324 str << std::setw(2) << time / 1000;
2325 if (!hideFraction) {
2326 str <<
'.' << std::setw(3) << time % 1000;
2334 if (press !=
nullptr) {
2337 if (release !=
nullptr) {
2345 FXEvent* e = (FXEvent*) ptr;
2348 if (e->code == FX::KEY_Page_Up) {
2350 }
else if (e->code == FX::KEY_Page_Down) {
2354 const bool ignoreSimple =
myAmGaming && (e->state & (CONTROLMASK | SHIFTMASK | ALTMASK)) == 0;
2355 const long handled = ignoreSimple ? 0 : FXMainWindow::onKeyPress(o, sel, ptr);
2356 if (handled == 0 &&
myMDIClient->numChildren() > 0) {
2361 if (!ignoreSimple) {
2375 const long handled = FXMainWindow::onKeyRelease(o, sel, ptr);
2376 if (handled == 0 &&
myMDIClient->numChildren() > 0) {
2377 FXEvent* e = (FXEvent*) ptr;
2424const std::vector<SUMOTime>
@ MID_HOTKEY_CTRL_Q_CLOSE
Main window closes.
@ ID_RUNTHREAD_EVENT
The Simulation execution thread.
@ MID_HOTKEY_CTRL_T_OPENNETEDIT_OPENSUMO
Open current SUMO simulation/network in netedit, or current netedit simulation/network in SUMO.
@ MID_LISTINTERNAL
Locator configuration - menu entry.
@ MID_NEW_MICROVIEW
Open a new microscopic view.
@ 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_CTRL_O_OPENSIMULATION_OPENNETWORK
Open simulation in SUMO and open network in netedit.
@ MID_HOTKEY_F9_EDIT_VIEWSCHEME
open edit scheme menu
@ MID_HOTKEY_CTRL_J_TOGGLEDRAWJUNCTIONSHAPE
toggle draw junction shape
@ MID_TRACI_STATUS
update traci status
@ MID_LANGUAGE_TR
change language to turkish
@ 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_U_OPENEDGEDATA
Load edge data for visualization.
@ 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_HOTKEY_D_MODE_SINGLESIMULATIONSTEP_DELETE
hotkey for perform a single simulation step in SUMO and set delete mode in netedit
@ MID_HOTKEY_SHIFT_O_LOCATEPOI
Locate poi - button.
@ MID_LANGUAGE_ZHT
change language to chinese (traditional)
@ MID_LANGUAGE_ES
change language to spanish
@ MID_HOTKEY_SHIFT_A_LOCATEADDITIONAL
Locate additional structure - button.
@ 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_HOTKEY_S_MODE_STOPSIMULATION_SELECT
hotkey for stop simulation in SUMO and set select mode in netedit
@ MID_HOTKEY_SHIFT_C_LOCATECONTAINER
Locate container - button.
@ MID_HOTKEY_CTRL_SHIFT_N_NEWWINDOW
open a new window (SUMO AND netedit)
@ MID_HOTKEY_SHIFT_V_LOCATEVEHICLE
Locate vehicle - button.
@ MID_HOTKEY_SHIFT_F11_HALLOFFAME
show the hall of fame dialog
@ MID_LANGUAGE_HU
change language to hungarian
@ MID_HOTKEY_SHIFT_L_LOCATEPOLY
Locate polygons - button.
@ MID_HOTKEY_A_MODE_STARTSIMULATION_ADDITIONALSTOP
hotkey for start simulation in SUMO and set editing mode additionals AND stops in netedit
@ MID_HOTKEY_CTRL_K_OPENTLSPROGRAMS
Load file with TLS Programs.
@ MID_HOTKEY_SHIFT_E_LOCATEEDGE
Locate edge - button.
@ MID_CLEARMESSAGEWINDOW
Clear simulation output.
@ 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_HOTKEY_SHIFT_P_LOCATEPERSON
Locate person - button.
@ MID_HOTKEY_CTRL_P_OPENSHAPES
Load additional file with poi and polygons.
@ MID_LANGUAGE_EN
change language to english
@ MID_HOTKEY_SHIFT_J_LOCATEJUNCTION
Locate junction - button.
@ 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_LANGUAGE_DE
change language to german
@ MID_HOTKEY_ALT_F4_CLOSE
Main window closes.
@ MID_TIME_TOGGLE
toggle time display mode
@ MID_HOTKEY_CTRL_A_STARTSIMULATION_OPENADDITIONALS
Start the simulation in SUMO and open Additionals Elements in netedit.
@ MID_DELAY_DEC
decrease sim delay
@ MID_NEW_OSGVIEW
Open a new microscopic 3D view.
@ MID_FEEDBACK
feedback button
@ MID_HOTKEY_CTRL_H_APPSETTINGS_OPENEDGETYPES
open app setting dialog in SUMO and open edge type files in netedit
@ MID_HOTKEY_CTRL_SHIFT_S_SAVESUMOCONFIG
save SUMOConfig (SUMO AND netedit)
@ MID_HOTKEY_F12_ABOUT
open about dialog
@ MID_HOTKEY_CTRL_E_EDITSELECTION_LOADNETEDITCONFIG
Edit selection in SUMO and load neteditConfig in netedit.
@ MID_HOTKEY_SHIFT_T_LOCATETLS
Locate TLS - button.
@ MID_DELAY_INC
increase sim delay
@ MID_HOTKEY_CTRL_N_OPENNETWORK_NEWNETWORK
open network in SUMO and create new empty network in netedit
@ MID_HOTKEY_CTRL_QUICK_RELOAD
Quick-Reload the previously loaded simulation (keep the net)
@ MID_LANGUAGE_ZH
change language to chinese (simplified)
@ MID_SHOWVEHSTATS
Show vehicle statistics.
@ MID_LANGUAGE_FR
change language to french
@ MID_WINDOW
Main window-ID.
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_MESSAGEF(...)
SUMOTime string2time(const std::string &r)
convert string to SUMOTime
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
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
std::string gLanguage
the language for GUI elements and messages
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)
#define TLC(context, string)
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
breakpoint dialog
FXEX::MFXThreadEvent myLoadThreadEvent
io-event with the load-thread
void handleEvent_Message(GUIEvent *e)
called when event "message" ocurred
GUILoadThread * myLoadThread
the thread that loads simulations
void handleEvent_SimulationEnded(GUIEvent *e)
called when event "simulation ended" ocurred
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.
SUMOTime myWaitingTime
waiting time
long onCmdFeedback(FXObject *, FXSelector, void *)
Shows the feedback 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)
called when a key is pressed
void handleEvent_SimulationLoaded(GUIEvent *e)
called when event "simulation loaded" ocurred
FXToolBarShell * myToolBarDrag9
FXRealSpinner * mySimDelaySpinner
Simulation delay spinner.
long onCmdChangelog(FXObject *sender, FXSelector sel, void *ptr)
called if the user selects help->Changelog
void handleEvent_SimulationStep(GUIEvent *e)
called when event "simulation step" ocurred
bool myHaveNotifiedAboutSimEnd
whether the simulation end was already announced
void setStatusBarText(const std::string &text)
set status bar text
FXToolBarShell * myToolBarDrag10
FXMenuPane * myFileMenuRecentConfigs
FXMenu pane for recent configs.
long onCmdStop(FXObject *, FXSelector, void *)
Called on "stop".
MFXRecentNetworks myRecentNetworks
List of recent networks.
MFXLCDLabel * myTimeLossLabel
time loss label
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
virtual void setDelay(double delay)
Sets the delay of the parent application in milliseconds.
MFXLCDLabel * myEmergencyVehicleLabel
emergency vehicle label
FXToolBarShell * myToolBarDrag7
double mySimDelay
the simulation delay in milliseconds
void addRecentConfig(const FX::FXString &f)
add recent config to recent file list
SUMOTime getCurrentSimTime() const
get current simulation time
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
total distance label
bool hadDependentBuild
flag to mark if GUIApplicationWIndow has depend build
SUMOTime myEmergencyVehicleCount
emergency vehicle count
FXMenuPane * myFileMenuRecentNetworks
FXMenu pane for recent networks.
FXCursor * getDefaultCursor()
get default cursor
SUMOTime myTimeLoss
time loss
void checkGamingEventsDRT()
handles additional game-related events (DRT)
FXMDIMenu * myMDIMenu
The menu used for the MDI-windows.
void updateTimeLCDTooltip()
update LCD timer tooltip
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
long onCmdClose(FXObject *, FXSelector, void *)
Called on menu File->Close.
virtual void buildToolBars()
Builds the tool bar.
long onUpdNeteditSUMOConfig(FXObject *, FXSelector, void *)
Enable or disable open SUMOConfig in netedit.
long onCmdDelayToggle(FXObject *, FXSelector, void *)
Called on "delay toggle".
void buildRecentNetworks(FXMenuPane *fileMenu, FXMenuPane *fileMenuRecentNetworks)
build recent networks
FXMenuPane * myFileMenu
the submenus
long onCmdToggleSecondaryShape(FXObject *, FXSelector, void *)
Toggle draw junction shape.
virtual double getDelay() const
Returns the simulation delay in miliseconds.
long onCmdStart(FXObject *, FXSelector, void *)
Called on "play".
GUIMessageWindow * myMessageWindow
A window to display messages, warnings and error in.
GUIRunThread * getRunner()
get run thread
void loadConfigOrNet(const std::string &file)
starts to load a simulation
FXToolBar * myToolBar1
The application tool bar.
FXMenuPane * mySettingsMenu
bool myWasStarted
the information whether the simulation was started before
long onCmdNeteditSUMOConfig(FXObject *, FXSelector, void *)
Called on menu Edit->Netedit (SUMOCfg)
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)
config or net on startup
long onCmdListInternal(FXObject *, FXSelector, void *)
Toggle listing of internal structures.
bool myTLSGame
flag for enable TLS gameMode
FXEX::MFXThreadEvent myRunThreadEvent
io-event with the run-thread
void dependentBuild(const bool isLibsumo)
build dependt
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 list of breakpoints
long onCmdQuit(FXObject *, FXSelector, void *)
Called by FOX if the application shall be closed (Called either by FileMenu->Quit,...
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="")
opens a new simulation display
FXGLCanvas * getBuildGLCanvas() const
get build GLCanvas
RandomDistributor< std::string > myJamSounds
random list of jam sounds
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.
virtual void create()
Creates the main window (required by FOX)
std::map< int, Command * > myHotkeyPress
custom hotkeys pressed
FXToolBarShell * myToolBarDrag5
MFXLCDLabel * myWaitingTimeLabel
waiting time label
long onCmdDemandScale(FXObject *, FXSelector, void *)
Called on "demand scale".
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
called when a key is released
RandomDistributor< std::string > myCollisionSounds
random list of collision sounds
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".
void eraseBreakpointDialog()
erase current breakpoint dialog
int myPreviousCollisionNumber
previous collision number
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.
MFXRecentNetworks myRecentConfigs
List of recent configs.
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 onCmdNeteditNetwork(FXObject *, FXSelector, void *)
Called on menu Edit->Netedit (network)
long onUpdStop(FXObject *, FXSelector, void *)
Determines whether "stop" is enabled.
FXDataTarget * mySimDelayTarget
Simulation delay target.
long onCmdSaveConfig(FXObject *, FXSelector, void *)
Called on menu File->Close.
FXMenuPane * myLocatorMenu
void closeAllWindows()
this method closes all windows and deletes the current simulation
void updateTimeLCD(SUMOTime time)
updates the simulation time display
long onCmdSaveState(FXObject *, FXSelector, void *)
Called on "save state".
std::map< int, Command * > myHotkeyRelease
custom hotkeys released
FXToolBarShell * myToolBarDrag3
long onLoadThreadEvent(FXObject *, FXSelector, void *)
Called on an event from the loading thread.
long onCmdReload(FXObject *, FXSelector, void *)
Called on reload.
void addRecentNetwork(const FX::FXString &f)
add recent network to recent file list
void buildRecentConfigs(FXMenuPane *fileMenu, FXMenuPane *fileMenuRecentConfigs)
build recent configs
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.
double myTotalDistance
total distance
long onCmdLocate(FXObject *, FXSelector, void *)
Called on menu commands from the Locator menu.
FXToolBar * myToolBar6
toolbars used in game
FXToolBarShell * myToolBarDrag6
toolbars shell used in game
long long myGuiSettingsFileMTime
last modification time of the gui setting file
FXSlider * mySimDelaySlider
Simulation delay slider.
long onCmdOpenConfiguration(FXObject *, FXSelector, void *)
Called on menu File->Open Configuration.
long onCmdOpenEdgeData(FXObject *, FXSelector, void *)
Called on menu File->Load EdgeData.
virtual void addToWindowsMenu(FXMenuPane *menuPane)
FOX need this.
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()
a certaint event ocurred
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 close()
close GUICursorSubSys
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.
The application's "Feedback" dialog.
void create()
Creates the widget.
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
FXMenuPane * myLanguageMenu
Language menu common to all applications.
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
void buildLanguageMenu(FXMenuBar *menuBar)
long onCmdChangeLanguage(FXObject *, FXSelector, void *)
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
long onUpdChangeLanguage(FXObject *, FXSelector, void *)
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.
void flushOutputsAtEnd()
flush outputs once the simulation has reached its end
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 buildAccelerators(FXAccelTable *accelTable, FXObject *target, const bool sumogui)
build accelerators
static void changeAccelerator(FXAccelTable *accelTable, FXObject *target, GUIShortcut keysym, long msg)
change acelerator (used for toogle dynamically binding space key with start/end simulation)
static void clearTextures()
clears loaded textures
static std::string clipped
bool drawJunctionShape
whether the shape of the junction should be drawn
bool secondaryShape
whether secondary lane shape shall 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 dependence 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.
SUMOTime loadState(const std::string &fileName, const bool catchExceptions)
load state from file and return new time
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.
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.
static void setupI18n(const std::string &locale="")
set up gettext stuff
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)
@brie get modified time
static long getCurrentMillis()
Returns the current time in milliseconds.
static TraCIServer * getInstance()
static FXIcon * getVClassIcon(const SUMOVehicleClass vc)
returns icon associated to the given vClass
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false, const bool isRoute=false, const bool isExternal=false, const bool catchExceptions=true)
Runs the given handler on the given file; returns if everything's ok.