166 myGLObjectType(type),
167 myMicrosimID(microsimID),
179 paramWindow->removeObject(
this);
261GUIGlObject::getNode()
const {
267GUIGlObject::setNode(osg::Node* node) {
280 new FXMenuSeparator(ret);
289 new FXMenuSeparator(ret);
299 new FXMenuSeparator(ret);
312 new FXMenuSeparator(ret);
321 new FXMenuSeparator(ret);
330 new FXMenuSeparator(ret);
341 FXMenuPane* showCursorGeoPositionPane =
new FXMenuPane(ret);
343 new FXMenuCascade(ret,
TL(
"Show cursor geo-position in "),
nullptr, showCursorGeoPositionPane);
345 if (mapper.first ==
"GeoHack") {
347 }
else if (mapper.first ==
"Google Maps") {
349 }
else if (mapper.first ==
"OSM") {
363 new FXMenuSeparator(ret);
376 std::set<GUIParameterTableWindow*>::iterator i =
myParamWindows.find(t);
401 new FXMenuSeparator(ret);
424 new FXMenuSeparator(ret);
437 if (settings.
show(
this) || forceShow) {
@ MID_MANIP
Open the object's manipulator.
@ MID_ADDSELECT
Add to selected items - menu entry.
@ MID_COPY_CURSOR_GEOPOSITION
Copy cursor geo-coordinate position - popup entry.
@ MID_CENTER
Center view to object - popup entry.
@ MID_COPY_TEST_COORDINATES
Copy test coordinates.
@ MID_SHOW_GEOPOSITION_ONLINE
Show the cursor geo-coordinate position online in GeoHack - popup entry.
@ MID_COPY_TYPED_NAME
Copy typed object name - popup entry.
@ MID_COPY_CURSOR_POSITION
Copy cursor position - popup entry.
@ MID_SHOWPARS
Show object parameter - popup entry.
@ MID_COPY_NAME
Copy object name - popup entry.
@ MID_SHOWTYPEPARS
Show object type parameter - popup entry.
@ MID_REMOVESELECT
Remove from selected items - Menu Entry.
@ 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_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_ROUTE_EMBEDDED
a route
@ 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_VAPORIZER
a Vaporizer
@ GLO_ROUTEFLOW
a routeFlow
@ GLO_CONTAINER_STOP
a containerStop
@ GLO_WIRE
reserved GLO type for packing all wire elements
@ GLO_CALIBRATOR
a Calibrator
@ GLO_DOTTEDCONTOUR
dotted contour (used in netedit)
@ GLO_E3DETECTOR
a E3 detector
@ GLO_FRONTELEMENT
front element (used in netedit)
@ GLO_TRAIN_STOP
a trainStop
@ 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_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_STOPPING_PLACE
reserved GLO type for packing all StoppingPlace elements
@ 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_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_E1DETECTOR_ME
a E1 detector
@ 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.
@ GEOHACK
icons for geo tools
#define UNUSED_PARAMETER(x)
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)
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
FXIcon * getGLIcon() const
get icon associated with this GL Object
static const double INVALID_PRIORITY
const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
std::string myMicrosimID
ID of GL object.
virtual void markAsFrontElement()
mark element as front element (Currently used only in netedit)
std::string myFullName
full name of GL Object
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 GUIGlObjectType myGLObjectType
The type of the object.
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
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
virtual void setMicrosimID(const std::string &newID)
Changes the microsimID of the object.
const std::string & getFullName() const
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
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.
virtual ~GUIGlObject()
Destructor.
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
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.
std::string createFullName() const
create full name
std::set< GUIParameterTableWindow * > myParamWindows
Parameter table windows which refer to this object.
GUIGlObject(GUIGlObjectType type, const std::string µsimID, 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
FXFont * getBoldFont()
get bold front
const std::map< std::string, std::string > & getOnlineMaps() const
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.
A point in 2D or 3D with translation and scaling methods.
const std::string & getString(const T key) const
static std::string emptyString
An empty string.
bool show(const GUIGlObject *o) const
whether to show the text