63 myFrameParent(frameParent),
66 myClickedJunction(
nullptr),
67 myClickedEdge(
nullptr),
68 myClickedLane(
nullptr),
69 myClickedCrossing(
nullptr),
70 myClickedConnection(
nullptr),
71 myClickedAdditional(
nullptr),
72 myClickedDemandElement(
nullptr),
73 myClickedDataSet(
nullptr),
74 myClickedDataInterval(
nullptr),
75 myClickedGenericData(
nullptr) {
147 FXEvent* e = (FXEvent*)eventData;
215 if (planParent->getChildDemandElements().size() == 1) {
246 if (inspectedElements.isInspectingSingleElement()) {
247 if (inspectedElements.getFirstAC() !=
myClickedAC) {
314 new FXMenuSeparator(pane);
320 centerMenuCommand->disable();
327 inspectMenuCommand->disable();
328 deleteMenuCommand->disable();
399 junctionDestinationItem->setExpanded(
true);
404 return junctionDestinationItem;
418 junctionDestinationItem->setExpanded(
true);
421 edgeItem->setExpanded(
true);
437 junctionItem->setExpanded(
true);
449 edgeFromItem->setExpanded(
true);
452 edgeToItem->setExpanded(
true);
455 connectionItem->setExpanded(
true);
461 return connectionItem;
473 GNELane* lane = attributeCarriers->retrieveLane(POILane->getParentLanes().at(0)->getID());
479 junctionDestinationItem->setExpanded(
true);
482 edgeItem->setExpanded(
true);
485 laneItem->setExpanded(
true);
497 FXTreeItem* root =
nullptr;
560 FXTreeItem* root =
nullptr;
623 FXTreeItem* root =
nullptr;
693 FXTreeItem* root =
nullptr;
782 FXTreeItem* junctionItem =
addListItem(HE, itemParent);
799 FXTreeItem* edgeItem =
addListItem(HE, itemParent);
801 for (
const auto& lane : edge->
getLanes()) {
828 FXTreeItem* laneItem =
addListItem(HE, itemParent);
841 FXTreeItem* incomingConnections =
addListItem(laneItem,
TL(
"Incomings"), incomingLaneConnections.front()->getACIcon(),
false);
843 for (
const auto& connection : incomingLaneConnections) {
851 FXTreeItem* outgoingConnections =
addListItem(laneItem,
TL(
"Outgoing"), outcomingLaneConnections.front()->getACIcon(),
false);
853 for (
const auto& connection : outcomingLaneConnections) {
871 FXTreeItem* treeItem =
addListItem(HE, itemParent);
881 std::vector<GNEAdditional*> symbols;
883 if (additional->getTagProperty().isSymbol()) {
884 symbols.push_back(additional);
887 if (symbols.size() > 0) {
889 const auto additionalParent = symbols.front()->getParentAdditionals().front();
890 const std::string symbolType = additionalParent->getTagProperty().hasAttribute(
SUMO_ATTR_EDGES) ?
TL(
"Edges") :
TL(
"Lanes");
894 for (
const auto& symbol : symbols) {
900 if (!additional->getTagProperty().isSymbol()) {
918 FXTreeItem* dataElementItem =
addListItem(HE, itemParent);
944 item->setExpanded(
true);
955 item->setExpanded(expanded);
FXDEFMAP(GNEElementTree) HierarchicalElementTreeMap[]
@ MID_GNE_DELETE
delete element
@ MID_GNE_CENTER
center element
@ MID_GNE_ACHIERARCHY_SHOWCHILDMENU
In GNEElementTree list, show child menu.
@ MID_GNE_ACHIERARCHY_MOVEUP
In GNEElementTree list, move element to up.
@ MID_GNE_INSPECT
inspect element
@ MID_GNE_ACHIERARCHY_MOVEDOWN
In GNEElementTree list, move element to down.
#define GUIDesignTreeListFixedHeight
tree list with fixed height
GUIIcon
An enumeration of icons used by the gui applications.
#define WRITE_WARNINGF(...)
@ SUMO_TAG_EDGEREL
a relation between two edges
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
@ SUMO_TAG_CONNECTION
connectioon between two lanes
@ SUMO_TAG_JUNCTION
begin/end of the description of a junction
@ SUMO_TAG_CROSSING
crossing between edges for pedestrians
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ GNE_TAG_POILANE
Point of interest over Lane.
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ SUMO_ATTR_EDGES
the edges of a route
@ GNE_ATTR_DEFAULT_VTYPE
Flag to check if VType is a default VType.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
An Element which don't belong to GNENet but has influence in the simulation.
const std::string getID() const
get ID (all Attribute Carriers have one)
FXIcon * getACIcon() const
get FXIcon associated to this AC
virtual std::string getPopUpID() const =0
get PopPup ID (Used in AC Hierarchy)
const std::string & getTagStr() const
get tag assigned to this object in string format
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
virtual std::string getHierarchyName() const =0
get Hierarchy Name (Used in AC Hierarchy)
virtual GUIGlObject * getGUIGlObject()=0
GNEEdge * getEdgeFrom() const
get the name of the edge the vehicles leave
GNEEdge * getEdgeTo() const
get the name of the edge the vehicles may reach when leaving "from"
An Element which don't belong to GNENet but has influence in the simulation.
GNEDataSet * getDataSetParent() const
Returns a pointer to GNEDataSet parent.
const std::vector< GNEGenericData * > & getGenericDataChildren() const
get generic data children
const std::map< const double, GNEDataInterval * > & getDataIntervalChildren() const
get data interval children
virtual std::string getAttribute(SumoXMLAttr key) const =0
A road/street connecting two junctions (netedit-version)
const std::vector< GNELane * > & getLanes() const
returns a reference to the lane vector
GNEJunction * getFromJunction() const
get from Junction (only used to increase readability)
GNEJunction * getToJunction() const
get from Junction (only used to increase readability)
std::set< FXTreeItem * > myTreeItemsConnections
set used to save tree items without AC assigned, the Incoming/Outcoming connections
GNEAttributeCarrier * myClickedAC
pointer to current clicked Attribute Carrier
FXTreeItem * showAttributeCarrierParents()
show child of current attributeCarrier
void createPopUpMenu(int X, int Y, GNEAttributeCarrier *clickedAC)
GNEDataInterval * myClickedDataInterval
data interval element (casted from myClickedAC)
GNEConnection * myClickedConnection
junction (casted from myClickedAC)
long onCmdCenterItem(FXObject *, FXSelector, void *)
called when user click over option "center" of child Menu
std::map< FXTreeItem *, GNEAttributeCarrier * > myTreeItemToACMap
map used to save the FXTreeItems items with their vinculated AC
GNEDataSet * myClickedDataSet
data set element (casted from myClickedAC)
long onCmdInspectItem(FXObject *, FXSelector, void *)
called when user click over option "inspect" of child menu
GNECrossing * myClickedCrossing
crossing (casted from myClickedAC)
void showHierarchicalElementChildren(GNEHierarchicalElement *HE, FXTreeItem *itemParent)
show children of given hierarchical element
GNEFrame * myFrameParent
frame Parent
GNEHierarchicalElement * myHE
hierarchical element
GNEGenericData * myClickedGenericData
generic data element (casted from myClickedAC)
long onCmdShowChildMenu(FXObject *, FXSelector, void *data)
long onCmdMoveItemUp(FXObject *, FXSelector, void *)
called when user click over option "Move up" of child menu
void hideHierarchicalElementTree()
hide GNEElementTree
GNEAdditional * myClickedAdditional
additional (casted from myClickedAC)
MFXTreeListDynamic * myTreeListDynamic
tree list dynamic to show the children of the element to erase
GNEDemandElement * myClickedDemandElement
demand element (casted from myClickedAC)
GNEJunction * myClickedJunction
junction (casted from myClickedAC)
FXTreeItem * addListItem(GNEAttributeCarrier *AC, FXTreeItem *itemParent=nullptr, std::string prefix="", std::string sufix="")
add item into list
long onCmdMoveItemDown(FXObject *, FXSelector, void *)
called when user click over option "Move down" of child menu
void refreshHierarchicalElementTree()
refresh GNEElementTree
GNEEdge * myClickedEdge
edge (casted from myClickedAC)
GNELane * myClickedLane
lane (casted from myClickedAC)
void removeCurrentEditedAttributeCarrier(const GNEAttributeCarrier *HE)
if given AttributeCarrier is the same of myHE, set it as nullptr
long onCmdDeleteItem(FXObject *, FXSelector, void *)
called when user click over option "delete" of child menu
~GNEElementTree()
destructor
void showHierarchicalElementTree(GNEAttributeCarrier *AC)
show GNEElementTree
static bool isSupermodeValid(const GNEViewNet *viewNet, const GNEAttributeCarrier *AC)
return true if AC can be edited in the current supermode
GNEViewNet * getViewNet() const
get view net
An Element which don't belong to GNENet but has influence in the simulation.
GNEDataInterval * getDataIntervalParent() const
get data interval parent
const std::vector< GNEDemandElement * > & getChildDemandElements() const
return child demand elements
const std::vector< GNELane * > & getChildLanes() const
get child lanes
const std::vector< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
const std::vector< GNEAdditional * > & getParentAdditionals() const
get parent additionals
const std::vector< GNEEdge * > & getChildEdges() const
get child edges
const std::vector< GNEEdge * > & getParentEdges() const
get parent edges
const std::vector< GNELane * > & getParentLanes() const
get parent lanes
const std::vector< GNEAdditional * > & getChildAdditionals() const
return child additionals
const std::vector< GNEGenericData * > & getChildGenericDatas() const
return child generic data elements
void clearInspection()
clear inspection
void inspectElement(GNEAttributeCarrier *AC, GNEAttributeCarrier *previousInspectedAC=nullptr)
Inspect a single element.
const std::vector< GNECrossing * > & getGNECrossings() const
Returns GNECrossings.
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
std::vector< GNEConnection * > getGNEOutcomingConnections()
returns a vector with the outgoing GNEConnections of this lane
std::vector< GNEConnection * > getGNEIncomingConnections()
returns a vector with the incoming GNEConnections of this lane
GNEEdge * getParentEdge() const
get parent edge
GNELane * retrieveLane(const std::string &id, bool hardFail=true, bool checkVolatileChange=false) const
get lane by id
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
GNEJunction * retrieveJunction(const std::string &id, bool hardFail=true) const
get junction by id
GNEDataSet * retrieveDataSet(const std::string &id, bool hardFail=true) const
Returns the named data set.
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
GNEDemandElement * retrieveDemandElement(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named demand element.
void deleteEdge(GNEEdge *edge, GNEUndoList *undoList, bool recomputeConnections)
removes edge
void deleteLane(GNELane *lane, GNEUndoList *undoList, bool recomputeConnections)
removes lane
void deleteCrossing(GNECrossing *crossing, GNEUndoList *undoList)
remove crossing
void deleteAdditional(GNEAdditional *additional, GNEUndoList *undoList)
remove additional
void deleteDemandElement(GNEDemandElement *demandElement, GNEUndoList *undoList)
remove demand element
void deleteDataInterval(GNEDataInterval *dataInterval, GNEUndoList *undoList)
remove data interval
void deleteConnection(GNEConnection *connection, GNEUndoList *undoList)
remove connection
void deleteGenericData(GNEGenericData *genericData, GNEUndoList *undoList)
remove generic data
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
void deleteDataSet(GNEDataSet *dataSet, GNEUndoList *undoList)
remove data set
void deleteJunction(GNEJunction *junction, GNEUndoList *undoList)
removes junction and all incident edges
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
bool isTAZElement() const
return true if tag correspond to a TAZ element
bool isNetworkElement() const
element sets
bool isDataElement() const
return true if tag correspond to a data element
bool isType() const
demand elements
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool isDemandElement() const
return true if tag correspond to a demand element
bool isAdditionalElement() const
return true if tag correspond to an additional element (note: this include TAZ, shapes and wires)
void end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
void begin(GUIIcon icon, const std::string &description)
Begin undo command sub-group with current supermode. This begins a new group of commands that are tre...
void add(GNEChange *command, bool doit=false, bool merge=true)
Add new command, executing it if desired. The new command will be merged with the previous command if...
GNENet * getNet() const
get the net object
GNEViewNetHelper::InspectedElements & getInspectedElements()
get inspected elements
GNEViewParent * getViewParent() const
get the net object
GNEUndoList * getUndoList() const
get the undoList object
void updateViewNet(const bool ignoreViewUpdater=true) const
Mark the entire GNEViewNet to be repainted later.
GUIMainWindow * getGUIMainWindow() const
get GUIMainWindow App
GNEInspectorFrame * getInspectorFrame() const
get frame for inspect elements
static FXMenuCommand * buildFXMenuCommand(FXComposite *p, const std::string &text, FXIcon *icon, FXObject *tgt, FXSelector sel, const bool disable=false)
build menu command
GUIGlID getGlID() const
Returns the numerical id of the object.
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
FXFont * getBoldFont()
get bold front
virtual void centerTo(GUIGlID id, bool applyZoom, double zoomDist=20)
centers to the chosen artifact
MFXGroupBoxModule (based on FXGroupBox)
void show()
Show MFXTreeListDynamic.
void clearItems()
clear items
void hide()
Hide MFXTreeListDynamic.
FXWindow * getFXWindow()
get FXWindows associated with this MFXTreeListDynamic
FXTreeItem * getItemAt(FXint x, FXint y) const
Get item at x,y, if any.
FXTreeItem * appendItem(FXTreeItem *father, const FXString &text, FXIcon *oi, FXColor tColor=FXRGB(0, 0, 0))
append item with given text and icon