85#define MIN_DRAW_DELAY 20
90#define STAT_TELEPORTS 2
92#define STAT_CONTAINERS 4
132 FXMAPFUNC(SEL_COMMAND,
MID_NEW_OSGVIEW, GUIApplicationWindow::onCmdNewOSG),
255FXIMPLEMENT(
GUIApplicationWindow, FXMainWindow, GUIApplicationWindowMap, ARRAYNUMBER(GUIApplicationWindowMap))
268#pragma warning(disable: 4355)
272 myFileMenuRecentNetworks(new FXMenuPane(this)),
273 myFileMenuRecentConfigs(new FXMenuPane(this)),
274 myRecentNetworks(a,
"networks"),
275 myRecentConfigs(a,
"configs"),
284 a->setTooltipTime(1000000000);
285 a->setTooltipPause(1000000000);
323 button->setBackColor(FXRGBA(253, 255, 206, 255));
329 myGeoCoordinate =
new FXTextField(
myGeoFrame, 26,
this,
MID_GEO_COORDINATE, FRAME_NONE | LAYOUT_CENTER_Y | TEXTFIELD_ENTER_ONLY, 0, 0, 0,
GUIDesignHeight, 2, 2, 1, 1);
330 myGeoCoordinate->setHelpText(
TL(
"Original coordinate (before coordinate transformation in netconvert). Enter 'lat, lon' or 'lat:... lon:...' to center view"));
338 myCartesianCoordinate =
new FXTextField(
myCartesianFrame, 22,
this,
MID_CARTESIAN_COORDINATE, FRAME_NONE | LAYOUT_CENTER_Y | TEXTFIELD_ENTER_ONLY, 0, 0, 0,
GUIDesignHeight, 2, 2, 1, 1);
344 std::vector<std::string> help({
345 TL(
"number of running vehicles"),
346 TL(
"number of insertion backlogged vehicles"),
347 TL(
"percentage of teleports per departed vehicles"),
348 TL(
"number of active persons"),
349 TL(
"number of active containers")});
394 gCurrentFolder = getApp()->reg().readStringEntry(
"SETTINGS",
"basedir",
"");
395 FXMainWindow::create();
413 FXint textWidth = getApp()->getNormalFont()->getTextWidth(
"8", 1) * 24;
420 show(PLACEMENT_DEFAULT);
422 if (getApp()->reg().readIntEntry(
"SETTINGS",
"maximized", 0) == 1) {
426 myShowTimeAsHMS = (getApp()->reg().readIntEntry(
"gui",
"timeasHMS", 0) == 1);
428 const std::string& onlineMaps = getApp()->reg().readStringEntry(
"gui",
"onlineMaps",
"");
431 if (
split.size() == 2) {
436 myOnlineMaps[
"GeoHack"] =
"https://geohack.toolforge.org/geohack.php?params=%lat;%lon_scale:1000";
437 myOnlineMaps[
"Google Maps"] =
"https://www.google.com/maps/search/?api=1&query=%lat,%lon&zoom=19";
438 myOnlineMaps[
"OSM"] =
"https://www.openstreetmap.org/?mlat=%lat&mlon=%lon&zoom=18&layers=M";
488 FXMainWindow::detach();
506 TL(
"New Window"),
"Ctrl+Shift+N",
TL(
"Open a new sumo-gui window."),
510 TL(
"&Open Simulation..."),
"Ctrl+O",
TL(
"Open a simulation (Configuration file)."),
513 TL(
"Open &Network..."),
"Ctrl+N",
TL(
"Open a network."),
516 TL(
"Open Shapes "),
"Ctrl+P",
TL(
"Load POIs and Polygons for visualization."),
519 TL(
"Open EdgeData "),
"Ctrl+U",
TL(
"Load edge related data for visualization."),
522 TL(
"&Reload"),
"Ctrl+R",
TL(
"Reloads the simulation / the network."),
525 TL(
"Quick-Reload"),
"Ctrl+0",
TL(
"Reloads the simulation (but not network)."),
529 TL(
"Save Configuration"),
"Ctrl+Shift+S",
TL(
"Save current options as a configuration file."),
532 TL(
"Close"),
"Ctrl+W",
TL(
"Close the simulation."),
540 TL(
"&Quit"),
"Ctrl+Q",
TL(
"Quit the Application."),
545 for (
const auto& vehicleClass : vehicleClasses) {
551 TL(
"Edit Selected..."),
"Ctrl+E",
TL(
"Opens a dialog for editing the list of selected items."),
557 TL(
"Set Breakpoint"),
"B",
TL(
"Sets a breakpoint at the current simulation step"),
560 TL(
"Set Breakpoint with offset"),
"Alt+B",
TL(
"Sets a breakpoint at the current simulation step + offset configured in application settings"),
563 TL(
"Edit Breakpoints"),
"Ctrl+B",
TL(
"Opens a dialog for editing breakpoints."),
566 TL(
"Edit Visualisation"),
"F9",
TL(
"Opens a dialog for editing visualization settings."),
569 TL(
"Edit Viewport"),
"Ctrl+I",
TL(
"Opens a dialog for editing viewing area, zoom and rotation."),
578 TL(
"Open in netedit"),
"Ctrl+T",
TL(
"Opens current simulation in NETEDIT."),
581 TL(
"Open network in netedit"),
"Ctrl+Shift+T",
TL(
"Opens current network in NETEDIT."),
587 TL(
"Application Settings"),
"Ctrl+H",
TL(
"Open a Dialog for Application Settings editing."),
590 TL(
"Gaming Mode\tCtrl+G\tToggle gaming mode on/off."),
593 TL(
"Full Screen Mode"),
"Ctrl+F",
TL(
"Toggle full screen mode on/off."),
599 TL(
"&Junctions"),
"Shift+J",
TL(
"Open a dialog for locating a Junction."),
602 TL(
"&Edges"),
"Shift+E",
TL(
"Open a dialog for locating an Edge."),
605 TL(
"&Vehicles"),
"Shift+V",
TL(
"Open a dialog for locating a Vehicle."),
608 TL(
"&Persons"),
"Shift+P",
TL(
"Open a dialog for locating a Person."),
611 TL(
"&Container"),
"Shift+C",
TL(
"Open a dialog for locating a Container."),
614 TL(
"&TLS"),
"Shift+T",
TL(
"Open a dialog for locating a Traffic Light."),
617 TL(
"&Additional"),
"Shift+A",
TL(
"Open a dialog for locating an Additional Structure."),
620 TL(
"P&oI"),
"Shift+O",
TL(
"Open a dialog for locating a Point of Interest."),
623 TL(
"Po&lygon"),
"Shift+L",
TL(
"Open a dialog for locating a Polygon."),
636 TL(
"Run"),
"A,space",
TL(
"Start/ Resume the simulation."),
639 TLC(
"Simulation",
"Stop"),
"S,space",
TL(
"Halt the simulation."),
642 TL(
"Step"),
"D",
TL(
"Perform one simulation step."),
645 TL(
"Delay+"),
"PgUp",
TL(
"Increase simulation step delay."),
nullptr,
this,
MID_DELAY_INC);
647 TL(
"Delay-"),
"PgDn",
TL(
"Decrease simulation step delay."),
nullptr,
this,
MID_DELAY_DEC);
649 TL(
"Save"),
"",
TL(
"Save the current simulation state to a file."),
652 TL(
"Load"),
"",
TL(
"Load simulation state for the current network from file."),
662 TL(
"Tile &Horizontally"),
"",
TL(
"Tile the views horizontally."),
665 TL(
"Tile &Vertically"),
"",
TL(
"Tile the views vertically."),
668 TL(
"Cascade"),
"",
TL(
"Cascade the views."),
672 TL(
"&Close"),
"",
TL(
"Close the selected view."),
674 FXMenuSeparator* sep2 =
new FXMenuSeparator(
myWindowMenu);
676 sep2->setSelector(FXMDIClient::ID_MDI_ANY);
693 TL(
"Clear Message Window"),
"",
TL(
"Clear the message window."),
792 myScaleTrafficTooltip->setHelpText(
TL(
"Scale traffic volume from running flows and from vehicles that are loaded incrementally from route files."));
812 myStaticTooltipMenu, (std::string(
"\t") +
TL(
"Toggle View Tooltips") + std::string(
"\t") +
TL(
"Toggles whether tooltips in the view shall be shown.")).c_str(),
818 myStaticTooltipMenu, (std::string(
"\t") +
TL(
"Toggle Menu Tooltips") + std::string(
"\t") +
TL(
"Toggles whether tooltips in the menu shall be shown.")).c_str(),
886 new FXMenuSeparator(fileMenuRecentNetworks);
892 new FXMenuCascade(fileMenu,
TL(
"Recent Networks"),
nullptr, fileMenuRecentNetworks);
909 new FXMenuSeparator(fileMenuRecentConfigs);
915 new FXMenuCascade(fileMenu,
TL(
"Recent Configs"),
nullptr, fileMenuRecentConfigs);
922 getApp()->reg().writeStringEntry(
"SETTINGS",
"basedir",
gCurrentFolder.text());
923 getApp()->reg().writeIntEntry(
"SETTINGS",
"maximized", isMaximized() ? 1 : 0);
924 getApp()->reg().writeIntEntry(
"gui",
"timeasHMS",
myShowTimeAsHMS ? 1 : 0);
934 FXMenuCommand* mc =
dynamic_cast<FXMenuCommand*
>(menu);
943 const std::vector<MSLane*>& lanes = (*i)->getLanes();
944 for (std::vector<MSLane*>::const_iterator it = lanes.begin(); it != lanes.end(); ++it) {
1039 FXEvent* e = (FXEvent*) ptr;
1040 onlyNet = (e->state & SHIFTMASK) != 0;
1042 FXRegistry reg(
"SUMO netedit",
"netedit");
1049 std::string netedit =
"netedit";
1050 const char* sumoPath = getenv(
"SUMO_HOME");
1051 if (sumoPath !=
nullptr) {
1052 std::string newPath = std::string(sumoPath) +
"/bin/netedit";
1054 netedit =
"\"" + newPath +
"\"";
1058 std::string cmd = netedit +
" --registry-viewport";
1064 cmd +=
" --ignore.additionalelements";
1067 cmd +=
" --ignore.routeelements";
1077 cmd =
"start /B \"\" " + cmd;
1088 FXRegistry reg(
"SUMO sumo-gui",
"sumo-gui");
1089 std::string sumo_gui =
"sumo-gui";
1090 const char* sumoPath = getenv(
"SUMO_HOME");
1091 if (sumoPath !=
nullptr) {
1092 std::string newPath = std::string(sumoPath) +
"/bin/sumo_gui";
1094 sumo_gui =
"\"" + newPath +
"\"";
1097 std::string cmd = sumo_gui;
1103 cmd =
"start /B \"\" " + cmd;
1115 FXFileDialog opendialog(
this,
TL(
"Open Simulation Configuration"));
1117 opendialog.setSelectMode(SELECTFILE_EXISTING);
1122 if (opendialog.execute()) {
1124 std::string file = opendialog.getFilename().text();
1135 FXFileDialog opendialog(
this,
TL(
"Open Network"));
1137 opendialog.setSelectMode(SELECTFILE_EXISTING);
1142 if (opendialog.execute()) {
1144 std::string file = opendialog.getFilename().text();
1155 FXFileDialog opendialog(
this,
TL(
"Open Shapes"));
1157 opendialog.setSelectMode(SELECTFILE_EXISTING);
1162 if (opendialog.execute()) {
1164 std::string file = opendialog.getFilename().text();
1186 FXFileDialog opendialog(
this,
TL(
"Open EdgeData"));
1188 opendialog.setSelectMode(SELECTFILE_EXISTING);
1193 if (opendialog.execute()) {
1195 std::string file = opendialog.getFilename().text();
1215 getApp()->beginWaitCursor();
1220 if (sender ==
nullptr) {
1244 myStatusbar->getStatusLine()->setText(
TL(
"Already loading!"));
1247 std::string file((
const char*)ptr);
1256 FXFileDialog opendialog(
this,
TL(
"Save SUMO Configuration"));
1258 opendialog.setSelectMode(SELECTFILE_ANY);
1288 sender->handle(
this,
1289 myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1297 sender->handle(
this,
1299 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1307 sender->handle(
this,
1308 myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1316 sender->handle(
this,
1318 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1328 myStatusbar->getStatusLine()->setText(
TL(
"No simulation loaded!"));
1337 getApp()->forceRefresh();
1345 getApp()->forceRefresh();
1354 myStatusbar->getStatusLine()->setText(
TL(
"No simulation loaded!"));
1370 FXFileDialog opendialog(
this,
TL(
"Save Simulation State"));
1372 opendialog.setSelectMode(SELECTFILE_ANY);
1390 FXFileDialog opendialog(
this,
TL(
"Load Simulation State"));
1392 opendialog.setSelectMode(SELECTFILE_ANY);
1397 if (opendialog.execute() && FXStat::exists(opendialog.getFilename())) {
1399 const std::string file = opendialog.getFilename().text();
1508 sender->handle(
this,
1510 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1522 sender->handle(
this,
1524 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1536 sender->handle(
this,
1538 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1548 sender->handle(
this, FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1553 sender->handle(
this, FXSEL(SEL_COMMAND, ID_DISABLE), ptr);
1566 sender->handle(
this, FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1567 sender->handle(
this, FXSEL(SEL_COMMAND, ID_SHOW), ptr);
1570 sender->handle(
this, FXSEL(SEL_COMMAND, ID_DISABLE), ptr);
1571 sender->handle(
this, FXSEL(SEL_COMMAND, ID_HIDE), ptr);
1615 d->show(PLACEMENT_OWNER);
1711 getApp()->reg().writeIntEntry(
"SETTINGS",
"x", getX());
1712 getApp()->reg().writeIntEntry(
"SETTINGS",
"y", getY());
1713 getApp()->reg().writeIntEntry(
"SETTINGS",
"width", getWidth());
1714 getApp()->reg().writeIntEntry(
"SETTINGS",
"height", getHeight());
1716 setDecorations(DECOR_NONE);
1717 place(PLACEMENT_MAXIMIZED);
1737 place(PLACEMENT_VISIBLE);
1738 setDecorations(DECOR_ALL);
1743 setWidth(getApp()->reg().readIntEntry(
"SETTINGS",
"width", 600));
1744 setHeight(getApp()->reg().readIntEntry(
"SETTINGS",
"height", 400));
1745 setX(getApp()->reg().readIntEntry(
"SETTINGS",
"x", 150));
1746 setY(getApp()->reg().readIntEntry(
"SETTINGS",
"y", 150));
1781GUIApplicationWindow::onCmdNewOSG(FXObject*, FXSelector,
void*) {
1817 feedback->show(PLACEMENT_OWNER);
1826 about->show(PLACEMENT_OWNER);
1835 hall->show(PLACEMENT_OWNER);
1841 FXEvent*
event = (FXEvent*)ptr;
1843 setDNDData(FROM_CLIPBOARD, event->target,
string);
1923 if (ec->
myNet ==
nullptr) {
1957 if (ec->
mySettingsFiles.size() > 0 && (!
myIsReload || myGuiSettingsFileMTime < mTime || ec->mySettingsFiles.size() > 1)) {
1969 if (view ==
nullptr) {
1996 for (
const std::string& tlsID : settings.
getTrackers()) {
2004 WRITE_WARNINGF(
"Tracker for unknown tlLogic '%' in settings file '%'", tlsID, fname);
2018 std::vector<SUMOTime> breakpoints;
2023 breakpoints.push_back(t);
2025 std::sort(breakpoints.begin(), breakpoints.end());
2035 WRITE_ERRORF(
"Errors while loading selection: %", msg.c_str());
2039 int numNotFound = 0;
2041 (*myDynamicSelection) >> dummy;
2047 WRITE_MESSAGEF(
"% dynamic objects not present while loading selection", numNotFound - 1);
2053 setTitle(
TL(
"SUMO Interactive Traffic Light"));
2055 setTitle(
TL(
"SUMO Interactive Demand-Responsive-Transport"));
2064 off.
set(getApp()->reg().readRealEntry(
"viewport",
"x"),
2065 getApp()->reg().readRealEntry(
"viewport",
"y"),
2066 getApp()->reg().readRealEntry(
"viewport",
"z"));
2074 (*it)->setText(
"-");
2083 getApp()->endWaitCursor();
2097 if (t - myLastStepEventMillis < MIN_DRAW_DELAY && myRunThread->simulationIsStopable()) {
2114 if (backlog > running) {
2123 vehStats->setText(
toString(running).c_str());
2125 if (!delayStats->shown()) {
2128 delayStats->setText(
toString(backlog).c_str());
2130 if (delayStats->shown()) {
2134 if (teleports > 0) {
2135 if (!teleStats->shown()) {
2138 teleStats->setText((
toString(100.00 * teleports / departed) +
"%").c_str());
2141 if (!personStats->shown()) {
2142 personStats->show();
2147 if (!containerStats->shown()) {
2148 containerStats->show();
2160 getApp()->forceRefresh();
2164 std::stringstream tmp;
2166 if (tmp.str().empty()) {
2207 TLF(
"Simulation ended at time: %. (%)",
2212 TL(
"Do you want to close all open files and views?");
2213 FXuint answer = FXMessageBox::question(
this, MBOX_YES_NO,
TL(
"Simulation ended"),
"%s", text.c_str());
2231#ifdef HAVE_DANGEROUS_SOUNDS
2234 for (; it != end; ++it) {
2305 getApp()->beginWaitCursor();
2320 myStatusbar->getStatusLine()->setText(
TL(
"No simulation loaded!"));
2330 if (caption ==
"") {
2333 FXuint opts = MDI_TRACKING;
2337 if (oldView !=
nullptr) {
2369 (*it)->setText(
"-");
2393 view->makeNonCurrent();
2402 for (FXMainWindow*
const window : trackerWindows) {
2425 return getApp()->getDefaultCursor(DEF_ARROW_CURSOR);
2454 myStatusbar->getStatusLine()->setText(text.c_str());
2455 myStatusbar->getStatusLine()->setNormalText(text.c_str());
2502 std::ostringstream str;
2503 str << std::setfill(
'0');
2511 str << std::setw(2);
2517 str << std::setw(2) << time / 1000;
2518 if (!hideFraction) {
2519 str <<
'.' << std::setw(3) << time % 1000;
2527 if (press !=
nullptr) {
2530 if (release !=
nullptr) {
2538 FXEvent* e = (FXEvent*) ptr;
2539 if (e->code == KEY_Escape) {
2557 if (e->code == FX::KEY_Page_Up) {
2559 }
else if (e->code == FX::KEY_Page_Down) {
2563 const bool ignoreSimple =
myAmGaming && (e->state & (CONTROLMASK | SHIFTMASK | ALTMASK)) == 0;
2564 const long handled = ignoreSimple ? 0 : FXMainWindow::onKeyPress(o, sel, ptr);
2565 if (handled == 0 &&
myMDIClient->numChildren() > 0) {
2570 if (!ignoreSimple) {
2584 const long handled = FXMainWindow::onKeyRelease(o, sel, ptr);
2585 if (handled == 0 &&
myMDIClient->numChildren() > 0) {
2586 FXEvent* e = (FXEvent*) ptr;
2636 if (time >= begin) {
2638 time -= (time - begin) %
DELTA_T;
2640 if (std::find(breakpoints.begin(), breakpoints.end(), time) == breakpoints.end()) {
2641 breakpoints.push_back(time);
2642 std::sort(breakpoints.begin(), breakpoints.end());
2650const std::vector<SUMOTime>
@ MID_HOTKEY_CTRL_Q_CLOSE
Main window closes.
@ ID_RUNTHREAD_EVENT
The testing 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_TOOLBAREDIT_LOADADDITIONALS
load additionals in sumo-gui/netedit after press ctrl+T
@ 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_HOTKEY_A_MODE_STARTSIMULATION_ADDITIONALS_STOPS
hotkey for start simulation in SUMO and set editing mode additionals AND stops in netedit
@ 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_TOOLBAREDIT_LOADDEMAND
load demand in sumo-gui/netedit after press ctrl+T
@ 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_CTRL_A_STARTSIMULATION_OPENADDITIONALELEMENTS
Start the simulation in SUMO and open Additionals Elements 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_SHOWTOOLTIPS_MENU
Show tool tips in menus - button.
@ 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_HOTKEY_SHIFT_L_LOCATEPOLY
Locate polygons - button.
@ MID_HOTKEY_CTRL_K_OPENTLSPROGRAMS
Load file with TLS Programs.
@ MID_LANGUAGE_IT
change language to italian
@ MID_HOTKEY_SHIFT_E_LOCATEEDGE
Locate edge - button.
@ MID_HOTKEY_ALT_B_BREAKPOINT_EARLY
hotkey for setting a breakpoint ahead of the current time
@ 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_SHOWTOOLTIPS_VIEW
Show tool tips in view - button.
@ MID_GEO_COORDINATE
enter geo coordinate to center view
@ 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_HOTKEY_B_BREAKPOINT
hotkey for setting a breakpoint
@ MID_LANGUAGE_DE
change language to german
@ MID_HOTKEY_ALT_F4_CLOSE
Main window closes.
@ MID_TIME_TOGGLE
toggle time display mode
@ MID_DELAY_DEC
decrease sim delay
@ MID_NEW_OSGVIEW
Open a new microscopic 3D view.
@ MID_CARTESIAN_COORDINATE
enter cartesian coordinate to center view
@ MID_LANGUAGE_JA
change language to japanese
@ 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_HOTKEY_CTRL_SHIFT_T_OPEN_NET
load only the network in sumo-gui/netedit
@ MID_WINDOW
Main window-ID.
@ MID_LANGUAGE_KO
change language to korean
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 GUIDesignMFXCheckableButtonSquare
#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 occurred
@ GLDEBUG_OCCURRED
send when a gldebug occurred
@ ERROR_OCCURRED
send when a error occurred
@ 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 occurred
@ DEBUG_OCCURRED
send when a debug occurred
@ WARNING_OCCURRED
send when a warning occurred
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_WARNINGF(...)
#define WRITE_MESSAGEF(...)
#define WRITE_ERRORF(...)
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)
constexpr SUMOTime TIME2STEPS(double x)
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
int GUIDesignHeight
the default height for GUI elements
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
MFXLabelTooltip * myScaleTrafficTooltip
the demand scale label
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
long onCmdBreakpoint(FXObject *, FXSelector, void *)
Called to set a breakpoint via hotkey.
FXToolBarShell * myToolBarDrag9
FXRealSpinner * mySimDelaySpinner
Simulation delay spinner.
long onCmdBreakpointEarly(FXObject *, FXSelector, void *)
Called to set an early breakpoint via hotkey.
long onCmdChangelog(FXObject *sender, FXSelector sel, void *ptr)
called if the user selects help->Changelog
long onCmdOpenInNetedit(FXObject *, FXSelector, void *)
Called on menu Edit->open in Netedit.
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
MFXCheckableButton * myShowToolTipsView
checkable button for show tool tips in view
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
long onCmdShowToolTipsMenu(FXObject *, FXSelector, void *)
Called on "show tool tips in menu".
virtual void setDelay(double delay)
Sets the delay of the parent application in milliseconds.
MFXLCDLabel * myEmergencyVehicleLabel
emergency vehicle label
std::stringstream * myDynamicSelection
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.
GUIApplicationWindow(FXApp *a)
Constructor.
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 onCmdDelayToggle(FXObject *, FXSelector, void *)
Called on "delay toggle".
FXMenuCheck * myLoadAdditionalsInNetedit
menuCheck for enable/disable load additionals in netedit
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
MFXCheckableButton * myShowToolTipsMenu
checkable button for show tool tips in menu
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.
long onUpdNeedsSumoConfig(FXObject *, FXSelector, void *)
Determines whether some buttons which require an sumoConfig may be shown.
void loadOnStartup(const bool wait=false)
config or net on startup
void addBreakpoint(SUMOTime time)
Adds the given breakpoint.
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.
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)
FXMenuCommand * myOpenNetInNetedit
menuCommand for opening only the network in netedit
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.
virtual void setBreakpoints(const std::vector< SUMOTime > &breakpoints)
Sets the breakpoints of the parent application.
long onUpdNeedsNetwork(FXObject *, FXSelector, void *)
Determines whether some buttons which require an active network may be shown.
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 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
long onCmdShowToolTipsView(FXObject *, FXSelector, void *)
Called on "show tool tips in view".
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 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.
FXMenuCheck * myLoadDemandInNetedit
menuCheck for enable/disable load demand elements in netedit
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 certain event ocurred
void checkGamingEvents()
handles additional game-related events
long onCmdQuickReload(FXObject *, FXSelector, void *)
Called on quick-reload.
FXMenuCommand * myOpenInNetedit
menuCommand for opening simulation/network in netedit
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.
void saveDecals(const std::vector< GUISUMOAbstractView::Decal > &decals)
Makes the given decals the default.
static void close()
close GUICursorSubSys
static void initCursors(FXApp *a)
Initiate GUICursorSubSys.
static FXLabel * buildFXLabel(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXuint opts, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
Construct label with given text and icon.
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
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 FXMenuCheck * buildFXMenuCheckbox(FXComposite *p, const std::string &text, const std::string &info, FXObject *tgt, FXSelector sel)
build menu checkbox
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel, const bool disable=false)
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 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)
long onCmdUnfocusCoordinate(FXObject *, FXSelector, void *)
called when a coordinate field in the status bar loses focus
std::vector< FXMainWindow * > myTrackerWindows
list of tracker windows
FXMenuPane * myLanguageMenu
Language menu common to all applications.
GUISUMOAbstractView * getActiveView() const
get the active view or 0
long onCmdSetGeoCoordinate(FXObject *, FXSelector, void *)
called when user enters a geo coordinate in the status bar
bool myListTeleporting
information whether the locator should list teleporting vehicles
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.
long onCmdSetCartesianCoordinate(FXObject *, FXSelector, void *)
called when user enters a cartesian coordinate in the status bar
FXHorizontalFrame * myTraCiFrame
frames for coordinates
void buildLanguageMenu(FXMenuBar *menuBar)
long onCmdChangeLanguage(FXObject *, FXSelector, void *)
MFXStaticToolTip * myStaticTooltipView
static toolTip used in view
bool listParking() const
return whether to list parking vehicles
FXHorizontalFrame * myGeoFrame
FXTextField * myCartesianCoordinate
Coordinate fields for the current cartesian, geo-coordinate and test coordinates.
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
long onCmdFocusCoordinate(FXObject *, FXSelector, void *)
called when user focuses a coordinate field in the status bar
bool myAmFullScreen
FOX need this.
FXStatusBar * myStatusbar
The status bar.
void updateChildren(int msg=MID_SIMSTEP)
update childrens
FXTextField * myGeoCoordinate
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.
static SUMOTime getBreakPointOffset()
ask whether locate links is enabled
MSTransportableControl & getPersonControl() override
Returns the person control.
void flushOutputsAtEnd()
flush outputs once the simulation has reached its end
GUITrafficLightLogicWrapper * getTLLWrapper(MSTrafficLightLogic *tll)
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 getRotation() const =0
Returns the rotation of the canvas stored in this changer.
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)
void singleStep()
called when the user presses the "single step"-button
GUINet & getNet() const
returns the loaded network
virtual void begin()
starts the simulation (execution of one step after another)
SUMOTime getSimBegin()
get simulation begin time
void resume()
called when the user presses the "resume"-button
virtual bool simulationIsStartable() const
check if simulation is startable
bool networkAvailable() const
returns the information whether a network has been loaded
virtual bool simulationIsStepable() const
check if simulation is stepable
std::vector< SUMOTime > & getBreakpoints()
get list of breakpoints
virtual bool init(GUINet *net, SUMOTime start, SUMOTime end)
initialises the thread with the new simulation
FXMutex & getBreakpointLock()
get breakpoint lock
SUMOTime getSimEndTime() const
get simulation end time
virtual bool simulationIsStopable() const
check if simulation is stopableo
virtual void deleteSim()
deletes the existing simulation
void stop()
halts the simulation execution
void prepareDestruction()
halts the thread before it shall be deleted
MFXComboBoxIcon * getColoringSchemesCombo()
get coloring schemes combo
void addDecals(const std::vector< Decal > &decals)
add decals
void processPendingTextureDeletes()
process pending texture deletions
FXbool makeCurrent()
A reimplementation due to some internal reasons.
const GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings (read only)
GUIPerspectiveChanger & getChanger() const
get changer
std::vector< Decal > & getDecals()
The list of decals to show.
void clearDecals()
clear all decals
virtual void updatePositionInformationLabel() const
update position information labels
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
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.
std::string load(const std::string &filename, GUIGlObjectType type=GLO_MAX, std::ostream *dynamicNotFound=nullptr)
Loads a selection list (optionally with restricted type)
An XML-handler for visualisation schemes.
double getDelay() const
Returns the parsed delay.
const std::string & getSettingName() const
std::vector< std::string > getTrackers()
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 accelerator (used for toggle dynamically binding space key with start/end simulation)
static void resetTextures()
Reset textures.
static void initTextures(FXApp *a)
Initiate GUITextureSubSys for textures.
void begin2TrackPhases(GUIMainWindow *app=nullptr)
Builds a GUITLLogicPhasesTrackerWindow which will receive new phases.
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.
long setCurrentItem(const FXint index, FXbool notify=FALSE)
Set the current item (index is zero-based)
FXint findItem(const FXString &text) const
find item
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 FXFileDialog &openDialog)
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).
MSTLLogicControl & getTLSControl()
Returns the tls logics control.
@ 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.
MSTrafficLightLogic * getActive() const
bool knows(const std::string &id) const
Returns the information whether the named tls is stored.
TLSLogicVariants & get(const std::string &id) const
Returns the variants of a named tls.
The parent class for traffic light logics.
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
int getDepartedVehicleNo() const
Returns the number of inserted vehicles.
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.
int getTeleportCount() const
return the number of teleports (including collisions)
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.
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 std::string &indent="") const
Writes the configuration.
bool isSet(const std::string &name, bool failOnNonExistant=true) const
Returns the information whether the named option is set.
double getFloat(const std::string &name) const
Returns the double-value of the named option (only for Option_Float)
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.
const StringVector & getStringVector(const std::string &name) const
Returns the list of string-value of the named option (only for Option_StringVector)
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.
static StringBijection< StateFileExtension > StateFileExtensions
state file extensions
static StringBijection< SumoConfigFileExtension > SumoConfigFileExtensions
sumo config file extensions
static StringBijection< EdgeDataFileExtension > EdgeDataFileExtensions
edgedata file extensions
static StringBijection< ShapesFileExtension > ShapesFileExtensions
additional file extensions
static StringBijection< NetFileExtension > NetFileExtensions
net file extensions
std::vector< std::string > getVector()
return vector of strings
static std::string replace(std::string str, const std::string &what, const std::string &by)
Replaces all occurrences of the second string by the third string within the first string.
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.
static std::string transcodeToLocal(const std::string &utf8String)
convert a string from UTF-8 to the local codepage