![]() |
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 | |
| 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 (FXComposite *parent, GNEViewNet *viewNet) | |
| Constructor. More... | |
| void | handleIDs (std::vector< GUIGlID > ids, bool selectEdges, 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 | show () |
| show Frame More... | |
| ~GNESelectorFrame () | |
| Destructor. More... | |
FOX-callbacks | |
Called when the user change the type of element to search (netElement or Additional) | |
| long | onCmdSubset (FXObject *, FXSelector, void *) |
| 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 | 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 |
| the panel to hold all member widgets 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 tag, SumoXMLAttr attr, char compOp, SUMOReal val, const std::string &expr) |
| return objects of the given type with matching attrs More... | |
| std::string | getStats () const |
| get stats More... | |
Private Attributes | |
| const std::string | ALL_VCLASS_NAMES_MATCH_STRING |
| the string that should be matched against if attr 'allowed' or 'disalloed' are set to "all" More... | |
| FXListBox * | myMatchAttrBox |
| attributes of the match box More... | |
| FXTextField * | myMatchString |
| string of the match More... | |
| FXListBox * | myMatchTagBox |
| tag of the match box More... | |
| FXRealSpinDial * | mySelectionScaling |
| selection scaling More... | |
| FXListBox * | mySetBox |
| tag of the sets of elements More... | |
| FXuint | mySetOperation |
| how to modify selection More... | |
| FXDataTarget | mySetOperationTarget |
| target of 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 | ( | FXComposite * | parent, |
| GNEViewNet * | viewNet | ||
| ) |
Constructor.
parent FXFrame in which this GNEFrame is placed viewNet viewNet that uses this GNEFrame
Definition at line 82 of file GNESelectorFrame.cpp.
References MID_CHOOSEN_CLEAR, MID_CHOOSEN_ELEMENTS, MID_CHOOSEN_INVERT, MID_CHOOSEN_LOAD, MID_CHOOSEN_SAVE, MID_GNE_SELECT_SCALE, MID_GNE_SELMB_STRING, MID_GNE_SELMB_TAG, and MID_HELP.
| GNESelectorFrame::~GNESelectorFrame | ( | ) |
Destructor.
Definition at line 149 of file GNESelectorFrame.cpp.
References gSelected, and GUISelectedStorage::remove2Update().
|
inlineprotected |
FOX needs this.
Definition at line 124 of file GNESelectorFrame.h.
|
inherited |
get font of the header's frame
Definition at line 105 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderFont.
|
inherited |
get the label for the frame's header
Definition at line 99 of file GNEFrame.cpp.
References GNEFrame::myFrameHeaderLabel.
Referenced by GNEInspectorFrame::inspect().
|
private |
return objects of the given type with matching attrs
| [in] | compOp | One of {<,>,=} for matching against val or '@' for matching against expr |
Definition at line 492 of file GNESelectorFrame.cpp.
References ALL_VCLASS_NAMES_MATCH_STRING, GNEAttributeCarrier::getAttribute(), GNENet::getGlIDs(), GNEViewNet::getNet(), GUIGlObjectStorage::getObjectBlocking(), GNEAttributeCarrier::getTag(), GUIGlObjectStorage::gIDStorage, GNEAttributeCarrier::isNumerical(), GNEFrame::myViewNet, SUMO_ATTR_ALLOW, SUMO_ATTR_DISALLOW, SUMOReal, toString(), and GUIGlObjectStorage::unblockObject().
Referenced by onCmdSelMBString().
|
private |
get stats
Definition at line 400 of file GNESelectorFrame.cpp.
References GUISelectedStorage::getSelected(), GLO_ADDITIONAL, GLO_CONNECTION, GLO_EDGE, GLO_JUNCTION, GLO_LANE, gSelected, and toString().
Referenced by selectionUpdated().
|
inherited |
get view net
Definition at line 93 of file GNEFrame.cpp.
References GNEFrame::myViewNet.
Referenced by GNEInspectorFrame::AttrConnection::onCmdInspectConnection(), GNEInspectorFrame::AttrInput::onCmdSetAttribute(), GNEInspectorFrame::onCmdSetBlocking(), and GNEInspectorFrame::AttrConnection::onCmdSetShowConnection().
| void GNESelectorFrame::handleIDs | ( | std::vector< GUIGlID > | ids, |
| bool | selectEdges, | ||
| SetOperation | setop = SET_DEFAULT |
||
| ) |
apply list of ids to the current selection according to SetOperation,
Definition at line 418 of file GNESelectorFrame.cpp.
References GNEViewNet::autoSelectNodes(), GUIGlObject::getGlID(), GNEEdge::getGNEJunctionDest(), 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
Implements GNEFrame.
Definition at line 391 of file GNESelectorFrame.cpp.
References GNEViewNet::getViewParent(), gSelected, GNEViewParent::hideFramesArea(), GNEFrame::myViewNet, and GUISelectedStorage::remove2Update().
Referenced by GNEViewNet::updateModeSpecificControls().
| long GNESelectorFrame::onCmdClear | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user presses the Clear-button.
Definition at line 231 of file GNESelectorFrame.cpp.
References GNEViewNet::getNet(), GUISelectedStorage::getSelected(), GNEViewNet::getUndoList(), gSelected, and GNEFrame::myViewNet.
| long GNESelectorFrame::onCmdHelp | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user clicks the help button.
Definition at line 337 of file GNESelectorFrame.cpp.
| long GNESelectorFrame::onCmdInvert | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user presses the Invert-button.
Definition at line 239 of file GNESelectorFrame.cpp.
References GNENet::getGlIDs(), GNEViewNet::getNet(), GLO_ADDITIONAL, GLO_CONNECTION, GLO_EDGE, GLO_JUNCTION, GLO_LANE, gSelected, GNEFrame::myViewNet, GNEViewNet::selectEdges(), and GUISelectedStorage::toggleSelection().
| long GNESelectorFrame::onCmdLoad | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user presses the Load-button.
Definition at line 189 of file GNESelectorFrame.cpp.
References gCurrentFolder, GUIIconSubSys::getIcon(), gSelected, handleIDs(), ICON_EMPTY, GUISelectedStorage::loadIDs(), and GNEFrame::myViewNet.
| long GNESelectorFrame::onCmdSave | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user presses the Save-button.
Definition at line 215 of file GNESelectorFrame.cpp.
References gCurrentFolder, MFXUtils::getFilename2Write(), GUIIconSubSys::getIcon(), gSelected, ICON_EMPTY, and GUISelectedStorage::save().
| long GNESelectorFrame::onCmdScaleSelection | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user changes visual scaling.
Definition at line 373 of file GNESelectorFrame.cpp.
References FX::FXRealSpinDial::getValue(), mySelectionScaling, GNEFrame::myViewNet, and GNEViewNet::setSelectionScaling().
| long GNESelectorFrame::onCmdSelMBString | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user enters a new selection expression.
Definition at line 279 of file GNESelectorFrame.cpp.
References GNEAttributeCarrier::allowedAttributes(), GNEAttributeCarrier::allowedTags(), getMatches(), handleIDs(), GNEAttributeCarrier::isNumerical(), myMatchAttrBox, myMatchString, myMatchTagBox, and SUMOReal.
| long GNESelectorFrame::onCmdSelMBTag | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user selectes a tag in the match box.
Definition at line 262 of file GNESelectorFrame.cpp.
References GNEAttributeCarrier::allowedAttributes(), GNEAttributeCarrier::allowedTags(), myMatchAttrBox, myMatchTagBox, and toString().
Referenced by onCmdSubset().
| long GNESelectorFrame::onCmdSubset | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Definition at line 155 of file GNESelectorFrame.cpp.
References GNEAttributeCarrier::allowedAdditionalTags(), GNEAttributeCarrier::allowedNetElementTags(), myMatchTagBox, mySetBox, onCmdSelMBTag(), and toString().
|
virtual |
called if currently registered for updates for changes of global selection
Implements GUISelectedStorage::UpdateTarget.
Definition at line 411 of file GNESelectorFrame.cpp.
References getStats(), and GNEFrame::myFrameHeaderLabel.
Referenced by show().
|
virtual |
show Frame
Implements GNEFrame.
Definition at line 381 of file GNESelectorFrame.cpp.
References GUISelectedStorage::add2Update(), GNEViewNet::getViewParent(), gSelected, GNEFrame::myViewNet, selectionUpdated(), and GNEViewParent::showFramesArea().
Referenced by GNEViewNet::updateModeSpecificControls().
|
private |
the string that should be matched against if attr 'allowed' or 'disalloed' are set to "all"
Definition at line 157 of file GNESelectorFrame.h.
Referenced by getMatches().
|
protectedinherited |
the panel to hold all member widgets
Definition at line 94 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame().
|
protectedinherited |
Font for the Header.
Definition at line 88 of file GNEFrame.h.
Referenced by GNEFrame::getFrameHeaderFont(), GNEFrame::GNEFrame(), and GNEFrame::~GNEFrame().
|
protectedinherited |
the label for the frame's header
Definition at line 91 of file GNEFrame.h.
Referenced by GNEFrame::getFrameHeaderLabel(), GNEFrame::GNEFrame(), and selectionUpdated().
|
protectedinherited |
fame for header elements
Definition at line 97 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame().
|
protectedinherited |
fame for left header elements
Definition at line 100 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame(), and GNEInspectorFrame::inspect().
|
protectedinherited |
fame for right header elements
Definition at line 103 of file GNEFrame.h.
Referenced by GNEFrame::GNEFrame().
|
private |
attributes of the match box
Definition at line 140 of file GNESelectorFrame.h.
Referenced by onCmdSelMBString(), and onCmdSelMBTag().
|
private |
string of the match
Definition at line 143 of file GNESelectorFrame.h.
Referenced by onCmdSelMBString().
|
private |
tag of the match box
Definition at line 137 of file GNESelectorFrame.h.
Referenced by onCmdSelMBString(), onCmdSelMBTag(), and onCmdSubset().
|
private |
selection scaling
Definition at line 146 of file GNESelectorFrame.h.
Referenced by onCmdScaleSelection().
|
private |
tag of the sets of elements
Definition at line 134 of file GNESelectorFrame.h.
Referenced by onCmdSubset().
|
private |
how to modify selection
Definition at line 128 of file GNESelectorFrame.h.
Referenced by handleIDs().
|
private |
target of modify selection
Definition at line 131 of file GNESelectorFrame.h.
|
protectedinherited |
the window to inform when the tls is modfied
Definition at line 85 of file GNEFrame.h.
Referenced by GNEAdditionalFrame::addAdditional(), GNETLSEditorFrame::buildIinternalLanes(), GNETLSEditorFrame::editJunction(), GNEAdditionalFrame::generateID(), getMatches(), GNEFrame::getViewNet(), GNETLSEditorFrame::handleChange(), handleIDs(), GNEConnectorFrame::handleLaneClick(), GNETLSEditorFrame::handleMultiChange(), GNEConnectorFrame::hide(), GNETLSEditorFrame::hide(), hide(), GNEInspectorFrame::hide(), GNEAdditionalFrame::hide(), GNEConnectorFrame::initTargets(), GNEConnectorFrame::onCmdCancel(), GNETLSEditorFrame::onCmdCancel(), onCmdClear(), GNEConnectorFrame::onCmdClearSelectedConnections(), GNEInspectorFrame::onCmdCopyTemplate(), GNETLSEditorFrame::onCmdDefCreate(), GNETLSEditorFrame::onCmdDefDelete(), GNETLSEditorFrame::onCmdDefSwitch(), onCmdInvert(), onCmdLoad(), GNEConnectorFrame::onCmdOK(), GNETLSEditorFrame::onCmdOK(), GNETLSEditorFrame::onCmdPhaseSwitch(), GNEConnectorFrame::onCmdResetSelectedConnections(), onCmdScaleSelection(), GNEConnectorFrame::onCmdSelectConflicts(), GNEConnectorFrame::onCmdSelectDeadEnds(), GNEConnectorFrame::onCmdSelectDeadStarts(), GNEConnectorFrame::onCmdSelectPass(), GNEAdditionalFrame::removeAdditional(), GNEConnectorFrame::show(), GNETLSEditorFrame::show(), show(), GNEInspectorFrame::show(), and GNEAdditionalFrame::show().