![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEDialogACChooser.h>
Public Member Functions | |
GUIGlObject * | getObject () const |
Returns the chosen (selected) object. More... | |
GNEDialogACChooser (GNEViewParent *viewParent, FXIcon *icon, const std::string &title, const std::vector< GNEAttributeCarrier * > &ACs) | |
Constructor. More... | |
void | show () |
sets the focus after the window is created to work-around bug in libfox More... | |
~GNEDialogACChooser () | |
Destructor. More... | |
FOX-callbacks | |
long | onCmdCenter (FXObject *, FXSelector, void *) |
Callback: The selected item shall be centered within the calling view. More... | |
long | onCmdTrack (FXObject *, FXSelector, void *) |
Callback: The selected vehicle shall be tracked within the calling view. More... | |
long | onCmdClose (FXObject *, FXSelector, void *) |
Callback: The dialog shall be closed. More... | |
long | onChgText (FXObject *, FXSelector, void *) |
Callback: Something has been typed into the the field. More... | |
long | onCmdText (FXObject *, FXSelector, void *) |
Callback: Selects to current item if enter is pressed. More... | |
long | onListKeyPress (FXObject *, FXSelector, void *) |
Callback: Selects to current item if enter is pressed. More... | |
long | onCmdFilter (FXObject *, FXSelector, void *) |
Callback: Hides unselected items if pressed. More... | |
long | onCmdFilterSubstr (FXObject *, FXSelector, void *) |
Callback: Hides unmatched items if pressed. More... | |
long | onCmdToggleSelection (FXObject *, FXSelector, void *) |
Callback: Toggle selection status of current object. More... | |
long | onCmdLocateByName (FXObject *, FXSelector, void *) |
Callback: Toggle locator by name. More... | |
Protected Member Functions | |
std::string | getObjectName (GUIGlObject *o) const override |
@bbrief retrieve name for the given object (special case for TLS) More... | |
void | refreshList (const std::vector< GUIGlID > &ids) |
update the list with the given ids More... | |
void | toggleSelection (int listIndex) override |
toggle selection (handled differently in NETEDIT) More... | |
Private Attributes | |
std::vector< GNEAttributeCarrier * > | myACs |
list of displayed ACs More... | |
FXButton * | myCenterButton |
The button that triggers centering on the select object. More... | |
std::set< GUIGlID > | myIDs |
myList contains (void) pointers to elements of myIDs instead of the more More... | |
FXList * | myList |
The list that holds the ids. More... | |
bool | myLocateByName |
whether to locate by object name instead of id More... | |
bool | myLocateTLS |
whether the current locator is for TLS More... | |
GUIGlChildWindow * | myParent |
The parent window. More... | |
GUIGlObject * | mySelected |
The chosen id. More... | |
FXTextField * | myTextEntry |
The text field. More... | |
FXButton * | myTrackButton |
The button that triggers tracking on the select vehicle. More... | |
GNEViewParent * | myViewParent |
Instances of this class are windows that display the list of instances from a given artifact like vehicles, edges or junctions and allow one of their items
Definition at line 49 of file GNEDialogACChooser.h.
GNEDialogACChooser::GNEDialogACChooser | ( | GNEViewParent * | viewParent, |
FXIcon * | icon, | ||
const std::string & | title, | ||
const std::vector< GNEAttributeCarrier * > & | ACs | ||
) |
Constructor.
[in] | viewParent | GNEViewParent of Netedit |
[in] | icon | The icon to use |
[in] | title | The title to use |
[in] | ACs | list of choosen ACs |
Definition at line 36 of file GNEDialogACChooser.cpp.
References GUIDialog_GLObjChooser::refreshList().
GNEDialogACChooser::~GNEDialogACChooser | ( | ) |
Destructor.
Definition at line 51 of file GNEDialogACChooser.cpp.
References GNEViewParent::eraseACChooserDialog(), and myViewParent.
|
inlineinherited |
Returns the chosen (selected) object.
Definition at line 74 of file GUIDialog_GLObjChooser.h.
References GUIDialog_GLObjChooser::mySelected.
|
overrideprotectedvirtual |
@bbrief retrieve name for the given object (special case for TLS)
Reimplemented from GUIDialog_GLObjChooser.
Definition at line 68 of file GNEDialogACChooser.cpp.
References NBNode::getControllingTLS(), Named::getID(), GUIGlObject::getMicrosimID(), GNEJunction::getNBNode(), GUIDialog_GLObjChooser::getObjectName(), and myLocateTLS.
|
inherited |
Callback: Something has been typed into the the field.
Definition at line 144 of file GUIDialog_GLObjChooser.cpp.
References GUIDialog_GLObjChooser::myCenterButton, GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myLocateByName, GUIDialog_GLObjChooser::myTextEntry, and GUIDialog_GLObjChooser::myTrackButton.
Referenced by FXDEFMAP().
|
inherited |
Callback: The selected item shall be centered within the calling view.
Definition at line 110 of file GUIDialog_GLObjChooser.cpp.
References GUIGlChildWindow::getView(), GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myParent, GUIGlChildWindow::setView(), and GUISUMOAbstractView::stopTrack().
Referenced by FXDEFMAP().
|
inherited |
Callback: The dialog shall be closed.
Definition at line 137 of file GUIDialog_GLObjChooser.cpp.
Referenced by FXDEFMAP().
|
inherited |
Callback: Hides unselected items if pressed.
Definition at line 203 of file GUIDialog_GLObjChooser.cpp.
References flag, GUIIconSubSys::getIcon(), ICON_FLAG, GUIDialog_GLObjChooser::myList, and GUIDialog_GLObjChooser::refreshList().
Referenced by FXDEFMAP().
|
inherited |
Callback: Hides unmatched items if pressed.
Definition at line 219 of file GUIDialog_GLObjChooser.cpp.
References GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myTextEntry, and GUIDialog_GLObjChooser::refreshList().
Referenced by FXDEFMAP().
|
inherited |
Callback: Toggle locator by name.
Definition at line 281 of file GUIDialog_GLObjChooser.cpp.
References GUIGlObjectStorage::getObjectBlocking(), GUIDialog_GLObjChooser::getObjectName(), GUIGlObjectStorage::gIDStorage, GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myLocateByName, GUIDialog_GLObjChooser::myTextEntry, GUIDialog_GLObjChooser::refreshList(), and GUIGlObjectStorage::unblockObject().
Referenced by FXDEFMAP().
|
inherited |
Callback: Selects to current item if enter is pressed.
Definition at line 178 of file GUIDialog_GLObjChooser.cpp.
References GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myParent, and GUIGlChildWindow::setView().
Referenced by FXDEFMAP(), and GUIDialog_GLObjChooser::onListKeyPress().
|
inherited |
Callback: Toggle selection status of current object.
Definition at line 263 of file GUIDialog_GLObjChooser.cpp.
References flag, GUIIconSubSys::getIcon(), GUIGlChildWindow::getView(), ICON_FLAG, GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myParent, and GUIDialog_GLObjChooser::toggleSelection().
Referenced by FXDEFMAP().
|
inherited |
Callback: The selected vehicle shall be tracked within the calling view.
Definition at line 121 of file GUIDialog_GLObjChooser.cpp.
References GUIGlObject::getGlID(), GUIGlObjectStorage::getObjectBlocking(), GUIGlObject::getType(), GUIGlChildWindow::getView(), GUIGlObjectStorage::gIDStorage, GLO_VEHICLE, GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myParent, GUIGlChildWindow::setView(), GUISUMOAbstractView::startTrack(), and GUIGlObjectStorage::unblockObject().
Referenced by FXDEFMAP().
|
inherited |
Callback: Selects to current item if enter is pressed.
Definition at line 189 of file GUIDialog_GLObjChooser.cpp.
References GUIDialog_GLObjChooser::onCmdText().
Referenced by FXDEFMAP().
|
protectedinherited |
update the list with the given ids
Definition at line 244 of file GUIDialog_GLObjChooser.cpp.
References GUIGlObject::getGlID(), GUIIconSubSys::getIcon(), GUIGlObjectStorage::getObjectBlocking(), GUIDialog_GLObjChooser::getObjectName(), GUIGlObjectStorage::gIDStorage, ICON_FLAG, GUIGlChildWindow::isSelected(), GUIDialog_GLObjChooser::myIDs, GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myParent, and GUIGlObjectStorage::unblockObject().
Referenced by GNEDialogACChooser(), GUIDialog_GLObjChooser::onCmdFilter(), GUIDialog_GLObjChooser::onCmdFilterSubstr(), and GUIDialog_GLObjChooser::onCmdLocateByName().
|
inherited |
sets the focus after the window is created to work-around bug in libfox
Definition at line 103 of file GUIDialog_GLObjChooser.cpp.
References GUIDialog_GLObjChooser::myTextEntry.
|
overrideprotectedvirtual |
toggle selection (handled differently in NETEDIT)
Reimplemented from GUIDialog_GLObjChooser.
Definition at line 57 of file GNEDialogACChooser.cpp.
References GNEAttributeCarrier::isAttributeCarrierSelected(), myACs, GNEAttributeCarrier::selectAttributeCarrier(), and GNEAttributeCarrier::unselectAttributeCarrier().
|
private |
list of displayed ACs
Definition at line 73 of file GNEDialogACChooser.h.
Referenced by toggleSelection().
|
privateinherited |
The button that triggers centering on the select object.
Definition at line 133 of file GUIDialog_GLObjChooser.h.
Referenced by GUIDialog_GLObjChooser::onChgText().
|
privateinherited |
myList contains (void) pointers to elements of myIDs instead of the more
Definition at line 149 of file GUIDialog_GLObjChooser.h.
Referenced by GUIDialog_GLObjChooser::refreshList().
|
privateinherited |
The list that holds the ids.
Definition at line 130 of file GUIDialog_GLObjChooser.h.
Referenced by GUIDialog_GLObjChooser::onChgText(), GUIDialog_GLObjChooser::onCmdCenter(), GUIDialog_GLObjChooser::onCmdFilter(), GUIDialog_GLObjChooser::onCmdFilterSubstr(), GUIDialog_GLObjChooser::onCmdLocateByName(), GUIDialog_GLObjChooser::onCmdText(), GUIDialog_GLObjChooser::onCmdToggleSelection(), GUIDialog_GLObjChooser::onCmdTrack(), GUIDialog_GLObjChooser::refreshList(), and GUIDialog_GLObjChooser::toggleSelection().
|
privateinherited |
whether to locate by object name instead of id
Definition at line 152 of file GUIDialog_GLObjChooser.h.
Referenced by GUIDialog_GLObjChooser::getObjectName(), GUIDialog_GLObjChooser::onChgText(), and GUIDialog_GLObjChooser::onCmdLocateByName().
|
private |
whether the current locator is for TLS
Definition at line 78 of file GNEDialogACChooser.h.
Referenced by getObjectName().
|
privateinherited |
The parent window.
Definition at line 139 of file GUIDialog_GLObjChooser.h.
Referenced by GUIDialog_GLObjChooser::onCmdCenter(), GUIDialog_GLObjChooser::onCmdText(), GUIDialog_GLObjChooser::onCmdToggleSelection(), GUIDialog_GLObjChooser::onCmdTrack(), GUIDialog_GLObjChooser::refreshList(), and GUIDialog_GLObjChooser::~GUIDialog_GLObjChooser().
|
privateinherited |
The chosen id.
Definition at line 142 of file GUIDialog_GLObjChooser.h.
Referenced by GUIDialog_GLObjChooser::getObject().
|
privateinherited |
The text field.
Definition at line 145 of file GUIDialog_GLObjChooser.h.
Referenced by GUIDialog_GLObjChooser::onChgText(), GUIDialog_GLObjChooser::onCmdFilterSubstr(), GUIDialog_GLObjChooser::onCmdLocateByName(), and GUIDialog_GLObjChooser::show().
|
privateinherited |
The button that triggers tracking on the select vehicle.
Definition at line 136 of file GUIDialog_GLObjChooser.h.
Referenced by GUIDialog_GLObjChooser::onChgText().
|
private |
Definition at line 74 of file GNEDialogACChooser.h.
Referenced by ~GNEDialogACChooser().