Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEACChooserDialog Class Reference

#include <GNEACChooserDialog.h>

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

Public Member Functions

int getMessageId () const
GUIGlObjectgetObject () 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.
GNEACChooserDialogoperator= (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< GUIGlIDmyIDs
 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
GUIGlObjectmySelected
 The chosen id.
FXTextField * myTextEntry
 The text field.
FXButton * myTrackButton
 The button that triggers tracking on the select vehicle.
GNEViewParentmyViewParent
 pointer to view parent
GUIGlChildWindowmyWindowsParent
 window parent

Detailed Description

Definition at line 36 of file GNEACChooserDialog.h.

Constructor & Destructor Documentation

◆ GNEACChooserDialog() [1/2]

GNEACChooserDialog::GNEACChooserDialog ( GNEViewParent * viewParent,
int messageId,
FXIcon * icon,
const std::string & title,
const std::map< std::string, GNEAttributeCarrier * > & ACs )

Constructor.

Parameters
[in]viewParentGNEViewParent of Netedit
[in]iconThe icon to use
[in]titleThe title to use
[in]ACsmap with choosen ACs sorted by IDs

Definition at line 31 of file GNEACChooserDialog.cpp.

References GUIDialog_ChooserAbstract::GUIDialog_ChooserAbstract(), myACs, myFilteredACs, myLocateTLS, myViewParent, and GUIDialog_ChooserAbstract::refreshList().

Referenced by GNEACChooserDialog(), and operator=().

Here is the caller graph for this function:

◆ ~GNEACChooserDialog()

GNEACChooserDialog::~GNEACChooserDialog ( )

Destructor.

Definition at line 55 of file GNEACChooserDialog.cpp.

References myViewParent.

◆ GNEACChooserDialog() [2/2]

GNEACChooserDialog::GNEACChooserDialog ( const GNEACChooserDialog & )
privatedelete

Invalidated copy constructor.

References GNEACChooserDialog().

Member Function Documentation

◆ deselect()

void GNEACChooserDialog::deselect ( int listIndex)
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().

◆ filterACs()

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

filter ACs

Reimplemented from GUIDialog_ChooserAbstract.

Definition at line 93 of file GNEACChooserDialog.cpp.

References myACs, and myFilteredACs.

◆ getMessageId()

int GUIDialog_ChooserAbstract::getMessageId ( ) const
inlineinherited

Definition at line 126 of file GUIDialog_ChooserAbstract.h.

References myMessageId.

Referenced by GUISUMOViewParent::eraseGLObjChooser().

Here is the caller graph for this function:

◆ getObject()

GUIGlObject * GUIDialog_ChooserAbstract::getObject ( ) const
inherited

Returns the chosen (selected) object.

Returns
The selected object

Definition at line 132 of file GUIDialog_ChooserAbstract.cpp.

References mySelected.

◆ getObjectName()

std::string GNEACChooserDialog::getObjectName ( GUIGlObject * o) const
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.

◆ loadWindowPos()

void GUIPersistentWindowPos::loadWindowPos ( )
inherited

◆ onChgList()

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

Callback: Current list item has changed.

Definition at line 178 of file GUIDialog_ChooserAbstract.cpp.

References myInstantCenter, myList, and onCmdCenter().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onChgListSel()

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

Callback: Current list item selection has changed.

Definition at line 190 of file GUIDialog_ChooserAbstract.cpp.

References myList.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onChgText()

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

Callback: Something has been typed into the field.

Definition at line 196 of file GUIDialog_ChooserAbstract.cpp.

References myCaseSensitive, myCenterButton, myHaveFilteredSubstring, myList, myLocateByName, myTextEntry, and myTrackButton.

Referenced by FXDEFMAP(), and onCmdFilterSubstr().

Here is the caller graph for this function:

◆ onCmdAddListSelection()

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

Definition at line 361 of file GUIDialog_ChooserAbstract.cpp.

References FLAG, GUIIconSubSys::getIcon(), myList, myWindowsParent, and select().

Referenced by FXDEFMAP().

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 145 of file GUIDialog_ChooserAbstract.cpp.

References myList, and myWindowsParent.

Referenced by FXDEFMAP(), and onChgList().

Here is the caller graph for this function:

◆ onCmdClearListSelection()

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

Definition at line 375 of file GUIDialog_ChooserAbstract.cpp.

References deselect(), myList, and myWindowsParent.

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 172 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 270 of file GUIDialog_ChooserAbstract.cpp.

References FLAG, GUIIconSubSys::getIcon(), myList, and 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 286 of file GUIDialog_ChooserAbstract.cpp.

References filterACs(), myCaseSensitive, myHaveFilteredSubstring, myList, myTextEntry, onChgText(), and 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 388 of file GUIDialog_ChooserAbstract.cpp.

References getObjectName(), GUIGlObjectStorage::gIDStorage, myList, myLocateByName, myTextEntry, and refreshList().

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 239 of file GUIDialog_ChooserAbstract.cpp.

References myList, and myWindowsParent.

Referenced by FXDEFMAP(), and onKeyPress().

Here is the caller graph for this function:

◆ onCmdToggleSelection()

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

Callback: Toggle selection status of current object / list.

Definition at line 343 of file GUIDialog_ChooserAbstract.cpp.

References FLAG, GUIIconSubSys::getIcon(), myList, myWindowsParent, and 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 156 of file GUIDialog_ChooserAbstract.cpp.

References GUIGlObject::getGlID(), GUIGlObject::getType(), GUIGlObjectStorage::gIDStorage, GLO_VEHICLE, myList, and myWindowsParent.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdUpdate()

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

Callback: Update list.

Definition at line 414 of file GUIDialog_ChooserAbstract.cpp.

References myMessageId, myWindowsParent, and refreshList().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onKeyPress()

long GUIDialog_ChooserAbstract::onKeyPress ( FXObject * o,
FXSelector sel,
void * data )
inherited

keyboard functions

Definition at line 250 of file GUIDialog_ChooserAbstract.cpp.

References myList, myTextEntry, and onCmdText().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ operator=()

GNEACChooserDialog & GNEACChooserDialog::operator= ( const GNEACChooserDialog & src)
privatedelete

Invalidated assignment operator.

References GNEACChooserDialog().

◆ refreshList()

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

update the list with the given ids

Definition at line 323 of file GUIDialog_ChooserAbstract.cpp.

References FLAG, GUIGlObject::getGlID(), GUIIconSubSys::getIcon(), getObjectName(), GUIGlObjectStorage::gIDStorage, myCountLabel, myIDs, myList, myWindowsParent, TLF, and toString().

Referenced by GNEACChooserDialog::GNEACChooserDialog(), GUIDialog_ChooserAbstract(), onCmdFilter(), onCmdFilterSubstr(), onCmdLocateByName(), and onCmdUpdate().

Here is the caller graph for this function:

◆ saveWindowPos()

void GUIPersistentWindowPos::saveWindowPos ( )
inherited

Definition at line 71 of file GUIPersistentWindowPos.cpp.

References myParent, myStoreSize, and myWindowName.

Referenced by GUIDialog_ViewSettings::hide(), and ~GUIPersistentWindowPos().

Here is the caller graph for this function:

◆ select()

void GNEACChooserDialog::select ( int listIndex)
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().

◆ show()

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

Referenced by GUIDialog_ChooserAbstract().

Here is the caller graph for this function:

◆ toggleSelection()

void GNEACChooserDialog::toggleSelection ( int listIndex)
overrideprotectedvirtual

Field Documentation

◆ myACs

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

list of displayed ACs

Definition at line 74 of file GNEACChooserDialog.h.

Referenced by filterACs(), and GNEACChooserDialog().

◆ myCaseSensitive

FXCheckButton* GUIDialog_ChooserAbstract::myCaseSensitive
privateinherited

Whether search is case sensitive.

Definition at line 187 of file GUIDialog_ChooserAbstract.h.

Referenced by GUIDialog_ChooserAbstract(), onChgText(), onCmdFilterSubstr(), and ~GUIDialog_ChooserAbstract().

◆ myCenterButton

FXButton* GUIDialog_ChooserAbstract::myCenterButton
privateinherited

The button that triggers centering on the select object.

Definition at line 163 of file GUIDialog_ChooserAbstract.h.

Referenced by GUIDialog_ChooserAbstract(), and onChgText().

◆ myCountLabel

FXLabel* GUIDialog_ChooserAbstract::myCountLabel
privateinherited

label for declaring list size

Definition at line 184 of file GUIDialog_ChooserAbstract.h.

Referenced by GUIDialog_ChooserAbstract(), and refreshList().

◆ myDefaultHeight

int GUIPersistentWindowPos::myDefaultHeight
protectedinherited

Definition at line 65 of file GUIPersistentWindowPos.h.

Referenced by GUIPersistentWindowPos(), and loadWindowPos().

◆ myDefaultWidth

int GUIPersistentWindowPos::myDefaultWidth
protectedinherited

Definition at line 64 of file GUIPersistentWindowPos.h.

Referenced by GUIPersistentWindowPos(), and loadWindowPos().

◆ myDefaultX

int GUIPersistentWindowPos::myDefaultX
protectedinherited

Definition at line 61 of file GUIPersistentWindowPos.h.

Referenced by GUIPersistentWindowPos(), and loadWindowPos().

◆ myDefaultY

int GUIPersistentWindowPos::myDefaultY
protectedinherited

Definition at line 62 of file GUIPersistentWindowPos.h.

Referenced by GUIPersistentWindowPos(), and loadWindowPos().

◆ myFilteredACs

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

list of filtered ACs

Definition at line 77 of file GNEACChooserDialog.h.

Referenced by deselect(), filterACs(), GNEACChooserDialog(), select(), and toggleSelection().

◆ myHaveFilteredSubstring

bool GUIDialog_ChooserAbstract::myHaveFilteredSubstring
privateinherited

whether the list was filter by substring

Definition at line 181 of file GUIDialog_ChooserAbstract.h.

Referenced by GUIDialog_ChooserAbstract(), onChgText(), and 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 175 of file GUIDialog_ChooserAbstract.h.

Referenced by refreshList().

◆ myInstantCenter

FXCheckButton* GUIDialog_ChooserAbstract::myInstantCenter
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(), onChgList(), and ~GUIDialog_ChooserAbstract().

◆ myList

◆ myLocateByName

bool GUIDialog_ChooserAbstract::myLocateByName
privateinherited

whether to locate by object name instead of id

Definition at line 178 of file GUIDialog_ChooserAbstract.h.

Referenced by getObjectName(), GUIDialog_ChooserAbstract(), onChgText(), and onCmdLocateByName().

◆ myLocateTLS

bool GNEACChooserDialog::myLocateTLS
private

whether the current locator is for TLS

Definition at line 80 of file GNEACChooserDialog.h.

Referenced by getObjectName(), and GNEACChooserDialog().

◆ myMessageId

int GUIDialog_ChooserAbstract::myMessageId
privateinherited

the object type being chosen

Definition at line 157 of file GUIDialog_ChooserAbstract.h.

Referenced by getMessageId(), GUIDialog_ChooserAbstract(), and onCmdUpdate().

◆ myMinSize

int GUIPersistentWindowPos::myMinSize
protectedinherited

Definition at line 67 of file GUIPersistentWindowPos.h.

Referenced by GUIPersistentWindowPos(), and loadWindowPos().

◆ myMinTitlebarHeight

int GUIPersistentWindowPos::myMinTitlebarHeight
protectedinherited

Definition at line 68 of file GUIPersistentWindowPos.h.

Referenced by GUIPersistentWindowPos(), and loadWindowPos().

◆ myParent

FXWindow* GUIPersistentWindowPos::myParent
protectedinherited

The window for which the position is being stored.

Definition at line 53 of file GUIPersistentWindowPos.h.

Referenced by GUIPersistentWindowPos(), GUIPersistentWindowPos(), loadWindowPos(), and saveWindowPos().

◆ mySelected

GUIGlObject* GUIDialog_ChooserAbstract::mySelected
privateinherited

The chosen id.

Definition at line 169 of file GUIDialog_ChooserAbstract.h.

Referenced by getObject().

◆ myStoreSize

bool GUIPersistentWindowPos::myStoreSize
protectedinherited

whether window size shall be stored

Definition at line 59 of file GUIPersistentWindowPos.h.

Referenced by GUIPersistentWindowPos(), loadWindowPos(), and saveWindowPos().

◆ myTextEntry

FXTextField* GUIDialog_ChooserAbstract::myTextEntry
privateinherited

◆ myTrackButton

FXButton* GUIDialog_ChooserAbstract::myTrackButton
privateinherited

The button that triggers tracking on the select vehicle.

Definition at line 166 of file GUIDialog_ChooserAbstract.h.

Referenced by GUIDialog_ChooserAbstract(), and onChgText().

◆ myViewParent

GNEViewParent* GNEACChooserDialog::myViewParent
private

pointer to view parent

Definition at line 71 of file GNEACChooserDialog.h.

Referenced by GNEACChooserDialog(), and ~GNEACChooserDialog().

◆ myWindowName

std::string GUIPersistentWindowPos::myWindowName
protectedinherited

Name for storing in the registry.

Definition at line 56 of file GUIPersistentWindowPos.h.

Referenced by GUIPersistentWindowPos(), loadWindowPos(), and saveWindowPos().

◆ myWindowsParent


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