95 FXIcon* ic, FXuint opts,
96 FXint x, FXint y, FXint w, FXint h) :
97 GUIGlChildWindow(p, parentWindow, mdimenu, name,
nullptr, ic, opts, x, y, w, h) {
98 myParent->addGLChild(
this);
149 FXFileDialog opendialog(
this,
"Save Snapshot");
151 opendialog.setSelectMode(SELECTFILE_ANY);
153 opendialog.setPatternList(
"All Image and Video Files (*.gif,*.bmp,*.xpm,*.pcx,*.ico,*.rgb,*.xbm,*.tga,*.png,*.jpg,*.jpeg,*.tif,*.tiff,*.ps,*.eps,*.pdf,*.svg,*.tex,*.pgf,*.h264,*.hevc)\n" 154 "All Video Files (*.h264,*.hevc)\n" 156 opendialog.setPatternList(
"All Image Files (*.gif,*.bmp,*.xpm,*.pcx,*.ico,*.rgb,*.xbm,*.tga,*.png,*.jpg,*.jpeg,*.tif,*.tiff,*.ps,*.eps,*.pdf,*.svg,*.tex,*.pgf)\n" 158 "GIF Image (*.gif)\nBMP Image (*.bmp)\nXPM Image (*.xpm)\nPCX Image (*.pcx)\nICO Image (*.ico)\n" 159 "RGB Image (*.rgb)\nXBM Image (*.xbm)\nTARGA Image (*.tga)\nPNG Image (*.png)\n" 160 "JPEG Image (*.jpg,*.jpeg)\nTIFF Image (*.tif,*.tiff)\n" 161 "Postscript (*.ps)\nEncapsulated Postscript (*.eps)\nPortable Document Format (*.pdf)\n" 162 "Scalable Vector Graphics (*.svg)\nLATEX text strings (*.tex)\nPortable LaTeX Graphics (*.pgf)\n" 171 std::string file = opendialog.getFilename().text();
173 if (error ==
"video") {
175 }
else if (error !=
"") {
176 FXMessageBox::error(
this, MBOX_OK,
"Saving failed.",
"%s", error.c_str());
185 std::vector<GUIGlID> ids;
188 switch (FXSELID(sel)) {
192 title =
"Junction Chooser";
197 title =
"Edge Chooser";
207 title =
"Vehicle Chooser";
212 title =
"Person Chooser";
217 title =
"Traffic Lights Chooser";
222 title =
"Additional Objects Chooser";
227 title =
"POI Chooser";
232 title =
"Polygon Chooser";
235 throw ProcessError(
"Unknown Message ID in onCmdLocate");
260 if (edge ==
nullptr) {
264 const std::vector<MSLane*>& lanes = edge->
getLanes();
265 for (std::vector<MSLane*>::const_iterator j = lanes.begin(); j != lanes.end(); ++j) {
Locate junction - button.
FXGLVisual * getGLVisual() const
The class responsible for building and deletion of vehicles (gui-version)
Storage for geometrical objects extended by mutexes.
GUIIcon
An enumeration of icons used by the gui applications.
Locate addtional structure - button.
~GUISUMOViewParent()
Destructor.
FXDEFMAP(GUISUMOViewParent) GUISUMOViewParentMap[]
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...
void setToolBarVisibility(const bool value)
about toggled gaming status
The class responsible for building and deletion of vehicles (gui-version)
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
long onSimStep(FXObject *sender, FXSelector, void *)
Called on a simulation step.
bool listTeleporting() const
return whether to list teleporting vehicles
virtual long onKeyRelease(FXObject *o, FXSelector sel, void *data)
FXString gCurrentFolder
The folder used as last.
FXPopup * myLocatorPopup
The locator menu.
virtual void buildViewToolBars(GUIGlChildWindow &)
builds the view toolbars
virtual void endSnapshot()
Ends a video snapshot.
Representation of a lane in the micro simulation (gui-version)
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
A road/street connecting two junctions (gui-version)
GUIMainWindow * myParent
The parent window.
long onKeyPress(FXObject *o, FXSelector sel, void *data)
handle keys
Locate polygons - button.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
virtual long onKeyPress(FXObject *o, FXSelector sel, void *data)
keyboard functions
virtual MSTransportableControl & getPersonControl()
Returns the person control.
ShapeContainer & getShapeContainer()
Returns the shapes container.
std::string makeSnapshot(const std::string &destFile, const int width=-1, const int height=-1)
Takes a snapshots and writes it into the given file.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
bool isSelected(GUIGlObject *o) const
true if the object is selected (may include extra logic besides calling gSelected) ...
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
ViewType
Available view types.
bool isGaming() const
return whether the gui is in gaming mode
virtual void checkSnapshots()
Checks whether it is time for a snapshot.
bool listInternal() const
return whether to list internal structures
A single child window which contains a view of the simulation area.
reserved GLO type to pack all additionals
static std::vector< GUIGlID > getIDs(bool includeInternal)
bool listParking() const
return whether to list parking vehicles
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)
Called if the user wants to make a snapshot (screenshot)
A MSNet extended by some values for usage within the gui.
FXToolBar * myStaticNavigationToolBar
The static navigation tool bar.
FXMenuButton * myLocatorButton
The locator button.
A Simulation step was performed.
GUISUMOAbstractView * myView
The view.
GUIGlID getGlID() const
Returns the numerical id of the object.
virtual GUISUMOAbstractView * init(FXGLCanvas *share, GUINet &net, ViewType type)
"Initialises" this window by building the contents
GUISelectedStorage gSelected
A global holder of selected objects.
static std::vector< GUIGlID > getIDList(GUIGlObjectType typeFilter)
Returns the list of gl-ids of all additional objects that match the given type.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
FXVerticalFrame * myContentFrame
The contents frame.
void removeGLChild(GUIGlChildWindow *child)
removes the given child window from the list
GUI-version of the transportable control for building gui persons and containers. ...