![]() |
Eclipse SUMO - Simulation of Urban MObility
|
#include <GNEACChooserDialog.h>
Public Member Functions | |
| int | getMessageId () const |
| GUIGlObject * | getObject () const |
| Returns the chosen (selected) object. | |
| GNEACChooserDialog (GNEViewParent *viewParent, int messageId, FXIcon *icon, const std::string &title, const std::map< std::string, GNEAttributeCarrier * > &ACs) | |
| Constructor. | |
| void | loadWindowPos () |
| void | saveWindowPos () |
| void | show () |
| sets the focus after the window is created to work-around bug in libfox | |
| ~GNEACChooserDialog () | |
| Destructor. | |
FOX-callbacks | |
| long | onKeyPress (FXObject *o, FXSelector sel, void *data) |
| keyboard functions | |
| long | onCmdCenter (FXObject *, FXSelector, void *) |
| Callback: The selected item shall be centered within the calling view. | |
| long | onCmdTrack (FXObject *, FXSelector, void *) |
| Callback: The selected vehicle shall be tracked within the calling view. | |
| long | onCmdClose (FXObject *, FXSelector, void *) |
| Callback: The dialog shall be closed. | |
| long | onChgText (FXObject *, FXSelector, void *) |
| Callback: Something has been typed into the field. | |
| long | onCmdText (FXObject *, FXSelector, void *) |
| Callback: Selects to current item if enter is pressed. | |
| long | onChgList (FXObject *, FXSelector, void *) |
| Callback: Current list item has changed. | |
| long | onChgListSel (FXObject *, FXSelector, void *) |
| Callback: Current list item selection has changed. | |
| long | onCmdFilter (FXObject *, FXSelector, void *) |
| Callback: Hides unselected items if pressed. | |
| long | onCmdFilterSubstr (FXObject *, FXSelector, void *) |
| Callback: Hides unmatched items if pressed. | |
| long | onCmdToggleSelection (FXObject *, FXSelector, void *) |
| Callback: Toggle selection status of current object / list. | |
| long | onCmdAddListSelection (FXObject *, FXSelector, void *) |
| long | onCmdClearListSelection (FXObject *, FXSelector, void *) |
| long | onCmdLocateByName (FXObject *, FXSelector, void *) |
| Callback: Toggle locator by name. | |
| long | onCmdUpdate (FXObject *, FXSelector, void *) |
| Callback: Update list. | |
Protected Member Functions | |
| void | deselect (int listIndex) override |
| unset selection (handled differently in netedit) | |
| void | filterACs (const std::vector< GUIGlID > &GLIDs) override |
| filter ACs | |
| std::string | getObjectName (GUIGlObject *o) const override |
| retrieve name for the given object (special case for TLS) | |
| void | refreshList (const std::vector< GUIGlID > &ids) |
| update the list with the given ids | |
| void | select (int listIndex) override |
| set selection (handled differently in netedit) | |
| void | toggleSelection (int listIndex) override |
| toggle selection | |
Protected Attributes | |
| int | myDefaultHeight |
| int | myDefaultWidth |
| int | myDefaultX |
| int | myDefaultY |
| int | myMinSize |
| int | myMinTitlebarHeight |
| FXWindow * | myParent |
| The window for which the position is being stored. | |
| bool | myStoreSize |
| whether window size shall be stored | |
| std::string | myWindowName |
| Name for storing in the registry. | |
Private Member Functions | |
| GNEACChooserDialog (const GNEACChooserDialog &)=delete | |
| Invalidated copy constructor. | |
| GNEACChooserDialog & | operator= (const GNEACChooserDialog &src)=delete |
| Invalidated assignment operator. | |
Private Attributes | |
| std::vector< GNEAttributeCarrier * > | myACs |
| list of displayed ACs | |
| FXCheckButton * | myCaseSensitive |
| Whether search is case sensitive. | |
| FXButton * | myCenterButton |
| The button that triggers centering on the select object. | |
| FXLabel * | myCountLabel |
| label for declaring list size | |
| std::vector< GNEAttributeCarrier * > | myFilteredACs |
| list of filtered ACs | |
| bool | myHaveFilteredSubstring |
| whether the list was filter by substring | |
| std::set< GUIGlID > | myIDs |
| myList contains (void) pointers to elements of myIDs instead of the more volatile pointers to GUIGlObject | |
| FXCheckButton * | myInstantCenter |
| Whether each change in the list should re-center the view. | |
| FXList * | myList |
| The list that holds the ids. | |
| bool | myLocateByName |
| whether to locate by object name instead of id | |
| bool | myLocateTLS |
| whether the current locator is for TLS | |
| int | myMessageId |
| the object type being chosen | |
| GUIGlObject * | mySelected |
| The chosen id. | |
| FXTextField * | myTextEntry |
| The text field. | |
| FXButton * | myTrackButton |
| The button that triggers tracking on the select vehicle. | |
| GNEViewParent * | myViewParent |
| pointer to view parent | |
| GUIGlChildWindow * | myWindowsParent |
| window parent | |
Definition at line 36 of file GNEACChooserDialog.h.
| GNEACChooserDialog::GNEACChooserDialog | ( | GNEViewParent * | viewParent, |
| int | messageId, | ||
| FXIcon * | icon, | ||
| const std::string & | title, | ||
| const std::map< std::string, GNEAttributeCarrier * > & | ACs | ||
| ) |
Constructor.
| [in] | viewParent | GNEViewParent of Netedit |
| [in] | icon | The icon to use |
| [in] | title | The title to use |
| [in] | ACs | map with choosen ACs sorted by IDs |
Definition at line 31 of file GNEACChooserDialog.cpp.
References myACs, myFilteredACs, and GUIDialog_ChooserAbstract::refreshList().
| GNEACChooserDialog::~GNEACChooserDialog | ( | ) |
Destructor.
Definition at line 55 of file GNEACChooserDialog.cpp.
References GNEViewParent::eraseACChooserDialog(), and myViewParent.
|
privatedelete |
Invalidated copy constructor.
|
overrideprotectedvirtual |
unset selection (handled differently in netedit)
Reimplemented from GUIDialog_ChooserAbstract.
Definition at line 83 of file GNEACChooserDialog.cpp.
References GNEAttributeCarrier::isAttributeCarrierSelected(), myFilteredACs, and GNEAttributeCarrier::unselectAttributeCarrier().
|
overrideprotectedvirtual |
filter ACs
Reimplemented from GUIDialog_ChooserAbstract.
Definition at line 93 of file GNEACChooserDialog.cpp.
References myACs, and myFilteredACs.
|
inlineinherited |
Definition at line 126 of file GUIDialog_ChooserAbstract.h.
References GUIDialog_ChooserAbstract::myMessageId.
Referenced by GUISUMOViewParent::eraseGLObjChooser().
|
inherited |
Returns the chosen (selected) object.
Definition at line 132 of file GUIDialog_ChooserAbstract.cpp.
References GUIDialog_ChooserAbstract::mySelected.
|
overrideprotectedvirtual |
retrieve name for the given object (special case for TLS)
Reimplemented from GUIDialog_ChooserAbstract.
Definition at line 111 of file GNEACChooserDialog.cpp.
References NBNode::getControllingTLS(), GUIGlObject::getMicrosimID(), GNEJunction::getNBNode(), GUIDialog_ChooserAbstract::getObjectName(), myLocateTLS, and TL.
|
inherited |
Definition at line 84 of file GUIPersistentWindowPos.cpp.
References MAX2(), MIN2(), GUIPersistentWindowPos::myDefaultHeight, GUIPersistentWindowPos::myDefaultWidth, GUIPersistentWindowPos::myDefaultX, GUIPersistentWindowPos::myDefaultY, GUIPersistentWindowPos::myMinSize, GUIPersistentWindowPos::myMinTitlebarHeight, GUIPersistentWindowPos::myParent, GUIPersistentWindowPos::myStoreSize, and GUIPersistentWindowPos::myWindowName.
Referenced by GUIDialog_ChooserAbstract::GUIDialog_ChooserAbstract(), GUIDialog_EditViewport::GUIDialog_EditViewport(), GUIDialog_GLChosenEditor::GUIDialog_GLChosenEditor(), GUIDialog_ViewSettings::GUIDialog_ViewSettings(), and GUIParameterTableWindow::GUIParameterTableWindow().
|
inherited |
Callback: Current list item has changed.
Definition at line 178 of file GUIDialog_ChooserAbstract.cpp.
References GUIDialog_ChooserAbstract::myInstantCenter, GUIDialog_ChooserAbstract::myList, and GUIDialog_ChooserAbstract::onCmdCenter().
Referenced by FXDEFMAP().
|
inherited |
Callback: Current list item selection has changed.
Definition at line 190 of file GUIDialog_ChooserAbstract.cpp.
References GUIDialog_ChooserAbstract::myList.
Referenced by FXDEFMAP().
|
inherited |
Callback: Something has been typed into the field.
Definition at line 196 of file GUIDialog_ChooserAbstract.cpp.
References GUIDialog_ChooserAbstract::myCaseSensitive, 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 |
Definition at line 361 of file GUIDialog_ChooserAbstract.cpp.
References FLAG, GUIIconSubSys::getIcon(), GUIGlChildWindow::getView(), GUIDialog_ChooserAbstract::myList, GUIDialog_ChooserAbstract::myWindowsParent, and GUIDialog_ChooserAbstract::select().
Referenced by FXDEFMAP().
|
inherited |
Callback: The selected item shall be centered within the calling view.
Definition at line 145 of file GUIDialog_ChooserAbstract.cpp.
References GUIGlChildWindow::getView(), GUIDialog_ChooserAbstract::myList, GUIDialog_ChooserAbstract::myWindowsParent, GUIGlChildWindow::setView(), and GUISUMOAbstractView::stopTrack().
Referenced by FXDEFMAP(), and GUIDialog_ChooserAbstract::onChgList().
|
inherited |
Definition at line 375 of file GUIDialog_ChooserAbstract.cpp.
References GUIDialog_ChooserAbstract::deselect(), GUIGlChildWindow::getView(), GUIDialog_ChooserAbstract::myList, and GUIDialog_ChooserAbstract::myWindowsParent.
Referenced by FXDEFMAP().
|
inherited |
Callback: The dialog shall be closed.
Definition at line 172 of file GUIDialog_ChooserAbstract.cpp.
Referenced by FXDEFMAP().
|
inherited |
Callback: Hides unselected items if pressed.
Definition at line 270 of file GUIDialog_ChooserAbstract.cpp.
References FLAG, GUIIconSubSys::getIcon(), GUIDialog_ChooserAbstract::myList, and GUIDialog_ChooserAbstract::refreshList().
Referenced by FXDEFMAP().
|
inherited |
Callback: Hides unmatched items if pressed.
Definition at line 286 of file GUIDialog_ChooserAbstract.cpp.
References GUIDialog_ChooserAbstract::filterACs(), GUIDialog_ChooserAbstract::myCaseSensitive, 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 388 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 239 of file GUIDialog_ChooserAbstract.cpp.
References GUIDialog_ChooserAbstract::myList, GUIDialog_ChooserAbstract::myWindowsParent, and GUIGlChildWindow::setView().
Referenced by FXDEFMAP(), and GUIDialog_ChooserAbstract::onKeyPress().
|
inherited |
Callback: Toggle selection status of current object / list.
Definition at line 343 of file GUIDialog_ChooserAbstract.cpp.
References 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 156 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: Update list.
Definition at line 414 of file GUIDialog_ChooserAbstract.cpp.
References GUIGlChildWindow::getObjectIDs(), GUIDialog_ChooserAbstract::myMessageId, GUIDialog_ChooserAbstract::myWindowsParent, and GUIDialog_ChooserAbstract::refreshList().
Referenced by FXDEFMAP().
|
inherited |
keyboard functions
Definition at line 250 of file GUIDialog_ChooserAbstract.cpp.
References GUIDialog_ChooserAbstract::myList, GUIDialog_ChooserAbstract::myTextEntry, and GUIDialog_ChooserAbstract::onCmdText().
Referenced by FXDEFMAP().
|
privatedelete |
Invalidated assignment operator.
|
protectedinherited |
update the list with the given ids
Definition at line 323 of file GUIDialog_ChooserAbstract.cpp.
References FLAG, GUIGlObject::getGlID(), GUIIconSubSys::getIcon(), GUIGlObjectStorage::getObjectBlocking(), GUIDialog_ChooserAbstract::getObjectName(), GUIGlObjectStorage::gIDStorage, GUIGlChildWindow::isSelected(), GUIDialog_ChooserAbstract::myCountLabel, GUIDialog_ChooserAbstract::myIDs, GUIDialog_ChooserAbstract::myList, GUIDialog_ChooserAbstract::myWindowsParent, TLF, toString(), and GUIGlObjectStorage::unblockObject().
Referenced by GNEACChooserDialog(), GUIDialog_ChooserAbstract::GUIDialog_ChooserAbstract(), GUIDialog_ChooserAbstract::onCmdFilter(), GUIDialog_ChooserAbstract::onCmdFilterSubstr(), GUIDialog_ChooserAbstract::onCmdLocateByName(), and GUIDialog_ChooserAbstract::onCmdUpdate().
|
inherited |
Definition at line 71 of file GUIPersistentWindowPos.cpp.
References GUIPersistentWindowPos::myParent, GUIPersistentWindowPos::myStoreSize, and GUIPersistentWindowPos::myWindowName.
Referenced by GUIDialog_ViewSettings::hide(), and GUIPersistentWindowPos::~GUIPersistentWindowPos().
|
overrideprotectedvirtual |
set selection (handled differently in netedit)
Reimplemented from GUIDialog_ChooserAbstract.
Definition at line 73 of file GNEACChooserDialog.cpp.
References GNEAttributeCarrier::isAttributeCarrierSelected(), myFilteredACs, and GNEAttributeCarrier::selectAttributeCarrier().
|
inherited |
sets the focus after the window is created to work-around bug in libfox
Definition at line 138 of file GUIDialog_ChooserAbstract.cpp.
References GUIDialog_ChooserAbstract::myTextEntry.
Referenced by GUIDialog_ChooserAbstract::GUIDialog_ChooserAbstract().
|
overrideprotectedvirtual |
toggle selection
Reimplemented from GUIDialog_ChooserAbstract.
Definition at line 61 of file GNEACChooserDialog.cpp.
References GNEAttributeCarrier::isAttributeCarrierSelected(), myFilteredACs, GNEAttributeCarrier::selectAttributeCarrier(), and GNEAttributeCarrier::unselectAttributeCarrier().
|
private |
list of displayed ACs
Definition at line 74 of file GNEACChooserDialog.h.
Referenced by filterACs(), and GNEACChooserDialog().
|
privateinherited |
Whether search is case sensitive.
Definition at line 187 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::GUIDialog_ChooserAbstract(), GUIDialog_ChooserAbstract::onChgText(), GUIDialog_ChooserAbstract::onCmdFilterSubstr(), and GUIDialog_ChooserAbstract::~GUIDialog_ChooserAbstract().
|
privateinherited |
The button that triggers centering on the select object.
Definition at line 163 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::GUIDialog_ChooserAbstract(), and GUIDialog_ChooserAbstract::onChgText().
|
privateinherited |
label for declaring list size
Definition at line 184 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::GUIDialog_ChooserAbstract(), and GUIDialog_ChooserAbstract::refreshList().
|
protectedinherited |
Definition at line 65 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos().
|
protectedinherited |
Definition at line 64 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos().
|
protectedinherited |
Definition at line 61 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos().
|
protectedinherited |
Definition at line 62 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos().
|
private |
list of filtered ACs
Definition at line 77 of file GNEACChooserDialog.h.
Referenced by deselect(), filterACs(), GNEACChooserDialog(), select(), and toggleSelection().
|
privateinherited |
whether the list was filter by substring
Definition at line 181 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 175 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::refreshList().
|
privateinherited |
Whether each change in the list should re-center the view.
Definition at line 190 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::GUIDialog_ChooserAbstract(), GUIDialog_ChooserAbstract::onChgList(), and GUIDialog_ChooserAbstract::~GUIDialog_ChooserAbstract().
|
privateinherited |
The list that holds the ids.
Definition at line 160 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::deselect(), GUIDialog_ChooserAbstract::GUIDialog_ChooserAbstract(), GUIDialog_ChooserAbstract::onChgList(), GUIDialog_ChooserAbstract::onChgListSel(), GUIDialog_ChooserAbstract::onChgText(), GUIDialog_ChooserAbstract::onCmdAddListSelection(), GUIDialog_ChooserAbstract::onCmdCenter(), GUIDialog_ChooserAbstract::onCmdClearListSelection(), GUIDialog_ChooserAbstract::onCmdFilter(), GUIDialog_ChooserAbstract::onCmdFilterSubstr(), GUIDialog_ChooserAbstract::onCmdLocateByName(), GUIDialog_ChooserAbstract::onCmdText(), GUIDialog_ChooserAbstract::onCmdToggleSelection(), GUIDialog_ChooserAbstract::onCmdTrack(), GUIDialog_ChooserAbstract::onKeyPress(), GUIDialog_ChooserAbstract::refreshList(), GUIDialog_ChooserAbstract::select(), and GUIDialog_ChooserAbstract::toggleSelection().
|
privateinherited |
whether to locate by object name instead of id
Definition at line 178 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::getObjectName(), GUIDialog_ChooserAbstract::onChgText(), and GUIDialog_ChooserAbstract::onCmdLocateByName().
|
private |
whether the current locator is for TLS
Definition at line 80 of file GNEACChooserDialog.h.
Referenced by getObjectName().
|
privateinherited |
the object type being chosen
Definition at line 157 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::getMessageId(), and GUIDialog_ChooserAbstract::onCmdUpdate().
|
protectedinherited |
Definition at line 67 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos().
|
protectedinherited |
Definition at line 68 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos().
|
protectedinherited |
The window for which the position is being stored.
Definition at line 53 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos(), and GUIPersistentWindowPos::saveWindowPos().
|
privateinherited |
The chosen id.
Definition at line 169 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::getObject().
|
protectedinherited |
whether window size shall be stored
Definition at line 59 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos(), and GUIPersistentWindowPos::saveWindowPos().
|
privateinherited |
The text field.
Definition at line 172 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::GUIDialog_ChooserAbstract(), GUIDialog_ChooserAbstract::onChgText(), GUIDialog_ChooserAbstract::onCmdFilterSubstr(), GUIDialog_ChooserAbstract::onCmdLocateByName(), GUIDialog_ChooserAbstract::onKeyPress(), and GUIDialog_ChooserAbstract::show().
|
privateinherited |
The button that triggers tracking on the select vehicle.
Definition at line 166 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::GUIDialog_ChooserAbstract(), and GUIDialog_ChooserAbstract::onChgText().
|
private |
pointer to view parent
Definition at line 71 of file GNEACChooserDialog.h.
Referenced by ~GNEACChooserDialog().
|
protectedinherited |
Name for storing in the registry.
Definition at line 56 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos(), and GUIPersistentWindowPos::saveWindowPos().
|
privateinherited |
window parent
Definition at line 154 of file GUIDialog_ChooserAbstract.h.
Referenced by GUIDialog_ChooserAbstract::GUIDialog_ChooserAbstract(), GUIDialog_ChooserAbstract::onCmdAddListSelection(), GUIDialog_ChooserAbstract::onCmdCenter(), GUIDialog_ChooserAbstract::onCmdClearListSelection(), GUIDialog_ChooserAbstract::onCmdText(), GUIDialog_ChooserAbstract::onCmdToggleSelection(), GUIDialog_ChooserAbstract::onCmdTrack(), GUIDialog_ChooserAbstract::onCmdUpdate(), GUIDialog_ChooserAbstract::refreshList(), and GUIDialog_ChooserAbstract::~GUIDialog_ChooserAbstract().