![]() |
SUMO - Simulation of Urban MObility
|
#include <GNEPolygonFrame.h>


Data Structures | |
| class | ShapeAttributes |
| class | ShapeAttributeSingle |
Public Types | |
| enum | AddShapeResult { ADDSHAPE_SUCCESS, ADDSHAPE_NEWPOINT, ADDSHAPE_INVALID, ADDSHAPE_NOTHING } |
| FOX-declaration. More... | |
Public Member Functions | |
| bool | buildPoly (const PositionVector &drawedShape) |
| build Polygon using values of Fields and drawed shape return true if was sucesfully created More... | |
| void | focusUpperElement () |
| focus upper element of frame More... | |
| GNEFrame::DrawingMode * | getDrawingMode () 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... | |
| GNEFrame::GEOAttributes * | getGEOAttributes () const |
| get GEO Parameters editor More... | |
| GNEFrame::NeteditAttributes * | getNeteditAttributes () const |
| get netedit attributes editor More... | |
| GNEViewNet * | getViewNet () const |
| get view net More... | |
| GNEPolygonFrame (FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet) | |
| Constructor. More... | |
| virtual void | hide () |
| hide Frame More... | |
| AddShapeResult | processClick (const Position &clickedPosition, GNELane *lane) |
| process click over Viewnet More... | |
| void | setFrameWidth (int newWidth) |
| set width of GNEFrame More... | |
| void | show () |
| show shape frame and update use selected edges/lanes More... | |
| ~GNEPolygonFrame () | |
| Destructor. More... | |
FOX-callbacks | |
Called when the user select another shape Type | |
| long | onCmdSelectShape (FXObject *, FXSelector, void *) |
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... | |
| GNEPolygonFrame () | |
| FOX needs this. More... | |
Protected Attributes | |
| FXVerticalFrame * | myContentFrame |
| Vertical frame that holds all widgets of frame. More... | |
| GNEFrame::DrawingMode * | myDrawingMode |
| drawing mode More... | |
| GNEFrame::GEOAttributes * | myGEOAttributes |
| GEO Parameters. More... | |
| FXHorizontalFrame * | myHeaderFrame |
| fame for header elements More... | |
| FXHorizontalFrame * | myHeaderLeftFrame |
| fame for left header elements More... | |
| FXHorizontalFrame * | myHeaderRightFrame |
| fame for right header elements More... | |
| GNEFrame::NeteditAttributes * | myNeteditAttributes |
| Netedit parameter. More... | |
| GNEViewNet * | myViewNet |
| View Net for changes. More... | |
Private Member Functions | |
| void | setParametersOfShape (SumoXMLTag actualShapeType) |
| set parameters depending of the new shapeType More... | |
Private Attributes | |
| SumoXMLTag | myActualShapeType |
| actual shape type selected in the match Box More... | |
| FXGroupBox * | myGroupBoxForMyShapeMatchBox |
| groupBox for Match Box of shapes More... | |
| GNEPolygonFrame::ShapeAttributes * | myShapeAttributes |
| shape internal attributes More... | |
| FXComboBox * | myShapeMatchBox |
| combo box with the list of shape elements More... | |
The Widget for setting internal attributes of shape elements
Definition at line 48 of file GNEPolygonFrame.h.
FOX-declaration.
enum with all possible values after try to create an shape using frame
| Enumerator | |
|---|---|
| ADDSHAPE_SUCCESS | |
| ADDSHAPE_NEWPOINT | |
| ADDSHAPE_INVALID | |
| ADDSHAPE_NOTHING | |
Definition at line 55 of file GNEPolygonFrame.h.
| GNEPolygonFrame::GNEPolygonFrame | ( | FXHorizontalFrame * | horizontalFrameParent, |
| GNEViewNet * | viewNet | ||
| ) |
Constructor.
parent FXHorizontalFrame in which this GNEFrame is placed viewNet viewNet that uses this GNEFrame
Definition at line 82 of file GNEPolygonFrame.cpp.
References GNEAttributeCarrier::allowedShapeTags(), GUIDesignComboBox, GUIDesignComboBoxNCol, GUIDesignGroupBoxFrame, MID_GNE_ADDITIONALFRAME_SELECTADDITIONALTYPE, SUMO_TAG_POLY, and toString().
| GNEPolygonFrame::~GNEPolygonFrame | ( | ) |
Destructor.
Definition at line 124 of file GNEPolygonFrame.cpp.
References gSelected, and GUISelectedStorage::remove2Update().
|
inlineprotected |
FOX needs this.
Definition at line 264 of file GNEPolygonFrame.h.
References addPOI(), addPOILane(), addPolygon(), and setParametersOfShape().
|
protected |
add POI
Definition at line 331 of file GNEPolygonFrame.cpp.
References GNENet::addPOI(), GNEViewNet::getNet(), GNEViewNet::getUndoList(), GNE_ATTR_BLOCK_MOVEMENT, GNEFrame::myViewNet, GNEUndoList::p_abort(), GNEUndoList::p_begin(), GNEUndoList::p_end(), RGBColor::parseColor(), GeomConvHelper::parseShapeReporting(), GNENet::retrievePOI(), GNEPOI::setAttribute(), SUMO_ATTR_ANGLE, SUMO_ATTR_COLOR, SUMO_ATTR_HEIGHT, SUMO_ATTR_ID, SUMO_ATTR_IMGFILE, SUMO_ATTR_LAYER, SUMO_ATTR_POSITION, SUMO_ATTR_TYPE, SUMO_ATTR_WIDTH, SUMO_TAG_POI, and toString().
Referenced by GNEPolygonFrame(), and processClick().
|
protected |
add POILane
Definition at line 361 of file GNEPolygonFrame.cpp.
References GNENet::addPOI(), GNEAttributeCarrier::getID(), GNEViewNet::getNet(), GNEViewNet::getUndoList(), GNE_ATTR_BLOCK_MOVEMENT, GNEFrame::myViewNet, GNEUndoList::p_abort(), GNEUndoList::p_begin(), GNEUndoList::p_end(), RGBColor::parseColor(), GNENet::retrieveLane(), GNENet::retrievePOILane(), GNEPOILane::setAttribute(), SUMO_ATTR_ANGLE, SUMO_ATTR_COLOR, SUMO_ATTR_HEIGHT, SUMO_ATTR_ID, SUMO_ATTR_IMGFILE, SUMO_ATTR_LANE, SUMO_ATTR_LAYER, SUMO_ATTR_POSITION, SUMO_ATTR_POSITION_LAT, SUMO_ATTR_TYPE, SUMO_ATTR_WIDTH, SUMO_TAG_POILANE, and toString().
Referenced by GNEPolygonFrame(), and processClick().
|
protected |
add Polygon
Definition at line 301 of file GNEPolygonFrame.cpp.
References GNENet::addPolygon(), GNEViewNet::getNet(), GNEViewNet::getUndoList(), GNE_ATTR_BLOCK_MOVEMENT, GNE_ATTR_BLOCK_SHAPE, GNEFrame::myViewNet, GNEUndoList::p_abort(), GNEUndoList::p_begin(), GNEUndoList::p_end(), RGBColor::parseColor(), GeomConvHelper::parseShapeReporting(), GNENet::retrievePolygon(), GNEPoly::setAttribute(), SUMO_ATTR_ANGLE, SUMO_ATTR_COLOR, SUMO_ATTR_FILL, SUMO_ATTR_ID, SUMO_ATTR_IMGFILE, SUMO_ATTR_LAYER, SUMO_ATTR_SHAPE, SUMO_ATTR_TYPE, SUMO_TAG_POLY, and toString().
Referenced by buildPoly(), and GNEPolygonFrame().
| bool GNEPolygonFrame::buildPoly | ( | const PositionVector & | drawedShape | ) |
build Polygon using values of Fields and drawed shape return true if was sucesfully created
Definition at line 193 of file GNEPolygonFrame.cpp.
References addPolygon(), GNEPolygonFrame::ShapeAttributes::areValuesValid(), GNENet::generateShapeID(), GNEPolygonFrame::ShapeAttributes::getAttributesAndValues(), GNEViewNet::getNet(), GNE_ATTR_BLOCK_MOVEMENT, GNE_ATTR_BLOCK_SHAPE, GNEFrame::NeteditAttributes::isBlockMovementEnabled(), GNEFrame::NeteditAttributes::isBlockShapeEnabled(), GNEFrame::myNeteditAttributes, myShapeAttributes, GNEFrame::myViewNet, GNEPolygonFrame::ShapeAttributes::showWarningMessage(), SUMO_ATTR_GEO, SUMO_ATTR_ID, SUMO_ATTR_SHAPE, SUMO_TAG_POLY, and toString().
|
inherited |
focus upper element of frame
Definition at line 540 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderLabel.
Referenced by GNEViewNet::hotkeyFocusFrame(), GNEViewNet::onLeftBtnPress(), GNEViewNet::setEditMode(), and GNEViewNet::updateModeSpecificControls().
|
inherited |
get drawing mode editor
Definition at line 609 of file GNEFrame.cpp.
References GNEFrame::myDrawingMode.
Referenced by GNEViewNet::abortOperation(), GNEViewNet::doPaintGL(), GNEViewNet::hotkeyEnter(), GNEViewNet::onRightBtnPress(), and GNEViewNet::onRightBtnRelease().
|
inherited |
get font of the header's frame
Definition at line 583 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderFont.
|
inherited |
get the label for the frame's header
Definition at line 577 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderLabel.
Referenced by GNEInspectorFrame::inspectMultisection().
|
inherited |
get GEO Parameters editor
Definition at line 599 of file GNEFrame.cpp.
References GNEFrame::myGEOAttributes.
|
static |
get list of selecte id's in string format
Definition at line 264 of file GNEPolygonFrame.cpp.
|
inherited |
get netedit attributes editor
Definition at line 589 of file GNEFrame.cpp.
References GNEFrame::myNeteditAttributes.
Referenced by GNEFrame::DrawingMode::stopDrawing().
|
inherited |
get view net
Definition at line 571 of file GNEFrame.cpp.
References GNEFrame::myViewNet.
Referenced by GNEFrame::DrawingMode::abortDrawing(), GNECrossingFrame::edgesSelector::enableEdgeSelector(), GNEInspectorFrame::NeteditParameters::onCmdChangeAdditionalParent(), GNEInspectorFrame::AttributeInput::onCmdSetAttribute(), GNECrossingFrame::crossingParameters::onCmdSetAttribute(), GNEInspectorFrame::NeteditParameters::onCmdSetBlockingMovement(), GNEInspectorFrame::NeteditParameters::onCmdSetBlockingShape(), GNEInspectorFrame::NeteditParameters::onCmdSetClosingShape(), GNEFrame::GEOAttributes::onCmdSetGEOAttribute(), GNEFrame::GEOAttributes::onCmdUseGEOParameters(), GNEDeleteFrame::removeAttributeCarrier(), GNECrossingFrame::edgesSelector::restoreEdgeColors(), and GNEFrame::DrawingMode::stopDrawing().
|
virtualinherited |
hide Frame
Reimplemented in GNECrossingFrame, and GNESelectorFrame.
Definition at line 555 of file GNEFrame.cpp.
References GNEViewNet::getViewParent(), GNEViewParent::hideFramesArea(), and GNEFrame::myViewNet.
Referenced by GNESelectorFrame::hide(), GNECrossingFrame::hide(), GNEAdditionalFrame::AdditionalAttributes::hideAdditionalParameters(), GNEAdditionalFrame::SelectorParentLanes::hideList(), GNEAdditionalFrame::SelectorParentAdditional::hideListOfAdditionals(), GNEAdditionalFrame::AdditionalAttributeSingle::hideParameter(), GNEPolygonFrame::ShapeAttributeSingle::hideParameter(), GNEPolygonFrame::ShapeAttributes::hideShapeParameters(), GNEInspectorFrame::onCmdDeleteItem(), GNEInspectorFrame::onCmdGoBack(), GNEDeleteFrame::onCmdInspectChildItem(), and GNEDeleteFrame::removeAttributeCarrier().
| long GNEPolygonFrame::onCmdSelectShape | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Definition at line 224 of file GNEPolygonFrame.cpp.
References GNEAttributeCarrier::allowedShapeTags(), GNEFrame::DrawingMode::hideDrawingMode(), GNEFrame::NeteditAttributes::hideNeteditAttributes(), myActualShapeType, GNEFrame::myDrawingMode, GNEFrame::myNeteditAttributes, myShapeAttributes, myShapeMatchBox, setParametersOfShape(), GNEFrame::DrawingMode::showDrawingMode(), GNEFrame::NeteditAttributes::showNeteditAttributes(), SUMO_TAG_NOTHING, SUMO_TAG_POLY, and toString().
| GNEPolygonFrame::AddShapeResult GNEPolygonFrame::processClick | ( | const Position & | clickedPosition, |
| GNELane * | lane | ||
| ) |
process click over Viewnet
| [in] | clickedPosition | clicked position over ViewNet |
| [in] | lane | clicked lane |
Definition at line 130 of file GNEPolygonFrame.cpp.
References GNEFrame::DrawingMode::addNewPoint(), addPOI(), addPOILane(), ADDSHAPE_INVALID, ADDSHAPE_NEWPOINT, ADDSHAPE_NOTHING, ADDSHAPE_SUCCESS, GNEPolygonFrame::ShapeAttributes::areValuesValid(), GNENet::generateShapeID(), GNEPolygonFrame::ShapeAttributes::getAttributesAndValues(), GNEAttributeCarrier::getID(), GNEViewNet::getNet(), GNELane::getShape(), GNE_ATTR_BLOCK_MOVEMENT, GNEFrame::NeteditAttributes::isBlockMovementEnabled(), GNEFrame::DrawingMode::isDrawing(), myActualShapeType, GNEFrame::myDrawingMode, GNEFrame::myNeteditAttributes, myShapeAttributes, GNEFrame::myViewNet, PositionVector::nearest_offset_to_point2D(), GNEViewNet::setStatusBarText(), GNEPolygonFrame::ShapeAttributes::showWarningMessage(), SUMO_ATTR_ID, SUMO_ATTR_LANE, SUMO_ATTR_POSITION, SUMO_TAG_POI, SUMO_TAG_POILANE, SUMO_TAG_POLY, toString(), and WRITE_WARNING.
Referenced by GNEViewNet::onLeftBtnPress().
|
inherited |
set width of GNEFrame
Definition at line 564 of file GNEFrame.cpp.
References GNEFrame::myScrollWindowsContents.
|
private |
set parameters depending of the new shapeType
Definition at line 280 of file GNEPolygonFrame.cpp.
References GNEPolygonFrame::ShapeAttributes::addAttribute(), GNEAttributeCarrier::allowedAttributes(), GNEPolygonFrame::ShapeAttributes::clearAttributes(), GNEPolygonFrame::ShapeAttributes::getNumberOfAddedAttributes(), GNEPolygonFrame::ShapeAttributes::hideShapeParameters(), GNEAttributeCarrier::isUnique(), myActualShapeType, myShapeAttributes, and GNEPolygonFrame::ShapeAttributes::showShapeParameters().
Referenced by GNEPolygonFrame(), and onCmdSelectShape().
|
virtual |
show shape frame and update use selected edges/lanes
Reimplemented from GNEFrame.
Definition at line 257 of file GNEPolygonFrame.cpp.
References GNEFrame::show().
Referenced by GNEPolygonFrame::ShapeAttributeSingle::showParameter(), GNEPolygonFrame::ShapeAttributes::showShapeParameters(), and GNEViewNet::updateModeSpecificControls().
|
private |
actual shape type selected in the match Box
Definition at line 289 of file GNEPolygonFrame.h.
Referenced by onCmdSelectShape(), processClick(), and setParametersOfShape().
|
protectedinherited |
Vertical frame that holds all widgets of frame.
Definition at line 340 of file GNEFrame.h.
Referenced by GNEConnectorFrame::GNEConnectorFrame(), GNECrossingFrame::GNECrossingFrame(), GNEFrame::GNEFrame(), GNESelectorFrame::GNESelectorFrame(), and GNEInspectorFrame::inspectMultisection().
|
protectedinherited |
drawing mode
Definition at line 358 of file GNEFrame.h.
Referenced by GNEFrame::getDrawingMode(), onCmdSelectShape(), and processClick().
|
protectedinherited |
GEO Parameters.
Definition at line 355 of file GNEFrame.h.
Referenced by GNEFrame::getGEOAttributes(), GNEInspectorFrame::inspectMultisection(), and GNEInspectorFrame::AttributeInput::onCmdSetAttribute().
|
private |
groupBox for Match Box of shapes
Definition at line 280 of file GNEPolygonFrame.h.
|
protectedinherited |
fame for header elements
Definition at line 343 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame().
|
protectedinherited |
fame for left header elements
Definition at line 346 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame(), GNEInspectorFrame::inspectChild(), GNEInspectorFrame::inspectFromDeleteFrame(), and GNEInspectorFrame::inspectMultisection().
|
protectedinherited |
fame for right header elements
Definition at line 349 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame().
|
protectedinherited |
Netedit parameter.
Definition at line 352 of file GNEFrame.h.
Referenced by buildPoly(), GNEFrame::getNeteditAttributes(), onCmdSelectShape(), and processClick().
|
private |
shape internal attributes
Definition at line 286 of file GNEPolygonFrame.h.
Referenced by buildPoly(), onCmdSelectShape(), processClick(), and setParametersOfShape().
|
private |
combo box with the list of shape elements
Definition at line 283 of file GNEPolygonFrame.h.
Referenced by onCmdSelectShape().
|
protectedinherited |
View Net for changes.
Definition at line 337 of file GNEFrame.h.
Referenced by GNEAdditionalFrame::addAdditional(), addPOI(), addPOILane(), addPolygon(), GNETLSEditorFrame::buildIinternalLanes(), buildPoly(), GNEDeleteFrame::createPopUpMenu(), GNEInspectorFrame::createPopUpMenu(), GNETLSEditorFrame::editJunction(), GNEAdditionalFrame::generateID(), GNESelectorFrame::getMatches(), GNEFrame::getViewNet(), GNETLSEditorFrame::handleChange(), GNESelectorFrame::handleIDs(), GNEConnectorFrame::handleLaneClick(), GNETLSEditorFrame::handleMultiChange(), GNEFrame::hide(), GNEConnectorFrame::initTargets(), GNEConnectorFrame::onCmdCancel(), GNETLSEditorFrame::onCmdCancel(), GNEDeleteFrame::onCmdCenterChildItem(), GNEInspectorFrame::onCmdCenterItem(), GNESelectorFrame::onCmdClear(), GNEConnectorFrame::onCmdClearSelectedConnections(), GNEInspectorFrame::onCmdCopyTemplate(), GNECrossingFrame::onCmdCreateCrossing(), GNETLSEditorFrame::onCmdDefCreate(), GNETLSEditorFrame::onCmdDefDelete(), GNETLSEditorFrame::onCmdDefSwitch(), GNEInspectorFrame::onCmdDeleteItem(), GNEInspectorFrame::onCmdGoBack(), GNEDeleteFrame::onCmdInspectChildItem(), GNESelectorFrame::onCmdInvert(), GNESelectorFrame::onCmdLoad(), GNEConnectorFrame::onCmdOK(), GNETLSEditorFrame::onCmdOK(), GNETLSEditorFrame::onCmdPhaseSwitch(), GNEConnectorFrame::onCmdResetSelectedConnections(), GNESelectorFrame::onCmdScaleSelection(), GNEConnectorFrame::onCmdSelectConflicts(), GNEConnectorFrame::onCmdSelectDeadEnds(), GNEConnectorFrame::onCmdSelectDeadStarts(), GNEConnectorFrame::onCmdSelectPass(), processClick(), GNEAdditionalFrame::removeAdditional(), GNEDeleteFrame::removeAttributeCarrier(), and GNEFrame::show().