Eclipse SUMO - Simulation of Urban MObility
GUISUMOViewParent.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
18 // A single child window which contains a view of the simulation area
19 /****************************************************************************/
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #include <config.h>
26 
27 #include <string>
28 #include <vector>
29 #include <fxkeys.h>
31 #include <utils/geom/Position.h>
32 #include <utils/geom/Boundary.h>
46 #include <guisim/GUIVehicle.h>
47 #include <guisim/GUIPerson.h>
48 #include <guisim/GUIEdge.h>
49 #include <guisim/GUILane.h>
50 #include <guisim/GUINet.h>
53 #include <microsim/MSJunction.h>
54 #include <microsim/MSGlobals.h>
55 #include "GUIGlobals.h"
56 #include "GUIViewTraffic.h"
57 #include "GUIApplicationWindow.h"
58 #include "GUISUMOViewParent.h"
59 
61 
62 #ifdef HAVE_OSG
63 #include <osgview/GUIOSGView.h>
64 #endif
65 
66 #define SPEEDFACTOR_SCALE 100.0
67 
68 // ===========================================================================
69 // FOX callback mapping
70 // ===========================================================================
71 FXDEFMAP(GUISUMOViewParent) GUISUMOViewParentMap[] = {
73  // FXMAPFUNC(SEL_COMMAND, MID_ALLOWROTATION, GUISUMOViewParent::onCmdAllowRotation),
74  FXMAPFUNC(SEL_COMMAND, MID_LOCATEJUNCTION, GUISUMOViewParent::onCmdLocate),
75  FXMAPFUNC(SEL_COMMAND, MID_LOCATEEDGE, GUISUMOViewParent::onCmdLocate),
76  FXMAPFUNC(SEL_COMMAND, MID_LOCATEVEHICLE, GUISUMOViewParent::onCmdLocate),
77  FXMAPFUNC(SEL_COMMAND, MID_LOCATEPERSON, GUISUMOViewParent::onCmdLocate),
78  FXMAPFUNC(SEL_COMMAND, MID_LOCATETLS, GUISUMOViewParent::onCmdLocate),
79  FXMAPFUNC(SEL_COMMAND, MID_LOCATEADD, GUISUMOViewParent::onCmdLocate),
80  FXMAPFUNC(SEL_COMMAND, MID_LOCATEPOI, GUISUMOViewParent::onCmdLocate),
81  FXMAPFUNC(SEL_COMMAND, MID_LOCATEPOLY, GUISUMOViewParent::onCmdLocate),
84  FXMAPFUNC(SEL_COMMAND, MID_SIMSTEP, GUISUMOViewParent::onSimStep),
85 
86 };
87 
88 // Object implementation
89 FXIMPLEMENT(GUISUMOViewParent, GUIGlChildWindow, GUISUMOViewParentMap, ARRAYNUMBER(GUISUMOViewParentMap))
90 
91 
92 // ===========================================================================
93 // member method definitions
94 // ===========================================================================
95 GUISUMOViewParent::GUISUMOViewParent(FXMDIClient* p, FXMDIMenu* mdimenu,
96  const FXString& name,
97  GUIMainWindow* parentWindow,
98  FXIcon* ic, FXuint opts,
99  FXint x, FXint y, FXint w, FXint h) :
100  GUIGlChildWindow(p, parentWindow, mdimenu, name, nullptr, ic, opts, x, y, w, h) {
101  buildSpeedControlToolbar();
102  myParent->addGLChild(this);
103 }
104 
105 
108  switch (type) {
109  default:
110  case VIEW_2D_OPENGL:
111  myView = new GUIViewTraffic(myContentFrame, *myParent, this, net, myParent->getGLVisual(), share);
112  break;
113 #ifdef HAVE_OSG
114  case VIEW_3D_OSG:
115  myView = new GUIOSGView(myContentFrame, *myParent, this, net, myParent->getGLVisual(), share);
116  break;
117 #endif
118  }
119  myView->buildViewToolBars(*this);
120  if (myParent->isGaming()) {
122  }
123  return myView;
124 }
125 
126 
128  myParent->removeGLChild(this);
129 }
130 
131 
132 void
134  if (value) {
136  } else {
138  }
139 }
140 
141 
142 long
143 GUISUMOViewParent::onCmdMakeSnapshot(FXObject* sender, FXSelector, void*) {
144  MFXCheckableButton* button = dynamic_cast<MFXCheckableButton*>(sender);
145  // check if cast was sucesfully
146  if (button) {
147  if (button->amChecked()) {
148  myView->endSnapshot();
149  button->setChecked(false);
150  return 1;
151  }
152  // get the new file name
153  FXFileDialog opendialog(this, "Save Snapshot");
154  opendialog.setIcon(GUIIconSubSys::getIcon(ICON_EMPTY));
155  opendialog.setSelectMode(SELECTFILE_ANY);
156 #ifdef HAVE_FFMPEG
157  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"
158  "All Video Files (*.h264,*.hevc)\n"
159 #else
160  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"
161 #endif
162  "GIF Image (*.gif)\nBMP Image (*.bmp)\nXPM Image (*.xpm)\nPCX Image (*.pcx)\nICO Image (*.ico)\n"
163  "RGB Image (*.rgb)\nXBM Image (*.xbm)\nTARGA Image (*.tga)\nPNG Image (*.png)\n"
164  "JPEG Image (*.jpg,*.jpeg)\nTIFF Image (*.tif,*.tiff)\n"
165  "Postscript (*.ps)\nEncapsulated Postscript (*.eps)\nPortable Document Format (*.pdf)\n"
166  "Scalable Vector Graphics (*.svg)\nLATEX text strings (*.tex)\nPortable LaTeX Graphics (*.pgf)\n"
167  "All Files (*)");
168  if (gCurrentFolder.length() != 0) {
169  opendialog.setDirectory(gCurrentFolder);
170  }
171  if (!opendialog.execute() || !MFXUtils::userPermitsOverwritingWhenFileExists(this, opendialog.getFilename())) {
172  return 1;
173  }
174  gCurrentFolder = opendialog.getDirectory();
175  std::string file = opendialog.getFilename().text();
176  std::string error = myView->makeSnapshot(file);
177  if (error == "video") {
178  button->setChecked(!button->amChecked());
179  } else if (error != "") {
180  FXMessageBox::error(this, MBOX_OK, "Saving failed.", "%s", error.c_str());
181  }
182  }
183  return 1;
184 }
185 
186 
187 long
188 GUISUMOViewParent::onCmdLocate(FXObject*, FXSelector sel, void*) {
189  std::vector<GUIGlID> ids;
190  GUIIcon icon;
191  std::string chooserTitle;
192  switch (FXSELID(sel)) {
193  case MID_LOCATEJUNCTION:
194  ids = static_cast<GUINet*>(GUINet::getInstance())->getJunctionIDs(myParent->listInternal());
195  icon = ICON_LOCATEJUNCTION;
196  chooserTitle = "Junction Chooser";
197  break;
198  case MID_LOCATEEDGE:
200  icon = ICON_LOCATEEDGE;
201  chooserTitle = "Edge Chooser";
202  break;
203  case MID_LOCATEVEHICLE:
205  static_cast<GUIMEVehicleControl*>(static_cast<GUINet*>(MSNet::getInstance())->getGUIMEVehicleControl())->insertVehicleIDs(ids);
206  } else {
207  static_cast<GUIVehicleControl&>(MSNet::getInstance()->getVehicleControl()).insertVehicleIDs(
209  }
210  icon = ICON_LOCATEVEHICLE;
211  chooserTitle = "Vehicle Chooser";
212  break;
213  case MID_LOCATEPERSON:
214  static_cast<GUITransportableControl&>(MSNet::getInstance()->getPersonControl()).insertPersonIDs(ids);
215  icon = ICON_LOCATEPERSON;
216  chooserTitle = "Person Chooser";
217  break;
218  case MID_LOCATETLS:
219  ids = static_cast<GUINet*>(GUINet::getInstance())->getTLSIDs();
220  icon = ICON_LOCATETLS;
221  chooserTitle = "Traffic Lights Chooser";
222  break;
223  case MID_LOCATEADD:
225  icon = ICON_LOCATEADD;
226  chooserTitle = "Additional Objects Chooser";
227  break;
228  case MID_LOCATEPOI:
229  ids = static_cast<GUIShapeContainer&>(GUINet::getInstance()->getShapeContainer()).getPOIIds();
230  icon = ICON_LOCATEPOI;
231  chooserTitle = "POI Chooser";
232  break;
233  case MID_LOCATEPOLY:
234  ids = static_cast<GUIShapeContainer&>(GUINet::getInstance()->getShapeContainer()).getPolygonIDs();
235  icon = ICON_LOCATEPOLY;
236  chooserTitle = "Polygon Chooser";
237  break;
238  default:
239  throw ProcessError("Unknown Message ID in onCmdLocate");
240  }
241  myLocatorPopup->popdown();
242  myLocatorButton->killFocus();
243  myLocatorPopup->update();
244  new GUIDialog_GLObjChooser(this, GUIIconSubSys::getIcon(icon), chooserTitle.c_str(), ids, GUIGlObjectStorage::gIDStorage);
245  return 1;
246 }
247 
248 
249 long
250 GUISUMOViewParent::onSimStep(FXObject*, FXSelector, void*) {
251  myView->update();
253  return 1;
254 }
255 
256 
257 bool
259  GUIGlObjectType type = o->getType();
260  if (gSelected.isSelected(type, o->getGlID())) {
261  return true;
262  } else if (type == GLO_EDGE) {
263  GUIEdge* edge = dynamic_cast<GUIEdge*>(o);
264  if (edge == nullptr) {
265  // hmph, just some security stuff
266  return false;
267  }
268  const std::vector<MSLane*>& lanes = edge->getLanes();
269  for (std::vector<MSLane*>::const_iterator j = lanes.begin(); j != lanes.end(); ++j) {
270  GUILane* l = dynamic_cast<GUILane*>(*j);
271  if (l != nullptr && gSelected.isSelected(GLO_LANE, l->getGlID())) {
272  return true;
273  }
274  }
275  return false;
276  } else {
277  return false;
278  }
279 }
280 
281 
282 long
283 GUISUMOViewParent::onKeyPress(FXObject* o, FXSelector sel, void* ptr) {
284  myView->onKeyPress(o, sel, ptr);
285  return 0;
286 }
287 
288 
289 long
290 GUISUMOViewParent::onKeyRelease(FXObject* o, FXSelector sel, void* ptr) {
291  myView->onKeyRelease(o, sel, ptr);
292  return 0;
293 }
294 
295 
296 void
299  new FXVerticalSeparator(toolbar, GUIDesignVerticalSeparator);
300 
301  //myToolBarDragSpeed = new FXToolBarShell(this, GUIDesignToolBar);
302  //myToolBarSpeed = new FXToolBar(toolbar, myToolBarDragSpeed, GUIDesignToolBarRaisedSameTop);
303  //mySpeedFactorSlider = new FXSlider(myToolBarSpeed, this, MID_SPEEDFACTOR, LAYOUT_FIX_WIDTH | SLIDER_ARROW_UP | SLIDER_TICKS_TOP, 0, 0, 300, 10, 0, 0, 5, 0);
304  mySpeedFactorSlider = new FXSlider(toolbar, this, MID_SPEEDFACTOR, LAYOUT_FIX_WIDTH | SLIDER_ARROW_UP | SLIDER_TICKS_TOP, 0, 0, 200, 10, 0, 0, 5, 0);
305  mySpeedFactorSlider->setRange(0, 200);
306  mySpeedFactorSlider->setHeadSize(10);
307  mySpeedFactorSlider->setIncrement(1);
308  mySpeedFactorSlider->setTickDelta(100);
309  mySpeedFactorSlider->setValue(100);
310  mySpeedFactorSlider->setHelpText("Control speedFactor of tracked object");
311  //mySpeedFactorSlider->hide();
312 }
313 
314 long
315 GUISUMOViewParent::onCmdSpeedFactor(FXObject*, FXSelector, void*) {
316  if (myView != nullptr && myView->getTrackedID() != GUIGlObject::INVALID_ID) {
318  if (o != nullptr) {
319  const double speedFactor = mySpeedFactorSlider->getValue() / SPEEDFACTOR_SCALE;
320  if (o->getType() == GLO_VEHICLE) {
321  MSBaseVehicle* veh = dynamic_cast<MSBaseVehicle*>(o);
322  veh->setChosenSpeedFactor(speedFactor);
323  } else if (o->getType() == GLO_PERSON) {
324  //MSPerson* person = dynamic_cast<MSPerson*>(o);
325  //person->setChosenSpeedFactor(speedFactor);
326  }
327  mySpeedFactorSlider->setTipText(toString(speedFactor).c_str());
328  }
329 
330  }
331  return 1;
332 }
333 
334 long
335 GUISUMOViewParent::onUpdSpeedFactor(FXObject* sender, FXSelector, void* ptr) {
336  bool disable = myView == nullptr || myView->getTrackedID() == GUIGlObject::INVALID_ID;
337  sender->handle(this, FXSEL(SEL_COMMAND, disable ? ID_DISABLE : ID_ENABLE), ptr);
338  if (disable) {
339  mySpeedFactorSlider->hide();
340  } else {
342  if (o != nullptr) {
343  if (o->getType() == GLO_VEHICLE) {
344  MSBaseVehicle* veh = dynamic_cast<MSBaseVehicle*>(o);
346  } else if (o->getType() == GLO_PERSON) {
347  MSPerson* person = dynamic_cast<MSPerson*>(o);
348  mySpeedFactorSlider->setValue((int)(person->getChosenSpeedFactor() * SPEEDFACTOR_SCALE));
349  }
350  }
351 
352  mySpeedFactorSlider->show();
353  }
354  return 1;
355 }
356 
357 /****************************************************************************/
GUIGlObject::getType
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Definition: GUIGlObject.cpp:180
MID_LOCATEPOI
Locate poi - button.
Definition: GUIAppEnum.h:338
GUIGlObject_AbstractAdd::getIDList
static std::vector< GUIGlID > getIDList(GUIGlObjectType typeFilter)
Returns the list of gl-ids of all additional objects that match the given type.
Definition: GUIGlObject_AbstractAdd.cpp:89
GUIViewTraffic.h
GUISUMOViewParent::setToolBarVisibility
void setToolBarVisibility(const bool value)
@notify about toggled gaming status
Definition: GUISUMOViewParent.cpp:133
Boundary.h
MID_LOCATETLS
Locate TLS - button.
Definition: GUIAppEnum.h:334
GUITransportableControl.h
GUIMainWindow::listParking
bool listParking() const
return whether to list parking vehicles
Definition: GUIMainWindow.h:92
MFXImageHelper.h
GUIMainWindow::listTeleporting
bool listTeleporting() const
return whether to list teleporting vehicles
Definition: GUIMainWindow.h:97
GUIGlObjectTypes.h
MFXCheckableButton::amChecked
bool amChecked() const
check if this MFXCheckableButton is checked
Definition: MFXCheckableButton.cpp:51
MID_LOCATEEDGE
Locate edge - button.
Definition: GUIAppEnum.h:324
GUIVehicle.h
GUISUMOAbstractView
Definition: GUISUMOAbstractView.h:72
GUISUMOViewParent
A single child window which contains a view of the simulation area.
Definition: GUISUMOViewParent.h:58
GUIViewTraffic
Definition: GUIViewTraffic.h:54
MFXCheckableButton::setChecked
void setChecked(bool val)
check or uncheck this MFXCheckableButton
Definition: MFXCheckableButton.cpp:57
GUIVehicleControl.h
GUIGlChildWindow::myView
GUISUMOAbstractView * myView
The view.
Definition: GUIGlChildWindow.h:105
GUIMEVehicleControl.h
GUIPerson.h
GUISUMOAbstractView::buildViewToolBars
virtual void buildViewToolBars(GUIGlChildWindow &)
builds the view toolbars
Definition: GUISUMOAbstractView.h:83
ICON_EMPTY
Definition: GUIIcons.h:41
MSPerson
Definition: MSPerson.h:63
GUIGlobalSelection.h
ICON_LOCATEEDGE
Definition: GUIIcons.h:76
MSGlobals::gUseMesoSim
static bool gUseMesoSim
Definition: MSGlobals.h:90
GUISUMOAbstractView::checkSnapshots
virtual void checkSnapshots()
Checks whether it is time for a snapshot.
Definition: GUISUMOAbstractView.cpp:1273
GLO_PERSON
Definition: GUIGlObjectTypes.h:159
MID_LOCATEPERSON
Locate person - button.
Definition: GUIAppEnum.h:332
GLO_VEHICLE
Definition: GUIGlObjectTypes.h:141
GUIDesigns.h
GUIGlChildWindow::myLocatorPopup
FXPopup * myLocatorPopup
The locator menu.
Definition: GUIGlChildWindow.h:108
ICON_LOCATETLS
Definition: GUIIcons.h:81
GUINet.h
GUIIconSubSys::getIcon
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Definition: GUIIconSubSys.cpp:609
GUISUMOViewParent::onSimStep
long onSimStep(FXObject *sender, FXSelector, void *)
Called on a simulation step.
Definition: GUISUMOViewParent.cpp:250
GUIGlObjectStorage.h
MSBaseVehicle::getChosenSpeedFactor
double getChosenSpeedFactor() const
Returns the precomputed factor by which the driver wants to be faster than the speed limit.
Definition: MSBaseVehicle.h:426
GUIAppEnum.h
GUISUMOViewParent::VIEW_3D_OSG
plain 3D OSG view (
Definition: GUISUMOViewParent.h:68
GUISUMOViewParent::onUpdSpeedFactor
long onUpdSpeedFactor(FXObject *, FXSelector, void *)
Definition: GUISUMOViewParent.cpp:335
ICON_LOCATEADD
Definition: GUIIcons.h:82
GUIGlObjectType
GUIGlObjectType
Definition: GUIGlObjectTypes.h:39
MID_SPEEDFACTOR
scale vehicle speed
Definition: GUIAppEnum.h:354
GUIGlObject::INVALID_ID
static const GUIGlID INVALID_ID
Definition: GUIGlObject.h:69
GUIMainWindow::isGaming
bool isGaming() const
return whether the gui is in gaming mode
Definition: GUIMainWindow.h:82
ICON_LOCATEJUNCTION
Definition: GUIIcons.h:75
GUISUMOViewParent::mySpeedFactorSlider
FXSlider * mySpeedFactorSlider
Definition: GUISUMOViewParent.h:130
MSBaseVehicle::setChosenSpeedFactor
void setChosenSpeedFactor(const double factor)
Returns the precomputed factor by which the driver wants to be faster than the speed limit.
Definition: MSBaseVehicle.h:433
MSJunction.h
GUILane.h
GUIShapeContainer.h
GUIGlobals.h
GUISUMOViewParent::onKeyPress
long onKeyPress(FXObject *o, FXSelector sel, void *data)
handle keys
Definition: GUISUMOViewParent.cpp:283
FXDEFMAP
FXDEFMAP(GUISUMOViewParent) GUISUMOViewParentMap[]
ICON_LOCATEPOI
Definition: GUIIcons.h:83
MID_SIMSTEP
A Simulation step was performed.
Definition: GUIAppEnum.h:456
GUIGlObject::getGlID
GUIGlID getGlID() const
Returns the numerical id of the object.
Definition: GUIGlObject.cpp:149
GUISUMOViewParent::ViewType
ViewType
Available view types.
Definition: GUISUMOViewParent.h:64
GUIGlChildWindow::myLocatorButton
FXMenuButton * myLocatorButton
The locator button.
Definition: GUIGlChildWindow.h:111
ProcessError
Definition: UtilExceptions.h:39
ICON_LOCATEPOLY
Definition: GUIIcons.h:84
GUIApplicationWindow.h
GUISUMOViewParent.h
GLO_EDGE
an edge
Definition: GUIGlObjectTypes.h:46
GUIIcons.h
MSGlobals.h
UtilExceptions.h
GUIIOGlobals.h
GLO_LANE
a lane
Definition: GUIGlObjectTypes.h:48
GUIMainWindow::getGLVisual
FXGLVisual * getGLVisual() const
Definition: GUIMainWindow.cpp:164
GUIGlObjectStorage::getObjectBlocking
GUIGlObject * getObjectBlocking(GUIGlID id)
Returns the object from the container locking it.
Definition: GUIGlObjectStorage.cpp:62
GUIGlObject
Definition: GUIGlObject.h:65
GUISUMOAbstractView::endSnapshot
virtual void endSnapshot()
Ends a video snapshot.
Definition: GUISUMOAbstractView.h:193
GUIIcon
GUIIcon
An enumeration of icons used by the gui applications.
Definition: GUIIcons.h:35
gCurrentFolder
FXString gCurrentFolder
The folder used as last.
Definition: GUIIOGlobals.cpp:32
GUISUMOAbstractView::onKeyRelease
virtual long onKeyRelease(FXObject *o, FXSelector sel, void *data)
Definition: GUISUMOAbstractView.cpp:1085
ICON_LOCATEPERSON
Definition: GUIIcons.h:80
GUIIconSubSys.h
ICON_LOCATEVEHICLE
Definition: GUIIcons.h:77
GUISUMOViewParent::onCmdMakeSnapshot
long onCmdMakeSnapshot(FXObject *sender, FXSelector, void *)
Called if the user wants to make a snapshot (screenshot)
Definition: GUISUMOViewParent.cpp:143
Position.h
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:47
GUILane
Representation of a lane in the micro simulation (gui-version)
Definition: GUILane.h:61
GUISUMOAbstractView::makeSnapshot
std::string makeSnapshot(const std::string &destFile, const int w=-1, const int h=-1)
Takes a snapshots and writes it into the given file.
Definition: GUISUMOAbstractView.cpp:1107
MSNet::getInstance
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:167
GUIMainWindow
Definition: GUIMainWindow.h:46
GUIEdge
A road/street connecting two junctions (gui-version)
Definition: GUIEdge.h:52
GUISUMOViewParent::onCmdLocate
long onCmdLocate(FXObject *, FXSelector, void *)
locator-callback
Definition: GUISUMOViewParent.cpp:188
MID_LOCATEJUNCTION
Locate junction - button.
Definition: GUIAppEnum.h:322
SPEEDFACTOR_SCALE
#define SPEEDFACTOR_SCALE
Definition: GUISUMOViewParent.cpp:66
GUISUMOViewParent::isSelected
bool isSelected(GUIGlObject *o) const
true if the object is selected (may include extra logic besides calling gSelected)
Definition: GUISUMOViewParent.cpp:258
MFXCheckableButton
Definition: MFXCheckableButton.h:30
GUISUMOViewParent::onKeyRelease
long onKeyRelease(FXObject *o, FXSelector sel, void *data)
Definition: GUISUMOViewParent.cpp:290
MFXUtils.h
GUIEdge.h
GUIOSGView.h
GUIDesignVerticalSeparator
#define GUIDesignVerticalSeparator
vertical separator
Definition: GUIDesigns.h:324
GUIGlChildWindow::myStaticNavigationToolBar
FXToolBar * myStaticNavigationToolBar
The static navigation tool bar.
Definition: GUIGlChildWindow.h:102
GUIGlObjectStorage::gIDStorage
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
Definition: GUIGlObjectStorage.h:140
GUIMainWindow::removeGLChild
void removeGLChild(GUIGlChildWindow *child)
removes the given child window from the list
Definition: GUIMainWindow.cpp:98
MSTransportable::getChosenSpeedFactor
double getChosenSpeedFactor() const
Definition: MSTransportable.h:555
gSelected
GUISelectedStorage gSelected
A global holder of selected objects.
Definition: GUIGlobalSelection.cpp:33
MSBaseVehicle
The base class for microscopic and mesoscopic vehicles.
Definition: MSBaseVehicle.h:51
GUIGlChildWindow::myParent
GUIMainWindow * myParent
The parent window.
Definition: GUIGlChildWindow.h:96
MSEdge::getLanes
const std::vector< MSLane * > & getLanes() const
Returns this edge's lanes.
Definition: MSEdge.h:167
MID_LOCATEVEHICLE
Locate vehicle - button.
Definition: GUIAppEnum.h:326
GUISUMOAbstractView::onKeyPress
virtual long onKeyPress(FXObject *o, FXSelector sel, void *data)
keyboard functions
Definition: GUISUMOAbstractView.cpp:1074
GUISUMOViewParent::buildSpeedControlToolbar
void buildSpeedControlToolbar()
Definition: GUISUMOViewParent.cpp:297
GUIDialog_GLObjChooser.h
config.h
GUIEdge::getIDs
static std::vector< GUIGlID > getIDs(bool includeInternal)
Definition: GUIEdge.cpp:89
GLO_ADDITIONAL
reserved GLO type to pack all additionals
Definition: GUIGlObjectTypes.h:59
GUIGlChildWindow
Definition: GUIGlChildWindow.h:40
MID_LOCATEPOLY
Locate polygons - button.
Definition: GUIAppEnum.h:340
GUINet
A MSNet extended by some values for usage within the gui.
Definition: GUINet.h:82
GUIGlChildWindow::myContentFrame
FXVerticalFrame * myContentFrame
The contents frame.
Definition: GUIGlChildWindow.h:114
GUIMainWindow::listInternal
bool listInternal() const
return whether to list internal structures
Definition: GUIMainWindow.h:87
MID_LOCATEADD
Locate addtional structure - button.
Definition: GUIAppEnum.h:336
MFXUtils::userPermitsOverwritingWhenFileExists
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.
Definition: MFXUtils.cpp:40
GUIGlChildWindow::myGripNavigationToolbar
FXMenuBar * myGripNavigationToolbar
The grip navigation tool bar.
Definition: GUIGlChildWindow.h:99
GUISUMOViewParent::VIEW_2D_OPENGL
plain 2D openGL view (
Definition: GUISUMOViewParent.h:66
MID_MAKESNAPSHOT
Make snapshot - button.
Definition: GUIAppEnum.h:344
GUISUMOViewParent::init
virtual GUISUMOAbstractView * init(FXGLCanvas *share, GUINet &net, ViewType type)
"Initialises" this window by building the contents
Definition: GUISUMOViewParent.cpp:107
GUISUMOAbstractView::getTrackedID
virtual GUIGlID getTrackedID() const
get tracked id
Definition: GUISUMOAbstractView.cpp:1435
GUIDialog_GLObjChooser
Definition: GUIDialog_GLObjChooser.h:51
GUISUMOViewParent::onCmdSpeedFactor
long onCmdSpeedFactor(FXObject *, FXSelector, void *)
speedFactor-callback
Definition: GUISUMOViewParent.cpp:315
GUISUMOViewParent::~GUISUMOViewParent
~GUISUMOViewParent()
Destructor.
Definition: GUISUMOViewParent.cpp:127
MFXCheckableButton.h
GUISelectedStorage::isSelected
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
Definition: GUISelectedStorage.cpp:94