![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GUIDialog_GLObjChooser.h>
Public Member Functions | |
GUIGlObject * | getObject () const |
Returns the chosen (selected) object. More... | |
GUIDialog_GLObjChooser (GUISUMOViewParent *SUMOViewParent, FXIcon *icon, const FXString &title, const std::vector< GUIGlID > &ids, GUIGlObjectStorage &glStorage) | |
Constructor. More... | |
void | show () |
sets the focus after the window is created to work-around bug in libfox More... | |
virtual | ~GUIDialog_GLObjChooser () |
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 | |
virtual void | filterACs (const std::vector< GUIGlID > &GLIDs) |
filter ACs (needed in NETEDIT) More... | |
virtual std::string | getObjectName (GUIGlObject *o) const |
@bbrief retrieve name for the given object More... | |
void | refreshList (const std::vector< GUIGlID > &ids) |
update the list with the given ids More... | |
virtual void | toggleSelection (int listIndex) |
fox need this More... | |
Private Attributes | |
FXButton * | myCenterButton |
The button that triggers centering on the select object. More... | |
bool | myHaveFilteredSubstring |
whether the list was filter by substring More... | |
std::set< GUIGlID > | myIDs |
myList contains (void) pointers to elements of myIDs instead of the more volatile pointers to GUIGlObject More... | |
FXList * | myList |
The list that holds the ids. More... | |
bool | myLocateByName |
whether to locate by object name instead of id More... | |
GUIGlObject * | mySelected |
The chosen id. More... | |
GUISUMOViewParent * | mySUMOViewParent |
SUMO-GUI View parent. More... | |
FXTextField * | myTextEntry |
The text field. More... | |
FXButton * | myTrackButton |
The button that triggers tracking on the select vehicle. More... | |
GUIGlChildWindow * | myWindowsParent |
window parent More... | |
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 47 of file GUIDialog_GLObjChooser.h.
GUIDialog_GLObjChooser::GUIDialog_GLObjChooser | ( | GUISUMOViewParent * | SUMOViewParent, |
FXIcon * | icon, | ||
const FXString & | title, | ||
const std::vector< GUIGlID > & | ids, | ||
GUIGlObjectStorage & | glStorage | ||
) |
Constructor.
[in] | SUMOViewParent | The calling view (SUMO-GUI) |
[in] | viewParent | The calling view (NETEDIT) |
[in] | icon | The icon to use |
[in] | title | The title to use |
[in] | glStorage | The storage to retrieve ids from |
Definition at line 45 of file GUIDialog_GLObjChooser.cpp.
|
virtual |
Destructor.
Definition at line 52 of file GUIDialog_GLObjChooser.cpp.
References GUISUMOViewParent::eraseGLObjChooser(), and mySUMOViewParent.
|
protectedvirtualinherited |
filter ACs (needed in NETEDIT)
Reimplemented in GNEDialogACChooser.
Definition at line 330 of file GUIDialog_ChooserAbstract.cpp.
Referenced by GUIDialog_ChooserAbstract::onCmdFilterSubstr().
|
inherited |
Returns the chosen (selected) object.
Definition at line 108 of file GUIDialog_ChooserAbstract.cpp.
References GUIDialog_ChooserAbstract::mySelected.
|
protectedvirtualinherited |
@bbrief retrieve name for the given object
Reimplemented in GNEDialogACChooser.
Definition at line 250 of file GUIDialog_ChooserAbstract.cpp.
References GUIGlObject::getMicrosimID(), GUIGlObject::getOptionalName(), and GUIDialog_ChooserAbstract::myLocateByName.
Referenced by GNEDialogACChooser::getObjectName(), GUIDialog_ChooserAbstract::onCmdLocateByName(), and GUIDialog_ChooserAbstract::refreshList().
|
inherited |
Callback: Something has been typed into the the field.
Definition at line 155 of file GUIDialog_ChooserAbstract.cpp.
References GUIDialog_ChooserAbstract::myCenterButton, GUIDialog_ChooserAbstract::myHaveFilteredSubstring, GUIDialog_ChooserAbstract::myList, GUIDialog_ChooserAbstract::myLocateByName, GUIDialog_ChooserAbstract::myTextEntry, and GUIDialog_ChooserAbstract::myTrackButton.
Referenced by FXDEFMAP(), and GUIDialog_ChooserAbstract::onCmdFilterSubstr().
|
inherited |
Callback: The selected item shall be centered within the calling view.
Definition at line 121 of file GUIDialog_ChooserAbstract.cpp.
References GUIGlChildWindow::getView(), GUIDialog_ChooserAbstract::myList, GUIDialog_ChooserAbstract::myWindowsParent, GUIGlChildWindow::setView(), and GUISUMOAbstractView::stopTrack().
Referenced by FXDEFMAP().
|
inherited |
Callback: The dialog shall be closed.
Definition at line 148 of file GUIDialog_ChooserAbstract.cpp.
Referenced by FXDEFMAP().
|
inherited |
Callback: Hides unselected items if pressed.
Definition at line 214 of file GUIDialog_ChooserAbstract.cpp.
References flag, FLAG, GUIIconSubSys::getIcon(), GUIDialog_ChooserAbstract::myList, and GUIDialog_ChooserAbstract::refreshList().
Referenced by FXDEFMAP().
|
inherited |
Callback: Hides unmatched items if pressed.
Definition at line 230 of file GUIDialog_ChooserAbstract.cpp.
References GUIDialog_ChooserAbstract::filterACs(), GUIDialog_ChooserAbstract::myHaveFilteredSubstring, GUIDialog_ChooserAbstract::myList, GUIDialog_ChooserAbstract::myTextEntry, GUIDialog_ChooserAbstract::onChgText(), and GUIDialog_ChooserAbstract::refreshList().
Referenced by FXDEFMAP().
|
inherited |
Callback: Toggle locator by name.
Definition at line 296 of file GUIDialog_ChooserAbstract.cpp.
References GUIGlObjectStorage::getObjectBlocking(), GUIDialog_ChooserAbstract::getObjectName(), GUIGlObjectStorage::gIDStorage, GUIDialog_ChooserAbstract::myList, GUIDialog_ChooserAbstract::myLocateByName, GUIDialog_ChooserAbstract::myTextEntry, GUIDialog_ChooserAbstract::refreshList(), and GUIGlObjectStorage::unblockObject().
Referenced by FXDEFMAP().
|
inherited |
Callback: Selects to current item if enter is pressed.
Definition at line 189 of file GUIDialog_ChooserAbstract.cpp.
References GUIDialog_ChooserAbstract::myList, GUIDialog_ChooserAbstract::myWindowsParent, and GUIGlChildWindow::setView().
Referenced by FXDEFMAP(), and GUIDialog_ChooserAbstract::onListKeyPress().
|
inherited |
Callback: Toggle selection status of current object.
Definition at line 278 of file GUIDialog_ChooserAbstract.cpp.
References flag, FLAG, GUIIconSubSys::getIcon(), GUIGlChildWindow::getView(), GUIDialog_ChooserAbstract::myList, GUIDialog_ChooserAbstract::myWindowsParent, and GUIDialog_ChooserAbstract::toggleSelection().
Referenced by FXDEFMAP().
|
inherited |
Callback: The selected vehicle shall be tracked within the calling view.
Definition at line 132 of file GUIDialog_ChooserAbstract.cpp.
References GUIGlObject::getGlID(), GUIGlObjectStorage::getObjectBlocking(), GUIGlObject::getType(), GUIGlChildWindow::getView(), GUIGlObjectStorage::gIDStorage, GLO_VEHICLE, GUIDialog_ChooserAbstract::myList, GUIDialog_ChooserAbstract::myWindowsParent, GUIGlChildWindow::setView(), GUISUMOAbstractView::startTrack(), and GUIGlObjectStorage::unblockObject().
Referenced by FXDEFMAP().
|
inherited |
Callback: Selects to current item if enter is pressed.
Definition at line 200 of file GUIDialog_ChooserAbstract.cpp.
References GUIDialog_ChooserAbstract::onCmdText().
Referenced by FXDEFMAP().
|
protectedinherited |
update the list with the given ids
Definition at line 259 of file GUIDialog_ChooserAbstract.cpp.
References FLAG, GUIGlObject::getGlID(), GUIIconSubSys::getIcon(), GUIGlObjectStorage::getObjectBlocking(), GUIDialog_ChooserAbstract::getObjectName(), GUIGlObjectStorage::gIDStorage, GUIGlChildWindow::isSelected(), GUIDialog_ChooserAbstract::myIDs, GUIDialog_ChooserAbstract::myList, GUIDialog_ChooserAbstract::myWindowsParent, and GUIGlObjectStorage::unblockObject().
Referenced by GNEDialogACChooser::GNEDialogACChooser(), GUIDialog_ChooserAbstract::onCmdFilter(), GUIDialog_ChooserAbstract::onCmdFilterSubstr(), and GUIDialog_ChooserAbstract::onCmdLocateByName().
|
inherited |
sets the focus after the window is created to work-around bug in libfox
Definition at line 114 of file GUIDialog_ChooserAbstract.cpp.
References GUIDialog_ChooserAbstract::myTextEntry.
|
protectedvirtualinherited |
fox need this
toggle selection (handled differently in NETEDIT)
Reimplemented in GNEDialogACChooser.
Definition at line 323 of file GUIDialog_ChooserAbstract.cpp.
References gSelected, GUIDialog_ChooserAbstract::myList, and GUISelectedStorage::toggleSelection().
Referenced by GUIDialog_ChooserAbstract::onCmdToggleSelection().
|
privateinherited |
The button that triggers centering on the select object.
Definition at line 136 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::onChgText().
|
privateinherited |
whether the list was filter by substring
Definition at line 154 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::onChgText(), and GUIDialog_ChooserAbstract::onCmdFilterSubstr().
|
privateinherited |
myList contains (void) pointers to elements of myIDs instead of the more volatile pointers to GUIGlObject
Definition at line 148 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::refreshList().
|
privateinherited |
The list that holds the ids.
Definition at line 133 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::onChgText(), GUIDialog_ChooserAbstract::onCmdCenter(), GUIDialog_ChooserAbstract::onCmdFilter(), GUIDialog_ChooserAbstract::onCmdFilterSubstr(), GUIDialog_ChooserAbstract::onCmdLocateByName(), GUIDialog_ChooserAbstract::onCmdText(), GUIDialog_ChooserAbstract::onCmdToggleSelection(), GUIDialog_ChooserAbstract::onCmdTrack(), GUIDialog_ChooserAbstract::refreshList(), and GUIDialog_ChooserAbstract::toggleSelection().
|
privateinherited |
whether to locate by object name instead of id
Definition at line 151 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::getObjectName(), GUIDialog_ChooserAbstract::onChgText(), and GUIDialog_ChooserAbstract::onCmdLocateByName().
|
privateinherited |
The chosen id.
Definition at line 142 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::getObject().
|
private |
SUMO-GUI View parent.
Definition at line 67 of file GUIDialog_GLObjChooser.h.
Referenced by ~GUIDialog_GLObjChooser().
|
privateinherited |
The text field.
Definition at line 145 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::onChgText(), GUIDialog_ChooserAbstract::onCmdFilterSubstr(), GUIDialog_ChooserAbstract::onCmdLocateByName(), and GUIDialog_ChooserAbstract::show().
|
privateinherited |
The button that triggers tracking on the select vehicle.
Definition at line 139 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::onChgText().
|
privateinherited |
window parent
Definition at line 130 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::onCmdCenter(), GUIDialog_ChooserAbstract::onCmdText(), GUIDialog_ChooserAbstract::onCmdToggleSelection(), GUIDialog_ChooserAbstract::onCmdTrack(), GUIDialog_ChooserAbstract::refreshList(), and GUIDialog_ChooserAbstract::~GUIDialog_ChooserAbstract().