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;
216 if (planParent->getChildDemandElements().size() == 1) {
315 new FXMenuSeparator(pane);
321 centerMenuCommand->disable();
328 inspectMenuCommand->disable();
329 deleteMenuCommand->disable();
400 junctionDestinationItem->setExpanded(
true);
405 return junctionDestinationItem;
419 junctionDestinationItem->setExpanded(
true);
422 edgeItem->setExpanded(
true);
438 junctionItem->setExpanded(
true);
450 edgeFromItem->setExpanded(
true);
453 edgeToItem->setExpanded(
true);
456 connectionItem->setExpanded(
true);
462 return connectionItem;
474 GNELane* lane = attributeCarriers->retrieveLane(POILane->getParentLanes().at(0)->getID());
480 junctionDestinationItem->setExpanded(
true);
483 edgeItem->setExpanded(
true);
486 laneItem->setExpanded(
true);
498 FXTreeItem* root =
nullptr;
561 FXTreeItem* root =
nullptr;
624 FXTreeItem* root =
nullptr;
694 FXTreeItem* root =
nullptr;
783 FXTreeItem* junctionItem =
addListItem(HE, itemParent);
800 FXTreeItem* edgeItem =
addListItem(HE, itemParent);
802 for (
const auto& lane : edge->
getLanes()) {
829 FXTreeItem* laneItem =
addListItem(HE, itemParent);
842 FXTreeItem* incomingConnections =
addListItem(laneItem,
TL(
"Incomings"), incomingLaneConnections.front()->getACIcon(),
false);
844 for (
const auto& connection : incomingLaneConnections) {
852 FXTreeItem* outgoingConnections =
addListItem(laneItem,
TL(
"Outgoing"), outcomingLaneConnections.front()->getACIcon(),
false);
854 for (
const auto& connection : outcomingLaneConnections) {
872 FXTreeItem* treeItem =
addListItem(HE, itemParent);
882 std::vector<GNEAdditional*> symbols;
884 if (additional->getTagProperty().isSymbol()) {
885 symbols.push_back(additional);
888 if (symbols.size() > 0) {
890 const auto additionalParent = symbols.front()->getParentAdditionals().front();
891 const std::string symbolType = additionalParent->getTagProperty().hasAttribute(
SUMO_ATTR_EDGES) ?
TL(
"Edges") :
TL(
"Lanes");
895 for (
const auto& symbol : symbols) {
901 if (!additional->getTagProperty().isSymbol()) {
919 FXTreeItem* dataElementItem =
addListItem(HE, itemParent);
945 item->setExpanded(
true);
956 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 inspectChild(GNEAttributeCarrier *AC, GNEAttributeCarrier *previousElement)
inspect child of already inspected element
void inspectSingleElement(GNEAttributeCarrier *AC)
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
GNEViewParent * getViewParent() const
get the net object
GNEUndoList * getUndoList() const
get the undoList object
const std::vector< GNEAttributeCarrier * > & getInspectedAttributeCarriers() const
get inspected attribute carriers
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