|
SUMO - Simulation of Urban MObility
|
Editor for the list of chosen objects. More...
#include <GUIDialog_GLChosenEditor.h>


Public Member Functions | |
| GUIDialog_GLChosenEditor (GUIMainWindow *parent, GUISelectedStorage *str) | |
| Constructor. More... | |
| void | rebuildList () |
| Rebuilds the entire list. More... | |
| void | selectionUpdated () |
| ~GUIDialog_GLChosenEditor () | |
| Destructor. More... | |
FOX-callbacks | |
| long | onCmdLoad (FXObject *, FXSelector, void *) |
| Called when the user presses the Load-button. More... | |
| long | onCmdSave (FXObject *, FXSelector, void *) |
| Called when the user presses the Save-button. More... | |
| long | onCmdDeselect (FXObject *, FXSelector, void *) |
| Called when the user presses the Deselect-button. More... | |
| long | onCmdClear (FXObject *, FXSelector, void *) |
| Called when the user presses the Clear-button. More... | |
| long | onCmdClose (FXObject *, FXSelector, void *) |
| Called when the user presses the Close-button. More... | |
Protected Member Functions | |
| GUIDialog_GLChosenEditor () | |
| FOX needs this. More... | |
Private Attributes | |
| FXList * | myList |
| The list that holds the ids. More... | |
| GUIMainWindow * | myParent |
| The parent window. More... | |
| GUISelectedStorage * | myStorage |
| The storage. More... | |
Editor for the list of chosen objects.
Definition at line 57 of file GUIDialog_GLChosenEditor.h.
| GUIDialog_GLChosenEditor::GUIDialog_GLChosenEditor | ( | GUIMainWindow * | parent, |
| GUISelectedStorage * | str | ||
| ) |
Constructor.
Notifies both the parent and the storage about being initialised.
| [in] | parent | The parent window |
| [in] | str | The storage of object selections to use |
Definition at line 69 of file GUIDialog_GLChosenEditor.cpp.
References GUIIconSubSys::getIcon(), ICON_APP_SELECTOR, MID_CANCEL, MID_CHOOSEN_CLEAR, MID_CHOOSEN_DESELECT, MID_CHOOSEN_LOAD, and MID_CHOOSEN_SAVE.
| GUIDialog_GLChosenEditor::~GUIDialog_GLChosenEditor | ( | ) |
Destructor.
Notifies both the parent and the storage about being destroyed.
Definition at line 115 of file GUIDialog_GLChosenEditor.cpp.
References myParent, myStorage, GUISelectedStorage::remove2Update(), and GUIMainWindow::removeChild().
|
inlineprotected |
FOX needs this.
Definition at line 148 of file GUIDialog_GLChosenEditor.h.
| long GUIDialog_GLChosenEditor::onCmdClear | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user presses the Clear-button.
Clear the internal list and calls GUISelectedStorage::clear. Repaints itself
Definition at line 205 of file GUIDialog_GLChosenEditor.cpp.
References GUISelectedStorage::clear(), gSelected, myList, myParent, and GUIMainWindow::updateChildren().
| long GUIDialog_GLChosenEditor::onCmdClose | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user presses the Close-button.
Closes itself.
Definition at line 215 of file GUIDialog_GLChosenEditor.cpp.
| long GUIDialog_GLChosenEditor::onCmdDeselect | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user presses the Deselect-button.
Determines which items were chosen and calls GUISelectedStorage::deselect for each.
Definition at line 183 of file GUIDialog_GLChosenEditor.cpp.
References GUISelectedStorage::deselect(), gSelected, myList, myParent, rebuildList(), and GUIMainWindow::updateChildren().
| long GUIDialog_GLChosenEditor::onCmdLoad | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user presses the Load-button.
Opens a file dialog and forces the parent to load the list of selected objects when a file was chosen. Rebuilds the list, then, and redraws itself.
Definition at line 145 of file GUIDialog_GLChosenEditor.cpp.
References gCurrentFolder, GUIIconSubSys::getIcon(), gSelected, ICON_EMPTY, GUISelectedStorage::load(), and rebuildList().
| long GUIDialog_GLChosenEditor::onCmdSave | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user presses the Save-button.
Opens a file dialog and forces the selection container to save the list of selected objects when a file was chosen.
If the saveing failed, a message window is shown.
Definition at line 168 of file GUIDialog_GLChosenEditor.cpp.
References gCurrentFolder, MFXUtils::getFilename2Write(), GUIIconSubSys::getIcon(), gSelected, ICON_EMPTY, and GUISelectedStorage::save().
| void GUIDialog_GLChosenEditor::rebuildList | ( | ) |
Rebuilds the entire list.
Definition at line 122 of file GUIDialog_GLChosenEditor.cpp.
References GUIGlObject::getFullName(), GUIGlObjectStorage::getObjectBlocking(), GUISelectedStorage::getSelected(), GUIGlObjectStorage::gIDStorage, gSelected, myList, and GUIGlObjectStorage::unblockObject().
Referenced by onCmdDeselect(), onCmdLoad(), and selectionUpdated().
|
virtual |
Implements GUISelectedStorage::UpdateTarget.
Definition at line 138 of file GUIDialog_GLChosenEditor.cpp.
References rebuildList().
|
private |
The list that holds the ids.
Definition at line 138 of file GUIDialog_GLChosenEditor.h.
Referenced by onCmdClear(), onCmdDeselect(), and rebuildList().
|
private |
The parent window.
Definition at line 141 of file GUIDialog_GLChosenEditor.h.
Referenced by onCmdClear(), onCmdDeselect(), and ~GUIDialog_GLChosenEditor().
|
private |
The storage.
Definition at line 144 of file GUIDialog_GLChosenEditor.h.
Referenced by ~GUIDialog_GLChosenEditor().