SUMO - Simulation of Urban MObility
GNEAdditionalFrame Class Reference

#include <GNEAdditionalFrame.h>

Inheritance diagram for GNEAdditionalFrame:
Inheritance graph
Collaboration diagram for GNEAdditionalFrame:
Collaboration graph

Data Structures

class  additionalParameters
 
class  additionalParentSelector
 
class  edgeParentsSelector
 
class  editorParameters
 
class  laneParentsSelector
 
class  singleAdditionalParameter
 FOX-declaration. More...
 
class  singleAdditionalParameterList
 

Public Member Functions

bool addAdditional (GNENetElement *netElement, GUISUMOAbstractView *parent)
 add additional element More...
 
FXFont * getFrameHeaderFont () const
 get font of the header's frame More...
 
FXLabel * getFrameHeaderLabel () const
 get the label for the frame's header More...
 
GNEViewNet * getViewNet () const
 get view net More...
 
 GNEAdditionalFrame (FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet)
 Constructor. More...
 
virtual void hide ()
 hide Frame More...
 
void removeAdditional (GNEAdditional *additional)
 remove an additional element previously added More...
 
void setFrameWidth (int width)
 set width of GNEFrame More...
 
void show ()
 show additional frame and update use selected edges/lanes More...
 
 ~GNEAdditionalFrame ()
 Destructor. More...
 
FOX-callbacks

Called when the user select another additional Type

long onCmdSelectAdditional (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

 GNEAdditionalFrame ()
 FOX needs this. More...
 

Protected Attributes

FXVerticalFrame * myContentFrame
 Vertical frame that holds all widgets of frame. More...
 
FXFont * myFrameHeaderFont
 Font for the Header. More...
 
FXLabel * myFrameHeaderLabel
 the label for the frame's header More...
 
FXHorizontalFrame * myHeaderFrame
 fame for header elements More...
 
FXHorizontalFrame * myHeaderLeftFrame
 fame for left header elements More...
 
FXHorizontalFrame * myHeaderRightFrame
 fame for right header elements More...
 
GNEViewNet * myViewNet
 the window to inform when the tls is modfied More...
 

Private Member Functions

std::string generateID (GNENetElement *netElement) const
 generate a ID for an additiona element More...
 
SUMOReal setEndPosition (SUMOReal laneLenght, SUMOReal positionOfTheMouseOverLane, SUMOReal lenghtOfAdditional)
 obtain the End position values of StoppingPlaces and E2 detector over the lane More...
 
void setParametersOfAdditional (SumoXMLTag actualAdditionalType)
 set parameters depending of the new additionalType More...
 
SUMOReal setStartPosition (SUMOReal positionOfTheMouseOverLane, SUMOReal lenghtOfAdditional)
 obtain the Start position values of StoppingPlaces and E2 detector over the lane More...
 

Private Attributes

SumoXMLTag myActualAdditionalType
 actual additional type selected in the match Box More...
 
FXComboBox * myAdditionalMatchBox
 combo box with the list of additional elements More...
 
GNEAdditionalFrame::additionalParameters * myadditionalParameters
 additional default parameters More...
 
GNEAdditionalFrame::additionalParentSelector * myAdditionalParentSelector
 list of additional Set More...
 
GNEAdditionalFrame::edgeParentsSelector * myedgeParentsSelector
 list of edgeParentsSelector More...
 
GNEAdditionalFrame::editorParameters * myEditorParameters
 editor parameter More...
 
FXGroupBox * myGroupBoxForMyAdditionalMatchBox
 groupBox for Match Box of additionals More...
 
GNEAdditionalFrame::laneParentsSelector * mylaneParentsSelector
 list of laneParentsSelector More...
 

Detailed Description

The Widget for setting default parameters of additional elements

Definition at line 49 of file GNEAdditionalFrame.h.

Constructor & Destructor Documentation

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

Constructor.

parent FXHorizontalFrame in which this GNEFrame is placed viewNet viewNet that uses this GNEFrame

Create list for edgeParentsSelector

Create list for laneParentsSelector

Definition at line 131 of file GNEAdditionalFrame.cpp.

References GNEAttributeCarrier::allowedTags(), GUIDesignComboBox, GUIDesignComboBoxNCol, GUIDesignGroupBoxFrame, MID_GNE_MODE_ADDITIONAL_ITEM, and toString().

GNEAdditionalFrame::~GNEAdditionalFrame ( )

Destructor.

Definition at line 174 of file GNEAdditionalFrame.cpp.

References gSelected, and GUISelectedStorage::remove2Update().

GNEAdditionalFrame::GNEAdditionalFrame ( )
inlineprotected

FOX needs this.

Definition at line 623 of file GNEAdditionalFrame.h.

References generateID(), setEndPosition(), setParametersOfAdditional(), setStartPosition(), and SUMOReal.

Member Function Documentation

bool GNEAdditionalFrame::addAdditional ( GNENetElement *  netElement,
GUISUMOAbstractView *  parent 
)

add additional element

Parameters
[in]netElementclicked netElement. if user dind't clicked over a GNENetElement in view, netElement will be NULL
[in]parentAbstractView to obtain the position of the mouse over the lane.
Returns
true if an additional was added, false in other case

Definition at line 179 of file GNEAdditionalFrame.cpp.

References GNEAdditionalHandler::buildAdditional(), generateID(), GNEAdditionalFrame::additionalParameters::getAttributesAndValues(), GNEAttributeCarrier::getID(), GNEAdditionalFrame::additionalParentSelector::getIdSelected(), GNEAdditionalFrame::edgeParentsSelector::getIdsSelected(), GNEAdditionalFrame::laneParentsSelector::getIdsSelected(), GNEEdge::getLanes(), GNELane::getLaneShapeLenght(), GNEAdditionalFrame::editorParameters::getLenght(), GNEViewNet::getNet(), GUISUMOAbstractView::getPositionInformation(), GNELane::getShape(), GNE_ATTR_BLOCK_MOVEMENT, GNE_ATTR_PARENT, GNEAttributeCarrier::hasAttribute(), GNEAdditionalFrame::editorParameters::isBlockEnabled(), GNEAdditionalFrame::editorParameters::isCurrentLenghtValid(), GNEAdditionalFrame::edgeParentsSelector::isUseSelectedEdgesEnable(), GNEAdditionalFrame::laneParentsSelector::isUseSelectedLanesEnable(), GNEAdditionalFrame::additionalParameters::isValuesValid(), joinToString(), myActualAdditionalType, myadditionalParameters, myAdditionalParentSelector, myedgeParentsSelector, myEditorParameters, mylaneParentsSelector, GNEFrame::myViewNet, PositionVector::nearest_offset_to_point2D(), GNENet::retrieveEdges(), GNENet::retrieveLanes(), setEndPosition(), setStartPosition(), SUMO_ATTR_CROSSING, SUMO_ATTR_EDGE, SUMO_ATTR_EDGES, SUMO_ATTR_ENDPOS, SUMO_ATTR_FILE, SUMO_ATTR_ID, SUMO_ATTR_JUNCTION, SUMO_ATTR_LANE, SUMO_ATTR_LANES, SUMO_ATTR_OUTPUT, SUMO_ATTR_POSITION, SUMO_ATTR_STARTPOS, SUMO_TAG_DET_ENTRY, SUMO_TAG_DET_EXIT, SUMO_TAG_E3DETECTOR, SUMOReal, toString(), and WRITE_WARNING.

Referenced by GNEViewNet::onLeftBtnPress().

std::string GNEAdditionalFrame::generateID ( GNENetElement *  netElement) const
private
FXFont * GNEFrame::getFrameHeaderFont ( ) const
inherited

get font of the header's frame

Definition at line 137 of file GNEFrame.cpp.

References GNEFrame::myFrameHeaderFont.

FXLabel * GNEFrame::getFrameHeaderLabel ( ) const
inherited

get the label for the frame's header

Definition at line 131 of file GNEFrame.cpp.

References GNEFrame::myFrameHeaderLabel.

Referenced by GNEInspectorFrame::inspectMultisection().

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

get list of selecte id's in string format

Definition at line 1269 of file GNEAdditionalFrame.cpp.

References text().

Referenced by GNEAdditionalFrame::edgeParentsSelector::getIdsSelected(), and GNEAdditionalFrame::laneParentsSelector::getIdsSelected().

long GNEAdditionalFrame::onCmdSelectAdditional ( FXObject *  ,
FXSelector  ,
void *   
)
void GNEAdditionalFrame::removeAdditional ( GNEAdditional *  additional)

remove an additional element previously added

Parameters
[in]additionalelement to erase

Definition at line 389 of file GNEAdditionalFrame.cpp.

References GNEAttributeCarrier::getDescription(), GNEViewNet::getUndoList(), GNEFrame::myViewNet, GNEUndoList::p_begin(), and GNEUndoList::p_end().

Referenced by GNEDeleteFrame::removeAttributeCarrier().

void GNEFrame::setFrameWidth ( int  width)
inherited

set width of GNEFrame

Definition at line 118 of file GNEFrame.cpp.

References GNEFrame::myScrollWindowsContents.

void GNEAdditionalFrame::setParametersOfAdditional ( SumoXMLTag  actualAdditionalType)
private

Field Documentation

SumoXMLTag GNEAdditionalFrame::myActualAdditionalType
private

actual additional type selected in the match Box

Definition at line 660 of file GNEAdditionalFrame.h.

Referenced by addAdditional(), generateID(), and setParametersOfAdditional().

FXComboBox* GNEAdditionalFrame::myAdditionalMatchBox
private

combo box with the list of additional elements

Definition at line 642 of file GNEAdditionalFrame.h.

Referenced by onCmdSelectAdditional().

GNEAdditionalFrame::additionalParameters* GNEAdditionalFrame::myadditionalParameters
private

additional default parameters

Definition at line 645 of file GNEAdditionalFrame.h.

Referenced by addAdditional(), and setParametersOfAdditional().

GNEAdditionalFrame::additionalParentSelector* GNEAdditionalFrame::myAdditionalParentSelector
private

list of additional Set

Definition at line 651 of file GNEAdditionalFrame.h.

Referenced by addAdditional(), and setParametersOfAdditional().

FXVerticalFrame* GNEFrame::myContentFrame
protectedinherited

Vertical frame that holds all widgets of frame.

Definition at line 101 of file GNEFrame.h.

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

GNEAdditionalFrame::edgeParentsSelector* GNEAdditionalFrame::myedgeParentsSelector
private

list of edgeParentsSelector

Definition at line 654 of file GNEAdditionalFrame.h.

Referenced by addAdditional(), setParametersOfAdditional(), and show().

GNEAdditionalFrame::editorParameters* GNEAdditionalFrame::myEditorParameters
private

editor parameter

Definition at line 648 of file GNEAdditionalFrame.h.

Referenced by addAdditional(), setEndPosition(), setParametersOfAdditional(), and setStartPosition().

FXFont* GNEFrame::myFrameHeaderFont
protectedinherited

Font for the Header.

Definition at line 95 of file GNEFrame.h.

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

FXLabel* GNEFrame::myFrameHeaderLabel
protectedinherited

the label for the frame's header

Definition at line 98 of file GNEFrame.h.

Referenced by GNEFrame::getFrameHeaderLabel(), GNEFrame::GNEFrame(), and GNESelectorFrame::selectionUpdated().

FXGroupBox* GNEAdditionalFrame::myGroupBoxForMyAdditionalMatchBox
private

groupBox for Match Box of additionals

Definition at line 639 of file GNEAdditionalFrame.h.

FXHorizontalFrame* GNEFrame::myHeaderFrame
protectedinherited

fame for header elements

Definition at line 104 of file GNEFrame.h.

Referenced by GNEFrame::GNEFrame().

FXHorizontalFrame* GNEFrame::myHeaderLeftFrame
protectedinherited
FXHorizontalFrame* GNEFrame::myHeaderRightFrame
protectedinherited

fame for right header elements

Definition at line 110 of file GNEFrame.h.

Referenced by GNEFrame::GNEFrame().

GNEAdditionalFrame::laneParentsSelector* GNEAdditionalFrame::mylaneParentsSelector
private

list of laneParentsSelector

Definition at line 657 of file GNEAdditionalFrame.h.

Referenced by addAdditional(), setParametersOfAdditional(), and show().

GNEViewNet* GNEFrame::myViewNet
protectedinherited

the window to inform when the tls is modfied

Definition at line 92 of file GNEFrame.h.

Referenced by addAdditional(), GNETLSEditorFrame::buildIinternalLanes(), GNEDeleteFrame::createPopUpMenu(), GNEInspectorFrame::createPopUpMenu(), GNETLSEditorFrame::editJunction(), generateID(), GNESelectorFrame::getMatches(), GNEFrame::getViewNet(), GNETLSEditorFrame::handleChange(), GNESelectorFrame::handleIDs(), GNEConnectorFrame::handleLaneClick(), GNETLSEditorFrame::handleMultiChange(), GNEFrame::hide(), GNEConnectorFrame::initTargets(), GNEConnectorFrame::onCmdCancel(), GNETLSEditorFrame::onCmdCancel(), GNEDeleteFrame::onCmdCenterItem(), GNEInspectorFrame::onCmdCenterItem(), GNESelectorFrame::onCmdClear(), GNEConnectorFrame::onCmdClearSelectedConnections(), GNEInspectorFrame::onCmdCopyTemplate(), GNECrossingFrame::onCmdCreateCrossing(), GNETLSEditorFrame::onCmdDefCreate(), GNETLSEditorFrame::onCmdDefDelete(), GNETLSEditorFrame::onCmdDefSwitch(), GNEInspectorFrame::onCmdDeleteItem(), GNEInspectorFrame::onCmdGoBack(), GNEDeleteFrame::onCmdInspectItem(), GNESelectorFrame::onCmdInvert(), GNESelectorFrame::onCmdLoad(), GNEConnectorFrame::onCmdOK(), GNETLSEditorFrame::onCmdOK(), GNETLSEditorFrame::onCmdPhaseSwitch(), GNEConnectorFrame::onCmdResetSelectedConnections(), GNESelectorFrame::onCmdScaleSelection(), GNEConnectorFrame::onCmdSelectConflicts(), GNEConnectorFrame::onCmdSelectDeadEnds(), GNEConnectorFrame::onCmdSelectDeadStarts(), GNEConnectorFrame::onCmdSelectPass(), removeAdditional(), GNEDeleteFrame::removeAttributeCarrier(), and GNEFrame::show().


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