Eclipse SUMO - Simulation of Urban MObility
GNEPolygonFrame Class Reference

#include <GNEPolygonFrame.h>

Inheritance diagram for GNEPolygonFrame:
[legend]
Collaboration diagram for GNEPolygonFrame:
[legend]

Data Structures

class  GEOPOICreator
 

Public Types

enum class  AddShape { SUCCESS , UPDATEDTEMPORALSHAPE , INVALID , NOTHING }
 enum with all possible values after try to create an shape using frame More...
 

Public Member Functions

void focusUpperElement ()
 focus upper element of frame More...
 
GNEFrameModuls::DrawingShapegetDrawingShapeModul () const
 get drawing mode editor More...
 
FXFont * getFrameHeaderFont () const
 get font of the header's frame More...
 
FXLabel * getFrameHeaderLabel () const
 get the label for the frame's header More...
 
GNEViewNetgetViewNet () const
 get view net More...
 
 GNEPolygonFrame (FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
 Constructor. More...
 
virtual void hide ()
 hide Frame More...
 
GNEPolygonFrame::AddShape processClick (const Position &clickedPosition, const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
 process click over Viewnet 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...
 
 ~GNEPolygonFrame ()
 Destructor. More...
 

Static Public Member Functions

static std::string getIdsSelected (const FXList *list)
 get list of selecte id's in string format More...
 

Protected Member Functions

bool addPOI (const std::map< SumoXMLAttr, std::string > &POIValues)
 add POI More...
 
bool addPOILane (const std::map< SumoXMLAttr, std::string > &POIValues)
 add POILane More...
 
bool addPolygon (const std::map< SumoXMLAttr, std::string > &POIValues)
 add Polygon More...
 
const std::vector< std::string > & getPredefinedTagsMML () const
 get predefinedTagsMML More...
 
void openHelpAttributesDialog (const GNETagProperties &tagProperties) const
 Open help attributes dialog. More...
 
bool shapeDrawed ()
 build a shaped element using the drawed shape return true if was successfully created More...
 
void tagSelected ()
 Tag selected in TagSelector. More...
 
functions called by moduls that can be reimplemented in frame children
virtual void demandElementSelected ()
 selected demand element in DemandElementSelector More...
 
virtual void attributeUpdated ()
 function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/... More...
 
virtual void attributesEditorExtendedDialogOpened ()
 open AttributesCreator extended dialog (can be reimplemented in frame children) More...
 
virtual void selectedOverlappedElement (GNEAttributeCarrier *AC)
 open AttributesCreator extended dialog (can be reimplemented in frame children) More...
 
virtual void createPath ()
 create path (can be reimplemented in frame children) More...
 

Protected Attributes

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

Private Attributes

GNEFrameModuls::DrawingShapemyDrawingShape
 Drawing shape. More...
 
FXLabel * myFrameHeaderLabel = nullptr
 the label for the frame's header More...
 
GEOPOICreatormyGEOPOICreator
 GEOPOICreator. More...
 
GNEFrameAttributesModuls::NeteditAttributesmyNeteditAttributes
 Netedit parameter. More...
 
std::vector< std::string > myPredefinedTagsMML
 Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cached) More...
 
FXScrollWindow * myScrollWindowsContents = nullptr
 scroll windows that holds the content frame More...
 
GNEFrameAttributesModuls::AttributesCreatormyShapeAttributes
 shape internal attributes More...
 
GNEFrameModuls::TagSelectormyShapeTagSelector
 shape tag selector 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 setting internal attributes of shape elements

Definition at line 30 of file GNEPolygonFrame.h.

Member Enumeration Documentation

◆ AddShape

enum with all possible values after try to create an shape using frame

Enumerator
SUCCESS 
UPDATEDTEMPORALSHAPE 
INVALID 
NOTHING 

Definition at line 35 of file GNEPolygonFrame.h.

Constructor & Destructor Documentation

◆ GNEPolygonFrame()

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

Constructor.

parent FXHorizontalFrame in which this GNEFrame is placed

viewNet viewNet that uses this GNEFrame

create GEOPOICreator

Definition at line 215 of file GNEPolygonFrame.cpp.

References myDrawingShape, myGEOPOICreator, myNeteditAttributes, myShapeAttributes, myShapeTagSelector, GNEFrameModuls::TagSelector::setCurrentTag(), and SUMO_TAG_POLY.

◆ ~GNEPolygonFrame()

GNEPolygonFrame::~GNEPolygonFrame ( )

Destructor.

Definition at line 238 of file GNEPolygonFrame.cpp.

Member Function Documentation

◆ addPOI()

◆ addPOILane()

◆ addPolygon()

◆ attributesEditorExtendedDialogOpened()

void GNEFrame::attributesEditorExtendedDialogOpened ( )
protectedvirtualinherited

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

Reimplemented in GNEVehicleTypeFrame.

Definition at line 185 of file GNEFrame.cpp.

◆ attributeUpdated()

void GNEFrame::attributeUpdated ( )
protectedvirtualinherited

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

Reimplemented in GNEVehicleTypeFrame, GNEPersonTypeFrame, and GNEInspectorFrame.

Definition at line 179 of file GNEFrame.cpp.

◆ createPath()

void GNEFrame::createPath ( )
protectedvirtualinherited

create path (can be reimplemented in frame children)

Reimplemented in GNEVehicleFrame, GNERouteFrame, GNEPersonPlanFrame, GNEPersonFrame, GNEGenericDataFrame, and GNEEdgeRelDataFrame.

Definition at line 197 of file GNEFrame.cpp.

Referenced by GNEAdditionalFrame::E2MultilaneLaneSelector::onCmdCreatePath().

Here is the caller graph for this function:

◆ demandElementSelected()

void GNEFrame::demandElementSelected ( )
protectedvirtualinherited

selected demand element in DemandElementSelector

Reimplemented in GNEVehicleFrame, GNEStopFrame, GNEPersonPlanFrame, and GNEPersonFrame.

Definition at line 166 of file GNEFrame.cpp.

◆ focusUpperElement()

void GNEFrame::focusUpperElement ( )
inherited

focus upper element of frame

Definition at line 102 of file GNEFrame.cpp.

References GNEFrame::myFrameHeaderLabel.

Referenced by GNEViewNet::hotkeyFocusFrame(), GNEInspectorFrame::processDataSupermodeClick(), GNEInspectorFrame::processDemandSupermodeClick(), GNEInspectorFrame::processNetworkSupermodeClick(), GNEViewNet::updateDataModeSpecificControls(), GNEViewNet::updateDemandModeSpecificControls(), and GNEViewNet::updateNetworkModeSpecificControls().

Here is the caller graph for this function:

◆ getDrawingShapeModul()

GNEFrameModuls::DrawingShape * GNEPolygonFrame::getDrawingShapeModul ( ) const

get drawing mode editor

Definition at line 350 of file GNEPolygonFrame.cpp.

References myDrawingShape.

Referenced by GNEViewNet::abortOperation(), GNEViewNet::drawTemporalDrawShape(), GNEViewNet::hotkeyEnter(), GNEViewNet::onKeyPress(), GNEViewNet::onKeyRelease(), GNEViewNet::onRightBtnPress(), GNEViewNet::onRightBtnRelease(), and GNEViewNet::processMoveMouseNetwork().

Here is the caller graph for this function:

◆ 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().

Here is the caller graph for this function:

◆ getIdsSelected()

std::string GNEPolygonFrame::getIdsSelected ( const FXList *  list)
static

get list of selecte id's in string format

Definition at line 334 of file GNEPolygonFrame.cpp.

◆ getPredefinedTagsMML()

const std::vector< std::string > & GNEFrame::getPredefinedTagsMML ( ) const
protectedinherited

get predefinedTagsMML

Definition at line 269 of file GNEFrame.cpp.

References GNEFrame::myPredefinedTagsMML.

Referenced by GNEVehicleFrame::addVehicle(), GNEAdditionalFrame::buildAdditionalOverEdge(), GNEAdditionalFrame::buildAdditionalOverLane(), GNEAdditionalFrame::buildAdditionalOverView(), GNEPersonFrame::buildPerson(), GNEVehicleFrame::createPath(), and GNETAZFrame::shapeDrawed().

Here is the caller graph for this function:

◆ getViewNet()

◆ hide()

◆ openHelpAttributesDialog()

◆ processClick()

GNEPolygonFrame::AddShape GNEPolygonFrame::processClick ( const Position clickedPosition,
const GNEViewNetHelper::ObjectsUnderCursor objectsUnderCursor 
)

process click over Viewnet

Parameters
[in]clickedPositionclicked position over ViewNet
[in]ObjectsUnderCursorobjects under cursor after click over view
Returns
AddShapeStatus with the result of operation

Definition at line 252 of file GNEPolygonFrame.cpp.

References GNEFrameModuls::DrawingShape::addNewPoint(), addPOI(), addPOILane(), GNEFrameAttributesModuls::AttributesCreator::areValuesValid(), GNENet::generateShapeID(), GNEFrameAttributesModuls::AttributesCreator::getAttributesAndValues(), GNEFrameModuls::TagSelector::getCurrentTagProperties(), GNEFrameModuls::DrawingShape::getDeleteLastCreatedPoint(), GNENetworkElement::getID(), GNEViewNetHelper::ObjectsUnderCursor::getLaneFront(), GNELane::getLaneShape(), GNEViewNet::getNet(), GNEFrameAttributesModuls::NeteditAttributes::getNeteditAttributesAndValues(), GNETagProperties::getTag(), INVALID, GNEFrameModuls::DrawingShape::isDrawing(), myDrawingShape, myNeteditAttributes, myShapeAttributes, myShapeTagSelector, GNEFrame::myViewNet, PositionVector::nearest_offset_to_point2D(), NOTHING, GNEFrameAttributesModuls::AttributesCreator::refreshRows(), GNEFrameModuls::DrawingShape::removeLastPoint(), GNEViewNet::setStatusBarText(), GNEFrameAttributesModuls::AttributesCreator::showWarningMessage(), SUCCESS, SUMO_ATTR_GEO, SUMO_ATTR_ID, SUMO_ATTR_LANE, SUMO_ATTR_POSITION, SUMO_TAG_POI, SUMO_TAG_POILANE, SUMO_TAG_POLY, toString(), UPDATEDTEMPORALSHAPE, and WRITE_WARNING.

Referenced by GNEViewNet::processLeftButtonPressNetwork().

Here is the caller graph for this function:

◆ selectedOverlappedElement()

void GNEFrame::selectedOverlappedElement ( GNEAttributeCarrier AC)
protectedvirtualinherited

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

Reimplemented in GNETLSEditorFrame, and GNEInspectorFrame.

Definition at line 191 of file GNEFrame.cpp.

◆ setFrameWidth()

void GNEFrame::setFrameWidth ( int  newWidth)
inherited

set width of GNEFrame

Definition at line 126 of file GNEFrame.cpp.

References GNEFrame::myScrollWindowsContents.

◆ shapeDrawed()

◆ show()

void GNEPolygonFrame::show ( )
virtual

show Frame

Reimplemented from GNEFrame.

Definition at line 243 of file GNEPolygonFrame.cpp.

References myShapeTagSelector, GNEFrameModuls::TagSelector::refreshTagProperties(), and GNEFrame::show().

Referenced by GNEPolygonFrame::GEOPOICreator::showGEOPOICreatorModul(), and GNEViewNet::updateNetworkModeSpecificControls().

Here is the caller graph for this function:

◆ tagSelected()

◆ 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().

Here is the caller graph for this function:

Field Documentation

◆ myContentFrame

FXVerticalFrame* GNEFrame::myContentFrame = nullptr
protectedinherited

Vertical frame that holds all widgets of frame.

Definition at line 116 of file GNEFrame.h.

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

◆ myDrawingShape

GNEFrameModuls::DrawingShape* GNEPolygonFrame::myDrawingShape
private

Drawing shape.

Definition at line 156 of file GNEPolygonFrame.h.

Referenced by getDrawingShapeModul(), GNEPolygonFrame(), processClick(), shapeDrawed(), and tagSelected().

◆ 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 132 of file GNEFrame.h.

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

◆ myFrameHeaderLabel

FXLabel* GNEFrame::myFrameHeaderLabel = nullptr
privateinherited

the label for the frame's header

Definition at line 135 of file GNEFrame.h.

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

◆ myGEOPOICreator

GEOPOICreator* GNEPolygonFrame::myGEOPOICreator
private

GEOPOICreator.

Definition at line 159 of file GNEPolygonFrame.h.

Referenced by GNEPolygonFrame(), and tagSelected().

◆ myHeaderFrame

FXHorizontalFrame* GNEFrame::myHeaderFrame = nullptr
protectedinherited

fame for header elements

Definition at line 119 of file GNEFrame.h.

Referenced by GNEFrame::GNEFrame().

◆ myHeaderLeftFrame

FXHorizontalFrame* GNEFrame::myHeaderLeftFrame = nullptr
protectedinherited

◆ myHeaderRightFrame

FXHorizontalFrame* GNEFrame::myHeaderRightFrame = nullptr
protectedinherited

fame for right header elements

Definition at line 125 of file GNEFrame.h.

Referenced by GNEFrame::GNEFrame().

◆ myNeteditAttributes

GNEFrameAttributesModuls::NeteditAttributes* GNEPolygonFrame::myNeteditAttributes
private

Netedit parameter.

Definition at line 153 of file GNEPolygonFrame.h.

Referenced by GNEPolygonFrame(), processClick(), shapeDrawed(), and tagSelected().

◆ myPredefinedTagsMML

std::vector<std::string> GNEFrame::myPredefinedTagsMML
privateinherited

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

Definition at line 138 of file GNEFrame.h.

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

◆ myScrollWindowsContents

FXScrollWindow* GNEFrame::myScrollWindowsContents = nullptr
privateinherited

scroll windows that holds the content frame

Definition at line 129 of file GNEFrame.h.

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

◆ myShapeAttributes

GNEFrameAttributesModuls::AttributesCreator* GNEPolygonFrame::myShapeAttributes
private

shape internal attributes

Definition at line 150 of file GNEPolygonFrame.h.

Referenced by GNEPolygonFrame(), processClick(), shapeDrawed(), and tagSelected().

◆ myShapeTagSelector

GNEFrameModuls::TagSelector* GNEPolygonFrame::myShapeTagSelector
private

shape tag selector

Definition at line 147 of file GNEPolygonFrame.h.

Referenced by GNEPolygonFrame(), processClick(), show(), and tagSelected().

◆ myViewNet

GNEViewNet* GNEFrame::myViewNet = nullptr
protectedinherited

View Net.

Definition at line 113 of file GNEFrame.h.

Referenced by GNESelectorFrame::ACsToSelected(), GNEAdditionalFrame::addAdditional(), GNECrossingFrame::addCrossing(), GNEEdgeDataFrame::addEdgeData(), GNERouteFrame::addEdgeRoute(), GNETAZFrame::addOrRemoveTAZMember(), GNEPersonFrame::addPerson(), GNEPersonPlanFrame::addPersonPlanElement(), addPOI(), addPOILane(), addPolygon(), GNEStopFrame::addStop(), GNETAZRelDataFrame::addTAZRelationData(), GNEVehicleFrame::addVehicle(), GNEFrameAttributesModuls::AttributesEditorRow::AttributesEditorRow(), GNEAdditionalFrame::buildAdditionalOverEdge(), GNEAdditionalFrame::buildAdditionalOverLane(), GNEAdditionalFrame::buildAdditionalOverView(), GNEConnectorFrame::buildConnection(), GNETLSEditorFrame::buildInternalLanes(), GNEPersonFrame::buildPerson(), GNEProhibitionFrame::buildProhibition(), GNETLSEditorFrame::cleanup(), GNESelectorFrame::clearCurrentSelection(), GNEInspectorFrame::clearInspectedAC(), GNEEdgeRelDataFrame::createPath(), GNEPersonFrame::createPath(), GNEPersonPlanFrame::createPath(), GNERouteFrame::createPath(), GNEVehicleFrame::createPath(), GNETAZFrame::dropTAZMembers(), GNETLSEditorFrame::editJunction(), GNETLSEditorFrame::editTLS(), GNEAdditionalFrame::generateID(), GNESelectorFrame::getMatches(), GNEFrame::getViewNet(), GNEPersonTypeFrame::GNEPersonTypeFrame(), GNEVehicleTypeFrame::GNEVehicleTypeFrame(), GNETLSEditorFrame::handleChange(), GNESelectorFrame::handleIDs(), GNEConnectorFrame::handleLaneClick(), GNETLSEditorFrame::handleMultiChange(), GNEProhibitionFrame::handleProhibitionClick(), GNEInspectorFrame::hide(), GNEGenericDataFrame::hide(), GNEPersonFrame::hide(), GNEPersonPlanFrame::hide(), GNERouteFrame::hide(), GNEVehicleFrame::hide(), GNEFrame::hide(), GNEConnectorFrame::initTargets(), GNEInspectorFrame::inspectMultisection(), GNEInspectorFrame::inspectSingleElement(), GNEProhibitionFrame::onCmdCancel(), GNETLSEditorFrame::onCmdCancel(), GNETLSEditorFrame::onCmdDefCreate(), GNETLSEditorFrame::onCmdDefDelete(), GNETLSEditorFrame::onCmdDefSwitch(), GNEInspectorFrame::onCmdGoBack(), GNETLSEditorFrame::onCmdOK(), GNETLSEditorFrame::onCmdPhaseSwitch(), GNEDeleteFrame::SubordinatedElements::openWarningDialog(), GNETLSEditorFrame::parseTLSPrograms(), processClick(), GNECreateEdgeFrame::processClick(), GNEInspectorFrame::processDataSupermodeClick(), GNEInspectorFrame::processDemandSupermodeClick(), GNEInspectorFrame::processNetworkSupermodeClick(), GNEProhibitionFrame::ProhibitionLegend::ProhibitionLegend(), GNEDeleteFrame::removeAttributeCarrier(), GNEDeleteFrame::removeGeometryPoint(), GNEDeleteFrame::removeSelectedAttributeCarriers(), GNEDeleteFrame::selectedACsToDelete(), GNEInspectorFrame::selectedOverlappedElement(), shapeDrawed(), GNETAZFrame::shapeDrawed(), GNEPersonPlanFrame::show(), GNEStopFrame::show(), and GNEFrame::show().


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