64 #include <osgview/GUIOSGView.h>
67 #ifdef CHECK_MEMORY_LEAKS
69 #endif // CHECK_MEMORY_LEAKS
99 FXIcon* ic, FXuint opts,
100 FXint x, FXint y, FXint w, FXint h)
102 myParent->addChild(
this,
false);
145 FXFileDialog opendialog(
this,
"Save Snapshot");
147 opendialog.setSelectMode(SELECTFILE_ANY);
148 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"
149 "GIF Image (*.gif)\nBMP Image (*.bmp)\nXPM Image (*.xpm)\nPCX Image (*.pcx)\nICO Image (*.ico)\n"
150 "RGB Image (*.rgb)\nXBM Image (*.xbm)\nTARGA Image (*.tga)\nPNG Image (*.png)\n"
151 "JPEG Image (*.jpg, *.jpeg)\nTIFF Image (*.tif, *.tiff)\n"
152 "Postscript (*.ps)\nEncapsulated Postscript (*.eps)\nPortable Document Format (*.pdf)\n"
153 "Scalable Vector Graphics (*.svg)\nLATEX text strings (*.tex)\nPortable LaTeX Graphics (*.pgf)\n"
162 std::string file = opendialog.getFilename().text();
165 FXMessageBox::error(
this, MBOX_OK,
"Saving failed.",
"%s", error.c_str());
174 std::vector<GUIGlID> ids;
177 switch (FXSELID(sel)) {
182 title =
"Junction Chooser";
188 title =
"Edge Chooser";
194 title =
"Vehicle Chooser";
200 title =
"Traffic Lights Chooser";
206 title =
"Additional Objects Chooser";
212 title =
"POI Chooser";
218 title =
"Polygon Chooser";
221 throw ProcessError(
"Unknown Message ID in onCmdLocate");
253 const std::vector<MSLane*>& lanes = edge->
getLanes();
254 for (std::vector<MSLane*>::const_iterator j = lanes.begin(); j != lanes.end(); ++j) {
static std::vector< GUIGlID > getIDList()
Returns the list of gl-ids of all additional objects.
void show()
sets the focus after the window is created to work-around bug in libfox
bool isSelected(GUIGlObject *o) const
true if the object is selected (may include extra logic besides calling gSelected) ...
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.
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
~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...
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.
FXString gCurrentFolder
The folder used as last.
FXPopup * myLocatorPopup
The locator menu.
virtual void buildViewToolBars(GUIGlChildWindow &)
builds the view toolbars
bool isGaming() const
return whether the gui is in gaming mode
Locate junction - button.
GUIGlID getGlID() const
Returns the numerical id of the object.
A Simulation step was performed.
Representation of a lane in the micro simulation (gui-version)
A road/street connecting two junctions (gui-version)
GUIMainWindow * myParent
The parent window.
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Locate polygons - button.
ShapeContainer & getShapeContainer()
Returns the shapes container.
MSVehicleControl & getVehicleControl()
Returns the vehicle control.
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
ViewType
Available view types.
FXGLVisual * getGLVisual() const
bool listInternal() const
return whether to list internal structures
void removeChild(FXMDIChild *child)
removes the given child window from the list
void checkSnapshots()
Checks whether it is time for a snapshot.
FXToolBar * myNavigationToolBar
The tool bar.
std::string makeSnapshot(const std::string &destFile)
Takes a snapshots and writes it into the given file.
A single child window which contains a view of the simulation area.
static std::vector< GUIGlID > getIDs(bool includeInternal)
Locate addtional structure - button.
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.
FXMenuButton * myLocatorButton
GUISUMOAbstractView * myView
the view
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 FXIcon * getIcon(GUIIcon which)
FXVerticalFrame * myContentFrame
void toggleGaming()
about toggled gaming status