Eclipse SUMO - Simulation of Urban MObility
GNEDialogACChooser Class Reference

#include <GNEDialogACChooser.h>

Inheritance diagram for GNEDialogACChooser:
[legend]
Collaboration diagram for GNEDialogACChooser:
[legend]

Public Member Functions

GUIGlObjectgetObject () 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

void filterACs (const std::vector< GUIGlID > &GLIDs) override
 filter ACs More...
 
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
 toogle selection 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::vector< GNEAttributeCarrier * > myFilteredACs
 list of filtered ACs More...
 
bool myHaveFilteredSubstring
 whether the list was filter by substring More...
 
std::set< GUIGlIDmyIDs
 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...
 
bool myLocateTLS
 whether the current locator is for TLS More...
 
GUIGlObjectmySelected
 The chosen id. More...
 
FXTextField * myTextEntry
 The text field. More...
 
FXButton * myTrackButton
 The button that triggers tracking on the select vehicle. More...
 
GNEViewParentmyViewParent
 pointer to view parent More...
 
GUIGlChildWindowmyWindowsParent
 window parent More...
 

Detailed Description

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 43 of file GNEDialogACChooser.h.

Constructor & Destructor Documentation

◆ GNEDialogACChooser()

GNEDialogACChooser::GNEDialogACChooser ( GNEViewParent viewParent,
FXIcon *  icon,
const std::string &  title,
const std::vector< GNEAttributeCarrier * > &  ACs 
)

Constructor.

Parameters
[in]viewParentGNEViewParent of Netedit
[in]iconThe icon to use
[in]titleThe title to use
[in]ACslist of choosen ACs

Definition at line 33 of file GNEDialogACChooser.cpp.

References GUIDialog_ChooserAbstract::refreshList().

◆ ~GNEDialogACChooser()

GNEDialogACChooser::~GNEDialogACChooser ( )

Destructor.

Definition at line 49 of file GNEDialogACChooser.cpp.

References GNEViewParent::eraseACChooserDialog(), and myViewParent.

Member Function Documentation

◆ filterACs()

void GNEDialogACChooser::filterACs ( const std::vector< GUIGlID > &  GLIDs)
overrideprotectedvirtual

filter ACs

Reimplemented from GUIDialog_ChooserAbstract.

Definition at line 67 of file GNEDialogACChooser.cpp.

References myACs, and myFilteredACs.

◆ getObject()

GUIGlObject * GUIDialog_ChooserAbstract::getObject ( ) const
inherited

Returns the chosen (selected) object.

Returns
The selected object

Definition at line 108 of file GUIDialog_ChooserAbstract.cpp.

References GUIDialog_ChooserAbstract::mySelected.

◆ getObjectName()

std::string GNEDialogACChooser::getObjectName ( GUIGlObject o) const
overrideprotectedvirtual

@bbrief retrieve name for the given object (special case for TLS)

Reimplemented from GUIDialog_ChooserAbstract.

Definition at line 85 of file GNEDialogACChooser.cpp.

References NBNode::getControllingTLS(), GUIGlObject::getMicrosimID(), GNEJunction::getNBNode(), GUIDialog_ChooserAbstract::getObjectName(), and myLocateTLS.

◆ onChgText()

long GUIDialog_ChooserAbstract::onChgText ( FXObject *  ,
FXSelector  ,
void *   
)
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().

Here is the caller graph for this function:

◆ onCmdCenter()

long GUIDialog_ChooserAbstract::onCmdCenter ( FXObject *  ,
FXSelector  ,
void *   
)
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().

Here is the caller graph for this function:

◆ onCmdClose()

long GUIDialog_ChooserAbstract::onCmdClose ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

Callback: The dialog shall be closed.

Definition at line 148 of file GUIDialog_ChooserAbstract.cpp.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdFilter()

long GUIDialog_ChooserAbstract::onCmdFilter ( FXObject *  ,
FXSelector  ,
void *   
)
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().

Here is the caller graph for this function:

◆ onCmdFilterSubstr()

long GUIDialog_ChooserAbstract::onCmdFilterSubstr ( FXObject *  ,
FXSelector  ,
void *   
)
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().

Here is the caller graph for this function:

◆ onCmdLocateByName()

long GUIDialog_ChooserAbstract::onCmdLocateByName ( FXObject *  ,
FXSelector  ,
void *   
)
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().

Here is the caller graph for this function:

◆ onCmdText()

long GUIDialog_ChooserAbstract::onCmdText ( FXObject *  ,
FXSelector  ,
void *   
)
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().

Here is the caller graph for this function:

◆ onCmdToggleSelection()

long GUIDialog_ChooserAbstract::onCmdToggleSelection ( FXObject *  ,
FXSelector  ,
void *   
)
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().

Here is the caller graph for this function:

◆ onCmdTrack()

long GUIDialog_ChooserAbstract::onCmdTrack ( FXObject *  ,
FXSelector  ,
void *   
)
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().

Here is the caller graph for this function:

◆ onListKeyPress()

long GUIDialog_ChooserAbstract::onListKeyPress ( FXObject *  ,
FXSelector  ,
void *  ptr 
)
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().

Here is the caller graph for this function:

◆ refreshList()

void GUIDialog_ChooserAbstract::refreshList ( const std::vector< GUIGlID > &  ids)
protectedinherited

◆ show()

void GUIDialog_ChooserAbstract::show ( )
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.

◆ toggleSelection()

void GNEDialogACChooser::toggleSelection ( int  listIndex)
overrideprotectedvirtual

Field Documentation

◆ myACs

std::vector<GNEAttributeCarrier*> GNEDialogACChooser::myACs
private

list of displayed ACs

Definition at line 74 of file GNEDialogACChooser.h.

Referenced by filterACs().

◆ myCenterButton

FXButton* GUIDialog_ChooserAbstract::myCenterButton
privateinherited

The button that triggers centering on the select object.

Definition at line 136 of file GUIDialog_ChooserAbstract.h.

Referenced by GUIDialog_ChooserAbstract::onChgText().

◆ myFilteredACs

std::vector<GNEAttributeCarrier*> GNEDialogACChooser::myFilteredACs
private

list of filtered ACs

Definition at line 77 of file GNEDialogACChooser.h.

Referenced by filterACs(), and toggleSelection().

◆ myHaveFilteredSubstring

bool GUIDialog_ChooserAbstract::myHaveFilteredSubstring
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().

◆ myIDs

std::set<GUIGlID> GUIDialog_ChooserAbstract::myIDs
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().

◆ myList

◆ myLocateByName

bool GUIDialog_ChooserAbstract::myLocateByName
privateinherited

◆ myLocateTLS

bool GNEDialogACChooser::myLocateTLS
private

whether the current locator is for TLS

Definition at line 80 of file GNEDialogACChooser.h.

Referenced by getObjectName().

◆ mySelected

GUIGlObject* GUIDialog_ChooserAbstract::mySelected
privateinherited

The chosen id.

Definition at line 142 of file GUIDialog_ChooserAbstract.h.

Referenced by GUIDialog_ChooserAbstract::getObject().

◆ myTextEntry

FXTextField* GUIDialog_ChooserAbstract::myTextEntry
privateinherited

◆ myTrackButton

FXButton* GUIDialog_ChooserAbstract::myTrackButton
privateinherited

The button that triggers tracking on the select vehicle.

Definition at line 139 of file GUIDialog_ChooserAbstract.h.

Referenced by GUIDialog_ChooserAbstract::onChgText().

◆ myViewParent

GNEViewParent* GNEDialogACChooser::myViewParent
private

pointer to view parent

Definition at line 71 of file GNEDialogACChooser.h.

Referenced by ~GNEDialogACChooser().

◆ myWindowsParent


The documentation for this class was generated from the following files: