SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUIDialog_GLObjChooser Class Reference

#include <GUIDialog_GLObjChooser.h>

Inheritance diagram for GUIDialog_GLObjChooser:
FXMainWindow

Public Member Functions

GUIGlObjectgetObject () const
 Returns the chosen (selected) object. More...
 
 GUIDialog_GLObjChooser (GUIGlChildWindow *parent, FXIcon *icon, const FXString &title, GUIGlObjectType type, const std::vector< GUIGlID > &ids, GUIGlObjectStorage &glStorage)
 Constructor. More...
 
 ~GUIDialog_GLObjChooser ()
 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...
 

Protected Member Functions

 GUIDialog_GLObjChooser ()
 FOX needs this. More...
 

Private Attributes

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...
 
GUIGlObjectType myObjectType
 The artifact to choose. More...
 
GUIGlChildWindowmyParent
 The parent window. More...
 
GUIGlObjectmySelected
 The chosen id. More...
 
FXTextFieldmyTextEntry
 The text field. 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 59 of file GUIDialog_GLObjChooser.h.

Constructor & Destructor Documentation

GUIDialog_GLObjChooser::GUIDialog_GLObjChooser ( GUIGlChildWindow parent,
FXIcon *  icon,
const FXString &  title,
GUIGlObjectType  type,
const std::vector< GUIGlID > &  ids,
GUIGlObjectStorage glStorage 
)

Constructor.

Parameters
[in]parentThe calling view
[in]iconThe icon to use
[in]titleThe title to use
[in]typeThe type of gl-objects to show instances of
[in]glStorageThe 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 116 of file GUIDialog_GLObjChooser.cpp.

References GUIGlChildWindow::getParent(), myParent, and GUIMainWindow::removeChild().

GUIDialog_GLObjChooser::GUIDialog_GLObjChooser ( )
inlineprotected

FOX needs this.

Definition at line 136 of file GUIDialog_GLObjChooser.h.

Member Function Documentation

GUIGlObject* GUIDialog_GLObjChooser::getObject ( ) const
inline

Returns the chosen (selected) object.

Returns
The selected object

Definition at line 84 of file GUIDialog_GLObjChooser.h.

References mySelected.

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

Callback: Something has been typed into the the field.

Definition at line 139 of file GUIDialog_GLObjChooser.cpp.

References myList, and myTextEntry.

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

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

Definition at line 122 of file GUIDialog_GLObjChooser.cpp.

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

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

Callback: The dialog shall be closed.

Definition at line 132 of file GUIDialog_GLObjChooser.cpp.

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

Callback: Hides unselected items if pressed.

Definition at line 178 of file GUIDialog_GLObjChooser.cpp.

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

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

Callback: Selects to current item if enter is pressed.

Definition at line 153 of file GUIDialog_GLObjChooser.cpp.

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

Referenced by onListKeyPress().

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

Callback: Selects to current item if enter is pressed.

Definition at line 164 of file GUIDialog_GLObjChooser.cpp.

References onCmdText().

Field Documentation

std::set<GUIGlID> GUIDialog_GLObjChooser::myIDs
private

myList contains (void) pointers to elements of myIDs instead of the more

Definition at line 131 of file GUIDialog_GLObjChooser.h.

Referenced by onCmdFilter().

FXList* GUIDialog_GLObjChooser::myList
private

The list that holds the ids.

Definition at line 115 of file GUIDialog_GLObjChooser.h.

Referenced by onChgText(), onCmdCenter(), onCmdFilter(), and onCmdText().

GUIGlObjectType GUIDialog_GLObjChooser::myObjectType
private

The artifact to choose.

Definition at line 118 of file GUIDialog_GLObjChooser.h.

GUIGlChildWindow* GUIDialog_GLObjChooser::myParent
private

The parent window.

Definition at line 121 of file GUIDialog_GLObjChooser.h.

Referenced by onCmdCenter(), onCmdText(), and ~GUIDialog_GLObjChooser().

GUIGlObject* GUIDialog_GLObjChooser::mySelected
private

The chosen id.

Definition at line 124 of file GUIDialog_GLObjChooser.h.

Referenced by getObject().

FXTextField* GUIDialog_GLObjChooser::myTextEntry
private

The text field.

Definition at line 127 of file GUIDialog_GLObjChooser.h.

Referenced by onChgText().


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