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


Public Types | |
| enum | SetOperation { SET_ADD = 1, SET_SUB = 2, SET_RESTRICT = 3, SET_REPLACE = 4, SET_DEFAULT = 5 } |
| FOX-declaration. More... | |
Public Member Functions | |
| 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... | |
| GNEViewNet * | getViewNet () const |
| get view net More... | |
| GNESelectorFrame (FXHorizontalFrame *horizontalFrameParent, GNEViewNet *viewNet) | |
| Constructor. More... | |
| void | handleIDs (std::vector< GUIGlID > ids, bool selectEdgesEnabled, SetOperation setop=SET_DEFAULT) |
| apply list of ids to the current selection according to SetOperation, More... | |
| void | hide () |
| hide Frame More... | |
| void | selectionUpdated () |
| called if currently registered for updates for changes of global selection More... | |
| void | setFrameWidth (int newWidth) |
| set width of GNEFrame More... | |
| void | show () |
| show Frame More... | |
| ~GNESelectorFrame () | |
| Destructor. More... | |
FOX-callbacks | |
called when user change type of selction operation | |
| long | onCmdSelectOperation (FXObject *, FXSelector, void *) |
| long | onCmdSubset (FXObject *, FXSelector, void *) |
| Called when the user change the type of element to search (netElement or Additional) More... | |
| long | onCmdLoad (FXObject *, FXSelector, void *) |
| Called when the user presses the Load-button. More... | |
| long | onCmdSave (FXObject *, FXSelector, void *) |
| Called when the user presses the Save-button. More... | |
| long | onCmdClear (FXObject *, FXSelector, void *) |
| Called when the user presses the Clear-button. More... | |
| long | onCmdInvert (FXObject *, FXSelector, void *) |
| Called when the user presses the Invert-button. More... | |
| long | onCmdSelMBTag (FXObject *, FXSelector, void *) |
| Called when the user selectes a tag in the match box. More... | |
| long | onCmdSelMBAttribute (FXObject *, FXSelector, void *) |
| Called when the user selectes a tag in the match box. More... | |
| long | onCmdSelMBString (FXObject *, FXSelector, void *) |
| Called when the user enters a new selection expression. More... | |
| long | onCmdHelp (FXObject *, FXSelector, void *) |
| Called when the user clicks the help button. More... | |
| long | onCmdScaleSelection (FXObject *, FXSelector, void *) |
| Called when the user changes visual scaling. More... | |
Protected Member Functions | |
| GNESelectorFrame () | |
| 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::vector< GUIGlID > | getMatches (SumoXMLTag ACTag, SumoXMLAttr ACAttr, char compOp, double val, const std::string &expr) |
| return objects of the given type with matching attrs More... | |
Private Attributes | |
| FXRadioButton * | myAddRadioButton |
| add radio button More... | |
| SumoXMLAttr | myCurrentAttribute |
| current SumoXMLTag Attribute More... | |
| SumoXMLTag | myCurrentTag |
| current SumoXMLTag tag More... | |
| FXRadioButton * | myKeepRadioButton |
| keep button More... | |
| FXComboBox * | myMatchAttrComboBox |
| attributes of the match box More... | |
| FXTextField * | myMatchString |
| string of the match More... | |
| FXComboBox * | myMatchTagComboBox |
| tag of the match box More... | |
| FXRadioButton * | myRemoveRadioButton |
| remove radio button More... | |
| FXRadioButton * | myReplaceRadioButton |
| replace radio button More... | |
| FXLabel * | mySelectedItems |
| label with the list of current selected elements More... | |
| FXRealSpinDial * | mySelectionScaling |
| selection scaling More... | |
| FXComboBox * | mySetComboBox |
| tag of the sets of elements More... | |
| SetOperation | mySetOperation |
| how to modify selection More... | |
The Widget for modifying selections of network-elements
Definition at line 47 of file GNESelectorFrame.h.
FOX-declaration.
operations of selector
| Enumerator | |
|---|---|
| SET_ADD | |
| SET_SUB | |
| SET_RESTRICT | |
| SET_REPLACE | |
| SET_DEFAULT | |
Definition at line 53 of file GNESelectorFrame.h.
| GNESelectorFrame::GNESelectorFrame | ( | FXHorizontalFrame * | horizontalFrameParent, |
| GNEViewNet * | viewNet | ||
| ) |
Constructor.
parent FXHorizontalFrame in which this GNEFrame is placed viewNet viewNet that uses this GNEFrame
Definition at line 80 of file GNESelectorFrame.cpp.
References GUIDesignButton, GUIDesignButtonRectangular, GUIDesignComboBox, GUIDesignComboBoxNCol, GUIDesignGroupBoxFrame, GUIDesignLabelLeft, GUIDesignRadioButton, GUIDesignSpinDial, GUIDesignTextField, GUIDesignTextFieldNCol, MID_CHOOSEN_CLEAR, MID_CHOOSEN_ELEMENTS, MID_CHOOSEN_INVERT, MID_CHOOSEN_LOAD, MID_CHOOSEN_OPERATION, MID_CHOOSEN_SAVE, MID_GME_SELMB_ATTRIBUTE, MID_GNE_SELECT_SCALE, MID_GNE_SELMB_STRING, MID_GNE_SELMB_TAG, MID_HELP, SUMO_ATTR_SPEED, and SUMO_TAG_EDGE.
| GNESelectorFrame::~GNESelectorFrame | ( | ) |
Destructor.
Definition at line 152 of file GNESelectorFrame.cpp.
References gSelected, and GUISelectedStorage::remove2Update().
|
inlineprotected |
FOX needs this.
Definition at line 140 of file GNESelectorFrame.h.
|
inherited |
focus upper element of frame
Definition at line 92 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderLabel.
Referenced by GNEViewNet::hotkeyFocusFrame(), GNEViewNet::onLeftBtnPress(), GNEViewNet::setEditMode(), and GNEViewNet::updateModeSpecificControls().
|
inherited |
get font of the header's frame
Definition at line 135 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderFont.
|
inherited |
get the label for the frame's header
Definition at line 129 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderLabel.
Referenced by GNEInspectorFrame::inspectMultisection().
|
private |
return objects of the given type with matching attrs
| [in] | ACTag | XML Tag of AttributeCarrier |
| [in] | ACAttr | XML Attribute of AttributeCarrier |
| [in] | compOp | One of {<,>,=} for matching against val or '@' for matching against expr |
Definition at line 671 of file GNESelectorFrame.cpp.
References GNEAttributeCarrier::getAttribute(), GNEAttributeCarrier::getAttributeForSelection(), GNENet::getGlIDs(), GNEViewNet::getNet(), GUIGlObjectStorage::getObjectBlocking(), GNEAttributeCarrier::getTag(), GUIGlObjectStorage::gIDStorage, GNEAttributeCarrier::isNumerical(), GNEFrame::myViewNet, toString(), and GUIGlObjectStorage::unblockObject().
Referenced by onCmdSelMBString().
|
inherited |
get view net
Definition at line 123 of file GNEFrame.cpp.
References GNEFrame::myViewNet.
Referenced by GNEPolygonFrame::DrawingMode::abortDrawing(), GNECrossingFrame::edgesSelector::enableEdgeSelector(), GNEInspectorFrame::AttributeInput::onCmdSetAttribute(), GNECrossingFrame::crossingParameters::onCmdSetAttribute(), GNEInspectorFrame::NeteditParameters::onCmdSetBlockingMovement(), GNEInspectorFrame::NeteditParameters::onCmdSetBlockingShape(), GNEInspectorFrame::NeteditParameters::onCmdSetClosingShape(), GNEDeleteFrame::removeAttributeCarrier(), GNECrossingFrame::edgesSelector::restoreEdgeColors(), and GNEPolygonFrame::DrawingMode::stopDrawing().
| void GNESelectorFrame::handleIDs | ( | std::vector< GUIGlID > | ids, |
| bool | selectEdgesEnabled, | ||
| SetOperation | setop = SET_DEFAULT |
||
| ) |
apply list of ids to the current selection according to SetOperation,
Definition at line 599 of file GNESelectorFrame.cpp.
References GNEViewNet::autoSelectNodes(), GUIGlObject::getGlID(), GNEEdge::getGNEJunctionDestiny(), GNEEdge::getGNEJunctionSource(), GNEViewNet::getNet(), GUIGlObjectStorage::getObjectBlocking(), GUISelectedStorage::getSelected(), GUIGlObject::getType(), GNEViewNet::getUndoList(), GUIGlObjectStorage::gIDStorage, GLO_LANE, gSelected, mySetOperation, GNEFrame::myViewNet, GNEUndoList::p_begin(), GNEUndoList::p_end(), SET_ADD, SET_DEFAULT, SET_REPLACE, SET_RESTRICT, SET_SUB, and GUIGlObjectStorage::unblockObject().
Referenced by onCmdLoad(), GNEConnectorFrame::onCmdSelectConflicts(), GNEConnectorFrame::onCmdSelectDeadEnds(), GNEConnectorFrame::onCmdSelectDeadStarts(), GNEConnectorFrame::onCmdSelectPass(), onCmdSelMBString(), and GNEViewNet::onLeftBtnRelease().
|
virtual |
hide Frame
Reimplemented from GNEFrame.
Definition at line 560 of file GNESelectorFrame.cpp.
References gSelected, GNEFrame::hide(), and GUISelectedStorage::remove2Update().
| long GNESelectorFrame::onCmdClear | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user presses the Clear-button.
Definition at line 311 of file GNESelectorFrame.cpp.
References GNEViewNet::getNet(), GUISelectedStorage::getSelected(), GNEViewNet::getUndoList(), gSelected, GNEFrame::myViewNet, GNEUndoList::p_begin(), and GNEUndoList::p_end().
| long GNESelectorFrame::onCmdHelp | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user clicks the help button.
Definition at line 508 of file GNESelectorFrame.cpp.
References GUIIconSubSys::getIcon(), GUIDesignButtonOK, GUIDesignDialogBox, GUIDesignLabelLeft, and ICON_ACCEPT.
| long GNESelectorFrame::onCmdInvert | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user presses the Invert-button.
Definition at line 321 of file GNESelectorFrame.cpp.
References GUIGlObject::getGlID(), GNENet::getGlIDs(), NamedObjectCont< T >::getMyMap(), GNEViewNet::getNet(), ShapeContainer::getPOIs(), ShapeContainer::getPolygons(), GUISelectedStorage::getSelected(), GNEViewNet::getUndoList(), GLO_ADDITIONAL, GLO_CONNECTION, GLO_CROSSING, GLO_EDGE, GLO_JUNCTION, GLO_LANE, gSelected, GUISelectedStorage::isSelected(), GNEShape::isShapeVisible(), GNEFrame::myViewNet, GNEUndoList::p_begin(), GNEUndoList::p_end(), and GNEViewNet::selectEdges().
| long GNESelectorFrame::onCmdLoad | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user presses the Load-button.
Definition at line 251 of file GNESelectorFrame.cpp.
References gCurrentFolder, OptionsCont::getBool(), GUIIconSubSys::getIcon(), OptionsCont::getOptions(), gSelected, handleIDs(), ICON_EMPTY, GUISelectedStorage::loadIDs(), GNEFrame::myViewNet, and WRITE_WARNING.
| long GNESelectorFrame::onCmdSave | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user presses the Save-button.
Definition at line 286 of file GNESelectorFrame.cpp.
References gCurrentFolder, OptionsCont::getBool(), MFXUtils::getFilename2Write(), GUIIconSubSys::getIcon(), OptionsCont::getOptions(), gSelected, ICON_EMPTY, GUISelectedStorage::save(), and WRITE_WARNING.
| long GNESelectorFrame::onCmdScaleSelection | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user changes visual scaling.
Definition at line 542 of file GNESelectorFrame.cpp.
References FX::FXRealSpinDial::getValue(), mySelectionScaling, GNEFrame::myViewNet, and GNEViewNet::setSelectionScaling().
| long GNESelectorFrame::onCmdSelectOperation | ( | FXObject * | obj, |
| FXSelector | , | ||
| void * | |||
| ) |
Definition at line 158 of file GNESelectorFrame.cpp.
References myAddRadioButton, myKeepRadioButton, myRemoveRadioButton, myReplaceRadioButton, mySetOperation, SET_ADD, SET_REPLACE, SET_RESTRICT, and SET_SUB.
| long GNESelectorFrame::onCmdSelMBAttribute | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user selectes a tag in the match box.
Definition at line 437 of file GNESelectorFrame.cpp.
References GNEAttributeCarrier::allowedAttributes(), myCurrentAttribute, myCurrentTag, myMatchAttrComboBox, myMatchString, SUMO_ATTR_NOTHING, and toString().
Referenced by onCmdSelMBTag().
| long GNESelectorFrame::onCmdSelMBString | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user enters a new selection expression.
Definition at line 457 of file GNESelectorFrame.cpp.
References getMatches(), handleIDs(), GNEAttributeCarrier::isNumerical(), myCurrentAttribute, myCurrentTag, and myMatchString.
| long GNESelectorFrame::onCmdSelMBTag | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user selectes a tag in the match box.
Definition at line 387 of file GNESelectorFrame.cpp.
References GNEAttributeCarrier::allowedAdditionalTags(), GNEAttributeCarrier::allowedAttributes(), GNEAttributeCarrier::allowedNetElementsTags(), GNEAttributeCarrier::allowedShapeTags(), myCurrentTag, myMatchAttrComboBox, myMatchString, myMatchTagComboBox, mySetComboBox, onCmdSelMBAttribute(), SUMO_TAG_NOTHING, and toString().
Referenced by onCmdSubset().
| long GNESelectorFrame::onCmdSubset | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user change the type of element to search (netElement or Additional)
Definition at line 194 of file GNESelectorFrame.cpp.
References GNEAttributeCarrier::allowedAdditionalTags(), GNEAttributeCarrier::allowedNetElementsTags(), GNEAttributeCarrier::allowedShapeTags(), myMatchAttrComboBox, myMatchString, myMatchTagComboBox, mySetComboBox, onCmdSelMBTag(), and toString().
|
virtual |
called if currently registered for updates for changes of global selection
Implements GUISelectedStorage::UpdateTarget.
Definition at line 569 of file GNESelectorFrame.cpp.
References OptionsCont::getOptions(), GUISelectedStorage::getSelected(), GLO_ADDITIONAL, GLO_CONNECTION, GLO_CROSSING, GLO_EDGE, GLO_JUNCTION, GLO_LANE, GLO_POI, GLO_POLYGON, gSelected, mySelectedItems, toString(), and WRITE_WARNING.
Referenced by show().
|
inherited |
set width of GNEFrame
Definition at line 116 of file GNEFrame.cpp.
References GNEFrame::myScrollWindowsContents.
|
virtual |
show Frame
Reimplemented from GNEFrame.
Definition at line 550 of file GNESelectorFrame.cpp.
References GUISelectedStorage::add2Update(), gSelected, selectionUpdated(), and GNEFrame::show().
Referenced by GNEViewNet::updateModeSpecificControls().
|
private |
add radio button
Definition at line 150 of file GNESelectorFrame.h.
Referenced by onCmdSelectOperation().
|
protectedinherited |
Vertical frame that holds all widgets of frame.
Definition at line 104 of file GNEFrame.h.
Referenced by GNECrossingFrame::GNECrossingFrame(), GNEFrame::GNEFrame(), and GNEInspectorFrame::inspectMultisection().
|
private |
current SumoXMLTag Attribute
Definition at line 180 of file GNESelectorFrame.h.
Referenced by onCmdSelMBAttribute(), and onCmdSelMBString().
|
private |
current SumoXMLTag tag
Definition at line 177 of file GNESelectorFrame.h.
Referenced by onCmdSelMBAttribute(), onCmdSelMBString(), and onCmdSelMBTag().
|
protectedinherited |
Font for the Header.
Definition at line 98 of file GNEFrame.h.
Referenced by GNEFrame::getFrameHeaderFont(), GNEFrame::GNEFrame(), and GNEFrame::~GNEFrame().
|
protectedinherited |
the label for the frame's header
Definition at line 101 of file GNEFrame.h.
Referenced by GNEFrame::focusUpperElement(), GNEFrame::getFrameHeaderLabel(), and GNEFrame::GNEFrame().
|
protectedinherited |
fame for header elements
Definition at line 107 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame().
|
protectedinherited |
fame for left header elements
Definition at line 110 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame(), GNEInspectorFrame::inspectChild(), GNEInspectorFrame::inspectFromDeleteFrame(), and GNEInspectorFrame::inspectMultisection().
|
protectedinherited |
fame for right header elements
Definition at line 113 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame().
|
private |
keep button
Definition at line 156 of file GNESelectorFrame.h.
Referenced by onCmdSelectOperation().
|
private |
attributes of the match box
Definition at line 168 of file GNESelectorFrame.h.
Referenced by onCmdSelMBAttribute(), onCmdSelMBTag(), and onCmdSubset().
|
private |
string of the match
Definition at line 171 of file GNESelectorFrame.h.
Referenced by onCmdSelMBAttribute(), onCmdSelMBString(), onCmdSelMBTag(), and onCmdSubset().
|
private |
tag of the match box
Definition at line 165 of file GNESelectorFrame.h.
Referenced by onCmdSelMBTag(), and onCmdSubset().
|
private |
remove radio button
Definition at line 153 of file GNESelectorFrame.h.
Referenced by onCmdSelectOperation().
|
private |
replace radio button
Definition at line 159 of file GNESelectorFrame.h.
Referenced by onCmdSelectOperation().
|
private |
label with the list of current selected elements
Definition at line 147 of file GNESelectorFrame.h.
Referenced by selectionUpdated().
|
private |
selection scaling
Definition at line 174 of file GNESelectorFrame.h.
Referenced by onCmdScaleSelection().
|
private |
tag of the sets of elements
Definition at line 162 of file GNESelectorFrame.h.
Referenced by onCmdSelMBTag(), and onCmdSubset().
|
private |
how to modify selection
Definition at line 144 of file GNESelectorFrame.h.
Referenced by handleIDs(), and onCmdSelectOperation().
|
protectedinherited |
the window to inform when the tls is modfied
Definition at line 95 of file GNEFrame.h.
Referenced by GNEAdditionalFrame::addAdditional(), GNEPolygonFrame::addPOI(), GNEPolygonFrame::addPolygon(), GNETLSEditorFrame::buildIinternalLanes(), GNEPolygonFrame::buildPoly(), GNEDeleteFrame::createPopUpMenu(), GNEInspectorFrame::createPopUpMenu(), GNETLSEditorFrame::editJunction(), GNEAdditionalFrame::generateID(), getMatches(), GNEFrame::getViewNet(), GNETLSEditorFrame::handleChange(), handleIDs(), GNEConnectorFrame::handleLaneClick(), GNETLSEditorFrame::handleMultiChange(), GNEFrame::hide(), GNEConnectorFrame::initTargets(), GNEConnectorFrame::onCmdCancel(), GNETLSEditorFrame::onCmdCancel(), GNEDeleteFrame::onCmdCenterChildItem(), GNEInspectorFrame::onCmdCenterItem(), onCmdClear(), GNEConnectorFrame::onCmdClearSelectedConnections(), GNEInspectorFrame::onCmdCopyTemplate(), GNECrossingFrame::onCmdCreateCrossing(), GNETLSEditorFrame::onCmdDefCreate(), GNETLSEditorFrame::onCmdDefDelete(), GNETLSEditorFrame::onCmdDefSwitch(), GNEInspectorFrame::onCmdDeleteItem(), GNEInspectorFrame::onCmdGoBack(), GNEDeleteFrame::onCmdInspectChildItem(), onCmdInvert(), onCmdLoad(), GNEConnectorFrame::onCmdOK(), GNETLSEditorFrame::onCmdOK(), GNETLSEditorFrame::onCmdPhaseSwitch(), GNEConnectorFrame::onCmdResetSelectedConnections(), onCmdScaleSelection(), GNEConnectorFrame::onCmdSelectConflicts(), GNEConnectorFrame::onCmdSelectDeadEnds(), GNEConnectorFrame::onCmdSelectDeadStarts(), GNEConnectorFrame::onCmdSelectPass(), GNEPolygonFrame::processClick(), GNEAdditionalFrame::removeAdditional(), GNEDeleteFrame::removeAttributeCarrier(), and GNEFrame::show().