80#define MIN_DRAW_DELAY 20
120 FXMAPFUNC(SEL_COMMAND,
MID_NEW_OSGVIEW, GUIApplicationWindow::onCmdNewOSG),
233FXIMPLEMENT(
GUIApplicationWindow, FXMainWindow, GUIApplicationWindowMap, ARRAYNUMBER(GUIApplicationWindowMap))
246#pragma warning(disable: 4355)
250 myFileMenuRecentNetworks(new FXMenuPane(this)),
251 myFileMenuRecentConfigs(new FXMenuPane(this)),
252 myRecentNetworks(a,
"networks"),
253 myRecentConfigs(a,
"configs"),
262 a->setTooltipTime(1000000000);
263 a->setTooltipPause(1000000000);
301 button->setBackColor(FXRGBA(253, 255, 206, 255));
351 gCurrentFolder = getApp()->reg().readStringEntry(
"SETTINGS",
"basedir",
"");
352 FXMainWindow::create();
370 FXint textWidth = getApp()->getNormalFont()->getTextWidth(
"8", 1) * 24;
377 show(PLACEMENT_DEFAULT);
379 if (getApp()->reg().readIntEntry(
"SETTINGS",
"maximized", 0) == 1) {
383 myShowTimeAsHMS = (getApp()->reg().readIntEntry(
"gui",
"timeasHMS", 0) == 1);
385 const std::string& onlineMaps = getApp()->reg().readStringEntry(
"gui",
"onlineMaps",
"");
388 if (
split.size() == 2) {
393 myOnlineMaps[
"GeoHack"] =
"https://geohack.toolforge.org/geohack.php?params=%lat;%lon_scale:1000";
394 myOnlineMaps[
"Google Maps"] =
"https://www.google.com/maps?ll=%lat,%lon&t=h&z=18";
395 myOnlineMaps[
"OSM"] =
"https://www.openstreetmap.org/?mlat=%lat&mlon=%lon&zoom=18&layers=M";
445 FXMainWindow::detach();
463 TL(
"New Window"),
"Ctrl+Shift+N",
TL(
"Open a new sumo-gui window."),
467 TL(
"&Open Simulation..."),
"Ctrl+O",
TL(
"Open a simulation (Configuration file)."),
470 TL(
"Open &Network..."),
"Ctrl+N",
TL(
"Open a network."),
473 TL(
"Open Shapes "),
"Ctrl+P",
TL(
"Load POIs and Polygons for visualization."),
476 TL(
"Open EdgeData "),
"Ctrl+U",
TL(
"Load edge related data for visualization."),
479 TL(
"&Reload"),
"Ctrl+R",
TL(
"Reloads the simulation / the network."),
482 TL(
"Quick-Reload"),
"Ctrl+0",
TL(
"Reloads the simulation (but not network)."),
486 TL(
"Save Configuration"),
"Ctrl+Shift+S",
TL(
"Save current options as a configuration file."),
489 TL(
"Close"),
"Ctrl+W",
TL(
"Close the simulation."),
497 TL(
"&Quit"),
"Ctrl+Q",
TL(
"Quit the Application."),
502 for (
const auto& vehicleClass : vehicleClasses) {
508 TL(
"Edit Selected..."),
"Ctrl+E",
TL(
"Opens a dialog for editing the list of selected items."),
514 TL(
"Set Breakpoint"),
"B",
TL(
"Sets a breakpoint at the current simulation step"),
517 TL(
"Set Breakpoint with offset"),
"Alt+B",
TL(
"Sets a breakpoint at the current simulation step + offset configured in application settings"),
520 TL(
"Edit Breakpoints"),
"Ctrl+B",
TL(
"Opens a dialog for editing breakpoints."),
523 TL(
"Edit Visualisation"),
"F9",
TL(
"Opens a dialog for editing visualization settings."),
526 TL(
"Edit Viewport"),
"Ctrl+I",
TL(
"Opens a dialog for editing viewing area, zoom and rotation."),
535 TL(
"Open in netedit"),
"Ctrl+T",
TL(
"Opens current simulation in NETEDIT."),
541 TL(
"Application Settings"),
"Ctrl+H",
TL(
"Open a Dialog for Application Settings editing."),
544 TL(
"Gaming Mode\tCtrl+G\tToggle gaming mode on/off."),
547 TL(
"Full Screen Mode"),
"Ctrl+F",
TL(
"Toggle full screen mode on/off."),
553 TL(
"&Junctions"),
"Shift+J",
TL(
"Open a dialog for locating a Junction."),
556 TL(
"&Edges"),
"Shift+E",
TL(
"Open a dialog for locating an Edge."),
559 TL(
"&Vehicles"),
"Shift+V",
TL(
"Open a dialog for locating a Vehicle."),
562 TL(
"&Persons"),
"Shift+P",
TL(
"Open a dialog for locating a Person."),
565 TL(
"&Container"),
"Shift+C",
TL(
"Open a dialog for locating a Container."),
568 TL(
"&TLS"),
"Shift+T",
TL(
"Open a dialog for locating a Traffic Light."),
571 TL(
"&Additional"),
"Shift+A",
TL(
"Open a dialog for locating an Additional Structure."),
574 TL(
"P&oI"),
"Shift+O",
TL(
"Open a dialog for locating a Point of Interest."),
577 TL(
"Po&lygon"),
"Shift+L",
TL(
"Open a dialog for locating a Polygon."),
590 TL(
"Run"),
"A,space",
TL(
"Start/ Resume the simulation."),
593 TLC(
"Simulation",
"Stop"),
"S,space",
TL(
"Halt the simulation."),
596 TL(
"Step"),
"D",
TL(
"Perform one simulation step."),
599 TL(
"Delay+"),
"PgUp",
TL(
"Increase simulation step delay."),
nullptr,
this,
MID_DELAY_INC);
601 TL(
"Delay-"),
"PgDn",
TL(
"Decrease simulation step delay."),
nullptr,
this,
MID_DELAY_DEC);
603 TL(
"Save"),
"",
TL(
"Save the current simulation state to a file."),
606 TL(
"Load"),
"",
TL(
"Load simulation state for the current network from file."),
616 TL(
"Tile &Horizontally"),
"",
TL(
"Tile the views horizontally."),
619 TL(
"Tile &Vertically"),
"",
TL(
"Tile the views vertically."),
622 TL(
"Cascade"),
"",
TL(
"Cascade the views."),
626 TL(
"&Close"),
"",
TL(
"Close the selected view."),
628 FXMenuSeparator* sep2 =
new FXMenuSeparator(
myWindowMenu);
630 sep2->setSelector(FXMDIClient::ID_MDI_ANY);
647 TL(
"Clear Message Window"),
"",
TL(
"Clear the message window."),
746 myScaleTrafficTooltip->setHelpText(
TL(
"Scale traffic volume from running flows and from vehicles that are loaded incrementally from route files."));
828 new FXMenuSeparator(fileMenuRecentNetworks);
834 new FXMenuCascade(fileMenu,
TL(
"Recent Networks"),
nullptr, fileMenuRecentNetworks);
851 new FXMenuSeparator(fileMenuRecentConfigs);
857 new FXMenuCascade(fileMenu,
TL(
"Recent Configs"),
nullptr, fileMenuRecentConfigs);
864 getApp()->reg().writeStringEntry(
"SETTINGS",
"basedir",
gCurrentFolder.text());
865 getApp()->reg().writeIntEntry(
"SETTINGS",
"maximized", isMaximized() ? 1 : 0);
866 getApp()->reg().writeIntEntry(
"gui",
"timeasHMS",
myShowTimeAsHMS ? 1 : 0);
876 FXMenuCommand* mc =
dynamic_cast<FXMenuCommand*
>(menu);
886 const std::vector<MSLane*>& lanes = (*i)->getLanes();
887 for (std::vector<MSLane*>::const_iterator it = lanes.begin(); it != lanes.end(); ++it) {
974 FXRegistry reg(
"SUMO netedit",
"netedit");
981 std::string netedit =
"netedit";
982 const char* sumoPath = getenv(
"SUMO_HOME");
983 if (sumoPath !=
nullptr) {
984 std::string newPath = std::string(sumoPath) +
"/bin/netedit";
986 netedit =
"\"" + newPath +
"\"";
990 std::string cmd = netedit +
" --registry-viewport";
996 cmd +=
" --ignore.additionalelements";
999 cmd +=
" --ignore.routeelements";
1009 cmd =
"start /B \"\" " + cmd;
1020 FXRegistry reg(
"SUMO sumo-gui",
"sumo-gui");
1021 std::string sumo_gui =
"sumo-gui";
1022 const char* sumoPath = getenv(
"SUMO_HOME");
1023 if (sumoPath !=
nullptr) {
1024 std::string newPath = std::string(sumoPath) +
"/bin/sumo_gui";
1026 sumo_gui =
"\"" + newPath +
"\"";
1029 std::string cmd = sumo_gui;
1035 cmd =
"start /B \"\" " + cmd;
1047 FXFileDialog opendialog(
this,
TL(
"Open Simulation Configuration"));
1049 opendialog.setSelectMode(SELECTFILE_EXISTING);
1054 if (opendialog.execute()) {
1056 std::string file = opendialog.getFilename().text();
1067 FXFileDialog opendialog(
this,
TL(
"Open Network"));
1069 opendialog.setSelectMode(SELECTFILE_EXISTING);
1074 if (opendialog.execute()) {
1076 std::string file = opendialog.getFilename().text();
1087 FXFileDialog opendialog(
this,
TL(
"Open Shapes"));
1089 opendialog.setSelectMode(SELECTFILE_EXISTING);
1094 if (opendialog.execute()) {
1096 std::string file = opendialog.getFilename().text();
1118 FXFileDialog opendialog(
this,
TL(
"Open EdgeData"));
1120 opendialog.setSelectMode(SELECTFILE_EXISTING);
1125 if (opendialog.execute()) {
1127 std::string file = opendialog.getFilename().text();
1147 getApp()->beginWaitCursor();
1152 if (sender ==
nullptr) {
1176 myStatusbar->getStatusLine()->setText(
TL(
"Already loading!"));
1179 std::string file((
const char*)ptr);
1188 FXFileDialog opendialog(
this,
TL(
"Save SUMO Configuration"));
1190 opendialog.setSelectMode(SELECTFILE_ANY);
1220 sender->handle(
this,
1221 myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1229 sender->handle(
this,
1231 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1239 sender->handle(
this,
1240 myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1248 sender->handle(
this,
1250 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1260 myStatusbar->getStatusLine()->setText(
TL(
"No simulation loaded!"));
1269 getApp()->forceRefresh();
1277 getApp()->forceRefresh();
1286 myStatusbar->getStatusLine()->setText(
TL(
"No simulation loaded!"));
1302 FXFileDialog opendialog(
this,
TL(
"Save Simulation State"));
1304 opendialog.setSelectMode(SELECTFILE_ANY);
1322 FXFileDialog opendialog(
this,
TL(
"Load Simulation State"));
1324 opendialog.setSelectMode(SELECTFILE_ANY);
1329 if (opendialog.execute() && FXStat::exists(opendialog.getFilename())) {
1331 const std::string file = opendialog.getFilename().text();
1440 sender->handle(
this,
1442 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1454 sender->handle(
this,
1456 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1468 sender->handle(
this,
1470 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1480 sender->handle(
this, FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1485 sender->handle(
this, FXSEL(SEL_COMMAND, ID_DISABLE), ptr);
1498 sender->handle(
this, FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1499 sender->handle(
this, FXSEL(SEL_COMMAND, ID_SHOW), ptr);
1502 sender->handle(
this, FXSEL(SEL_COMMAND, ID_DISABLE), ptr);
1503 sender->handle(
this, FXSEL(SEL_COMMAND, ID_HIDE), ptr);
1547 d->show(PLACEMENT_OWNER);
1643 getApp()->reg().writeIntEntry(
"SETTINGS",
"x", getX());
1644 getApp()->reg().writeIntEntry(
"SETTINGS",
"y", getY());
1645 getApp()->reg().writeIntEntry(
"SETTINGS",
"width", getWidth());
1646 getApp()->reg().writeIntEntry(
"SETTINGS",
"height", getHeight());
1648 setDecorations(DECOR_NONE);
1649 place(PLACEMENT_MAXIMIZED);
1669 place(PLACEMENT_VISIBLE);
1670 setDecorations(DECOR_ALL);
1675 setWidth(getApp()->reg().readIntEntry(
"SETTINGS",
"width", 600));
1676 setHeight(getApp()->reg().readIntEntry(
"SETTINGS",
"height", 400));
1677 setX(getApp()->reg().readIntEntry(
"SETTINGS",
"x", 150));
1678 setY(getApp()->reg().readIntEntry(
"SETTINGS",
"y", 150));
1713GUIApplicationWindow::onCmdNewOSG(FXObject*, FXSelector,
void*) {
1725 feedback->show(PLACEMENT_OWNER);
1734 about->show(PLACEMENT_OWNER);
1743 hall->show(PLACEMENT_OWNER);
1749 FXEvent*
event = (FXEvent*)ptr;
1751 setDNDData(FROM_CLIPBOARD, event->target,
string);
1831 if (ec->
myNet ==
nullptr) {
1865 if (ec->
mySettingsFiles.size() > 0 && (!
myIsReload || myGuiSettingsFileMTime < mTime || ec->mySettingsFiles.size() > 1)) {
1877 if (view ==
nullptr) {
1915 std::vector<SUMOTime> breakpoints;
1920 breakpoints.push_back(t);
1922 std::sort(breakpoints.begin(), breakpoints.end());
1932 WRITE_ERRORF(
"Errors while loading selection: %", msg.c_str());
1936 int numNotFound = 0;
1938 (*myDynamicSelection) >> dummy;
1944 WRITE_MESSAGEF(
"% dynamic objects not present while loading selection", numNotFound - 1);
1950 setTitle(
TL(
"SUMO Interactive Traffic Light"));
1952 setTitle(
TL(
"SUMO Interactive Demand-Responsive-Transport"));
1961 off.
set(getApp()->reg().readRealEntry(
"viewport",
"x"),
1962 getApp()->reg().readRealEntry(
"viewport",
"y"),
1963 getApp()->reg().readRealEntry(
"viewport",
"z"));
1971 (*it)->setText(
"-");
1980 getApp()->endWaitCursor();
1994 if (t - myLastStepEventMillis < MIN_DRAW_DELAY && myRunThread->simulationIsStopable()) {
2003 if (backlog > running) {
2033 getApp()->forceRefresh();
2037 std::stringstream tmp;
2039 if (tmp.str().empty()) {
2080 TLF(
"Simulation ended at time: %. (%)",
2085 TL(
"Do you want to close all open files and views?");
2086 FXuint answer = FXMessageBox::question(
this, MBOX_YES_NO,
TL(
"Simulation ended"),
"%s", text.c_str());
2104#ifdef HAVE_DANGEROUS_SOUNDS
2107 for (; it != end; ++it) {
2178 getApp()->beginWaitCursor();
2193 myStatusbar->getStatusLine()->setText(
TL(
"No simulation loaded!"));
2203 if (caption ==
"") {
2206 FXuint opts = MDI_TRACKING;
2210 if (oldView !=
nullptr) {
2242 (*it)->setText(
"-");
2257 for (FXMainWindow*
const window : trackerWindows) {
2281 return getApp()->getDefaultCursor(DEF_ARROW_CURSOR);
2310 myStatusbar->getStatusLine()->setText(text.c_str());
2311 myStatusbar->getStatusLine()->setNormalText(text.c_str());
2358 std::ostringstream str;
2359 str << std::setfill(
'0');
2367 str << std::setw(2);
2368 str << time / 3600000 <<
'-';
2370 str << std::setw(2) << time / 60000 <<
'-';
2373 str << std::setw(2) << time / 1000;
2374 if (!hideFraction) {
2375 str <<
'.' << std::setw(3) << time % 1000;
2383 if (press !=
nullptr) {
2386 if (release !=
nullptr) {
2394 FXEvent* e = (FXEvent*) ptr;
2397 if (e->code == FX::KEY_Page_Up) {
2399 }
else if (e->code == FX::KEY_Page_Down) {
2403 const bool ignoreSimple =
myAmGaming && (e->state & (CONTROLMASK | SHIFTMASK | ALTMASK)) == 0;
2404 const long handled = ignoreSimple ? 0 : FXMainWindow::onKeyPress(o, sel, ptr);
2405 if (handled == 0 &&
myMDIClient->numChildren() > 0) {
2410 if (!ignoreSimple) {
2424 const long handled = FXMainWindow::onKeyRelease(o, sel, ptr);
2425 if (handled == 0 &&
myMDIClient->numChildren() > 0) {
2426 FXEvent* e = (FXEvent*) ptr;
2476 if (time >= begin) {
2478 time -= (time - begin) %
DELTA_T;
2480 if (std::find(breakpoints.begin(), breakpoints.end(), time) == breakpoints.end()) {
2481 breakpoints.push_back(time);
2482 std::sort(breakpoints.begin(), breakpoints.end());
2490const 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_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_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_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_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_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(...)
#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)
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types.
@ SVC_EMERGENCY
public emergency vehicles
const double SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
#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
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
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
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)
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
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 open 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.
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)
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.
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
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)
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
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
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
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 initTextures(FXApp *a)
Initiate GUITextureSubSys for textures.
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.
long setCurrentItem(const FXint index, FXbool notify=FALSE)
Set the current item (index is zero-based)
FXint findItem(const FXString &text) const
find item
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 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).
@ 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.
The XML-Handler for shapes loading network loading.
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.
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.
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.
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.