125 FXMAPFUNC(SEL_COMMAND,
MID_NEW_OSGVIEW, GUIApplicationWindow::onCmdNewOSG),
185 FXIMPLEMENT(
GUIApplicationWindow, FXMainWindow, GUIApplicationWindowMap, ARRAYNUMBER(GUIApplicationWindowMap))
197 myLoadThread(0), myRunThread(0),
199 myAlternateSimDelay(0),
200 myRecentNets(a,
"nets"),
201 myConfigPattern(configPattern),
202 hadDependentBuild(false),
203 myShowTimeAsHMS(false),
204 myAmFullScreen(false),
205 myHaveNotifiedAboutSimEnd(false),
208 myPreviousCollisionNumber(0),
239 myGeoCoordinate =
new FXLabel(
myGeoFrame,
"N/A\t\tOriginal coordinate (before coordinate transformation in NETCONVERT)", 0, LAYOUT_CENTER_Y);
281 gCurrentFolder = getApp()->reg().readStringEntry(
"SETTINGS",
"basedir",
"");
282 FXMainWindow::create();
300 FXint width = getApp()->getNormalFont()->getTextWidth(
"8", 1) * 24;
304 show(PLACEMENT_DEFAULT);
306 if (getApp()->reg().readIntEntry(
"SETTINGS",
"maximized", 0) == 1) {
310 myShowTimeAsHMS = (getApp()->reg().readIntEntry(
"gui",
"timeasHMS", 0) == 1);
348 FXMainWindow::detach();
360 "&Open Simulation...\tCtrl+O\tOpen a simulation (Configuration file).",
363 "Open &Network...\tCtrl+N\tOpen a network.",
366 "Open Shapes \tCtrl+P\tLoad POIs and Polygons for visualization.",
369 "&Reload\tCtrl+R\tReloads the simulation / the network.",
373 "Close\tCtrl+W\tClose the simulation.",
376 FXMenuSeparator* sep1 =
new FXMenuSeparator(
myFileMenu);
378 sep1->setSelector(FXRecentFiles::ID_ANYFILES);
392 FXMenuSeparator* sep2 =
new FXMenuSeparator(
myFileMenu);
394 sep2->setSelector(FXRecentFiles::ID_ANYFILES);
410 "&Quit\tCtrl+Q\tQuit the Application.",
416 for (std::vector<std::string>::iterator it = vehicleClasses.begin(); it != vehicleClasses.end(); ++it) {
422 new FXMenuTitle(
myMenuBar,
"&Edit", NULL, myEditMenu);
423 new FXMenuCommand(myEditMenu,
424 "Edit Selected...\tCtrl+E\tOpens a dialog for editing the list of selected items.",
426 new FXMenuCascade(myEditMenu,
427 "Select lanes which allow...\t\tOpens a menu for selecting a vehicle class by which to selected lanes.",
429 new FXMenuSeparator(myEditMenu);
430 new FXMenuCommand(myEditMenu,
431 "Edit Breakpoints...\tCtrl+B\tOpens a dialog for editing breakpoints.",
433 new FXMenuSeparator(myEditMenu);
434 new FXMenuCommand(myEditMenu,
435 "Open in Netedit...\tCtrl+T\tOpens the netedit application with the current network.",
442 "Application Settings...\t\tOpen a Dialog for Application Settings editing.",
445 "Gaming Mode\tCtrl+G\tToggle gaming mode on/off.",
448 "Full Screen Mode\tCtrl+F\tToggle full screen mode on/off.",
454 "Locate &Junctions\t\tOpen a Dialog for Locating a Junction.",
457 "Locate &Edges\t\tOpen a Dialog for Locating an Edge.",
461 "Locate &Vehicles\t\tOpen a Dialog for Locating a Vehicle.",
465 "Locate &Persons\t\tOpen a Dialog for Locating a Person.",
468 "Locate &TLS\t\tOpen a Dialog for Locating a Traffic Light.",
471 "Locate &Additional\t\tOpen a Dialog for Locating an Additional Structure.",
474 "Locate P&oI\t\tOpen a Dialog for Locating a Point of Intereset.",
477 "Locate Po&lygon\t\tOpen a Dialog for Locating a Polygon.",
481 "Show Internal Structures\t\tShow internal junctions and streets in locator dialog.",
484 "Show Parking Vehicles\t\tShow parking vehicles in locator dialog.",
488 "Show vehicles outside the road network\t\tShow vehicles that are teleporting or driving remote-controlled outside the road network in locator dialog.",
494 "Run\tCtrl+A\tStart running the simulation.",
497 "Stop\tCtrl+S\tStop running the simulation.",
500 "Step\tCtrl+D\tPerform one simulation step.",
507 "Show Status Line\t\tToggle the Status Bar on/off.",
510 "Show Message Window\t\tToggle the Message Window on/off.",
513 "Show Simulation Time\t\tToggle the Simulation Time on/off.",
516 "Show Simulation Delay\t\tToggle the Simulation Delay Entry on/off.",
533 sep1->setSelector(FXMDIClient::ID_MDI_ANY);
541 "Clear Message Window\t\tClear the message window.",
609 new FXButton(
myToolBar5,
"\t\tOpen a new microscopic view.",
612 new FXButton(
myToolBar5,
"\t\tOpen a new 3D view.",
622 new FXLabel(
myToolBar6,
"Waiting Time:\t\tTime spent waiting accumulated for all vehicles", 0, LAYOUT_TOP | LAYOUT_LEFT);
634 new FXLabel(
myToolBar7,
"Time Loss:\t\tTime lost due to being unable to drive with maximum speed for all vehicles", 0, LAYOUT_TOP | LAYOUT_LEFT);
648 getApp()->reg().writeIntEntry(
"SETTINGS",
"x", getX());
649 getApp()->reg().writeIntEntry(
"SETTINGS",
"y", getY());
650 getApp()->reg().writeIntEntry(
"SETTINGS",
"width", getWidth());
651 getApp()->reg().writeIntEntry(
"SETTINGS",
"height", getHeight());
653 getApp()->reg().writeStringEntry(
"SETTINGS",
"basedir",
gCurrentFolder.text());
654 getApp()->reg().writeIntEntry(
"SETTINGS",
"maximized", isMaximized() ? 1 : 0);
655 getApp()->reg().writeIntEntry(
"gui",
"timeasHMS",
myShowTimeAsHMS ? 1 : 0);
664 FXMenuCommand* mc =
dynamic_cast<FXMenuCommand*
>(menu);
665 if (mc->getText() ==
"Edit Selected...") {
674 const std::vector<MSLane*>& lanes = (*i)->getLanes();
675 for (std::vector<MSLane*>::const_iterator it = lanes.begin(); it != lanes.end(); ++it) {
718 FXRegistry reg(
"Netedit",
"DLR");
725 std::string netedit =
"netedit";
726 const char* sumoPath = getenv(
"SUMO_HOME");
728 std::string newPath = std::string(sumoPath) +
"/bin/netedit";
730 netedit =
"\"" + newPath +
"\"";
739 cmd =
"start /B \"\" " + cmd;
751 FXFileDialog opendialog(
this,
"Open Simulation Configuration");
753 opendialog.setSelectMode(SELECTFILE_EXISTING);
758 if (opendialog.execute()) {
760 std::string file = opendialog.getFilename().text();
771 FXFileDialog opendialog(
this,
"Open Network");
773 opendialog.setSelectMode(SELECTFILE_EXISTING);
774 opendialog.setPatternList(
"SUMO nets (*.net.xml)\nAll files (*)");
778 if (opendialog.execute()) {
780 std::string file = opendialog.getFilename().text();
791 FXFileDialog opendialog(
this,
"Open Shapes");
793 opendialog.setSelectMode(SELECTFILE_EXISTING);
794 opendialog.setPatternList(
"Additional files (*.xml)\nAll files (*)");
798 if (opendialog.execute()) {
800 std::string file = opendialog.getFilename().text();
819 getApp()->beginWaitCursor();
832 myStatusbar->getStatusLine()->setText(
"Already loading!");
835 std::string file((
const char*)data);
851 myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
861 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
870 myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
880 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
890 myStatusbar->getStatusLine()->setText(
"No simulation loaded!");
899 getApp()->forceRefresh();
907 getApp()->forceRefresh();
916 myStatusbar->getStatusLine()->setText(
"No simulation loaded!");
959 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
969 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
979 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
989 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1021 d->show(PLACEMENT_OWNER);
1071 getApp()->reg().writeIntEntry(
"SETTINGS",
"x", getX());
1072 getApp()->reg().writeIntEntry(
"SETTINGS",
"y", getY());
1073 getApp()->reg().writeIntEntry(
"SETTINGS",
"width", getWidth());
1074 getApp()->reg().writeIntEntry(
"SETTINGS",
"height", getHeight());
1076 setDecorations(DECOR_NONE);
1077 place(PLACEMENT_MAXIMIZED);
1096 place(PLACEMENT_VISIBLE);
1097 setDecorations(DECOR_ALL);
1102 setWidth(getApp()->reg().readIntEntry(
"SETTINGS",
"width", 600));
1103 setHeight(getApp()->reg().readIntEntry(
"SETTINGS",
"height", 400));
1104 setX(getApp()->reg().readIntEntry(
"SETTINGS",
"x", 150));
1105 setY(getApp()->reg().readIntEntry(
"SETTINGS",
"y", 150));
1140 GUIApplicationWindow::onCmdNewOSG(FXObject*, FXSelector,
void*) {
1151 about->show(PLACEMENT_OWNER);
1157 FXEvent*
event = (FXEvent*)ptr;
1159 setDNDData(FROM_CLIPBOARD, event->target,
string);
1221 if (ec->
myNet == 0) {
1262 std::string settingsName = settings.
addSettings(view);
1285 setTitle(
"SUMO Interactive Traffic Light");
1293 (*it)->setText(
"-");
1297 getApp()->endWaitCursor();
1312 if (backlog > running) {
1338 getApp()->forceRefresh();
1370 "\nDo you want to close all open files and views?";
1371 FXuint answer = FXMessageBox::question(
this, MBOX_YES_NO,
"Simulation ended",
"%s", text.c_str());
1398 #ifdef HAVE_DANGEROUS_SOUNDS // disable user-configurable command execution for public build 1401 for (; it != end; ++it) {
1446 getApp()->beginWaitCursor();
1459 myStatusbar->getStatusLine()->setText(
"No simulation loaded!");
1470 FXuint opts = MDI_TRACKING;
1507 (*it)->setText(
"-");
1549 return getApp()->getDefaultCursor(DEF_ARROW_CURSOR);
1573 myStatusbar->getStatusLine()->setText(text.c_str());
1575 myStatusbar->getStatusLine()->setNormalText(text.c_str());
1600 std::ostringstream str;
1601 str << std::setfill(
'0');
1609 str << std::setw(2);
1610 str << time / 3600000 <<
'-';
1612 str << std::setw(2) << time / 60000 <<
'-';
1615 str << std::setw(2) << time / 1000;
1616 if (!hideFraction) {
1617 str <<
'.' << std::setw(3) << time % 1000;
1625 const long handled = FXMainWindow::onKeyPress(o, sel, data);
1626 if (handled == 0 &&
myMDIClient->numChildren() > 0) {
1638 const long handled = FXMainWindow::onKeyRelease(o, sel, data);
1639 if (handled == 0 &&
myMDIClient->numChildren() > 0) {
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
FXLabel * myGeoCoordinate
long onCmdShowStats(FXObject *, FXSelector, void *)
Called on commands from the statistic buttons.
virtual ~GUIApplicationWindow()
Destructor.
GUILoadThread * myLoadThread
GUISUMOAbstractView * getView() const
Load additional file with poi and polygons.
GUICompleteSchemeStorage gSchemeStorage
long onCmdStep(FXObject *, FXSelector, void *)
Called on "step".
static std::string clipped
Representation of a vehicle in the micro simulation.
void handleEvent_SimulationLoaded(GUIEvent *e)
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.
SUMOTime myAlternateSimDelay
The alternate simulation delay for toggling.
virtual FXGLCanvas * getBuildGLCanvas() const
send when a message occured
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.
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.
bool gaming
whether the application is in gaming mode or not
#define GUIDesignButtonToolbar
little button with icon placed in navigation toolbar
const bool myOsgView
whether to load the OpenSceneGraph view
Reload the previously loaded simulation.
The Simulation delay control.
GUIColorer laneColorer
The lane colorer.
const std::string & getFileName() const
Locate junction - button.
void select(GUIGlID id, bool update=true)
Adds the object with the given id.
GUIVisualizationSettings * getVisualisationSettings() const
get visualitation settings
void addRecentFile(const FX::FXString &f, const bool isNet)
FXToolBarShell * myToolBarDrag4
toogle delay between alternative value
static void initIcons(FXApp *a)
Initiate GUIIconSubSys.
long onUpdStop(FXObject *, FXSelector, void *)
Determines whether "stop" is enabled.
bool myListParking
information whether the locator should list parking vehicles
long onClipboardRequest(FXObject *sender, FXSelector sel, void *ptr)
Somebody wants our clipped text.
virtual void setValue(FXdouble value)
Change current value.
void setNumberFormat(FXint prec, FXbool bExp=FALSE)
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
Open editor for selections.
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
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.
Fullscreen mode - menu entry.
void handleEvent_Screenshot(GUIEvent *e)
void saveViewport(const double x, const double y, const double z)
Makes the given viewport the default.
virtual void copyViewportTo(GUISUMOAbstractView *view)
copy the viewport to the given view
void loadConfigOrNet(const std::string &file, bool isNet)
#define GUIDesignToolBarShell2
design for first toolbar shell positioned in the same position of dock
virtual double getZPos() const =0
Returns the camera height corresponding to the current zoom factor.
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)
static bool gDemoAutoReload
the simulation shall reload when it has ended (demo)
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
#define WRITE_WARNING(msg)
Perform a single simulation step.
FXToolBarShell * myToolBarDrag2
void setFgColor(FXColor clr)
set/get forground color
static OptionsCont & getOptions()
Retrieves the options.
void checkGamingEvents()
handles additional game-related events
FXMenuPane * myFileMenu
the submenus
double getDelay() const
Returns the parsed delay.
void setActive(int scheme)
void addSeparator()
Adds a a separator to this log window.
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 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.
const std::string myFile
the name of the file to save to
bool myAmGaming
information whether the gui is currently in gaming mode
Gaming mode - menu entry.
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)
std::vector< FXMDIChild * > mySubWindows
static void clearTextures()
clears loaded textures
long onCmdOpenRecent(FXObject *, FXSelector, void *)
Called on opening a recent file.
#define GUIDesignMDIButtonRight
MDIButton oriented to right.
Loads a file previously loaded.
Locator configuration - menu entry.
static const RGBColor GREEN
An error occured during the simulation step.
long onKeyPress(FXObject *o, FXSelector sel, void *data)
handle keys
void updateTimeLCD(SUMOTime time)
updates the simulation time display
void setRange(FXdouble lo, FXdouble hi)
Change the spinner's range.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
GUIParameterTableWindow * getParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own parameter window.
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::set< SUMOTime > & getSnapshots()
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.
long onCmdAppSettings(FXObject *, FXSelector, void *)
Opens the application settings menu (Settings->Application Settings...)
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
int myPreviousCollisionNumber
const MSEdge * getEdge() const
Returns the edge the vehicle is currently at.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
FXMenuPane * mySettingsMenu
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)
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.
virtual void eventOccured()
GUIRunThread * myRunThread
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".
bool isGaming() const
return whether the gui is in gaming mode
GUIPerspectiveChanger & getChanger() const
get changer
const std::string myFile
the name of the loaded file
FXToolBarShell * myToolBarDrag3
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
bool simulationAvailable() const
double getMaxSpeed() const
Get vehicle's maximum speed [m/s].
The application's "About" - dialog.
FXGLCanvas * getBuildGLCanvas() const
bool myAmFullScreen
whether to show the window in full screen mode
long onCmdAbout(FXObject *, FXSelector, void *)
Shows the about dialog.
FXCursor * getDefaultCursor()
long onCmdClose(FXObject *, FXSelector, void *)
Called on menu File->Close.
Locate polygons - button.
send when a error occured
Send when a screenshot is requested; View and file name are stored within the event.
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
double getTrackerInterval() const
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.
Send when the simulation is over; The reason and the time step are stored within the event...
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.
std::string makeSnapshot(const std::string &destFile)
Takes a snapshots and writes it into the given file.
Open a new microscopic 3D view.
FXMenuPane * mySelectByPermissions
FXMutex & getBreakpointLock()
MSTransportableControl & getPersonControl()
Returns the person control.
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.
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.
void unlock()
release mutex lock
FXMenuBar * myMenuBar
The application menu bar.
Application settings - menu entry.
FXMenuPane * myWindowsMenu
FXToolBarShell * myToolBarDrag5
#define GUIDesignButtonToolbarText
FXToolBarShell * myToolBarDrag7
long onCmdFullScreen(FXObject *, FXSelector, void *)
Toggle full screen mode.
GUIVisualizationSettings & getDefault()
Returns the default scheme.
The simulation is loading.
GUISUMOAbstractView *const myView
the view to save
FXToolBarShell * myToolBarDrag6
static const RGBColor RED
named colors
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.
void prepareDestruction()
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
FXDEFMAP(GUIApplicationWindow) GUIApplicationWindowMap[]
MFXMutex myTrackerLock
A lock to make the removal and addition of trackers secure.
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.
void setSelector(FXSelector sel)
set the selector
MSInsertionControl & getInsertionControl()
Returns the insertion control.
#define GUIDesignToolBarShell1
design for first toolbar shell positioned in the next position of dock
void applyViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
MFXEventQue< GUIEvent * > myEvents
List of got requests.
static const MSEdgeVector & getAllEdges()
Returns all edges with a numerical id.
Open a new microscopic view.
static void close()
close GUIIconSubSys
long onUpdAddView(FXObject *, FXSelector, void *)
Determines whether adding a view is enabled.
long onCmdLocate(FXObject *, FXSelector, void *)
Called on menu commands from the Locator menu.
FXEX::FXLCDLabel * myTimeLossLabel
FXRealSpinDial * mySimDelayTarget
FXHorizontalFrame * myGeoFrame
Locate addtional structure - button.
void setStatusBarText(const std::string &text)
FXRecentFiles myRecentConfigs
List of recent config files.
SUMOTime getCurrentSimTime() const
The Simulation execution thread.
FXdouble getValue() const
Return current value.
void create()
Creates the widget.
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.
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
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
send when a warning occured
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
long onUpdNeedsSimulation(FXObject *, FXSelector, void *)
Determines whether some buttons which require an active simulation may be shown.
void setIncrements(FXdouble fine, FXdouble norm, FXdouble coarse)
Change all spinner increment.
An XML-handler for visualisation schemes.
static std::string getStateMessage(SimulationState state)
Returns the message to show if a certain state occurs.
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
#define GUIDesignToolBarShell3
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
Edit simulation breakpoints.
void handleEvent_SimulationStep(GUIEvent *e)
#define WRITE_MESSAGE(msg)
FXEX::FXLCDLabel * myLCDLabel
the simulation step display
SUMOTime getSimEndTime() const
static std::mt19937 myGamingRNG
A random number generator used to choose a gaming sound.
FXMenuPane * myControlMenu
GUISelectedStorage gSelected
A global holder of selected objects.
int getCollisionCount() const
return the number of collisions
A logging window for the gui.
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.
long onCmdQuit(FXObject *, FXSelector, void *)
Called by FOX if the application shall be closed.
GUINet * myNet
the loaded net
send when a status change occured
FXMutex & getSnapshotsLock()
constVehIt loadedVehEnd() const
Returns the end of the internal vehicle map.
virtual void addToWindowsMenu(FXMenuPane *)
long onUpdStart(FXObject *sender, FXSelector, void *ptr)
Determines whether "play" is enabled.
MSTransportableControl & getContainerControl()
Returns the container control.
void setApplicationSnapshots(std::set< SUMOTime > *snapshots, FXMutex *lock)
add snapshot synchronization
The main window of the SUMO-gui.