Eclipse SUMO - Simulation of Urban MObility
GNESelectorFrame Class Reference

#include <GNESelectorFrame.h>

Inheritance diagram for GNESelectorFrame:
Collaboration diagram for GNESelectorFrame:

Data Structures

class  ElementSet
 
class  LockGLObjectTypes
 
class  MatchAttribute
 
class  ModificationMode
 
class  SelectionOperation
 
class  VisualScaling
 

Public Member Functions

void clearCurrentSelection () const
 clear current selection with possibility of undo/redo More...
 
void focusUpperElement ()
 focus upper element of frame More...
 
FXFont * getFrameHeaderFont () const
 get font of the header's frame More...
 
FXLabel * getFrameHeaderLabel () const
 get the label for the frame's header More...
 
LockGLObjectTypesgetLockGLObjectTypes () const
 get selected items Modul More...
 
ModificationModegetModificationModeModul () const
 get modification mode modul More...
 
GNEViewNetgetViewNet () const
 get view net More...
 
 GNESelectorFrame (FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
 Constructor. More...
 
void handleIDs (const std::vector< GNEAttributeCarrier * > &ACs, ModificationMode::SetOperation setop=ModificationMode::SET_DEFAULT)
 apply list of ids to the current selection according to SetOperation, More...
 
void hide ()
 hide Frame More...
 
void setFrameWidth (int newWidth)
 set width of GNEFrame More...
 
void show ()
 show Frame More...
 
virtual void updateFrameAfterUndoRedo ()
 function called after undo/redo in the current frame (can be reimplemented in frame children) More...
 
 ~GNESelectorFrame ()
 Destructor. More...
 

Protected Member Functions

const RGBColorgetEdgeCandidateColor () const
 get edge candidate color More...
 
const RGBColorgetEdgeCandidateSelectedColor () const
 get selected color More...
 
const std::map< int, std::string > & getPredefinedTagsMML () const
 get predefinedTagsMML More...
 
void openHelpAttributesDialog (const GNEAttributeCarrier::TagProperties &tagProperties) const
 Open help attributes dialog. More...
 
functions called by moduls that can be reimplemented in frame children
virtual void tagSelected ()
 Tag selected in TagSelector. More...
 
virtual void demandElementSelected ()
 selected demand element in DemandElementSelector More...
 
virtual void edgePathCreated ()
 finish edge path creation More...
 
virtual bool shapeDrawed ()
 build a shaped element using the drawed shape (can be reimplemented in frame children) More...
 
virtual void attributeUpdated ()
 function called after set a valid attribute in AttributeCreator/AttributeEditor/GenericParametersEditor/... More...
 
virtual void attributesEditorExtendedDialogOpened ()
 open AttributesCreator extended dialog (can be reimplemented in frame children) More...
 

Protected Attributes

FXVerticalFrame * myContentFrame
 Vertical frame that holds all widgets of frame. More...
 
FXHorizontalFrame * myHeaderFrame
 fame for header elements More...
 
FXHorizontalFrame * myHeaderLeftFrame
 fame for left header elements More...
 
FXHorizontalFrame * myHeaderRightFrame
 fame for right header elements More...
 
GNEViewNetmyViewNet
 View Net. More...
 

Private Member Functions

bool ACsToSelected () const
 check if there is ACs to select/unselect More...
 
std::vector< GNEAttributeCarrier * > getMatches (SumoXMLTag ACTag, SumoXMLAttr ACAttr, char compOp, double val, const std::string &expr)
 return ACs of the given type with matching attrs More...
 

Private Attributes

RGBColor myEdgeCandidateColor
 edge candidate color (used by some modulds to mark edges) More...
 
RGBColor myEdgeCandidateSelectedColor
 selected edge candidate color (used by some modulds to selected mark edges) More...
 
ElementSetmyElementSet
 modul for select element set More...
 
FXLabel * myFrameHeaderLabel
 the label for the frame's header More...
 
LockGLObjectTypesmyLockGLObjectTypes
 modul for lock selected items More...
 
MatchAttributemyMatchAttribute
 modul for matchA ttribute More...
 
ModificationModemyModificationMode
 modul for change modification mode More...
 
std::map< int, std::string > myPredefinedTagsMML
 Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cached) More...
 
FXScrollWindow * myScrollWindowsContents
 scroll windows that holds the content frame More...
 
SelectionOperationmySelectionOperation
 modul for selection operations More...
 
VisualScalingmyVisualScaling
 modul for visual scaling More...
 

Static Private Attributes

static FXFont * myFrameHeaderFont = nullptr
 static Font for the Header (it's common for all headers, then create only one time) More...
 

Detailed Description

The Widget for modifying selections of network-elements

Definition at line 33 of file GNESelectorFrame.h.

Constructor & Destructor Documentation

◆ GNESelectorFrame()

GNESelectorFrame::GNESelectorFrame ( FXHorizontalFrame *  horizontalFrameParent,
GNEViewNet viewNet 
)

Constructor.

parent FXHorizontalFrame in which this GNEFrame is placed

viewNet viewNet that uses this GNEFrame

Definition at line 87 of file GNESelectorFrame.cpp.

References GUIDesignGroupBoxFrame, and GUIDesignLabelFrameInformation.

◆ ~GNESelectorFrame()

GNESelectorFrame::~GNESelectorFrame ( )

Destructor.

Definition at line 109 of file GNESelectorFrame.cpp.

Member Function Documentation

◆ ACsToSelected()

◆ attributesEditorExtendedDialogOpened()

void GNEFrame::attributesEditorExtendedDialogOpened ( )
protectedvirtualinherited

open AttributesCreator extended dialog (can be reimplemented in frame children)

Reimplemented in GNEVehicleTypeFrame.

Definition at line 191 of file GNEFrame.cpp.

◆ attributeUpdated()

void GNEFrame::attributeUpdated ( )
protectedvirtualinherited

function called after set a valid attribute in AttributeCreator/AttributeEditor/GenericParametersEditor/...

Reimplemented in GNEInspectorFrame, GNEVehicleTypeFrame, and GNEPersonTypeFrame.

Definition at line 185 of file GNEFrame.cpp.

◆ clearCurrentSelection()

void GNESelectorFrame::clearCurrentSelection ( ) const

clear current selection with possibility of undo/redo

Definition at line 131 of file GNESelectorFrame.cpp.

References ACsToSelected(), GNENet::AttributeCarriers::additionals, GNEViewNetHelper::EditModes::currentSupermode, GNENet::AttributeCarriers::demandElements, GNENet::getAttributeCarriers(), GNEViewNet::getEditModes(), GNEViewNet::getNet(), ShapeContainer::getPOIs(), ShapeContainer::getPolygons(), GNEAttributeCarrier::getTagProperties(), GNEViewNet::getUndoList(), GLO_ADDITIONAL, GLO_CONNECTION, GLO_CROSSING, GLO_EDGE, GLO_EMBEDDEDROUTE, GLO_FLOW, GLO_JUNCTION, GLO_LANE, GLO_PERSON, GLO_PERSONFLOW, GLO_PERSONSTOP, GLO_PERSONTRIP, GLO_POI, GLO_POLYGON, GLO_RIDE, GLO_ROUTE, GLO_ROUTEFLOW, GLO_STOP, GLO_TRIP, GLO_VEHICLE, GLO_WALK, GNE_ATTR_SELECTED, GNE_SUPERMODE_NETWORK, GNEShape::isAttributeCarrierSelected(), GNESelectorFrame::LockGLObjectTypes::IsObjectTypeLocked(), GNEAttributeCarrier::TagProperties::isSelectable(), GNENet::AttributeCarriers::junctions, myLockGLObjectTypes, GNEFrame::myViewNet, GNEUndoList::p_begin(), GNEUndoList::p_end(), GNEShape::setAttribute(), SUMO_TAG_EMBEDDEDROUTE, SUMO_TAG_FLOW, SUMO_TAG_PERSON, SUMO_TAG_PERSONFLOW, SUMO_TAG_PERSONSTOP_BUSSTOP, SUMO_TAG_PERSONSTOP_LANE, SUMO_TAG_PERSONTRIP_BUSSTOP, SUMO_TAG_PERSONTRIP_FROMTO, SUMO_TAG_RIDE_BUSSTOP, SUMO_TAG_RIDE_FROMTO, SUMO_TAG_ROUTE, SUMO_TAG_ROUTEFLOW, SUMO_TAG_STOP_BUSSTOP, SUMO_TAG_STOP_CHARGINGSTATION, SUMO_TAG_STOP_CONTAINERSTOP, SUMO_TAG_STOP_LANE, SUMO_TAG_STOP_PARKINGAREA, SUMO_TAG_TRIP, SUMO_TAG_VEHICLE, SUMO_TAG_WALK_BUSSTOP, SUMO_TAG_WALK_FROMTO, SUMO_TAG_WALK_ROUTE, and GNEViewNet::update().

Referenced by GNEViewNet::abortOperation().

◆ demandElementSelected()

void GNEFrame::demandElementSelected ( )
protectedvirtualinherited

selected demand element in DemandElementSelector

Reimplemented in GNEPersonPlanFrame, GNEStopFrame, GNEVehicleFrame, and GNEPersonFrame.

Definition at line 166 of file GNEFrame.cpp.

◆ edgePathCreated()

void GNEFrame::edgePathCreated ( )
protectedvirtualinherited

finish edge path creation

Reimplemented in GNEVehicleFrame, and GNEPersonFrame.

Definition at line 172 of file GNEFrame.cpp.

◆ focusUpperElement()

◆ getEdgeCandidateColor()

const RGBColor & GNEFrame::getEdgeCandidateColor ( ) const
protectedinherited

get edge candidate color

Definition at line 264 of file GNEFrame.cpp.

References GNEFrame::myEdgeCandidateColor.

Referenced by GNECrossingFrame::GNECrossingFrame().

◆ getEdgeCandidateSelectedColor()

const RGBColor & GNEFrame::getEdgeCandidateSelectedColor ( ) const
protectedinherited

get selected color

Definition at line 270 of file GNEFrame.cpp.

References GNEFrame::myEdgeCandidateSelectedColor.

Referenced by GNECrossingFrame::GNECrossingFrame().

◆ getFrameHeaderFont()

FXFont * GNEFrame::getFrameHeaderFont ( ) const
inherited

get font of the header's frame

Definition at line 145 of file GNEFrame.cpp.

References GNEFrame::myFrameHeaderFont.

◆ getFrameHeaderLabel()

FXLabel * GNEFrame::getFrameHeaderLabel ( ) const
inherited

get the label for the frame's header

Definition at line 139 of file GNEFrame.cpp.

References GNEFrame::myFrameHeaderLabel.

Referenced by GNEProhibitionFrame::GNEProhibitionFrame(), and GNEInspectorFrame::inspectMultisection().

◆ getLockGLObjectTypes()

◆ getMatches()

std::vector< GNEAttributeCarrier * > GNESelectorFrame::getMatches ( SumoXMLTag  ACTag,
SumoXMLAttr  ACAttr,
char  compOp,
double  val,
const std::string &  expr 
)
private

return ACs of the given type with matching attrs

Parameters
[in]ACTagXML Tag of AttributeCarrier
[in]ACAttrXML Attribute of AttributeCarrier
[in]compOpOne of {<,>,=} for matching against val or '@' for matching against expr

Definition at line 466 of file GNESelectorFrame.cpp.

References GNEViewNet::getNet(), GNEAttributeCarrier::getTagProperties(), GNEFrame::myViewNet, and GNENet::retrieveAttributeCarriers().

◆ getModificationModeModul()

GNESelectorFrame::ModificationMode * GNESelectorFrame::getModificationModeModul ( ) const

get modification mode modul

Definition at line 454 of file GNESelectorFrame.cpp.

References myModificationMode.

◆ getPredefinedTagsMML()

◆ getViewNet()

GNEViewNet * GNEFrame::getViewNet ( ) const
inherited

get view net

Definition at line 133 of file GNEFrame.cpp.

References GNEFrame::myViewNet.

Referenced by GNEDeleteFrame::removeAttributeCarrier().

◆ handleIDs()

◆ hide()

void GNESelectorFrame::hide ( )
virtual

hide Frame

Reimplemented from GNEFrame.

Definition at line 124 of file GNESelectorFrame.cpp.

References GNEFrame::hide().

◆ openHelpAttributesDialog()

◆ setFrameWidth()

void GNEFrame::setFrameWidth ( int  newWidth)
inherited

set width of GNEFrame

Definition at line 126 of file GNEFrame.cpp.

References GNEFrame::myScrollWindowsContents.

◆ shapeDrawed()

bool GNEFrame::shapeDrawed ( )
protectedvirtualinherited

build a shaped element using the drawed shape (can be reimplemented in frame children)

Reimplemented in GNETAZFrame, and GNEPolygonFrame.

Definition at line 178 of file GNEFrame.cpp.

◆ show()

◆ tagSelected()

void GNEFrame::tagSelected ( )
protectedvirtualinherited

Tag selected in TagSelector.

Reimplemented in GNEAdditionalFrame, GNEPersonPlanFrame, GNEPolygonFrame, GNEStopFrame, GNEVehicleFrame, and GNEPersonFrame.

Definition at line 160 of file GNEFrame.cpp.

◆ updateFrameAfterUndoRedo()

void GNEFrame::updateFrameAfterUndoRedo ( )
virtualinherited

function called after undo/redo in the current frame (can be reimplemented in frame children)

Reimplemented in GNEInspectorFrame.

Definition at line 151 of file GNEFrame.cpp.

Referenced by GNEApplicationWindow::onCmdRedo(), and GNEApplicationWindow::onCmdUndo().

Field Documentation

◆ myContentFrame

FXVerticalFrame* GNEFrame::myContentFrame
protectedinherited

Vertical frame that holds all widgets of frame.

Definition at line 123 of file GNEFrame.h.

Referenced by GNECrossingFrame::GNECrossingFrame(), GNEFrame::GNEFrame(), and GNEInspectorFrame::inspectMultisection().

◆ myEdgeCandidateColor

RGBColor GNEFrame::myEdgeCandidateColor
privateinherited

edge candidate color (used by some modulds to mark edges)

Definition at line 145 of file GNEFrame.h.

Referenced by GNEFrame::getEdgeCandidateColor().

◆ myEdgeCandidateSelectedColor

RGBColor GNEFrame::myEdgeCandidateSelectedColor
privateinherited

selected edge candidate color (used by some modulds to selected mark edges)

Definition at line 148 of file GNEFrame.h.

Referenced by GNEFrame::getEdgeCandidateSelectedColor().

◆ myElementSet

ElementSet* GNESelectorFrame::myElementSet
private

modul for select element set

Definition at line 422 of file GNESelectorFrame.h.

Referenced by show().

◆ myFrameHeaderFont

FXFont * GNEFrame::myFrameHeaderFont = nullptr
staticprivateinherited

static Font for the Header (it's common for all headers, then create only one time)

Definition at line 139 of file GNEFrame.h.

Referenced by GNEFrame::getFrameHeaderFont(), GNEFrame::GNEFrame(), and GNEFrame::~GNEFrame().

◆ myFrameHeaderLabel

FXLabel* GNEFrame::myFrameHeaderLabel
privateinherited

the label for the frame's header

Definition at line 142 of file GNEFrame.h.

Referenced by GNEFrame::focusUpperElement(), GNEFrame::getFrameHeaderLabel(), and GNEFrame::GNEFrame().

◆ myHeaderFrame

FXHorizontalFrame* GNEFrame::myHeaderFrame
protectedinherited

fame for header elements

Definition at line 126 of file GNEFrame.h.

Referenced by GNEFrame::GNEFrame().

◆ myHeaderLeftFrame

FXHorizontalFrame* GNEFrame::myHeaderLeftFrame
protectedinherited

◆ myHeaderRightFrame

FXHorizontalFrame* GNEFrame::myHeaderRightFrame
protectedinherited

fame for right header elements

Definition at line 132 of file GNEFrame.h.

Referenced by GNEFrame::GNEFrame().

◆ myLockGLObjectTypes

LockGLObjectTypes* GNESelectorFrame::myLockGLObjectTypes
private

modul for lock selected items

Definition at line 416 of file GNESelectorFrame.h.

Referenced by ACsToSelected(), clearCurrentSelection(), getLockGLObjectTypes(), and show().

◆ myMatchAttribute

MatchAttribute* GNESelectorFrame::myMatchAttribute
private

modul for matchA ttribute

Definition at line 425 of file GNESelectorFrame.h.

◆ myModificationMode

ModificationMode* GNESelectorFrame::myModificationMode
private

modul for change modification mode

Definition at line 419 of file GNESelectorFrame.h.

Referenced by getModificationModeModul(), and handleIDs().

◆ myPredefinedTagsMML

std::map<int, std::string> GNEFrame::myPredefinedTagsMML
privateinherited

Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cached)

Definition at line 151 of file GNEFrame.h.

Referenced by GNEFrame::getPredefinedTagsMML(), and GNEFrame::GNEFrame().

◆ myScrollWindowsContents

FXScrollWindow* GNEFrame::myScrollWindowsContents
privateinherited

scroll windows that holds the content frame

Definition at line 136 of file GNEFrame.h.

Referenced by GNEFrame::GNEFrame(), GNEFrame::openHelpAttributesDialog(), and GNEFrame::setFrameWidth().

◆ mySelectionOperation

SelectionOperation* GNESelectorFrame::mySelectionOperation
private

modul for selection operations

Definition at line 431 of file GNESelectorFrame.h.

◆ myViewNet

GNEViewNet* GNEFrame::myViewNet
protectedinherited

View Net.

Definition at line 120 of file GNEFrame.h.

Referenced by GNEDeleteFrame::ACsToDelete(), ACsToSelected(), GNEAdditionalFrame::addAdditional(), GNECrossingFrame::addCrossing(), GNETAZFrame::addOrRemoveTAZMember(), GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlan(), GNEPolygonFrame::addPOI(), GNEPolygonFrame::addPOILane(), GNEPolygonFrame::addPolygon(), GNEStopFrame::addStop(), GNEVehicleFrame::addVehicle(), GNEFrameAttributesModuls::AttributesEditorRow::AttributesEditorRow(), GNEAdditionalFrame::buildAdditionalOverEdge(), GNEAdditionalFrame::buildAdditionalOverLane(), GNEAdditionalFrame::buildAdditionalOverLanes(), GNEAdditionalFrame::buildAdditionalOverView(), GNEConnectorFrame::buildConnection(), GNETLSEditorFrame::buildIinternalLanes(), GNEPersonFrame::buildPerson(), GNEPersonFrame::buildPersonOverRoute(), GNEPersonFrame::buildPersonOverStop(), GNEProhibitionFrame::buildProhibition(), GNETLSEditorFrame::cleanup(), clearCurrentSelection(), GNEInspectorFrame::clearInspectedAC(), GNETAZFrame::dropTAZMembers(), GNEPersonFrame::edgePathCreated(), GNEVehicleFrame::edgePathCreated(), GNETLSEditorFrame::editJunction(), GNEAdditionalFrame::generateID(), getMatches(), GNEFrame::getViewNet(), GNEPersonTypeFrame::GNEPersonTypeFrame(), GNEVehicleTypeFrame::GNEVehicleTypeFrame(), GNETLSEditorFrame::handleChange(), GNERouteFrame::handleEdgeClick(), handleIDs(), GNEConnectorFrame::handleLaneClick(), GNETLSEditorFrame::handleMultiChange(), GNEProhibitionFrame::handleProhibitionClick(), GNEFrame::hide(), GNEInspectorFrame::hide(), GNERouteFrame::hotkeyBackSpace(), GNERouteFrame::hotkeyEnter(), GNERouteFrame::hotkeyEsc(), GNEConnectorFrame::initTargets(), GNEInspectorFrame::inspectSingleElement(), GNEProhibitionFrame::onCmdCancel(), GNETLSEditorFrame::onCmdCancel(), GNETLSEditorFrame::onCmdDefCreate(), GNETLSEditorFrame::onCmdDefDelete(), GNETLSEditorFrame::onCmdDefSwitch(), GNEInspectorFrame::onCmdGoBack(), GNETLSEditorFrame::onCmdOK(), GNETLSEditorFrame::onCmdPhaseSwitch(), GNETLSEditorFrame::parseTLSPrograms(), GNEPersonPlanFrame::personPlanCreated(), GNECreateEdgeFrame::processClick(), GNEPolygonFrame::processClick(), GNEInspectorFrame::processDemandSupermodeClick(), GNEInspectorFrame::processNetworkSupermodeClick(), GNEProhibitionFrame::ProhibitionLegend::ProhibitionLegend(), GNEDeleteFrame::removeAttributeCarrier(), GNEDeleteFrame::removeSelectedAttributeCarriers(), GNEPolygonFrame::shapeDrawed(), GNETAZFrame::shapeDrawed(), GNEFrame::show(), GNEStopFrame::show(), GNEDeleteFrame::show(), and GNEPersonPlanFrame::show().

◆ myVisualScaling

VisualScaling* GNESelectorFrame::myVisualScaling
private

modul for visual scaling

Definition at line 428 of file GNESelectorFrame.h.


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