 |
Eclipse SUMO - Simulation of Urban MObility
|
Go to the documentation of this file.
118 myGLObjectType(type),
119 myMicrosimID(microsimID) {
129 i->removeObject(
this);
194 GUIGlObject::getNode()
const {
200 GUIGlObject::setNode(osg::Node* node) {
210 new FXMenuSeparator(ret);
219 new FXMenuSeparator(ret);
226 new FXMenuCommand(ret,
"Copy name to clipboard",
nullptr, ret,
MID_COPY_NAME);
229 new FXMenuSeparator(ret);
242 new FXMenuSeparator(ret);
251 new FXMenuSeparator(ret);
260 new FXMenuSeparator(ret);
272 new FXMenuSeparator(ret);
281 new FXMenuSeparator(ret);
294 std::set<GUIParameterTableWindow*>::iterator i =
myParamWindows.find(t);
318 new FXMenuCommand(ret, (
"type: " + type +
"").c_str(),
nullptr,
nullptr, 0);
319 new FXMenuSeparator(ret);
341 new FXMenuCommand(ret, (
"type: " + type +
"").c_str(),
nullptr,
nullptr, 0);
342 new FXMenuSeparator(ret);
@ GLO_DET_ENTRY
a DetEntry detector
GUIGlObjectType getType() const
Returns the type of the object as coded in GUIGlObjectType.
#define UNUSED_PARAMETER(x)
@ GLO_CONNECTION
a connection
static void drawTextSettings(const GUIVisualizationTextSettings &settings, const std::string &text, const Position &pos, const double scale, const double angle=0, const double layer=2048)
A window containing a gl-object's parameter.
void removeParameterTable(GUIParameterTableWindow *w)
Lets this object know a parameter window showing the object's values was closed.
std::string myMicrosimID
ID of GL object.
virtual GUIParameterTableWindow * getTypeParameterWindow(GUIMainWindow &app, GUISUMOAbstractView &parent)
Returns an own type parameter window (optional)
bool remove(GUIGlID id)
Removes the named object from this container.
@ MID_COPY_CURSOR_GEOPOSITION
Copy cursor geo-coordinate position - popup entry.
void drawName(const Position &pos, const double scale, const GUIVisualizationTextSettings &settings, const double angle=0) const
draw name of item
const std::string & getString(const T key) const
GUIGlID registerObject(GUIGlObject *object, const std::string &fullName)
Registers an object.
const GUIGlObjectType myGLObjectType
The type of the object.
void buildSelectionPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to (de)select the object.
@ GLO_PERSONTRIP
a person trip
@ GLO_PERSONSTOP
a person stop
static StringBijection< GUIGlObjectType >::Entry GUIGlObjectTypeNamesInitializer[]
LinkStates (Currently unused)
static StringBijection< GUIGlObjectType > TypeNames
associates object types with strings
@ GLO_DET_EXIT
a DetExit detector
void buildShowManipulatorPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the manipulator window.
const std::string & getFullName() const
std::string myFullName
full name of GL Object
@ MID_COPY_NAME
Copy object name - popup entry.
virtual const std::string getOptionalName() const
Returns the name of the object (default "")
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
@ GLO_PERSONFLOW
a person flow
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
@ GLO_CHARGING_STATION
a chargingStation
@ MID_ADDSELECT
Add to selected items - menu entry.
@ GLO_PARKING_SPACE
a ParkingSpace
std::string createFullName() const
create full name
GUIGlObject(GUIGlObjectType type, const std::string µsimID)
Constructor.
@ MID_COPY_CURSOR_POSITION
Copy cursor position - popup entry.
@ MID_CENTER
Center view to object - popup entry.
virtual void setMicrosimID(const std::string &newID)
Changes the microsimID of the object.
static const GUIGlID INVALID_ID
virtual void drawGLAdditional(GUISUMOAbstractView *const parent, const GUIVisualizationSettings &s) const
Draws additional, user-triggered visualisations.
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
@ GLO_ROUTEELEMENT
reserved GLO type to pack all RouteElements (note: In this case the sorting of GLO_<element> is impor...
void buildNameCopyPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds entries which allow to copy the name / typed name into the clipboard.
@ GLO_E1DETECTOR_INSTANT
a E1 detector
@ GLO_ROUTEPROBE
a RouteProbe
std::set< GUIParameterTableWindow * > myParamWindows
Parameter table windows which refer to this object.
GUIGlID getGlID() const
Returns the numerical id of the object.
@ GLO_SHAPE
reserved GLO type to pack shapes
@ GLO_E1DETECTOR
a E1 detector
A point in 2D or 3D with translation and scaling methods.
void buildPopupHeader(GUIGLObjectPopupMenu *ret, GUIMainWindow &app, bool addSeparator=true)
Builds the header.
@ GLO_PARKING_AREA
a ParkingArea
@ GLO_E3DETECTOR
a E3 detector
GUIGlID myGlID
The numerical id of the object.
@ MID_SHOWPARS
Show object parameter - popup entry.
@ GLO_VAPORIZER
a Vaporizer
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
@ GLO_NETELEMENT
reserved GLO type to pack all netElements
static void removeObject(GUIGlObject &o)
Removes all instances that pass values from the object with the given id.
@ MID_MANIP
Open the object's manipulator.
void buildShowTypeParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the type parameter window.
void buildShowParamsPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to open the parameter window.
static GUIGlObjectStorage gIDStorage
A single static instance of this class.
static std::string emptyString
An empty string.
GUISelectedStorage gSelected
A global holder of selected objects.
void buildCenterPopupEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to center to the object.
void buildPositionCopyEntry(GUIGLObjectPopupMenu *ret, bool addSeparator=true)
Builds an entry which allows to copy the cursor position if geo projection is used,...
@ GLO_CALIBRATOR
a Calibrator
@ GLO_ADDITIONAL
reserved GLO type to pack all additionals
void addParameterTable(GUIParameterTableWindow *w)
virtual ~GUIGlObject()
Destructor.
@ GLO_CONTAINER_STOP
a containerStop
@ MID_COPY_TYPED_NAME
Copy typed object name - popup entry.
Stores the information about how to visualize structures.
@ GLO_E1DETECTOR_ME
a E1 detector
@ GLO_REROUTER_EDGE
a Rerouter
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
@ GLO_ROUTEFLOW
a routeFlow
@ GLO_E2DETECTOR
a E2 detector
@ MID_SHOWTYPEPARS
Show object type parameter - popup entry.
@ GLO_VSS
a Variable Speed Sign
@ GLO_NETWORK
The network - empty.
@ GLO_EMBEDDEDROUTE
a embedded route
virtual std::string getParentName() const
Returns the name of the parent object (if any)
@ MID_REMOVESELECT
Remove from selected items - Menu Etry.
bool isSelected(GUIGlObjectType type, GUIGlID id)
Returns the information whether the object with the given type and id is selected.