SUMO - Simulation of Urban MObility
GNEDialogACChooser Class Reference

#include <GNEDialogACChooser.h>

Inheritance diagram for GNEDialogACChooser:
Inheritance graph
Collaboration diagram for GNEDialogACChooser:
Collaboration graph

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 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 onCmdToggleSelection (FXObject *, FXSelector, void *)
 Callback: Toggle selection status of current object. More...
 

Protected Member Functions

std::string getObjectName (GUIGlObject *o) const override
 retrieve name for the given object (special case for TLS) More...
 
 GNEDialogACChooser ()
 FOX needs this. 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...
 
bool myLocateTLS
 whether the current locator is for TLS More...
 
GNEViewParent * myViewParent
 

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

Constructor & Destructor Documentation

◆ GNEDialogACChooser() [1/2]

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

References GUIDialog_GLObjChooser::refreshList().

◆ ~GNEDialogACChooser()

GNEDialogACChooser::~GNEDialogACChooser ( )

Destructor.

Definition at line 66 of file GNEDialogACChooser.cpp.

References GNEViewParent::eraseACChooserDialog(), and myViewParent.

◆ GNEDialogACChooser() [2/2]

GNEDialogACChooser::GNEDialogACChooser ( )
inlineprotected

FOX needs this.

Definition at line 66 of file GNEDialogACChooser.h.

References getObjectName(), and toggleSelection().

Member Function Documentation

◆ getObject()

◆ getObjectName()

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

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

Reimplemented from GUIDialog_GLObjChooser.

Definition at line 83 of file GNEDialogACChooser.cpp.

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

Referenced by GNEDialogACChooser().

◆ onChgText()

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

Callback: Something has been typed into the the field.

Definition at line 116 of file GUIDialog_GLObjChooser.cpp.

References GUIDialog_GLObjChooser::myCenterButton, GUIDialog_GLObjChooser::myList, and GUIDialog_GLObjChooser::myTextEntry.

Referenced by GUIDialog_GLObjChooser::getObject().

◆ onCmdCenter()

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

Callback: The selected item shall be centered within the calling view.

Definition at line 99 of file GUIDialog_GLObjChooser.cpp.

References GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myParent, and GUIGlChildWindow::setView().

Referenced by GUIDialog_GLObjChooser::getObject().

◆ onCmdClose()

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

Callback: The dialog shall be closed.

Definition at line 109 of file GUIDialog_GLObjChooser.cpp.

Referenced by GUIDialog_GLObjChooser::getObject().

◆ onCmdFilter()

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

Callback: Hides unselected items if pressed.

Definition at line 160 of file GUIDialog_GLObjChooser.cpp.

References flag, GUIIconSubSys::getIcon(), ICON_FLAG, GUIDialog_GLObjChooser::myList, and GUIDialog_GLObjChooser::refreshList().

Referenced by GUIDialog_GLObjChooser::getObject().

◆ onCmdText()

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

Callback: Selects to current item if enter is pressed.

Definition at line 135 of file GUIDialog_GLObjChooser.cpp.

References GUIDialog_GLObjChooser::myList, GUIDialog_GLObjChooser::myParent, and GUIGlChildWindow::setView().

Referenced by GUIDialog_GLObjChooser::getObject(), and GUIDialog_GLObjChooser::onListKeyPress().

◆ onCmdToggleSelection()

long GUIDialog_GLObjChooser::onCmdToggleSelection ( 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 146 of file GUIDialog_GLObjChooser.cpp.

References GUIDialog_GLObjChooser::onCmdText().

Referenced by GUIDialog_GLObjChooser::getObject().

◆ refreshList()

◆ show()

void GUIDialog_GLObjChooser::show ( )
inherited

sets the focus after the window is created to work-around bug in libfox

Definition at line 92 of file GUIDialog_GLObjChooser.cpp.

References GUIDialog_GLObjChooser::myTextEntry.

Referenced by GUIDialog_GLObjChooser::getObject().

◆ toggleSelection()

void GNEDialogACChooser::toggleSelection ( int  listIndex)
overrideprotectedvirtual

Field Documentation

◆ myACs

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

list of displayed ACs

Definition at line 75 of file GNEDialogACChooser.h.

Referenced by toggleSelection().

◆ myLocateTLS

bool GNEDialogACChooser::myLocateTLS
private

whether the current locator is for TLS

Definition at line 80 of file GNEDialogACChooser.h.

Referenced by getObjectName().

◆ myViewParent

GNEViewParent* GNEDialogACChooser::myViewParent
private

Definition at line 76 of file GNEDialogACChooser.h.

Referenced by ~GNEDialogACChooser().


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