61 myFrameParent(frameParent) {
134 FXEvent* e = (FXEvent*)eventData;
206 if (planParent->getChildDemandElements().size() == 1) {
237 if (inspectedElements.isInspectingSingleElement()) {
238 if (inspectedElements.getFirstAC() !=
myClickedAC) {
307 new FXMenuSeparator(pane);
311 new FXMenuSeparator(pane);
317 centerMenuCommand->disable();
324 inspectMenuCommand->disable();
325 deleteMenuCommand->disable();
393 if (edge ==
nullptr) {
399 junctionDestinationItem->setExpanded(
true);
404 return junctionDestinationItem;
410 if (lane ==
nullptr) {
418 junctionDestinationItem->setExpanded(
true);
421 edgeItem->setExpanded(
true);
433 if (crossing ==
nullptr) {
439 junctionItem->setExpanded(
true);
449 if (connection ==
nullptr) {
454 edgeFromItem->setExpanded(
true);
457 edgeToItem->setExpanded(
true);
460 connectionItem->setExpanded(
true);
466 return connectionItem;
475 if (POILane ==
nullptr) {
479 GNELane* lane = attributeCarriers->retrieveLane(POILane->getParentLanes().at(0)->getID());
485 junctionDestinationItem->setExpanded(
true);
488 edgeItem->setExpanded(
true);
491 laneItem->setExpanded(
true);
503 if (additional ==
nullptr) {
507 FXTreeItem* root =
nullptr;
570 if (TAZElement ==
nullptr) {
574 FXTreeItem* root =
nullptr;
637 if (demandElement ==
nullptr) {
641 FXTreeItem* root =
nullptr;
707 if (dataInterval ==
nullptr) {
715 if (dataElement ==
nullptr) {
719 FXTreeItem* root =
nullptr;
803 FXTreeItem* item =
addListItem(hierarchicalElement, itemParent);
819 GNEJunction* junction = attributeCarriers->retrieveJunction(hierarchicalElement->
getID(),
false);
830 GNELane* lane = attributeCarriers->retrieveLane(hierarchicalElement->
getID(),
false);
836 FXTreeItem* incomingConnections =
addListItem(item,
TL(
"Incomings"), incomingLaneConnections.front()->getACIcon(),
false);
838 for (
const auto& connection : incomingLaneConnections) {
846 FXTreeItem* outgoingConnections =
addListItem(item,
TL(
"Outgoing"), outcomingLaneConnections.front()->getACIcon(),
false);
848 for (
const auto& connection : outcomingLaneConnections) {
856 if (!additional->getTagProperty()->isSymbol()) {
862 if (additional->getTagProperty()->isSymbol()) {
896 GNEDataSet* dataSet = attributeCarriers->retrieveDataSet(hierarchicalElement->
getID(),
false);
906 auto dataInterval = attributeCarriers->retrieveDataInterval(hierarchicalElement,
false);
909 for (
const auto& genericData : dataInterval->getGenericDataChildren()) {
931 item->setExpanded(
true);
946 item->setExpanded(expanded);
959 if (editModes.isCurrentSupermodeNetwork()) {
960 if (tagProperty->isNetworkElement() || tagProperty->isAdditionalElement()) {
967 }
else if (editModes.isCurrentSupermodeDemand() &&
968 tagProperty->isDemandElement()) {
970 }
else if (editModes.isCurrentSupermodeData() &&
971 (tagProperty->isDataElement() || tagProperty->isMeanData())) {
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
#define WRITE_WARNINGF(...)
@ SUMO_TAG_EDGEREL
a relation between two edges
@ SUMO_TAG_VTYPE
description of a vehicle/person/container type
@ SUMO_TAG_TAZSINK
a sink within a district (connection road)
@ 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_TAZSOURCE
a source within a district (connection road)
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ GNE_ATTR_DEFAULT_VTYPE
Flag to check if VType is a default VType.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
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 GNEHierarchicalElement * getHierarchicalElement()=0
get GNEHierarchicalElement associated with this AttributeCarrier
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"
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)
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
bool isSupermodeValid(const GNEAttributeCarrier *AC) const
check if current supermode is valid for select/remove the given AC
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)
GNEFrame * myFrameParent
frame Parent
GNEAttributeCarrier * myHierarchicalElement
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
GNETAZSourceSink * myClickedTAZSourceSink
sourceSink (casted from myClickedAC)
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)
void showHierarchicalElementChildren(GNEAttributeCarrier *hierarchicalElement, FXTreeItem *itemParent)
show children of given hierarchical element
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
GNEViewNet * getViewNet() const
get view net
GNEDataInterval * getDataIntervalParent() const
get data interval parent
const GNEHierarchicalContainerChildren< GNEEdge * > & getChildEdges() const
get child edges
const GNEHierarchicalContainerParents< GNEAdditional * > & getParentAdditionals() const
get parent additionals
const GNEHierarchicalContainerParents< GNEDemandElement * > & getParentDemandElements() const
get parent demand elements
const GNEHierarchicalContainerParents< GNEEdge * > & getParentEdges() const
get parent edges
const GNEHierarchicalContainerChildren< GNEGenericData * > & getChildGenericDatas() const
return child generic data elements
const GNEHierarchicalContainerChildren< GNELane * > & getChildLanes() const
get child lanes
const GNEHierarchicalContainerChildren< GNEAdditional * > & getChildAdditionals() const
return child additionals
const GNEHierarchicalContainerChildrenSet< GNETAZSourceSink * > & getChildTAZSourceSinks() const
return child TAZSourceSinks (Set)
const GNEHierarchicalContainerChildren< GNEJunction * > & getChildJunctions() const
get child junctions
const GNEHierarchicalContainerParents< GNEJunction * > & getParentJunctions() const
get parent junctions
const GNEHierarchicalContainerParents< GNELane * > & getParentLanes() const
get parent lanes
const GNEHierarchicalContainerChildren< GNEDemandElement * > & getChildDemandElements() const
return child demand 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
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 deleteTAZSourceSink(GNETAZSourceSink *TAZSourceSink, GNEUndoList *undoList)
remove TAZSourceSink
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
network elements
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
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
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