126 FXMAPFUNC(SEL_COMMAND,
MID_NEW_OSGVIEW, GUIApplicationWindow::onCmdNewOSG),
194 FXIMPLEMENT(
GUIApplicationWindow, FXMainWindow, GUIApplicationWindowMap, ARRAYNUMBER(GUIApplicationWindowMap))
206 myLoadThread(nullptr), myRunThread(nullptr),
208 myAlternateSimDelay(0),
209 myRecentNets(a,
"nets"),
210 myConfigPattern(configPattern),
211 hadDependentBuild(false),
212 myShowTimeAsHMS(false),
213 myHaveNotifiedAboutSimEnd(false),
216 myPreviousCollisionNumber(0),
219 myEmergencyVehicleCount(0),
252 myGeoCoordinate =
new FXLabel(
myGeoFrame,
"N/A\t\tOriginal coordinate (before coordinate transformation in NETCONVERT)",
nullptr, LAYOUT_CENTER_Y);
297 gCurrentFolder = getApp()->reg().readStringEntry(
"SETTINGS",
"basedir",
"");
298 FXMainWindow::create();
316 FXint textWidth = getApp()->getNormalFont()->getTextWidth(
"8", 1) * 24;
320 show(PLACEMENT_DEFAULT);
322 if (getApp()->reg().readIntEntry(
"SETTINGS",
"maximized", 0) == 1) {
326 myShowTimeAsHMS = (getApp()->reg().readIntEntry(
"gui",
"timeasHMS", 0) == 1);
364 FXMainWindow::detach();
376 "&Open Simulation...\tCtrl+O\tOpen a simulation (Configuration file).",
379 "Open &Network...\tCtrl+N\tOpen a network.",
382 "Open Shapes \tCtrl+P\tLoad POIs and Polygons for visualization.",
385 "Open EdgeData \tCtrl+U\tLoad edge related data for visualization.",
388 "&Reload\tCtrl+R\tReloads the simulation / the network.",
392 "Close\tCtrl+W\tClose the simulation.",
395 FXMenuSeparator* sep1 =
new FXMenuSeparator(
myFileMenu);
397 sep1->setSelector(FXRecentFiles::ID_ANYFILES);
411 FXMenuSeparator* sep2 =
new FXMenuSeparator(
myFileMenu);
413 sep2->setSelector(FXRecentFiles::ID_ANYFILES);
429 "&Quit\tCtrl+Q\tQuit the Application.",
435 for (
auto i : vehicleClasses) {
440 new FXMenuTitle(
myMenuBar,
"&Edit",
nullptr, myEditMenu);
441 new FXMenuCommand(myEditMenu,
442 "Edit Selected...\tCtrl+E\tOpens a dialog for editing the list of selected items.",
445 "Select lanes which allow...\t\tOpens a menu for selecting a vehicle class by which to selected lanes.",
447 new FXMenuSeparator(myEditMenu);
448 new FXMenuCommand(myEditMenu,
449 "Edit Breakpoints\tCtrl+B\tOpens a dialog for editing breakpoints.",
451 new FXMenuCommand(myEditMenu,
452 "Edit Visualisation\tCtrl+V\tOpens a dialog for editing visualization settings.",
454 new FXMenuCommand(myEditMenu,
455 "Edit Viewport\tCtrl+I\tOpens a dialog for editing viewing are, zoom and rotation.",
457 new FXMenuSeparator(myEditMenu);
458 new FXMenuCommand(myEditMenu,
459 "Open in Netedit\tCtrl+T\tOpens the netedit application with the current network.",
466 "Application Settings...\t\tOpen a Dialog for Application Settings editing.",
469 "Gaming Mode\tCtrl+G\tToggle gaming mode on/off.",
472 "Full Screen Mode\tCtrl+F\tToggle full screen mode on/off.",
478 "Locate &Junctions\t\tOpen a Dialog for Locating a Junction.",
481 "Locate &Edges\t\tOpen a Dialog for Locating an Edge.",
485 "Locate &Vehicles\t\tOpen a Dialog for Locating a Vehicle.",
489 "Locate &Persons\t\tOpen a Dialog for Locating a Person.",
492 "Locate &TLS\t\tOpen a Dialog for Locating a Traffic Light.",
495 "Locate &Additional\t\tOpen a Dialog for Locating an Additional Structure.",
498 "Locate P&oI\t\tOpen a Dialog for Locating a Point of Intereset.",
501 "Locate Po&lygon\t\tOpen a Dialog for Locating a Polygon.",
505 "Show Internal Structures\t\tShow internal junctions and streets in locator dialog.",
508 "Show Parking Vehicles\t\tShow parking vehicles in locator dialog.",
512 "Show vehicles outside the road network\t\tShow vehicles that are teleporting or driving remote-controlled outside the road network in locator dialog.",
518 "Run\tCtrl+A\tStart running the simulation.",
521 "Stop\tCtrl+S\tStop running the simulation.",
524 "Step\tCtrl+D\tPerform one simulation step.",
527 "Save\t\tSave the current simulation state to a file.",
534 "Show Status Line\t\tToggle the Status Bar on/off.",
537 "Show Message Window\t\tToggle the Message Window on/off.",
540 "Show Simulation Time\t\tToggle the Simulation Time on/off.",
543 "Show Simulation Delay\t\tToggle the Simulation Delay Entry on/off.",
560 sep1->setSelector(FXMDIClient::ID_MDI_ANY);
568 "Clear Message Window\t\tClear the message window.",
631 mySimDelaySlider =
new FXSlider(
myToolBar4,
mySimDelayTarget, FXDataTarget::ID_VALUE, LAYOUT_FIX_WIDTH | SLIDER_ARROW_UP | SLIDER_TICKS_TOP, 0, 0, 300, 10, 0, 0, 5, 0);
648 new FXLabel(
myToolBar8,
"Scale Traffic:\t\tScale traffic from flows and vehicles that are loaded incrementally from route files",
nullptr, LAYOUT_TOP | LAYOUT_LEFT);
660 new FXButton(
myToolBar5,
"\t\tOpen a new microscopic view.",
663 new FXButton(
myToolBar5,
"\t\tOpen a new 3D view.",
673 new FXLabel(
myToolBar6,
"Waiting Time:\t\tTime spent waiting accumulated for all vehicles",
nullptr, LAYOUT_TOP | LAYOUT_LEFT);
685 new FXLabel(
myToolBar7,
"Time Loss:\t\tTime lost due to being unable to drive with maximum speed for all vehicles",
nullptr, LAYOUT_TOP | LAYOUT_LEFT);
697 new FXLabel(
myToolBar9,
"Distance (km):\t\tTotal distance driven by DRT vehicles",
nullptr, LAYOUT_TOP | LAYOUT_LEFT);
709 new FXLabel(
myToolBar10,
"Emergency Vehicle waiting time:\t\tTime spent waiting accumulated for emergency vehicles",
nullptr, LAYOUT_TOP | LAYOUT_LEFT);
723 getApp()->reg().writeStringEntry(
"SETTINGS",
"basedir",
gCurrentFolder.text());
724 getApp()->reg().writeIntEntry(
"SETTINGS",
"maximized", isMaximized() ? 1 : 0);
725 getApp()->reg().writeIntEntry(
"gui",
"timeasHMS",
myShowTimeAsHMS ? 1 : 0);
734 FXMenuCommand* mc =
dynamic_cast<FXMenuCommand*
>(menu);
735 if (mc->getText() ==
"Edit Selected...") {
744 const std::vector<MSLane*>& lanes = (*i)->getLanes();
745 for (std::vector<MSLane*>::const_iterator it = lanes.begin(); it != lanes.end(); ++it) {
805 FXRegistry reg(
"SUMO netedit",
"Eclipse");
812 std::string netedit =
"netedit";
813 const char* sumoPath = getenv(
"SUMO_HOME");
814 if (sumoPath !=
nullptr) {
815 std::string newPath = std::string(sumoPath) +
"/bin/netedit";
817 netedit =
"\"" + newPath +
"\"";
826 cmd =
"start /B \"\" " + cmd;
838 FXFileDialog opendialog(
this,
"Open Simulation Configuration");
840 opendialog.setSelectMode(SELECTFILE_EXISTING);
845 if (opendialog.execute()) {
847 std::string file = opendialog.getFilename().text();
858 FXFileDialog opendialog(
this,
"Open Network");
860 opendialog.setSelectMode(SELECTFILE_EXISTING);
861 opendialog.setPatternList(
"SUMO nets (*.net.xml)\nAll files (*)");
865 if (opendialog.execute()) {
867 std::string file = opendialog.getFilename().text();
878 FXFileDialog opendialog(
this,
"Open Shapes");
880 opendialog.setSelectMode(SELECTFILE_EXISTING);
881 opendialog.setPatternList(
"Additional files (*.xml)\nAll files (*)");
885 if (opendialog.execute()) {
887 std::string file = opendialog.getFilename().text();
908 FXFileDialog opendialog(
this,
"Open EdgeData");
910 opendialog.setSelectMode(SELECTFILE_EXISTING);
911 opendialog.setPatternList(
"EdgeData files (*.xml)\nAll files (*)");
915 if (opendialog.execute()) {
917 std::string file = opendialog.getFilename().text();
935 getApp()->beginWaitCursor();
948 myStatusbar->getStatusLine()->setText(
"Already loading!");
951 std::string file((
const char*)data);
967 myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
977 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
986 myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
996 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1006 myStatusbar->getStatusLine()->setText(
"No simulation loaded!");
1015 getApp()->forceRefresh();
1023 getApp()->forceRefresh();
1032 myStatusbar->getStatusLine()->setText(
"No simulation loaded!");
1048 FXFileDialog opendialog(
this,
"Save Simulation State");
1050 opendialog.setSelectMode(SELECTFILE_ANY);
1051 opendialog.setPatternList(
"Binary State (*.sbx)\nXML State (*.xml)");
1060 opendialog.getPatternText(opendialog.getCurrentPattern()).after(
'.').before(
')'));
1062 myStatusbar->getStatusLine()->setText(
"Simulation saved to " + file);
1104 sender->handle(
this,
1106 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1114 sender->handle(
this,
1116 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1124 sender->handle(
this,
1126 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1135 sender->handle(
this, disable ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1147 sender->handle(
this,
TraCIServer::getInstance() ==
nullptr ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1178 d->show(PLACEMENT_OWNER);
1238 getApp()->reg().writeIntEntry(
"SETTINGS",
"x", getX());
1239 getApp()->reg().writeIntEntry(
"SETTINGS",
"y", getY());
1240 getApp()->reg().writeIntEntry(
"SETTINGS",
"width", getWidth());
1241 getApp()->reg().writeIntEntry(
"SETTINGS",
"height", getHeight());
1243 setDecorations(DECOR_NONE);
1244 place(PLACEMENT_MAXIMIZED);
1264 place(PLACEMENT_VISIBLE);
1265 setDecorations(DECOR_ALL);
1270 setWidth(getApp()->reg().readIntEntry(
"SETTINGS",
"width", 600));
1271 setHeight(getApp()->reg().readIntEntry(
"SETTINGS",
"height", 400));
1272 setX(getApp()->reg().readIntEntry(
"SETTINGS",
"x", 150));
1273 setY(getApp()->reg().readIntEntry(
"SETTINGS",
"y", 150));
1308 GUIApplicationWindow::onCmdNewOSG(FXObject*, FXSelector,
void*) {
1319 about->show(PLACEMENT_OWNER);
1325 FXEvent*
event = (FXEvent*)ptr;
1327 setDNDData(FROM_CLIPBOARD, event->target,
string);
1388 if (ec->
myNet ==
nullptr) {
1423 if (view ==
nullptr) {
1426 std::string settingsName = settings.
addSettings(view);
1439 std::vector<SUMOTime> breakpoints;
1443 std::sort(breakpoints.begin(), breakpoints.end());
1458 std::vector<SUMOTime> breakpoints;
1462 std::sort(breakpoints.begin(), breakpoints.end());
1471 setTitle(
"SUMO Interactive Traffic Light");
1474 setTitle(
"SUMO Interactive Demand-Responsive-Transport");
1483 off.
set(getApp()->reg().readRealEntry(
"viewport",
"x"),
1484 getApp()->reg().readRealEntry(
"viewport",
"y"),
1485 getApp()->reg().readRealEntry(
"viewport",
"z"));
1488 view->setViewportFromToRot(off, p, 0);
1493 (*it)->setText(
"-");
1499 getApp()->endWaitCursor();
1513 if (backlog > running) {
1543 getApp()->forceRefresh();
1576 "\nDo you want to close all open files and views?";
1577 FXuint answer = FXMessageBox::question(
this, MBOX_YES_NO,
"Simulation ended",
"%s", text.c_str());
1591 #ifdef HAVE_DANGEROUS_SOUNDS // disable user-configurable command execution for public build 1594 for (; it != end; ++it) {
1628 if (veh->
getID().rfind(
"emergency", 0) == 0) {
1663 getApp()->beginWaitCursor();
1676 myStatusbar->getStatusLine()->setText(
"No simulation loaded!");
1687 FXuint opts = MDI_TRACKING;
1691 if (oldView !=
nullptr) {
1723 (*it)->setText(
"-");
1739 myTrackerWindows.clear();
1757 return getApp()->getDefaultCursor(DEF_ARROW_CURSOR);
1781 myStatusbar->getStatusLine()->setText(text.c_str());
1783 myStatusbar->getStatusLine()->setNormalText(text.c_str());
1808 std::ostringstream str;
1809 str << std::setfill(
'0');
1817 str << std::setw(2);
1818 str << time / 3600000 <<
'-';
1820 str << std::setw(2) << time / 60000 <<
'-';
1823 str << std::setw(2) << time / 1000;
1824 if (!hideFraction) {
1825 str <<
'.' << std::setw(3) << time % 1000;
1833 const long handled = FXMainWindow::onKeyPress(o, sel, data);
1834 if (handled == 0 &&
myMDIClient->numChildren() > 0) {
1846 const long handled = FXMainWindow::onKeyRelease(o, sel, data);
1847 if (handled == 0 &&
myMDIClient->numChildren() > 0) {
1875 const std::vector<SUMOTime>
Locate junction - button.
std::vector< FXMainWindow * > myTrackerWindows
const std::vector< GUISUMOAbstractView::Decal > & getDecals() const
Returns the parsed decals.
Event sent when the the simulation is over.
RandomDistributor< std::string > myJamSounds
Perform a single simulation step in SUMO and open Demand Elements in NETEDIT.
FXLabel * myGeoCoordinate
Fullscreen mode - menu entry.
long onCmdShowStats(FXObject *, FXSelector, void *)
Called on commands from the statistic buttons.
virtual ~GUIApplicationWindow()
Destructor.
GUILoadThread * myLoadThread
the thread that loads simulations
FXToolBarShell * myToolBarDrag9
GUICompleteSchemeStorage gSchemeStorage
long onCmdStep(FXObject *, FXSelector, void *)
Called on "step".
send when a warning occured
static std::string clipped
Representation of a vehicle in the micro simulation.
void handleEvent_SimulationLoaded(GUIEvent *e)
FXRealSpinner * myDemandScaleSpinner
the demand scale
long onCmdReload(FXObject *, FXSelector, void *)
Called on reload.
bool hasPersons() const
Returns whether persons are simulated.
static void resetFont()
to be called when the font context is invalidated
constVehIt loadedVehBegin() const
Returns the begin of the internal vehicle map.
void appendMsg(GUIEventType eType, const std::string &msg)
Adds new text to the window.
Reload the previously loaded simulation.
virtual FXGLCanvas * getBuildGLCanvas() const
get build GL Canvas
int getRunningVehicleNo() const
Returns the number of build and inserted, but not yet deleted vehicles.
FXSplitter * myMainSplitter
The splitter that divides the main window into vies and the log window.
virtual bool init(GUINet *net, SUMOTime start, SUMOTime end)
initialises the thread with the new simulation
SUMOTime getTimeStep() const
Returns the time step the simulation has ended at.
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
static bool isReadable(std::string path)
Checks whether the given file is readable.
long onUpdOpenRecent(FXObject *, FXSelector, void *)
Determines whether opening a recent file is enabled.
Storage for geometrical objects extended by mutexes.
long onCmdEditChosen(FXObject *, FXSelector, void *)
Called on menu Edit->Edit Chosen.
long onCmdListParking(FXObject *, FXSelector, void *)
Toggle listing of parking vehicles.
#define GUIDesignSplitterMDI
MDI Splitter.
Locate addtional structure - button.
#define GUIDesignButtonToolbar
little button with icon placed in navigation toolbar
const bool myOsgView
whether to load the OpenSceneGraph view
Edit simulation breakpoints.
GUIColorer laneColorer
The lane colorer.
static void buildSUMOAccelerators(GUIApplicationWindow *GUIApp)
build SUMO Accelerators
virtual void setBreakpoints(const std::vector< SUMOTime > &breakpoints)
Sets the breakpoints of the parent application.
const std::string & getFileName() const
virtual void eventOccurred()
long onCmdEditViewport(FXObject *, FXSelector, void *)
Called on menu Edit->Viewport.
void select(GUIGlID id, bool update=true)
Adds the object with the given id.
double y() const
Returns the y-position.
GUIVisualizationSettings * getVisualisationSettings() const
get visualitation settings
void addRecentFile(const FX::FXString &f, const bool isNet)
FXToolBarShell * myToolBarDrag4
static void initIcons(FXApp *a)
Initiate GUIIconSubSys.
long onUpdTraCIStatus(FXObject *, FXSelector, void *)
Determines whether traci is active.
long onUpdStop(FXObject *, FXSelector, void *)
Determines whether "stop" is enabled.
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...
long onCmdSaveState(FXObject *, FXSelector, void *)
Called on "save state".
bool myListParking
information whether the locator should list parking vehicles
long onClipboardRequest(FXObject *sender, FXSelector sel, void *ptr)
Somebody wants our clipped text.
static bool gRunAfterLoad
the simulation shall start direct after loading
#define GUIDesignStatusBar
design used in status bar
std::string time2string(SUMOTime t)
void setToolBarVisibility(const bool value)
about toggled gaming status
static void initCursors(FXApp *a)
Initiate GUICursorSubSys.
double x() const
Returns the x-position.
send when a debug occured
int myViewNumber
The current view number.
void setWindowSizeAndPos()
perform initial window positioning and sizing according to user options / previous call ...
virtual bool simulationIsStopable() const
#define GUIDesignToolBarGrip
design for toolbar grip (used to change the position of toolbar with mouse)
#define GUIDesignSplitter
virtual void detach()
Detaches the tool/menu bar.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Editor for the list of chosen objects.
void setThickness(const FXint width)
set/get segment width - must be less than half the segment length
FXMenuPane * myLocatorMenu
FXGLVisual * myGLVisual
The gl-visual used.
#define GUIDesignMDIButtonLeft
GUISUMOAbstractView * openNewView(GUISUMOViewParent::ViewType vt=GUISUMOViewParent::VIEW_2D_OPENGL)
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
bool myWasStarted
the information whether the simulation was started before
long onCmdStop(FXObject *, FXSelector, void *)
Called on "stop".
FXMutex myEventMutex
the mutex for the waiting semaphore
long onCmdNetedit(FXObject *, FXSelector, void *)
Called on menu Edit->Netedit.
FXString gCurrentFolder
The folder used as last.
#define GUIDesignToolBar
design for default toolbar
virtual void copyViewportTo(GUISUMOAbstractView *view)
copy the viewport to the given view
void loadConfigOrNet(const std::string &file, bool isNet)
const std::vector< SUMOTime > retrieveBreakpoints() const
retrieve breakpoints if provided by the application
virtual double getZPos() const =0
Returns the camera height corresponding to the current zoom factor.
void set(double x, double y)
set positions x and y
void show()
sets the focus after the window is created
static bool runParser(GenericSAXHandler &handler, const std::string &file, const bool isNet=false)
Runs the given handler on the given file; returns if everything's ok.
const SUMOTime myBegin
the time the simulation shall start with
long onCmdNewView(FXObject *, FXSelector, void *)
Called if a new view shall be opened (2D view)
FXMutex myTrackerLock
A lock to make the removal and addition of trackers secure.
static bool gDemoAutoReload
the simulation shall reload when it has ended (demo)
FXMenuCascade * mySelectLanesMenuCascade
the menu cascades
double myAlternateSimDelay
The alternate simulation delay in milliseconds for toggling.
send when a status change occured
long onUpdOpen(FXObject *, FXSelector, void *)
Determines whether opening is enabled.
double getSpeedLimit() const
Returns the speed limit of the edge The speed limit of the first lane is retured; should probably be...
long onCmdHelp(FXObject *sender, FXSelector sel, void *ptr)
called if the user selects help->Documentation
MSNet::SimulationState getReason() const
Returns the reason the simulation has ended due.
bool myListTeleporting
information whether the locator should list teleporting vehicles
virtual bool simulationIsStepable() const
void addDecals(const std::vector< Decal > &decals)
add decals
FXToolBarShell * myToolBarDrag2
Loads a file previously loaded.
void setFgColor(FXColor clr)
set/get forground color
static OptionsCont & getOptions()
Retrieves the options.
const bool myViewportFromRegistry
whether loading viewport from registry
void checkGamingEvents()
handles additional game-related events
FXMenuPane * myFileMenu
the submenus
double getDelay() const
Returns the parsed delay.
void setActive(int scheme)
Open editor for selections.
void addSeparator()
Adds a a separator to this log window.
void saveViewport(const double x, const double y, const double z, const double rot)
Makes the given viewport the default.
std::vector< SUMOTime > & getBreakpoints()
virtual void create()
Creates the main window (required by FOX)
Representation of a lane in the micro simulation (gui-version)
long onCmdOpenEdgeData(FXObject *, FXSelector, void *)
Called on menu File->Load EdgeData.
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
FXHorizontalFrame * myCartesianFrame
FXRecentFiles myRecentNets
List of recent nets.
const std::vector< std::string > mySettingsFiles
the name of the settings file to load
void loadConfigOrNet(const std::string &file, bool isNet)
begins the loading of the given file
RandomDistributor< std::string > getEventDistribution(const std::string &id)
const std::string & getMsg() const
Returns the message.
Editor for simulation breakpoints.
bool myAmGaming
information whether the gui is currently in gaming mode
bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
static FXint fxexecute(FXString link)
bool myShowTimeAsHMS
whether to show time as hour:minute:second
void handleEvent_Message(GUIEvent *e)
static void clearTextures()
clears loaded textures
long onCmdOpenRecent(FXObject *, FXSelector, void *)
Called on opening a recent file.
#define GUIDesignMDIButtonRight
MDIButton oriented to right.
static const RGBColor GREEN
FXEX::FXLCDLabel * myTotalDistanceLabel
An error occurred during the simulation step.
long onKeyPress(FXObject *o, FXSelector sel, void *data)
handle keys
Locate polygons - button.
void updateTimeLCD(SUMOTime time)
updates the simulation time display
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Open a new microscopic 3D view.
FXCondition myEventCondition
the semaphore when waiting for event completion
void handleEvent_SimulationEnded(GUIEvent *e)
bool myHaveNotifiedAboutSimEnd
whether the simulation end was already announced
static double gTrackerInterval
the aggregation period for tracker windows in seconds
std::string myConfigPattern
Input file pattern.
static unsigned long runHiddenCommand(const std::string &cmd)
run a shell command without popping up any windows (particuarly on win32)
long onCmdEditBreakpoints(FXObject *, FXSelector, void *)
Called on menu Edit->Edit Breakpoints.
static GUINet * getGUIInstance()
Returns the pointer to the unique instance of GUINet (singleton).
std::vector< FXButton * > myStatButtons
Buttons showing and running values and triggering statistic windows.
long onCmdStart(FXObject *, FXSelector, void *)
Called on "play".
ShapeContainer & getShapeContainer()
Returns the shapes container.
T get(std::mt19937 *which=0) const
Draw a sample of the distribution.
toogle delay between alternative value
long onCmdAppSettings(FXObject *, FXSelector, void *)
Opens the application settings menu (Settings->Application Settings...)
A point in 2D or 3D with translation and scaling methods.
const std::vector< SUMOTime > & getBreakpoints() const
Returns the parsed breakpoints.
virtual void buildToolBars()
Builds the tool bar.
void setHorizontal(const FXint len)
set/get segment horizontal length - must be more than twice the segment width
#define GUIDesignToolBarRaisedNextTop
design for first toolbar shell positioned in the next-top position of dock
Open a new microscopic view.
int myPreviousCollisionNumber
const MSEdge * getEdge() const
Returns the edge the vehicle is currently at.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
FXMenuPane * mySettingsMenu
FXEX::FXLCDLabel * myEmergencyVehicleLabel
FXMDIMenu * myMDIMenu
The menu used for the MDI-windows.
virtual bool simulationIsStartable() const
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
Open viewport editor - button.
void setVertical(const FXint len)
set/get segment vertical length - must be more than twice the segment width
FXToolBarShell * myMenuBarDrag
SVCPermissions getPermissions() const
Returns the vehicle class permissions for this lane.
bool hasContainers() const
Returns whether containers are simulated.
ViewType
Available view types.
GUIRunThread * myRunThread
the thread that runs simulations
long onCmdListInternal(FXObject *, FXSelector, void *)
Toggle listing of internal structures.
long onUpdReload(FXObject *, FXSelector, void *)
Determines whether reloading is enabled.
long onCmdDelayToggle(FXObject *, FXSelector, void *)
Called on "delay toggle".
GUIPerspectiveChanger & getChanger() const
get changer
const std::string myFile
the name of the loaded file
FXToolBarShell * myToolBarDrag8
FXToolBarShell * myToolBarDrag3
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
bool simulationAvailable() const
#define GUIDesignToolBarRaisedSameTop
design for first toolbar shell positioned in the same position of dock
SUMOTime string2time(const std::string &r)
double getMaxSpeed() const
Get vehicle's maximum speed [m/s].
SUMOTime myEmergencyVehicleCount
Load additional file with poi and polygons.
Toogle Gaming mode in SUMO and grid in NETEDIT.
The application's "About" - dialog.
FXGLCanvas * getBuildGLCanvas() const
long onCmdAbout(FXObject *, FXSelector, void *)
Shows the about dialog.
FXCursor * getDefaultCursor()
double mySimDelay
the simulation delay in milliseconds
long onCmdClose(FXObject *, FXSelector, void *)
Called on menu File->Close.
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
double getTrackerInterval() const
void checkGamingEventsDRT()
void setTarget(FXObject *tgt)
set the target
bool myListInternal
information whether the locator should list internal structures
long onCmdOpenShapes(FXObject *, FXSelector, void *)
Called on menu File->Load Shapes.
The dialog to change the application (gui) settings.
FXSlider * mySimDelaySlider
Send when the simulation is over;.
long onCmdClearMsgWindow(FXObject *, FXSelector, void *)
Called if the message window shall be cleared.
void setSnapshots(GUISUMOAbstractView *view) const
Makes a snapshot if it has been parsed.
Start the simulation in SUMO and open Additionals Elemements in NETEDIT.
std::vector< GUIGlChildWindow * > myGLWindows
FXMenuPane * mySelectByPermissions
FXMutex & getBreakpointLock()
virtual void fillMenuBar()
Builds the menu bar.
std::string addSettings(GUISUMOAbstractView *view=0) const
Adds the parsed settings to the global list of settings.
GUIApplicationWindow()
FOX needs this for static members.
Open view editor - button.
A single child window which contains a view of the simulation area.
FXEX::FXLCDLabel * myWaitingTimeLabel
performance indicators
static bool gQuitOnEnd
the window shall be closed when the simulation has ended
long onCmdGaming(FXObject *, FXSelector, void *)
Toggle gaming mode.
FXStatusBar * myStatusbar
The status bar.
FXToolBarShell * myToolBarDrag10
FXMenuBar * myMenuBar
The application menu bar.
FXMenuPane * myWindowsMenu
FXToolBarShell * myToolBarDrag5
#define GUIDesignButtonToolbarText
FXToolBarShell * myToolBarDrag7
long onCmdFullScreen(FXObject *, FXSelector, void *)
Toggle full screen mode.
static FXString assureExtension(const FXString &filename, const FXString &defaultExtension)
Corrects missing extension.
The simulation is loading.
FXToolBarShell * myToolBarDrag6
static const RGBColor RED
named colors
int getWaitingForVehicleNumber() const
Returns the number of vehicles waiting for a ride.
bool listParking() const
return whether to list parking vehicles
RandomDistributor< std::string > myCollisionSounds
long onCmdOpenConfiguration(FXObject *, FXSelector, void *)
Called on menu File->Open Configuration.
long onRunThreadEvent(FXObject *, FXSelector, void *)
Called on an event from the simulation thread.
The XML-Handler for shapes loading network loading.
void setGroove(const FXint width)
set/get groove width - must be less than segment width
FXLabel * myCartesianCoordinate
Labels for the current cartesian and geo-coordinate.
send when a gldebug occured
void prepareDestruction()
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
FXDEFMAP(GUIApplicationWindow) GUIApplicationWindowMap[]
int getWaitingVehicleNo() const
Returns the number of waiting vehicles.
virtual void sendBlockingEvent(GUIEvent *event)
Sends an event from the application thread to the GUI and waits until it is handled.
GUISUMOAbstractView * getView() const
return GUISUMOAbstractView
Locator configuration - menu entry.
void setSelector(FXSelector sel)
set the selector
MSInsertionControl & getInsertionControl()
Returns the insertion control.
void applyViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
static const MSEdgeVector & getAllEdges()
Returns all edges with a numerical id.
void setScale(double scale)
sets the demand scaling factor
send when a message occured
static void close()
close GUIIconSubSys
long onUpdAddView(FXObject *, FXSelector, void *)
Determines whether adding a view is enabled.
Load edge data for visualization.
long onCmdLocate(FXObject *, FXSelector, void *)
Called on menu commands from the Locator menu.
FXEX::FXLCDLabel * myTimeLossLabel
static TraCIServer * getInstance()
FXHorizontalFrame * myGeoFrame
void setStatusBarText(const std::string &text)
FXRecentFiles myRecentConfigs
List of recent config files.
SUMOTime getCurrentSimTime() const
void create()
Creates the widget.
send when a error occured
void clear()
Clears the list of selected objects.
FXToolBarShell * myToolBarDrag1
for some menu detaching fun
FXEX::FXThreadEvent myLoadThreadEvent
io-event with the load-thread
std::map< std::string, SUMOVehicle * >::const_iterator constVehIt
Definition of the internal vehicles map iterator.
#define GUIDesignToolbarMenuBar
MSTransportableControl & getPersonControl() override
Returns the person control.
FXEX::FXThreadEvent myRunThreadEvent
io-event with the run-thread
FXMDIClient * myMDIClient
The multi view panel.
double getOverallProb() const
Return the sum of the probabilites assigned to the members.
send when a simulation has been loaded
Stop the simulation in SUMO and save network in NETEDIT.
const double SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
virtual double getYPos() const =0
Returns the y-offset of the field to show stored in this changer.
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
FXRealSpinner * mySimDelaySpinner
GUIGlID getGlID() const
Returns the numerical id of the object.
FXToolBar * myToolBar1
The application tool bar.
#define GUIDesignHorizontalFrameStatusBar
Horizontal frame used in status bar.
long onCmdOpenNetwork(FXObject *, FXSelector, void *)
Called on menu File->Open Network.
double myJamSoundTime
waiting time after which vehicles trigger jam sounds
hot key <F1> open online documentation
FXSynchQue< GUIEvent * > myEvents
List of got requests.
long onUpdNeedsSimulation(FXObject *, FXSelector, void *)
Determines whether some buttons which require an active simulation may be shown.
An XML-handler for visualisation schemes.
static std::string getStateMessage(SimulationState state)
Returns the message to show if a certain state occurs.
bool myAmFullScreen
whether to show the window in full screen mode
const std::string & getViewType() const
Returns the parsed view type.
GUIEventType getOwnType() const
returns the event type
#define GUIDesignSpinDial
static FXString getTitleText(const FXString &appname, FXString filename="")
Returns the title text in dependance to an optional file name.
long onLoadThreadEvent(FXObject *, FXSelector, void *)
Called on an event from the loading thread.
virtual GUISUMOAbstractView * init(FXGLCanvas *share, GUINet &net, ViewType type)
"Initialises" this window by building the contents
long onCmdDemandScale(FXObject *, FXSelector, void *)
Called on "demand scale".
long onCmdEditViewScheme(FXObject *, FXSelector, void *)
Called on menu Edit->Visualization.
bool isStopped() const
Returns whether the vehicle is at a stop.
The class responsible for building and deletion of vehicles.
void setText(FXString lbl)
manipulate text in LCD label
GUIMessageWindow * myMessageWindow
A window to display messages, warnings and error in.
const SUMOTime myEnd
the time the simulation shall end with
void clear()
Clears the window.
bool myAmLoading
information whether the gui is currently loading and the load-options shall be greyed out ...
int getRunningNumber() const
Returns the number of build and inserted, but not yet deleted transportables.
long onCmdTimeToggle(FXObject *, FXSelector, void *)
Called on "time toggle".
long onCmdListTeleporting(FXObject *, FXSelector, void *)
Toggle listing of teleporting vehicles.
double getSpeed() const
Returns the vehicle's current speed.
long onKeyPress(FXObject *o, FXSelector sel, void *data)
handle keys
Application settings - menu entry.
void storeWindowSizeAndPos()
record window position and size in registry
void handleEvent_SimulationStep(GUIEvent *e)
#define WRITE_MESSAGE(msg)
FXEX::FXLCDLabel * myLCDLabel
the simulation step display
virtual void create()
create GUIGlChildWindow
SUMOTime getSimEndTime() const
static std::mt19937 myGamingRNG
A random number generator used to choose a gaming sound.
const std::string & getID() const
Returns the name of the vehicle.
FXMenuPane * myControlMenu
GUISelectedStorage gSelected
A global holder of selected objects.
int getCollisionCount() const
return the number of collisions
A logging window for the gui.
hot key <F2> open about dialog
send when a simulation step has been performed
long onUpdStep(FXObject *, FXSelector, void *)
Determines whether "step" is enabled.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
virtual double getXPos() const =0
Returns the x-offset of the field to show stored in this changer.
bool myTLSGame
current game mode
long onCmdQuit(FXObject *, FXSelector, void *)
Called by FOX if the application shall be closed.
GUINet * myNet
the loaded net
constVehIt loadedVehEnd() const
Returns the end of the internal vehicle map.
virtual void addToWindowsMenu(FXMenuPane *)
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent) override
Returns an own parameter window.
MSTransportableControl & getContainerControl() override
Returns the container control.
static void saveState(const std::string &file, SUMOTime step)
Saves the current state.
The Simulation execution thread.
long onUpdStart(FXObject *sender, FXSelector, void *ptr)
Determines whether "play" is enabled.
FXDataTarget * mySimDelayTarget
The main window of the SUMO-gui.