Eclipse SUMO - Simulation of Urban MObility
GNEFrameModules::HierarchicalElementTree Class Reference

#include <GNEFrameModules.h>

Inheritance diagram for GNEFrameModules::HierarchicalElementTree:
[legend]
Collaboration diagram for GNEFrameModules::HierarchicalElementTree:
[legend]

Public Types

enum  Options { NOTHING = 1 << 0, COLLAPSIBLE = 1 << 1, SAVE = 1 << 2, LOAD = 1 << 3 }
 GroupBoxModule options. More...
 

Public Member Functions

FXVerticalFrame * getCollapsableFrame ()
 get collapsable frame (used by all elements that will be collapsed if button is toogled) More...
 
void hideHierarchicalElementTree ()
 hide HierarchicalElementTree More...
 
 HierarchicalElementTree (GNEFrame *frameParent)
 FOX-declaration. More...
 
long onCmdCollapseButton (FXObject *, FXSelector, void *)
 collapse GroupBoxModule More...
 
long onCmdLoadButton (FXObject *, FXSelector, void *)
 load contents More...
 
long onCmdSaveButton (FXObject *, FXSelector, void *)
 save contents More...
 
long onPaint (FXObject *, FXSelector, void *)
 draw FXGroupBoxModule More...
 
void refreshHierarchicalElementTree ()
 refresh HierarchicalElementTree More...
 
void removeCurrentEditedAttributeCarrier (const GNEAttributeCarrier *HE)
 if given AttributeCarrier is the same of myHE, set it as nullptr More...
 
void setText (const std::string &text)
 set text More...
 
void showHierarchicalElementTree (GNEAttributeCarrier *AC)
 show HierarchicalElementTree More...
 
 ~HierarchicalElementTree ()
 destructor More...
 
FOX-callbacks

called when user press right click over an item of list of children

long onCmdShowChildMenu (FXObject *, FXSelector, void *data)
 
long onCmdCenterItem (FXObject *, FXSelector, void *)
 called when user click over option "center" of child Menu More...
 
long onCmdInspectItem (FXObject *, FXSelector, void *)
 called when user click over option "inspect" of child menu More...
 
long onCmdDeleteItem (FXObject *, FXSelector, void *)
 called when user click over option "delete" of child menu More...
 
long onCmdMoveItemUp (FXObject *, FXSelector, void *)
 called when user click over option "Move up" of child menu More...
 
long onCmdMoveItemDown (FXObject *, FXSelector, void *)
 called when user click over option "Move down" of child menu More...
 

Protected Member Functions

FXTreeItem * addListItem (FXTreeItem *itemParent, const std::string &text, FXIcon *icon, bool expanded)
 add item into list More...
 
FXTreeItem * addListItem (GNEAttributeCarrier *AC, FXTreeItem *itemParent=nullptr, std::string prefix="", std::string sufix="")
 add item into list More...
 
void createPopUpMenu (int X, int Y, GNEAttributeCarrier *clickedAC)
 
virtual bool loadContents () const
 load contents (can be reimplemented in children) More...
 
virtual bool saveContents () const
 save contents (can be reimplemented in children) More...
 
FXTreeItem * showAttributeCarrierParents ()
 show child of current attributeCarrier More...
 
void showHierarchicalElementChildren (GNEHierarchicalElement *HE, FXTreeItem *itemParent)
 show children of given hierarchical element More...
 
void toogleSaveButton (const bool value)
 enable or disable save buttons More...
 

Private Attributes

GNEAttributeCarriermyClickedAC
 pointer to current clicked Attribute Carrier More...
 
GNEAdditionalmyClickedAdditional
 additional (casted from myClickedAC) More...
 
GNEConnectionmyClickedConnection
 junction (casted from myClickedAC) More...
 
GNECrossingmyClickedCrossing
 crossing (casted from myClickedAC) More...
 
GNEDataIntervalmyClickedDataInterval
 data interval element (casted from myClickedAC) More...
 
GNEDataSetmyClickedDataSet
 data set element (casted from myClickedAC) More...
 
GNEDemandElementmyClickedDemandElement
 demand element (casted from myClickedAC) More...
 
GNEEdgemyClickedEdge
 edge (casted from myClickedAC) More...
 
GNEGenericDatamyClickedGenericData
 generic data element (casted from myClickedAC) More...
 
GNEJunctionmyClickedJunction
 junction (casted from myClickedAC) More...
 
GNELanemyClickedLane
 lane (casted from myClickedAC) More...
 
FXVerticalFrame * myCollapsableFrame = nullptr
 vertical collapsable frame More...
 
FXButton * myCollapseButton = nullptr
 button for collapse elements More...
 
bool myCollapsed
 flag to check if this groupbox is collapsed More...
 
GNEFramemyFrameParent
 frame Parent More...
 
GNEHierarchicalElementmyHE
 hierarchical element More...
 
FXLabel * myLabel = nullptr
 label used in non collapsable FXGroupBoxModule More...
 
FXButton * myLoadButton = nullptr
 button for load elements More...
 
const int myOptions
 GroupBoxModule options. More...
 
FXButton * mySaveButton = nullptr
 button for save elements More...
 
std::set< FXTreeItem * > myTreeItemsConnections
 set used to save tree items without AC assigned, the Incoming/Outcoming connections More...
 
std::map< FXTreeItem *, GNEAttributeCarrier * > myTreeItemToACMap
 map used to save the FXTreeItems items with their vinculated AC More...
 
FXTreeListDinamicmyTreeListDinamic = nullptr
 tree list dinamic to show the children of the element to erase More...
 

Detailed Description

Definition at line 202 of file GNEFrameModules.h.

Member Enumeration Documentation

◆ Options

enum FXGroupBoxModule::Options
inherited

GroupBoxModule options.

Enumerator
NOTHING 
COLLAPSIBLE 
SAVE 
LOAD 

Definition at line 32 of file FXGroupBoxModule.h.

Constructor & Destructor Documentation

◆ HierarchicalElementTree()

GNEFrameModules::HierarchicalElementTree::HierarchicalElementTree ( GNEFrame frameParent)

◆ ~HierarchicalElementTree()

GNEFrameModules::HierarchicalElementTree::~HierarchicalElementTree ( )

destructor

Definition at line 829 of file GNEFrameModules.cpp.

Member Function Documentation

◆ addListItem() [1/2]

FXTreeItem * GNEFrameModules::HierarchicalElementTree::addListItem ( FXTreeItem *  itemParent,
const std::string &  text,
FXIcon *  icon,
bool  expanded 
)
protected

add item into list

Definition at line 1700 of file GNEFrameModules.cpp.

◆ addListItem() [2/2]

FXTreeItem * GNEFrameModules::HierarchicalElementTree::addListItem ( GNEAttributeCarrier AC,
FXTreeItem *  itemParent = nullptr,
std::string  prefix = "",
std::string  sufix = "" 
)
protected

add item into list

Definition at line 1687 of file GNEFrameModules.cpp.

References GNEAttributeCarrier::getHierarchyName(), and GNEAttributeCarrier::getIcon().

◆ createPopUpMenu()

◆ getCollapsableFrame()

FXVerticalFrame * FXGroupBoxModule::getCollapsableFrame ( )
inherited

get collapsable frame (used by all elements that will be collapsed if button is toogled)

Definition at line 82 of file FXGroupBoxModule.cpp.

References FXGroupBoxModule::myCollapsableFrame.

Referenced by GNEInspectorFrame::AdditionalDialog::AdditionalDialog(), GNEFrameAttributeModules::AttributesCreator::AttributesCreator(), GNEFrameAttributeModules::AttributesEditor::AttributesEditor(), GNEFrameAttributeModules::AttributesEditorExtended::AttributesEditorExtended(), GNEGenericDataFrame::AttributeSelector::AttributeSelector(), GNEMoveFrame::ChangeZInSelection::ChangeZInSelection(), GNEConnectorFrame::ConnectionModifications::ConnectionModifications(), GNEConnectorFrame::ConnectionOperations::ConnectionOperations(), GNEConnectorFrame::ConnectionSelection::ConnectionSelection(), GNECommonNetworkModules::ConsecutiveLaneSelector::ConsecutiveLaneSelector(), GNECrossingFrame::CreateCrossing::CreateCrossing(), GNECrossingFrame::CrossingParameters::CrossingParameters(), GNETAZFrame::CurrentTAZ::CurrentTAZ(), GNEFrameModules::DemandElementSelector::DemandElementSelector(), GNEMoveFrame::DemandModeOptions::DemandModeOptions(), GNEFrameModules::DrawingShape::DrawingShape(), GNEFrameAttributeModules::DrawingShape::DrawingShape(), GNECrossingFrame::EdgesSelector::EdgesSelector(), GNEFrameAttributeModules::FlowEditor::FlowEditor(), GNEFrameAttributeModules::GenericDataAttributes::GenericDataAttributes(), GNEInspectorFrame::GEOAttributesEditor::GEOAttributesEditor(), GNEStopFrame::HelpCreation::HelpCreation(), GNEVehicleFrame::HelpCreation::HelpCreation(), HierarchicalElementTree(), GNECrossingFrame::Information::Information(), GNESelectorFrame::Information::Information(), GNEGenericDataFrame::IntervalSelector::IntervalSelector(), GNECreateEdgeFrame::LaneTypeSelector::LaneTypeSelector(), GNETAZRelDataFrame::Legend::Legend(), GNEProhibitionFrame::Legend::Legend(), GNEConnectorFrame::Legend::Legend(), GNECreateEdgeFrame::Legend::Legend(), GNESelectorFrame::ModificationMode::ModificationMode(), GNEProhibitionFrame::Modifications::Modifications(), GNEFrameAttributeModules::NeteditAttributes::NeteditAttributes(), GNEMoveFrame::NetworkModeOptions::NetworkModeOptions(), GNEMatchAttribute::onCmdHelp(), GNEMatchGenericDataAttribute::onCmdHelp(), GNEInspectorFrame::ParametersEditor::ParametersEditor(), GNEFrameModules::PathCreator::PathCreator(), GNEFrameModules::PathLegend::PathLegend(), GNEDeleteFrame::ProtectElements::ProtectElements(), GNESelectorFrame::SelectionHierarchy::SelectionHierarchy(), GNESelectorFrame::SelectionOperation::SelectionOperation(), GNEFrameModules::SelectorParent::SelectorParent(), GNEMoveFrame::ShiftEdgeSelectedGeometry::ShiftEdgeSelectedGeometry(), GNEMoveFrame::ShiftShapeGeometry::ShiftShapeGeometry(), GNETAZFrame::TAZChildDefaultParameters::TAZChildDefaultParameters(), GNETAZFrame::TAZCommonStatistics::TAZCommonStatistics(), GNETAZFrame::TAZEdgesGraphic::TAZEdgesGraphic(), GNETAZFrame::TAZParameters::TAZParameters(), GNETAZFrame::TAZSaveChanges::TAZSaveChanges(), GNETAZFrame::TAZSelectionStatistics::TAZSelectionStatistics(), GNEInspectorFrame::TemplateEditor::TemplateEditor(), GNETLSEditorFrame::TLSAttributes::TLSAttributes(), GNETLSEditorFrame::TLSDefinition::TLSDefinition(), GNETLSEditorFrame::TLSFile::TLSFile(), GNETLSEditorFrame::TLSJunction::TLSJunction(), GNETLSEditorFrame::TLSModifications::TLSModifications(), GNETLSEditorFrame::TLSPhases::TLSPhases(), GNETypeFrame::TypeEditor::TypeEditor(), and GNESelectorFrame::VisualScaling::VisualScaling().

◆ hideHierarchicalElementTree()

void GNEFrameModules::HierarchicalElementTree::hideHierarchicalElementTree ( )

hide HierarchicalElementTree

Definition at line 848 of file GNEFrameModules.cpp.

Referenced by GNEContainerPlanFrame::demandElementSelected(), GNEPersonPlanFrame::demandElementSelected(), GNEInspectorFrame::inspectMultisection(), GNEContainerPlanFrame::show(), GNEPersonPlanFrame::show(), GNEContainerPlanFrame::tagSelected(), and GNEPersonPlanFrame::tagSelected().

Here is the caller graph for this function:

◆ loadContents()

bool FXGroupBoxModule::loadContents ( ) const
protectedvirtualinherited

load contents (can be reimplemented in children)

Definition at line 142 of file FXGroupBoxModule.cpp.

Referenced by FXGroupBoxModule::onCmdLoadButton().

Here is the caller graph for this function:

◆ onCmdCenterItem()

long GNEFrameModules::HierarchicalElementTree::onCmdCenterItem ( FXObject *  ,
FXSelector  ,
void *   
)

called when user click over option "center" of child Menu

Definition at line 906 of file GNEFrameModules.cpp.

◆ onCmdCollapseButton()

long FXGroupBoxModule::onCmdCollapseButton ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

◆ onCmdDeleteItem()

long GNEFrameModules::HierarchicalElementTree::onCmdDeleteItem ( FXObject *  ,
FXSelector  ,
void *   
)

called when user click over option "delete" of child menu

Definition at line 941 of file GNEFrameModules.cpp.

References GNE_ATTR_DEFAULT_VTYPE, SUMO_ATTR_ID, SUMO_TAG_VTYPE, and WRITE_WARNING.

◆ onCmdInspectItem()

long GNEFrameModules::HierarchicalElementTree::onCmdInspectItem ( FXObject *  ,
FXSelector  ,
void *   
)

called when user click over option "inspect" of child menu

Definition at line 932 of file GNEFrameModules.cpp.

◆ onCmdLoadButton()

long FXGroupBoxModule::onCmdLoadButton ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

load contents

Definition at line 123 of file FXGroupBoxModule.cpp.

References FXGroupBoxModule::loadContents().

◆ onCmdMoveItemDown()

long GNEFrameModules::HierarchicalElementTree::onCmdMoveItemDown ( FXObject *  ,
FXSelector  ,
void *   
)

called when user click over option "Move down" of child menu

Definition at line 1022 of file GNEFrameModules.cpp.

◆ onCmdMoveItemUp()

long GNEFrameModules::HierarchicalElementTree::onCmdMoveItemUp ( FXObject *  ,
FXSelector  ,
void *   
)

called when user click over option "Move up" of child menu

Definition at line 1006 of file GNEFrameModules.cpp.

◆ onCmdSaveButton()

long FXGroupBoxModule::onCmdSaveButton ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

save contents

Definition at line 117 of file FXGroupBoxModule.cpp.

References FXGroupBoxModule::saveContents().

◆ onCmdShowChildMenu()

long GNEFrameModules::HierarchicalElementTree::onCmdShowChildMenu ( FXObject *  ,
FXSelector  ,
void *  data 
)

Definition at line 892 of file GNEFrameModules.cpp.

◆ onPaint()

long FXGroupBoxModule::onPaint ( FXObject *  ,
FXSelector  ,
void *  ptr 
)
inherited

draw FXGroupBoxModule

Definition at line 88 of file FXGroupBoxModule.cpp.

◆ refreshHierarchicalElementTree()

void GNEFrameModules::HierarchicalElementTree::refreshHierarchicalElementTree ( )

refresh HierarchicalElementTree

Definition at line 870 of file GNEFrameModules.cpp.

Referenced by GNEContainerPlanFrame::createPath(), GNEPersonPlanFrame::createPath(), and GNEInspectorFrame::updateFrameAfterUndoRedo().

Here is the caller graph for this function:

◆ removeCurrentEditedAttributeCarrier()

void GNEFrameModules::HierarchicalElementTree::removeCurrentEditedAttributeCarrier ( const GNEAttributeCarrier HE)

if given AttributeCarrier is the same of myHE, set it as nullptr

Definition at line 883 of file GNEFrameModules.cpp.

Referenced by GNEDataSet::removeDataIntervalChild(), GNEDataInterval::removeGenericDataChild(), and GNEEdge::removeLane().

Here is the caller graph for this function:

◆ saveContents()

bool FXGroupBoxModule::saveContents ( ) const
protectedvirtualinherited

save contents (can be reimplemented in children)

Reimplemented in GNEFixDemandElements::FixOptions.

Definition at line 135 of file FXGroupBoxModule.cpp.

Referenced by FXGroupBoxModule::onCmdSaveButton().

Here is the caller graph for this function:

◆ setText()

void FXGroupBoxModule::setText ( const std::string &  text)
inherited

set text

Definition at line 76 of file FXGroupBoxModule.cpp.

References FXGroupBoxModule::myLabel.

Referenced by GNESelectorFrame::SelectionInformation::updateInformationLabel().

Here is the caller graph for this function:

◆ showAttributeCarrierParents()

◆ showHierarchicalElementChildren()

◆ showHierarchicalElementTree()

void GNEFrameModules::HierarchicalElementTree::showHierarchicalElementTree ( GNEAttributeCarrier AC)

show HierarchicalElementTree

Definition at line 833 of file GNEFrameModules.cpp.

Referenced by GNEInspectorFrame::inspectMultisection(), GNEContainerPlanFrame::tagSelected(), and GNEPersonPlanFrame::tagSelected().

Here is the caller graph for this function:

◆ toogleSaveButton()

void FXGroupBoxModule::toogleSaveButton ( const bool  value)
protectedinherited

enable or disable save buttons

Definition at line 149 of file FXGroupBoxModule.cpp.

References FXGroupBoxModule::mySaveButton.

Field Documentation

◆ myClickedAC

GNEAttributeCarrier* GNEFrameModules::HierarchicalElementTree::myClickedAC
private

pointer to current clicked Attribute Carrier

Definition at line 272 of file GNEFrameModules.h.

◆ myClickedAdditional

GNEAdditional* GNEFrameModules::HierarchicalElementTree::myClickedAdditional
private

additional (casted from myClickedAC)

Definition at line 290 of file GNEFrameModules.h.

◆ myClickedConnection

GNEConnection* GNEFrameModules::HierarchicalElementTree::myClickedConnection
private

junction (casted from myClickedAC)

Definition at line 287 of file GNEFrameModules.h.

◆ myClickedCrossing

GNECrossing* GNEFrameModules::HierarchicalElementTree::myClickedCrossing
private

crossing (casted from myClickedAC)

Definition at line 284 of file GNEFrameModules.h.

◆ myClickedDataInterval

GNEDataInterval* GNEFrameModules::HierarchicalElementTree::myClickedDataInterval
private

data interval element (casted from myClickedAC)

Definition at line 299 of file GNEFrameModules.h.

◆ myClickedDataSet

GNEDataSet* GNEFrameModules::HierarchicalElementTree::myClickedDataSet
private

data set element (casted from myClickedAC)

Definition at line 296 of file GNEFrameModules.h.

◆ myClickedDemandElement

GNEDemandElement* GNEFrameModules::HierarchicalElementTree::myClickedDemandElement
private

demand element (casted from myClickedAC)

Definition at line 293 of file GNEFrameModules.h.

◆ myClickedEdge

GNEEdge* GNEFrameModules::HierarchicalElementTree::myClickedEdge
private

edge (casted from myClickedAC)

Definition at line 278 of file GNEFrameModules.h.

◆ myClickedGenericData

GNEGenericData* GNEFrameModules::HierarchicalElementTree::myClickedGenericData
private

generic data element (casted from myClickedAC)

Definition at line 302 of file GNEFrameModules.h.

◆ myClickedJunction

GNEJunction* GNEFrameModules::HierarchicalElementTree::myClickedJunction
private

junction (casted from myClickedAC)

Definition at line 275 of file GNEFrameModules.h.

◆ myClickedLane

GNELane* GNEFrameModules::HierarchicalElementTree::myClickedLane
private

lane (casted from myClickedAC)

Definition at line 281 of file GNEFrameModules.h.

◆ myCollapsableFrame

FXVerticalFrame* FXGroupBoxModule::myCollapsableFrame = nullptr
privateinherited

vertical collapsable frame

Definition at line 81 of file FXGroupBoxModule.h.

Referenced by FXGroupBoxModule::getCollapsableFrame(), and FXGroupBoxModule::onCmdCollapseButton().

◆ myCollapseButton

FXButton* FXGroupBoxModule::myCollapseButton = nullptr
privateinherited

button for collapse elements

Definition at line 87 of file FXGroupBoxModule.h.

Referenced by FXGroupBoxModule::onCmdCollapseButton().

◆ myCollapsed

bool FXGroupBoxModule::myCollapsed
privateinherited

flag to check if this groupbox is collapsed

Definition at line 96 of file FXGroupBoxModule.h.

Referenced by FXGroupBoxModule::onCmdCollapseButton().

◆ myFrameParent

GNEFrame* GNEFrameModules::HierarchicalElementTree::myFrameParent
private

frame Parent

Definition at line 266 of file GNEFrameModules.h.

◆ myHE

GNEHierarchicalElement* GNEFrameModules::HierarchicalElementTree::myHE
private

hierarchical element

Definition at line 269 of file GNEFrameModules.h.

◆ myLabel

FXLabel* FXGroupBoxModule::myLabel = nullptr
privateinherited

label used in non collapsable FXGroupBoxModule

Definition at line 84 of file FXGroupBoxModule.h.

Referenced by FXGroupBoxModule::setText().

◆ myLoadButton

FXButton* FXGroupBoxModule::myLoadButton = nullptr
privateinherited

button for load elements

Definition at line 93 of file FXGroupBoxModule.h.

◆ myOptions

const int FXGroupBoxModule::myOptions
privateinherited

GroupBoxModule options.

Definition at line 78 of file FXGroupBoxModule.h.

◆ mySaveButton

FXButton* FXGroupBoxModule::mySaveButton = nullptr
privateinherited

button for save elements

Definition at line 90 of file FXGroupBoxModule.h.

Referenced by FXGroupBoxModule::toogleSaveButton().

◆ myTreeItemsConnections

std::set<FXTreeItem*> GNEFrameModules::HierarchicalElementTree::myTreeItemsConnections
private

set used to save tree items without AC assigned, the Incoming/Outcoming connections

Definition at line 311 of file GNEFrameModules.h.

◆ myTreeItemToACMap

std::map<FXTreeItem*, GNEAttributeCarrier*> GNEFrameModules::HierarchicalElementTree::myTreeItemToACMap
private

map used to save the FXTreeItems items with their vinculated AC

Definition at line 308 of file GNEFrameModules.h.

◆ myTreeListDinamic

FXTreeListDinamic* GNEFrameModules::HierarchicalElementTree::myTreeListDinamic = nullptr
private

tree list dinamic to show the children of the element to erase

Definition at line 305 of file GNEFrameModules.h.

Referenced by HierarchicalElementTree().


The documentation for this class was generated from the following files: