Eclipse SUMO - Simulation of Urban MObility
GNEDialogACChooser Class Reference

#include <GNEDialogACChooser.h>

Inheritance diagram for GNEDialogACChooser:
Collaboration diagram for GNEDialogACChooser:

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

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< GUIGlIDmyIDs
 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...
 
GUIGlChildWindowmyParent
 The parent window. 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
 

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 49 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 36 of file GNEDialogACChooser.cpp.

References GUIDialog_GLObjChooser::refreshList().

◆ ~GNEDialogACChooser()

GNEDialogACChooser::~GNEDialogACChooser ( )

Destructor.

Definition at line 51 of file GNEDialogACChooser.cpp.

References GNEViewParent::eraseACChooserDialog(), and myViewParent.

Member Function Documentation

◆ getObject()

GUIGlObject* GUIDialog_GLObjChooser::getObject ( ) const
inlineinherited

Returns the chosen (selected) object.

Returns
The selected object

Definition at line 74 of file GUIDialog_GLObjChooser.h.

References GUIDialog_GLObjChooser::mySelected.

◆ getObjectName()

std::string GNEDialogACChooser::getObjectName ( GUIGlObject o) const
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(), GUIGlObject::getMicrosimID(), GNEJunction::getNBNode(), GUIDialog_GLObjChooser::getObjectName(), and myLocateTLS.

◆ onChgText()

long GUIDialog_GLObjChooser::onChgText ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

◆ onCmdCenter()

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

◆ onCmdClose()

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

Callback: The dialog shall be closed.

Definition at line 137 of file GUIDialog_GLObjChooser.cpp.

◆ onCmdFilter()

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

◆ onCmdFilterSubstr()

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

◆ onCmdLocateByName()

◆ onCmdText()

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

◆ onCmdToggleSelection()

long GUIDialog_GLObjChooser::onCmdToggleSelection ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

◆ onCmdTrack()

long GUIDialog_GLObjChooser::onCmdTrack ( FXObject *  ,
FXSelector  ,
void *   
)
inherited

◆ onListKeyPress()

long GUIDialog_GLObjChooser::onListKeyPress ( FXObject *  ,
FXSelector  ,
void *  ptr 
)
inherited

Callback: Selects to current item if enter is pressed.

Definition at line 189 of file GUIDialog_GLObjChooser.cpp.

References GUIDialog_GLObjChooser::onCmdText().

◆ refreshList()

◆ show()

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

◆ toggleSelection()

void GNEDialogACChooser::toggleSelection ( int  listIndex)
overrideprotectedvirtual

Field Documentation

◆ myACs

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

list of displayed ACs

Definition at line 73 of file GNEDialogACChooser.h.

Referenced by toggleSelection().

◆ myCenterButton

FXButton* GUIDialog_GLObjChooser::myCenterButton
privateinherited

The button that triggers centering on the select object.

Definition at line 133 of file GUIDialog_GLObjChooser.h.

Referenced by GUIDialog_GLObjChooser::onChgText().

◆ myIDs

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

◆ myList

◆ myLocateByName

bool GUIDialog_GLObjChooser::myLocateByName
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().

◆ myLocateTLS

bool GNEDialogACChooser::myLocateTLS
private

whether the current locator is for TLS

Definition at line 78 of file GNEDialogACChooser.h.

Referenced by getObjectName().

◆ myParent

◆ mySelected

GUIGlObject* GUIDialog_GLObjChooser::mySelected
privateinherited

The chosen id.

Definition at line 142 of file GUIDialog_GLObjChooser.h.

Referenced by GUIDialog_GLObjChooser::getObject().

◆ myTextEntry

FXTextField* GUIDialog_GLObjChooser::myTextEntry
privateinherited

◆ myTrackButton

FXButton* GUIDialog_GLObjChooser::myTrackButton
privateinherited

The button that triggers tracking on the select vehicle.

Definition at line 136 of file GUIDialog_GLObjChooser.h.

Referenced by GUIDialog_GLObjChooser::onChgText().

◆ myViewParent

GNEViewParent* GNEDialogACChooser::myViewParent
private

Definition at line 74 of file GNEDialogACChooser.h.

Referenced by ~GNEDialogACChooser().


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