SUMO - Simulation of Urban MObility
|
#include <GUIDialog_GLObjChooser.h>
Public Member Functions | |
GUIGlObject * | getObject () const |
Returns the chosen (selected) object. | |
GUIDialog_GLObjChooser (GUIGlChildWindow *parent, FXIcon *icon, const FXString &title, GUIGlObjectType type, const std::vector< GUIGlID > &ids, GUIGlObjectStorage &glStorage) | |
Constructor. | |
void | show () |
sets the focus after the window is created to work-around bug in libfox | |
~GUIDialog_GLObjChooser () | |
Destructor. | |
FOX-callbacks | |
long | onCmdCenter (FXObject *, FXSelector, void *) |
Callback: The selected item shall be centered 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 the field. | |
long | onCmdText (FXObject *, FXSelector, void *) |
Callback: Selects to current item if enter is pressed. | |
long | onListKeyPress (FXObject *, FXSelector, void *) |
Callback: Selects to current item if enter is pressed. | |
long | onCmdFilter (FXObject *, FXSelector, void *) |
Callback: Hides unselected items if pressed. |
Protected Member Functions | |
GUIDialog_GLObjChooser () | |
FOX needs this. |
Private Attributes | |
FXButton * | myCenterButton |
The button that triggers centering on the select object. | |
std::set< GUIGlID > | myIDs |
myList contains (void) pointers to elements of myIDs instead of the more | |
FXList * | myList |
The list that holds the ids. | |
GUIGlObjectType | myObjectType |
The artifact to choose. | |
GUIGlChildWindow * | myParent |
The parent window. | |
GUIGlObject * | mySelected |
The chosen id. | |
FXTextField * | myTextEntry |
The text field. |
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 59 of file GUIDialog_GLObjChooser.h.
GUIDialog_GLObjChooser::GUIDialog_GLObjChooser | ( | GUIGlChildWindow * | parent, |
FXIcon * | icon, | ||
const FXString & | title, | ||
GUIGlObjectType | type, | ||
const std::vector< GUIGlID > & | ids, | ||
GUIGlObjectStorage & | glStorage | ||
) |
Constructor.
[in] | parent | The calling view |
[in] | icon | The icon to use |
[in] | title | The title to use |
[in] | type | The type of gl-objects to show instances of |
[in] | glStorage | The storage to retrieve ids from |
Definition at line 69 of file GUIDialog_GLObjChooser.cpp.
References GUIGlObject::getGlID(), GUIIconSubSys::getIcon(), GUIGlObject::getMicrosimID(), ICON_FLAG, ICON_NO, ICON_RECENTERVIEW, MID_CANCEL, MID_CHOOSER_CENTER, MID_CHOOSER_FILTER, MID_CHOOSER_LIST, and MID_CHOOSER_TEXT.
GUIDialog_GLObjChooser::~GUIDialog_GLObjChooser | ( | ) |
Destructor.
Definition at line 115 of file GUIDialog_GLObjChooser.cpp.
References GUIGlChildWindow::getParent(), myParent, and GUIMainWindow::removeChild().
|
inlineprotected |
FOX needs this.
Definition at line 141 of file GUIDialog_GLObjChooser.h.
|
inline |
Returns the chosen (selected) object.
Definition at line 84 of file GUIDialog_GLObjChooser.h.
References mySelected.
Callback: Something has been typed into the the field.
Definition at line 145 of file GUIDialog_GLObjChooser.cpp.
References myCenterButton, myList, and myTextEntry.
Callback: The selected item shall be centered within the calling view.
Definition at line 128 of file GUIDialog_GLObjChooser.cpp.
References myList, myParent, and GUIGlChildWindow::setView().
Callback: The dialog shall be closed.
Definition at line 138 of file GUIDialog_GLObjChooser.cpp.
Callback: Hides unselected items if pressed.
Definition at line 189 of file GUIDialog_GLObjChooser.cpp.
References flag, GUIIconSubSys::getIcon(), ICON_FLAG, myIDs, and myList.
Callback: Selects to current item if enter is pressed.
Definition at line 164 of file GUIDialog_GLObjChooser.cpp.
References myList, myParent, and GUIGlChildWindow::setView().
Referenced by onListKeyPress().
Callback: Selects to current item if enter is pressed.
Definition at line 175 of file GUIDialog_GLObjChooser.cpp.
References onCmdText().
void GUIDialog_GLObjChooser::show | ( | ) |
sets the focus after the window is created to work-around bug in libfox
Definition at line 121 of file GUIDialog_GLObjChooser.cpp.
References myTextEntry.
Referenced by GUISUMOViewParent::onCmdLocate().
|
private |
The button that triggers centering on the select object.
Definition at line 120 of file GUIDialog_GLObjChooser.h.
Referenced by onChgText().
|
private |
myList contains (void) pointers to elements of myIDs instead of the more
Definition at line 136 of file GUIDialog_GLObjChooser.h.
Referenced by onCmdFilter().
|
private |
The list that holds the ids.
Definition at line 117 of file GUIDialog_GLObjChooser.h.
Referenced by onChgText(), onCmdCenter(), onCmdFilter(), and onCmdText().
|
private |
The artifact to choose.
Definition at line 123 of file GUIDialog_GLObjChooser.h.
|
private |
The parent window.
Definition at line 126 of file GUIDialog_GLObjChooser.h.
Referenced by onCmdCenter(), onCmdText(), and ~GUIDialog_GLObjChooser().
|
private |
|
private |
The text field.
Definition at line 132 of file GUIDialog_GLObjChooser.h.
Referenced by onChgText(), and show().