81 #ifdef CHECK_MEMORY_LEAKS
108 FXMAPFUNC(SEL_COMMAND,
MID_NEW_OSGVIEW, GUIApplicationWindow::onCmdNewOSG),
167 const
std::
string& configPattern)
169 myLoadThread(0), myRunThread(0),
171 myAlternateSimDelay(0),
172 myRecentNets(a, "nets"), myConfigPattern(configPattern),
173 hadDependentBuild(false),
174 myShowTimeAsHMS(false),
197 LAYOUT_SIDE_TOP | LAYOUT_FILL_X | FRAME_RAISED);
208 myStatusbar =
new FXStatusBar(
this, LAYOUT_SIDE_BOTTOM | LAYOUT_FILL_X | FRAME_RAISED);
212 0, 0, 20, 0, 0, 0, 0, 0, 0, 0);
216 0, 0, 20, 0, 0, 0, 0, 0, 0, 0);
222 SPLITTER_REVERSED | SPLITTER_VERTICAL | LAYOUT_FILL_X | LAYOUT_FILL_Y | SPLITTER_TRACKING | FRAME_RAISED | FRAME_THICK);
224 LAYOUT_FILL_X | LAYOUT_FILL_Y | FRAME_SUNKEN | FRAME_THICK);
227 FXMDIClient::ID_MDI_MENUWINDOW, LAYOUT_LEFT);
229 FXMDIClient::ID_MDI_MENUCLOSE, FRAME_RAISED | LAYOUT_RIGHT);
231 FXMDIClient::ID_MDI_MENURESTORE, FRAME_RAISED | LAYOUT_RIGHT);
233 FXMDIClient::ID_MDI_MENUMINIMIZE, FRAME_RAISED | LAYOUT_RIGHT);
262 if (getApp()->reg().readIntEntry(
"SETTINGS",
"maximized", 0) == 0) {
263 setX(getApp()->reg().readIntEntry(
"SETTINGS",
"x", 150));
264 setY(getApp()->reg().readIntEntry(
"SETTINGS",
"y", 150));
265 setWidth(getApp()->reg().readIntEntry(
"SETTINGS",
"width", 600));
266 setHeight(getApp()->reg().readIntEntry(
"SETTINGS",
"height", 400));
268 gCurrentFolder = getApp()->reg().readStringEntry(
"SETTINGS",
"basedir",
"");
269 FXMainWindow::create();
287 FXint width = getApp()->getNormalFont()->getTextWidth(
"8", 1) * 24;
291 show(PLACEMENT_SCREEN);
292 if (getApp()->reg().readIntEntry(
"SETTINGS",
"maximized", 0) == 1) {
295 myShowTimeAsHMS = (getApp()->reg().readIntEntry(
"gui",
"timeasHMS", 0) == 1);
333 FXMainWindow::detach();
345 "&Open Simulation...\tCtl-O\tOpen a simulation (Configuration file).",
348 "Open &Network...\tCtl-N\tOpen a network.",
351 "&Reload\tCtl-R\tReloads the simulation / the network.",
355 "&Close\tCtl-W\tClose the simulation.",
358 FXMenuSeparator* sep1 =
new FXMenuSeparator(
myFileMenu);
360 sep1->setSelector(FXRecentFiles::ID_ANYFILES);
374 FXMenuSeparator* sep2 =
new FXMenuSeparator(
myFileMenu);
376 sep2->setSelector(FXRecentFiles::ID_ANYFILES);
392 "&Quit\tCtl-Q\tQuit the Application.",
398 for (std::vector<std::string>::iterator it = vehicleClasses.begin(); it != vehicleClasses.end(); ++it) {
406 "Edit Selected...\tCtl-E\tOpens a Dialog for editing the List of Selected Items.",
409 "Select lanes which allow...\t\tOpens a menu for selecting a vehicle class by which to selected lanes.",
413 "Edit Breakpoints...\tCtl-B\tOpens a Dialog for editing breakpoints.",
420 "Application Settings...\t\tOpen a Dialog for Application Settings editing.",
423 "Gaming Mode\tCtl-G\tToggle gaming mode on/off.",
429 "Locate &Junctions\t\tOpen a Dialog for Locating a Junction.",
432 "Locate &Edges\t\tOpen a Dialog for Locating an Edge.",
436 "Locate &Vehicles\t\tOpen a Dialog for Locating a Vehicle.",
440 "Locate &TLS\t\tOpen a Dialog for Locating a Traffic Light.",
443 "Locate &Additional\t\tOpen a Dialog for Locating an Additional Structure.",
446 "Locate &PoI\t\tOpen a Dialog for Locating a Point of Intereset.",
449 "Locate P&olygon\t\tOpen a Dialog for Locating a Polygon.",
453 "Show Internal Structures\t\tShow internal junctions and streets in locator Dialog.",
459 "Run\tCtl-A\tStart running the simulation.",
462 "Stop\tCtl-S\tStop running the simulation.",
465 "Step\tCtl-D\tPerform one simulation step.",
472 "Show Status Line\t\tToggle the Status Bar on/off.",
475 "Show Message Window\t\tToggle the Message Window on/off.",
478 "Show Simulation Time\t\tToggle the Simulation Time on/off.",
481 "Show Simulation Delay\t\tToggle the Simulation Delay Entry on/off.",
498 sep1->setSelector(FXMDIClient::ID_MDI_ANY);
506 "Clear Message Window\t\tClear the message window.",
524 LAYOUT_DOCK_NEXT | LAYOUT_SIDE_TOP | FRAME_RAISED);
530 ICON_ABOVE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
533 ICON_ABOVE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
536 ICON_ABOVE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
542 LAYOUT_DOCK_SAME | LAYOUT_SIDE_TOP | FRAME_RAISED);
547 ICON_ABOVE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
550 ICON_ABOVE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
553 ICON_ABOVE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
559 LAYOUT_DOCK_SAME | LAYOUT_SIDE_TOP | FRAME_RAISED);
563 BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
575 LAYOUT_DOCK_SAME | LAYOUT_SIDE_TOP | FRAME_RAISED | LAYOUT_FILL_Y);
579 BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
582 LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK | LAYOUT_FILL_Y);
592 LAYOUT_DOCK_SAME | LAYOUT_SIDE_TOP | FRAME_RAISED);
598 ICON_ABOVE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
602 ICON_ABOVE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
611 new FXLabel(
myToolBar6,
"Waiting Time:\t\tTime spent waiting accumulated for all vehicles", 0, LAYOUT_TOP | LAYOUT_LEFT);
623 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);
636 getApp()->reg().writeIntEntry(
"SETTINGS",
"x", getX());
637 getApp()->reg().writeIntEntry(
"SETTINGS",
"y", getY());
638 getApp()->reg().writeIntEntry(
"SETTINGS",
"width", getWidth());
639 getApp()->reg().writeIntEntry(
"SETTINGS",
"height", getHeight());
640 getApp()->reg().writeStringEntry(
"SETTINGS",
"basedir",
gCurrentFolder.text());
641 getApp()->reg().writeIntEntry(
"SETTINGS",
"maximized", isMaximized() ? 1 : 0);
642 getApp()->reg().writeIntEntry(
"gui",
"timeasHMS",
myShowTimeAsHMS ? 1 : 0);
652 if (mc->getText() ==
"Edit Selected...") {
662 for (std::vector<MSLane*>::const_iterator it = lanes.begin(); it != lanes.end(); ++it) {
696 FXFileDialog opendialog(
this,
"Open Simulation Configuration");
698 opendialog.setSelectMode(SELECTFILE_EXISTING);
703 if (opendialog.execute()) {
705 std::string file = opendialog.getFilename().text();
716 FXFileDialog opendialog(
this,
"Open Network");
718 opendialog.setSelectMode(SELECTFILE_EXISTING);
719 opendialog.setPatternList(
"SUMO nets (*.net.xml)\nAll files (*)");
723 if (opendialog.execute()) {
725 std::string file = opendialog.getFilename().text();
735 load(
"",
false,
true);
743 myStatusbar->getStatusLine()->setText(
"Already loading!");
746 std::string file((
const char*)data);
762 myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
772 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
781 myAmLoading ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
791 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
801 myStatusbar->getStatusLine()->setText(
"No simulation loaded!");
825 myStatusbar->getStatusLine()->setText(
"No simulation loaded!");
868 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
878 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
888 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
898 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
919 d->show(PLACEMENT_OWNER);
975 GUIApplicationWindow::onCmdNewOSG(
FXObject*, FXSelector,
void*) {
987 about->show(PLACEMENT_OWNER);
993 FXEvent*
event = (FXEvent*)ptr;
995 setDNDData(FROM_CLIPBOARD, event->target,
string);
1053 if (ec->
myNet == 0) {
1089 std::string settingsName = settings.
addSettings(view);
1111 setTitle(
"SUMO Traffic Light Game");
1121 getApp()->endWaitCursor();
1159 FXMessageBox::warning(
this, MBOX_OK,
"Simulation ended",
"%s", text.c_str());
1171 for (; it != end; ++it) {
1203 getApp()->beginWaitCursor();
1221 myStatusbar->getStatusLine()->setText(
"No simulation loaded!");
1225 FXuint opts = MDI_TRACKING;
1291 return getApp()->getDefaultCursor(DEF_ARROW_CURSOR);
1309 myStatusbar->getStatusLine()->setText(text.c_str());
1310 myStatusbar->getStatusLine()->setNormalText(text.c_str());
1322 const bool hideFraction =
myAmGaming || fmod(
TS, 1.) == 0.;
1323 const int BuffSize = 100;
1324 char buffer[BuffSize];
1326 const int hours = (
int)fracSeconds / 3600;
1327 const int minutes = ((
int)fracSeconds % 3600) / 60;
1328 fracSeconds = fracSeconds - 3600 * hours - 60 * minutes;
1329 const std::string format = (hideFraction ?
1330 "%02d-%02d-%02.0f" :
"%02d-%02d-%06.3f");
1331 snprintf(buffer, BuffSize, format.c_str(), hours, minutes, fracSeconds);
1333 const std::string format = (hideFraction ?
1334 "%13.0f" :
"%13.3f");
1335 snprintf(buffer, BuffSize, format.c_str(), fracSeconds);
std::vector< FXMainWindow * > myTrackerWindows
Event sent when the the simulation is over.
MFXMutex & getBreakpointLock()
RandomDistributor< std::string > myJamSounds
FXLabel * myGeoCoordinate
GUISUMOAbstractView * getView() const
virtual ~GUIApplicationWindow()
Destructor.
GUILoadThread * myLoadThread
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)
SUMOReal getMaxSpeed() const
Get vehicle's maximum speed [m/s].
long onCmdReload(FXObject *, FXSelector, void *)
Called on reload.
virtual bool simulationIsStepable() const
std::string addSettings(GUISUMOAbstractView *view=0) const
Adds the parsed settings to the global list of settings.
MSNet::SimulationState getReason() const
Returns the reason the simulation has ended due.
The Simulation execution thread.
SUMOTime myAlternateSimDelay
The alternate simulation delay for toggling.
GUIVisualizationSettings * getVisualisationSettings()
send when a message occured
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
SUMOVehicleClass
Definition of vehicle classes to differ between different lane usage and authority types...
constVehIt loadedVehBegin() const
Returns the begin of the internal vehicle map.
long onUpdOpenRecent(FXObject *, FXSelector, void *)
Determines whether opening a recent file is enabled.
const std::string & getViewType() const
Returns the parsed view type.
long onCmdEditChosen(FXObject *, FXSelector, void *)
Called on menu Edit->Edit Chosen.
MFXEventQue myEvents
List of got requests.
static MTRand myGamingRNG
A random number generator used to choose a gaming sound.
bool gaming
whether the application is in gaming mode or not
const bool myOsgView
whether to load the OpenSceneGraph view
const std::string & getMsg() const
Returns the message.
GUIColorer laneColorer
The lane colorer.
void load(const std::string &file, bool isNet)
begins the loading of the given file
void select(GUIGlID id, bool update=true)
Adds the object with the given id.
FXToolBarShell * myToolBarDrag4
long onUpdStop(FXObject *, FXSelector, void *)
Determines whether "stop" is enabled.
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)
virtual bool simulationIsStartable() const
static bool gRunAfterLoad
the simulation shall start direct after loading
std::string time2string(SUMOTime t)
Edit simulation breakpoints.
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
Reload the previously loaded simulation.
FXGLVisual * myGLVisual
The gl-visual used.
GUISUMOAbstractView * openNewView(GUISUMOViewParent::ViewType vt=GUISUMOViewParent::VIEW_2D_OPENGL)
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
long onCmdStop(FXObject *, FXSelector, void *)
Called on "stop".
const std::vector< SUMOTime > & getBreakpoints() const
Returns the parsed breakpoints.
static bool dictionary(const std::string &id, MSEdge *edge)
Inserts edge into the static dictionary Returns true if the key id isn't already in the dictionary...
FXString gCurrentFolder
The folder used as last.
Loads a file previously loaded.
constVehIt loadedVehEnd() const
Returns the end of the internal vehicle map.
SUMOTime getCurrentTimeStep() const
Returns the current simulation step.
bool isGaming() const
return whether the gui is in gaming mode
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)
Locate junction - button.
GUIGlID getGlID() const
Returns the numerical id of the object.
long onUpdOpen(FXObject *, FXSelector, void *)
Determines whether opening is enabled.
virtual FXGLCanvas * getBuildGLCanvas() const
const std::vector< GUISUMOAbstractView::Decal > & getDecals() const
Returns the parsed decals.
void addDecals(const std::vector< Decal > &decals)
FXToolBarShell * myToolBarDrag2
void setViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
void setFgColor(FXColor clr)
set/get forground color
void checkGamingEvents()
handles additional game-related events
FXMenuPane * myFileMenu
the submenus
void addSeparator()
Adds a a separator to this log window.
std::vector< SUMOTime > & getBreakpoints()
Application settings - menu entry.
virtual void create()
Creates the main window (required by FOX)
Representation of a lane in the micro simulation (gui-version)
FXHorizontalFrame * myCartesianFrame
SUMOReal getDelay() const
Returns the parsed delay.
FXRecentFiles myRecentNets
List of recent nets.
const std::vector< std::string > mySettingsFiles
the name of the settings file to load
RandomDistributor< std::string > getEventDistribution(const std::string &id)
Editor for simulation breakpoints.
bool myAmGaming
information whether the gui is currently in gaming mode
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
GUIEventType getOwnType() const
returns the event type
long onCmdOpenRecent(FXObject *, FXSelector, void *)
Called on opening a recent file.
void setActive(size_t scheme)
static const RGBColor GREEN
An error occured during the simulation step.
void updateTimeLCD(SUMOTime time)
updates the simulation time display
void setRange(FXdouble lo, FXdouble hi)
Change the spinner's range.
Locator configuration - menu entry.
void handleEvent_SimulationEnded(GUIEvent *e)
FXdouble getValue() const
Return current value.
Locate polygons - button.
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.
SUMOReal getJamSoundTime()
SUMOReal myJamSoundTime
waiting time after which vehicles trigger jam sounds
long onCmdStart(FXObject *, FXSelector, void *)
Called on "play".
long onCmdAppSettings(FXObject *, FXSelector, void *)
Opens the application settings menu (Settings->Application Settings...)
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
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
FXMenuPane * mySettingsMenu
static void init(FXApp *a)
size_t myViewNumber
The current view number.
T get(MTRand *which=0) const
Draw a sample of the distribution.
FXMDIMenu * myMDIMenu
The menu used for the MDI-windows.
void load(const std::string &file, bool isNet, bool isReload=false)
void setSnapshots(GUISUMOAbstractView *view) const
Makes a snapshot if it has been parsed.
void setVertical(const FXint len)
set/get segment vertical length - must be more than twice the segment width
FXToolBarShell * myMenuBarDrag
SUMOTime getCurrentSimTime() const
ViewType
Available view types.
virtual void eventOccured()
GUIRunThread * myRunThread
long onCmdListInternal(FXObject *, FXSelector, void *)
Toggle listing of internal structures.
Gaming mode - menu entry.
Perform a single simulation step.
long onUpdReload(FXObject *, FXSelector, void *)
Determines whether reloading is enabled.
long onCmdDelayToggle(FXObject *, FXSelector, void *)
Called on "delay toggle".
const std::string myFile
the name of the loaded file
FXToolBarShell * myToolBarDrag3
The application's "About" - dialog.
void setStatusBarText(const std::string &)
The Simulation delay control.
long onCmdAbout(FXObject *, FXSelector, void *)
Shows the about dialog.
FXCursor * getDefaultCursor()
long onCmdClose(FXObject *, FXSelector, void *)
Called on menu File->Close.
void saveViewport(const SUMOReal x, const SUMOReal y, const SUMOReal zoom)
Makes the given viewport the default.
send when a error occured
SVCPermissions getPermissions() const
Returns the vehicle class permissions for this lane.
StringBijection< SUMOVehicleClass > SumoVehicleClassStrings(sumoVehicleClassStringInitializer, SVC_CUSTOM2, false)
void dependentBuild(bool game)
void setTarget(FXObject *tgt)
set the target
bool myListInternal
information whether the locator should list internal structures
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
virtual bool simulationIsStopable() const
The dialog to change the application (gui) settings.
SUMOReal getSpeedLimit() const
Returns the speed limit of the edge The speed limit of the first lane is retured; should probably be...
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.
FXMenuPane * mySelectByPermissions
virtual void fillMenuBar()
Builds the menu bar.
Open a new microscopic 3D view.
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 appendText(GUIEventType eType, const std::string &msg)
Adds new text to the window.
void unlock()
release mutex lock
FXMenuBar * myMenuBar
The application menu bar.
FXMenuPane * myWindowsMenu
FXToolBarShell * myToolBarDrag5
SUMOReal getOverallProb() const
Return the sum of the probabilites assigned to the members.
FXGLCanvas * getBuildGLCanvas() const
FXToolBarShell * myToolBarDrag7
GUIVisualizationSettings & getDefault()
Returns the default scheme.
FXToolBarShell * myToolBarDrag6
static const RGBColor RED
Locate addtional structure - button.
long onCmdOpenConfiguration(FXObject *, FXSelector, void *)
Called on menu File->Open Configuration.
long onRunThreadEvent(FXObject *, FXSelector, void *)
Called on an event from the simulation thread.
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()
FXDEFMAP(GUIApplicationWindow) GUIApplicationWindowMap[]
MFXMutex myTrackerLock
A lock to make the removal and addition of trackers secure.
void setSelector(FXSelector sel)
set the selector
long onUpdAddView(FXObject *, FXSelector, void *)
Determines whether adding a view is enabled.
SUMOTime getSimEndTime() const
long onCmdLocate(FXObject *, FXSelector, void *)
Called on menu commands from the Locator menu.
FXEX::FXLCDLabel * myTimeLossLabel
FXRealSpinDial * mySimDelayTarget
FXHorizontalFrame * myGeoFrame
static size_t dictSize()
Returns the number of edges.
FXRecentFiles myRecentConfigs
List of recent config files.
const MSVehicleType & getVehicleType() const
Returns the vehicle's type definition.
const SUMOReal SUMO_const_haltingSpeed
the speed threshold at which vehicles are considered as halting
void create()
Creates the widget (and the icons)
void clear()
Clears the list of selected objects.
FXToolBarShell * myToolBarDrag1
for some menu detaching fun
SUMOReal getSpeed() const
Returns the vehicle's current speed.
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
toogle delay between alternative value
FXMDIClient * myMDIClient
The multi view panel.
send when a simulation has been loaded
bool simulationAvailable() const
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
send when a warning occured
FXToolBar * myToolBar1
The application tool bar.
long onCmdOpenNetwork(FXObject *, FXSelector, void *)
Called on menu File->Open Network.
long onUpdNeedsSimulation(FXObject *, FXSelector, void *)
Determines whether some buttons which require an active simulation may be shown.
SUMOTime getTimeStep() const
Returns the time step the simulation has ended at.
void setIncrements(FXdouble fine, FXdouble norm, FXdouble coarse)
Change all spinner increment.
static const bool gUseMesoSim
An XML-handler for visualisation schemes.
static std::string getStateMessage(SimulationState state)
Returns the message to show if a certain state occurs.
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
const MSEdge * getEdge() const
Returns the edge the vehicle is currently at.
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 ...
long onCmdTimeToggle(FXObject *, FXSelector, void *)
Called on "time toggle".
bool isOnRoad() const
Returns the information whether the vehicle is on a road (is simulated)
void handleEvent_SimulationStep(GUIEvent *e)
FXEX::FXLCDLabel * myLCDLabel
the simulation step display
FXMenuPane * myControlMenu
GUISelectedStorage gSelected
A global holder of selected objects.
A logging window for the gui.
send when a simulation step has been performed
long onUpdStep(FXObject *, FXSelector, void *)
Determines whether "step" is enabled.
Open a new microscopic view.
static FXIcon * getIcon(GUIIcon which)
long onCmdQuit(FXObject *, FXSelector, void *)
Called by FOX if the application shall be closed.
GUINet * myNet
the loaded net
virtual void addToWindowsMenu(FXMenuPane *)
long onUpdStart(FXObject *sender, FXSelector, void *ptr)
Determines whether "play" is enabled.
The main window of the SUMO-gui.