Eclipse SUMO - Simulation of Urban MObility
GUIGlObject.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3 // Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
21 // Base class for all objects that may be displayed within the openGL-gui
22 /****************************************************************************/
23 #include <config.h>
24 
25 #include <string>
26 #include <stack>
28 #include <utils/common/ToString.h>
38 #include <utils/gui/div/GLHelper.h>
41 #include <utils/geom/GeomHelper.h>
44 
45 #include "GUIGlObject.h"
46 #include "GUIGlObjectStorage.h"
47 
48 // ===========================================================================
49 // static members
50 // ===========================================================================
51 
53  {"network", GLO_NETWORK},
54  //
55  {"networkElement", GLO_NETWORKELEMENT},
56  {"edge", GLO_EDGE},
57  {"lane", GLO_LANE},
58  {"junction", GLO_JUNCTION},
59  {"connection", GLO_CONNECTION},
60  {"crossing", GLO_CROSSING},
61  {"walkingArea", GLO_WALKINGAREA},
62  {"tlLogic", GLO_TLLOGIC},
63  {"edgeType", GLO_EDGETYPE},
64  {"laneType", GLO_LANETYPE},
65  //
66  {"parentChildLine", GLO_PARENTCHILDLINE},
67  //
68  {"additional", GLO_ADDITIONALELEMENT},
69  {"stoppingPlace", GLO_STOPPING_PLACE},
70  {"busStop", GLO_BUS_STOP},
71  {"trainStop", GLO_TRAIN_STOP},
72  {"access", GLO_ACCESS},
73  {"taz", GLO_TAZ},
74  {"containerStop", GLO_CONTAINER_STOP},
75  {"chargingStation", GLO_CHARGING_STATION},
76  {"parkingArea", GLO_PARKING_AREA},
77  {"stoppingPlaceLast", GLO_STOPPING_PLACE_LAST},
78  {"parkingSpace", GLO_PARKING_SPACE},
79  {"e1Detector", GLO_E1DETECTOR},
80  {"e1DetectorME", GLO_E1DETECTOR_ME},
81  {"e1DetectorInstant", GLO_E1DETECTOR_INSTANT},
82  {"e2Detector", GLO_E2DETECTOR},
83  {"e3Detector", GLO_E3DETECTOR},
84  {"entryDetector", GLO_DET_ENTRY},
85  {"exitDetector", GLO_DET_EXIT},
86  {"rerouter", GLO_REROUTER},
87  {"rerouterInterval", GLO_REROUTER_INTERVAL},
88  {"closingreroute", GLO_REROUTER_CLOSINGREROUTE},
89  {"closingLaneReroute", GLO_REROUTER_CLOSINGLANEREROUTE},
90  {"parkingAreaReroute", GLO_REROUTER_PARKINGAREAREROUTE},
91  {"destProbReroute", GLO_REROUTER_DESTPROBREROUTE},
92  {"routeProbReroute", GLO_REROUTER_ROUTEPROBREROUTE},
93  {"rerouterEdge", GLO_REROUTER_EDGE},
94  {"variableSpeedSign", GLO_VSS},
95  {"variableSpeedSignStep", GLO_VSS_STEP},
96  {"calibrator", GLO_CALIBRATOR},
97  {"routeProbe", GLO_ROUTEPROBE},
98  {"vaporizer", GLO_VAPORIZER},
99  {"wire", GLO_WIRE},
100  {"overheadWireSegment", GLO_OVERHEAD_WIRE_SEGMENT},
101  {"tractionsubstation", GLO_TRACTIONSUBSTATION},
102  {"additionalLast", GLO_ADDITIONALELEMENT_LAST},
103  //
104  {"laneArrows", GLO_LANEARROWS},
105  //
106  {"shape", GLO_SHAPE},
107  {"polygon", GLO_POLYGON},
108  {"poi", GLO_POI},
109  {"jupedsim.walkable_area", GLO_JPS_WALKABLEAREA},
110  {"jupedsim.obstacle", GLO_JPS_OBSTACLE},
111  {"shapeLast", GLO_SHAPE_LAST},
112  //
113  {"routeElement", GLO_ROUTEELEMENT},
114  {"vType", GLO_VTYPE},
115  //
116  {"route", GLO_ROUTE},
117  //
118  {"ride", GLO_RIDE},
119  {"walk", GLO_WALK},
120  {"personTrip", GLO_PERSONTRIP},
121  {"transport", GLO_TRANSPORT},
122  {"tranship", GLO_TRANSHIP},
123  //
124  {"stop", GLO_STOP},
125  {"stopPlan", GLO_STOP_PLAN},
126  //
127  {"vehicle", GLO_VEHICLE},
128  {"trip", GLO_TRIP},
129  {"flow", GLO_FLOW},
130  {"routeFlow", GLO_ROUTEFLOW},
131  //
132  {"container", GLO_CONTAINER},
133  {"containerFlow", GLO_CONTAINERFLOW},
134  //
135  {"person", GLO_PERSON},
136  {"personFlow", GLO_PERSONFLOW},
137  //
138  {"edgeData", GLO_EDGEDATA},
139  {"edgeRelData", GLO_EDGERELDATA},
140  {"TAZRelData", GLO_TAZRELDATA},
141  //
142  {"lockIcon", GLO_LOCKICON},
143  {"textName", GLO_TEXTNAME},
144  {"frontElement", GLO_FRONTELEMENT},
145  {"geometryPoint", GLO_GEOMETRYPOINT},
146  {"dottedContour", GLO_DOTTEDCONTOUR},
147  {"temporalShape", GLO_TEMPORALSHAPE},
148  {"rectangleSelection", GLO_RECTANGLESELECTION},
149  {"testElement", GLO_TESTELEMENT},
150  //
151  {"undefined", GLO_MAX}
152 };
153 
154 
155 StringBijection<GUIGlObjectType> GUIGlObject::TypeNames(GUIGlObjectTypeNamesInitializer, GLO_MAX);
157 const double GUIGlObject::INVALID_PRIORITY(-std::numeric_limits<double>::max());
158 
159 // ===========================================================================
160 // method definitions
161 // ===========================================================================
162 
163 GUIGlObject::GUIGlObject(GUIGlObjectType type, const std::string& microsimID, FXIcon* icon) :
164  myGlID(GUIGlObjectStorage::gIDStorage.registerObject(this)),
165  myGLObjectType(type),
166  myMicrosimID(microsimID),
167  myIcon(icon) {
168  // make sure that reserved GLO_ADDITIONALELEMENT isn't used
172 }
173 
174 
176  // remove all paramWindow related with this object
177  for (const auto& paramWindow : myParamWindows) {
178  paramWindow->removeObject(this);
179  }
180  // remove object from GLObjectValuePassConnector and GUIGlObjectStorage
183 }
184 
185 
186 std::string
189 }
190 
191 
192 FXIcon*
194  return myIcon;
195 }
196 
197 
200  UNUSED_PARAMETER(&app);
201  UNUSED_PARAMETER(&parent);
202  return nullptr;
203 }
204 
205 
206 bool
208  // by default unlocked
209  return false;
210 }
211 
212 
213 void
215  // by default nothing to do
216 }
217 
218 
219 void
221  // by default nothing to do
222 }
223 
224 
225 void
227  // by default nothing to do
228 }
229 
230 
231 void
233  // by default nothing to update
234 }
235 
236 
237 const std::string
239  return "";
240 }
241 
242 
243 void
244 GUIGlObject::setMicrosimID(const std::string& newID) {
245  myMicrosimID = newID;
248 }
249 
250 
251 void
253  UNUSED_PARAMETER(&s);
254  UNUSED_PARAMETER(parent);
255 }
256 
257 #ifdef HAVE_OSG
258 
259 osg::Node*
260 GUIGlObject::getNode() const {
261  return myOSGNode;
262 }
263 
264 
265 void
266 GUIGlObject::setNode(osg::Node* node) {
267  myOSGNode = node;
268 }
269 
270 #endif
271 
272 void
274  new MFXMenuHeader(ret, app.getBoldFont(), getFullName().c_str(), myIcon, nullptr, 0);
275  if (OptionsCont::getOptions().getBool("gui-testing")) {
276  GUIDesigns::buildFXMenuCommand(ret, TL("Copy test coordinates to clipboard"), nullptr, ret, MID_COPY_TEST_COORDINATES);
277  }
278  if (addSeparator) {
279  new FXMenuSeparator(ret);
280  }
281 }
282 
283 
284 void
287  if (addSeparator) {
288  new FXMenuSeparator(ret);
289  }
290 }
291 
292 
293 void
295  GUIDesigns::buildFXMenuCommand(ret, TL("Copy name to clipboard"), nullptr, ret, MID_COPY_NAME);
296  GUIDesigns::buildFXMenuCommand(ret, TL("Copy typed name to clipboard"), nullptr, ret, MID_COPY_TYPED_NAME);
297  if (addSeparator) {
298  new FXMenuSeparator(ret);
299  }
300 }
301 
302 
303 void
305  if (gSelected.isSelected(getType(), getGlID())) {
307  } else {
309  }
310  if (addSeparator) {
311  new FXMenuSeparator(ret);
312  }
313 }
314 
315 
316 void
319  if (addSeparator) {
320  new FXMenuSeparator(ret);
321  }
322 }
323 
324 
325 void
328  if (addSeparator) {
329  new FXMenuSeparator(ret);
330  }
331 }
332 
333 
334 void
336  GUIDesigns::buildFXMenuCommand(ret, TL("Copy cursor position to clipboard"), nullptr, ret, MID_COPY_CURSOR_POSITION);
337  if (GeoConvHelper::getFinal().usingGeoProjection()) {
338  GUIDesigns::buildFXMenuCommand(ret, TL("Copy cursor geo-position to clipboard"), nullptr, ret, MID_COPY_CURSOR_GEOPOSITION);
339  // create menu pane for edge operations
340  FXMenuPane* showCursorGeoPositionPane = new FXMenuPane(ret);
341  ret->insertMenuPaneChild(showCursorGeoPositionPane);
342  new FXMenuCascade(ret, TL("Show cursor geo-position in "), nullptr, showCursorGeoPositionPane);
343  for (const auto& mapper : app.getOnlineMaps()) {
344  if (mapper.first == "GeoHack") {
346  } else if (mapper.first == "Google Maps") {
348  } else if (mapper.first == "OSM") {
350  } else {
351  GUIDesigns::buildFXMenuCommand(showCursorGeoPositionPane, mapper.first, nullptr, ret, MID_SHOW_GEOPOSITION_ONLINE);
352  }
353  }
354  }
355 }
356 
357 
358 void
361  if (addSeparator) {
362  new FXMenuSeparator(ret);
363  }
364 }
365 
366 
367 void
369  myParamWindows.insert(t);
370 }
371 
372 
373 void
375  std::set<GUIParameterTableWindow*>::iterator i = myParamWindows.find(t);
376  if (i != myParamWindows.end()) {
377  myParamWindows.erase(i);
378  }
379 }
380 
381 
382 void
384  assert(ret);
385  // build header (<tag>:<ID>
386  buildPopupHeader(ret, app, false);
387  // build center
389  // build copy name
391  // build select/unselect
393  // build show parameters
394  buildShowParamsPopupEntry(ret, false);
395  // build copy cursor position to clipboard
396  buildPositionCopyEntry(ret, app);
397  // only show type if isn't empty
398  if (type != "") {
399  GUIDesigns::buildFXMenuCommand(ret, TLF("type: %", type).c_str(), nullptr, nullptr, 0);
400  new FXMenuSeparator(ret);
401  }
402 }
403 
404 
405 void
407  assert(ret);
408  // build header (<tag>:<ID>
409  buildPopupHeader(ret, app, false);
410  // build center
412  // build copy name
414  // build select/unselect
416  // build show parameters
417  buildShowParamsPopupEntry(ret, false);
418  // build copy cursor position to clipboard
419  buildPositionCopyEntry(ret, app);
420  // only show type if isn't empty
421  if (type != "") {
422  GUIDesigns::buildFXMenuCommand(ret, TLF("type: %", type).c_str(), nullptr, nullptr, 0);
423  new FXMenuSeparator(ret);
424  }
425 }
426 
427 
428 std::string
431 }
432 
433 
434 void
435 GUIGlObject::drawName(const Position& pos, const double scale, const GUIVisualizationTextSettings& settings, const double angle, bool forceShow) const {
436  if (settings.show(this) || forceShow) {
437  GLHelper::drawTextSettings(settings, getMicrosimID(), pos, scale, angle);
438  }
439 }
440 
441 
442 /****************************************************************************/
@ MID_MANIP
Open the object's manipulator.
Definition: GUIAppEnum.h:489
@ MID_ADDSELECT
Add to selected items - menu entry.
Definition: GUIAppEnum.h:485
@ MID_COPY_CURSOR_GEOPOSITION
Copy cursor geo-coordinate position - popup entry.
Definition: GUIAppEnum.h:463
@ MID_CENTER
Center view to object - popup entry.
Definition: GUIAppEnum.h:451
@ MID_COPY_TEST_COORDINATES
Copy test coordinates.
Definition: GUIAppEnum.h:457
@ MID_SHOW_GEOPOSITION_ONLINE
Show the cursor geo-coordinate position online in GeoHack - popup entry.
Definition: GUIAppEnum.h:467
@ MID_COPY_TYPED_NAME
Copy typed object name - popup entry.
Definition: GUIAppEnum.h:455
@ MID_COPY_CURSOR_POSITION
Copy cursor position - popup entry.
Definition: GUIAppEnum.h:461
@ MID_SHOWPARS
Show object parameter - popup entry.
Definition: GUIAppEnum.h:471
@ MID_COPY_NAME
Copy object name - popup entry.
Definition: GUIAppEnum.h:453
@ MID_SHOWTYPEPARS
Show object type parameter - popup entry.
Definition: GUIAppEnum.h:473
@ MID_REMOVESELECT
Remove from selected items - Menu Entry.
Definition: GUIAppEnum.h:487
unsigned int GUIGlID
Definition: GUIGlObject.h:43
GUIGlObjectType
@ GLO_EDGERELDATA
edge relation data
@ GLO_DET_EXIT
a DetExit detector
@ GLO_TAZRELDATA
TAZ relation data.
@ GLO_WALKINGAREA
a walkingArea
@ GLO_TEMPORALSHAPE
temporal shape (used in netedit)
@ GLO_VTYPE
@bief vTypes
@ GLO_ROUTEELEMENT
reserved GLO type to pack all RouteElements (note: In this case the sorting of GLO_<element> is impor...
@ GLO_JPS_WALKABLEAREA
walkable area
@ GLO_REROUTER_EDGE
a Rerouter over edge
@ GLO_TRIP
a trip
@ GLO_BUS_STOP
a busStop
@ GLO_REROUTER_DESTPROBREROUTE
a destination probability reroute
@ GLO_TESTELEMENT
test element (used in netedit)
@ GLO_E2DETECTOR
a E2 detector
@ GLO_DET_ENTRY
a DetEntry detector
@ GLO_TRANSHIP
a container tranship
@ GLO_ROUTEPROBE
a RouteProbe
@ GLO_E1DETECTOR
a E1 detector
@ GLO_STOPPING_PLACE_LAST
reserved GLO type for packing all StoppingPlace elements
@ GLO_STOP_PLAN
a stop plan stop
@ GLO_ACCESS
a Acces
@ GLO_VAPORIZER
a Vaporizer
@ GLO_ROUTEFLOW
a routeFlow
@ GLO_WALK
a walk
@ GLO_CONTAINER_STOP
a containerStop
@ GLO_MAX
empty max
@ GLO_ROUTE
a route
@ GLO_WIRE
reserved GLO type for packing all wire elements
@ GLO_CALIBRATOR
a Calibrator
@ GLO_DOTTEDCONTOUR
dotted contour (used in netedit)
@ GLO_JUNCTION
a junction
@ GLO_E3DETECTOR
a E3 detector
@ GLO_FRONTELEMENT
front element (used in netedit)
@ GLO_LANE
a lane
@ GLO_TRAIN_STOP
a trainStop
@ GLO_RIDE
a ride
@ GLO_FLOW
a flow
@ GLO_GEOMETRYPOINT
geometry point (used in netedit)
@ GLO_CHARGING_STATION
a chargingStation
@ GLO_EDGETYPE
an edgeType
@ GLO_PARKING_AREA
a ParkingArea
@ GLO_VSS_STEP
a Variable Speed Sign step
@ GLO_TAZ
Traffic Assignment Zones (TAZs)
@ GLO_LANEARROWS
lane details
@ GLO_CONTAINER
a container
@ GLO_PARENTCHILDLINE
line between parent and childrens
@ GLO_JPS_OBSTACLE
obstacles
@ GLO_EDGEDATA
edge data
@ GLO_CONNECTION
a connection
@ GLO_REROUTER_PARKINGAREAREROUTE
a parking area reroute
@ GLO_ADDITIONALELEMENT
reserved GLO type for packing all additionals elements
@ GLO_PERSONTRIP
a person trip
@ GLO_EDGE
an edge
@ GLO_STOPPING_PLACE
reserved GLO type for packing all StoppingPlace elements
@ GLO_VEHICLE
a vehicle
@ GLO_PERSON
a person
@ GLO_SHAPE_LAST
reserved GLO type to pack shapes
@ GLO_TRANSPORT
a container transport
@ GLO_NETWORK
The network - empty.
@ GLO_SHAPE
reserved GLO type to pack shapes
@ GLO_POI
poi (over view, geo and lane)
@ GLO_REROUTER_CLOSINGLANEREROUTE
a closing lane reroute
@ GLO_RECTANGLESELECTION
rectangle selection shape (used in netedit)
@ GLO_STOP
a stop
@ GLO_LANETYPE
a laneType
@ GLO_OVERHEAD_WIRE_SEGMENT
a segment of an overhead line
@ GLO_TEXTNAME
text element (used in netedit)
@ GLO_NETWORKELEMENT
reserved GLO type to pack all network elements
@ GLO_REROUTER_CLOSINGREROUTE
a closing reroute
@ GLO_PARKING_SPACE
a ParkingSpace
@ GLO_CONTAINERFLOW
a person flow
@ GLO_POLYGON
polygon
@ GLO_TLLOGIC
a tl-logic
@ GLO_E1DETECTOR_ME
a E1 detector
@ GLO_CROSSING
a tl-logic
@ GLO_REROUTER
a Rerouter
@ GLO_PERSONFLOW
a person flow
@ GLO_E1DETECTOR_INSTANT
a E1 detector
@ GLO_REROUTER_INTERVAL
a rerouter interval
@ GLO_REROUTER_ROUTEPROBREROUTE
a route probability reroute
@ GLO_TRACTIONSUBSTATION
a segment of an overhead line
@ GLO_ADDITIONALELEMENT_LAST
reserved GLO type for packing all additionals elements
@ GLO_VSS
a Variable Speed Sign
@ GLO_LOCKICON
Lock icon (used in netedit)
GUISelectedStorage gSelected
A global holder of selected objects.
@ RECENTERVIEW
@ GEOHACK
icons for geo tools
#define TL(string)
Definition: MsgHandler.h:315
#define TLF(string,...)
Definition: MsgHandler.h:317
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:30
static void drawTextSettings(const GUIVisualizationTextSettings &settings, const std::string &text, const Position &pos, const double scale, const double angle=0, const double layer=2048, const int align=0)
Definition: GLHelper.cpp:787
static void removeObject(GUIGlObject &o)
Removes all instances that pass values from the object with the given id.
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel, const bool disable=false)
build menu command
Definition: GUIDesigns.cpp:42
The popup menu of a globject.
void insertMenuPaneChild(FXMenuPane *child)
Insert a sub-menu pane in this GUIGLObjectPopupMenu.
FXIcon * getGLIcon() const
get icon associated with this GL Object
static const double INVALID_PRIORITY
Definition: GUIGlObject.h:73
std::string myMicrosimID
ID of GL object.
Definition: GUIGlObject.h:309
virtual void markAsFrontElement()
mark element as front element (Currently used only in netedit)
std::string myFullName
full name of GL Object
Definition: GUIGlObject.h:312
void buildShowTypeParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the type parameter window.
void buildShowManipulatorPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the manipulator window.
virtual void deleteGLObject()
delete GLObject (Currently used only in netedit)
const std::string & getFullName() const
Definition: GUIGlObject.h:94
const GUIGlObjectType myGLObjectType
The type of the object.
Definition: GUIGlObject.h:306
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
virtual GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own type parameter window (optional)
virtual const std::string getOptionalName() const
Returns the name of the object (default "")
static const GUIGlID INVALID_ID
Definition: GUIGlObject.h:72
void buildShapePopupOptions(GUIMainWindow &app, GUIGLObjectPopupMenu *ret, const std::string &type)
build basic shape popup options. Used to unify pop-ups menu in netedit and SUMO-GUI
static StringBijection< GUIGlObjectType >::Entry GUIGlObjectTypeNamesInitializer[]
vector for TypeNames Initializer
Definition: GUIGlObject.h:332
virtual void setMicrosimID(const std::string &newID)
Changes the microsimID of the object.
virtual std::string getParentName() const
Returns the name of the parent object (if any)
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
virtual void updateGLObject()
update GLObject (geometry, ID, etc.) (optional)
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
void addParameterTable(GUIParameterTableWindow *w)
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
static StringBijection< GUIGlObjectType > TypeNames
associates object types with strings
Definition: GUIGlObject.h:71
void buildAdditionalsPopupOptions(GUIMainWindow &app, GUIGLObjectPopupMenu *ret, const std::string &type)
build basic additional popup options. Used to unify pop-ups menu in netedit and SUMO-GUI
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
Definition: GUIGlObject.h:156
virtual ~GUIGlObject()
Destructor.
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
Definition: GUIGlObject.h:143
void removeParameterTable(GUIParameterTableWindow *w)
Lets this object know a parameter window showing the object's values was closed.
virtual void drawGLAdditional(GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
Draws additional, user-triggered visualisations.
virtual bool isGLObjectLocked() const
check if element is locked (Currently used only in netedit)
virtual void selectGLObject()
select GLObject (Currently used only in netedit)
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
FXIcon * myIcon
icon associatd with this GL Object
Definition: GUIGlObject.h:315
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, const GUIMainWindow &app) const
Builds an entry which allows to copy the cursor position if geo projection is used,...
GUIGlID getGlID() const
Returns the numerical id of the object.
Definition: GUIGlObject.h:104
std::string createFullName() const
create full name
std::set< GUIParameterTableWindow * > myParamWindows
Parameter table windows which refer to this object.
Definition: GUIGlObject.h:321
GUIGlObject(GUIGlObjectType type, const std::string &microsimID, FXIcon *icon)
Constructor.
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0, bool forceShow=false) const
draw name of item
A storage for of displayed objects via their numerical id.
void changeName(GUIGlObject *object, const std::string &fullName)
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
bool remove(GUIGlID id)
Removes the named object from this container.
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
const std::map< std::string, std::string > & getOnlineMaps() const
FXFont * getBoldFont()
get bold front
A window containing a gl-object's parameter.
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.
Stores the information about how to visualize structures.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:60
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:37
const std::string & getString(const T key) const
static std::string emptyString
An empty string.
Definition: StringUtils.h:86
bool show(const GUIGlObject *o) const
whether to show the text