![]() |
Eclipse 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 (Notifies both the parent and the storage about being initialised) | |
| void | rebuildList () |
| Rebuilds the entire list. | |
| void | selectionUpdated () |
| called when selection is updated | |
| ~GUIDialog_GLChosenEditor () | |
| Destructor (Notifies both the parent and the storage about being destroyed) | |
FOX-callbacks | |
| long | onKeyPress (FXObject *o, FXSelector sel, void *data) |
| keyboard functions | |
| long | onCmdLoad (FXObject *, FXSelector, void *) |
| Called when the user presses the Load-button. | |
| long | onCmdSave (FXObject *, FXSelector, void *) |
| Called when the user presses the Save-button. | |
| long | onCmdDeselect (FXObject *, FXSelector, void *) |
| Called when the user presses the Deselect-button. | |
| long | onCmdClear (FXObject *, FXSelector, void *) |
| Called when the user presses the Clear-button. | |
| long | onCmdClose (FXObject *, FXSelector, void *) |
| Called when the user presses the Close-button. | |
Protected Member Functions | |
| GUIDialog_GLChosenEditor () | |
| FOX needs this. | |
Private Member Functions | |
| void | loadWindowPos () |
| void | saveWindowPos () |
Private Attributes | |
| int | myDefaultHeight |
| int | myDefaultWidth |
| int | myDefaultX |
| int | myDefaultY |
| FXList * | myList = nullptr |
| The list that holds the ids. | |
| int | myMinSize |
| int | myMinTitlebarHeight |
| GUIMainWindow * | myParent = nullptr |
| The parent window. | |
| GUISelectedStorage * | myStorage = nullptr |
| The storage. | |
| bool | myStoreSize |
| whether window size shall be stored | |
| std::string | myWindowName |
| Name for storing in the registry. | |
Editor for the list of chosen objects.
Definition at line 48 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 64 of file GUIDialog_GLChosenEditor.cpp.
References GUISelectedStorage::add2Update(), GUIMainWindow::addChild(), GUIDesigns::buildFXButton(), FLAG, GUIIconSubSys::getIcon(), GUIDesignAuxiliarFrame, GUIDesignChooserButtons, GUIDesignChooserLayoutLeft, GUIDesignChooserLayoutList, GUIDesignChooserLayoutRight, GUIDesignChooserListMultiple, GUIDesignHorizontalSeparator, GUIPersistentWindowPos::loadWindowPos(), MID_CANCEL, MID_CHOOSEN_CLEAR, MID_CHOOSEN_DESELECT, MID_CHOOSEN_LOAD, MID_CHOOSEN_SAVE, MID_CHOOSER_LIST, myList, myParent, myStorage, NO, OPEN, rebuildList(), SAVE, and TL.
| GUIDialog_GLChosenEditor::~GUIDialog_GLChosenEditor | ( | ) |
Destructor (Notifies both the parent and the storage about being destroyed)
Definition at line 101 of file GUIDialog_GLChosenEditor.cpp.
References myParent, myStorage, GUISelectedStorage::remove2Update(), and GUIMainWindow::removeChild().
|
inlineprotected |
FOX needs this.
Definition at line 120 of file GUIDialog_GLChosenEditor.h.
|
inherited |
Definition at line 84 of file GUIPersistentWindowPos.cpp.
References MAX2(), MIN2(), GUIPersistentWindowPos::myDefaultHeight, GUIPersistentWindowPos::myDefaultWidth, GUIPersistentWindowPos::myDefaultX, GUIPersistentWindowPos::myDefaultY, GUIPersistentWindowPos::myMinSize, GUIPersistentWindowPos::myMinTitlebarHeight, GUIPersistentWindowPos::myParent, GUIPersistentWindowPos::myStoreSize, and GUIPersistentWindowPos::myWindowName.
Referenced by GUIDialog_ChooserAbstract::GUIDialog_ChooserAbstract(), GUIDialog_EditViewport::GUIDialog_EditViewport(), GUIDialog_GLChosenEditor(), GUIDialog_ViewSettings::GUIDialog_ViewSettings(), and GUIParameterTableWindow::GUIParameterTableWindow().
| 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 204 of file GUIDialog_GLChosenEditor.cpp.
References GUISelectedStorage::clear(), gSelected, myList, myParent, and GUIMainWindow::updateChildren().
Referenced by FXDEFMAP().
| long GUIDialog_GLChosenEditor::onCmdClose | ( | FXObject * | , |
| FXSelector | , | ||
| void * | |||
| ) |
Called when the user presses the Close-button.
Closes itself.
Definition at line 213 of file GUIDialog_GLChosenEditor.cpp.
Referenced by FXDEFMAP(), and onKeyPress().
| 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 172 of file GUIDialog_GLChosenEditor.cpp.
References GUISelectedStorage::deselect(), GUIGlObject::getGlID(), gSelected, myList, myParent, rebuildList(), and GUIMainWindow::updateChildren().
Referenced by FXDEFMAP().
| 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 131 of file GUIDialog_GLChosenEditor.cpp.
References gCurrentFolder, GUIIconSubSys::getIcon(), gSelected, GUISelectedStorage::load(), myParent, OPEN, rebuildList(), TL, SUMOXMLDefinitions::TXTFileExtensions, and GUIMainWindow::updateChildren().
Referenced by FXDEFMAP().
| 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 saving failed, a message window is shown.
Definition at line 155 of file GUIDialog_GLChosenEditor.cpp.
References gCurrentFolder, MFXUtils::getFilename2Write(), GUIIconSubSys::getIcon(), gSelected, GUISelectedStorage::save(), SAVE, TL, and SUMOXMLDefinitions::TXTFileExtensions.
Referenced by FXDEFMAP().
| long GUIDialog_GLChosenEditor::onKeyPress | ( | FXObject * | o, |
| FXSelector | sel, | ||
| void * | data | ||
| ) |
keyboard functions
Definition at line 193 of file GUIDialog_GLChosenEditor.cpp.
References onCmdClose().
Referenced by FXDEFMAP().
| void GUIDialog_GLChosenEditor::rebuildList | ( | ) |
Rebuilds the entire list.
Definition at line 108 of file GUIDialog_GLChosenEditor.cpp.
References GUIGlObject::getFullName(), GUIGlObjectStorage::getObjectBlocking(), GUISelectedStorage::getSelected(), GUIGlObjectStorage::gIDStorage, gSelected, myList, and GUIGlObjectStorage::unblockObject().
Referenced by GUIDialog_GLChosenEditor(), onCmdDeselect(), onCmdLoad(), and selectionUpdated().
|
inherited |
Definition at line 71 of file GUIPersistentWindowPos.cpp.
References GUIPersistentWindowPos::myParent, GUIPersistentWindowPos::myStoreSize, and GUIPersistentWindowPos::myWindowName.
Referenced by GUIDialog_ViewSettings::hide(), and GUIPersistentWindowPos::~GUIPersistentWindowPos().
|
virtual |
called when selection is updated
Implements GUISelectedStorage::UpdateTarget.
Definition at line 124 of file GUIDialog_GLChosenEditor.cpp.
References rebuildList().
|
protectedinherited |
Definition at line 65 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos().
|
protectedinherited |
Definition at line 64 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos().
|
protectedinherited |
Definition at line 61 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos().
|
protectedinherited |
Definition at line 62 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos().
|
private |
The list that holds the ids.
Definition at line 124 of file GUIDialog_GLChosenEditor.h.
Referenced by GUIDialog_GLChosenEditor(), onCmdClear(), onCmdDeselect(), and rebuildList().
|
protectedinherited |
Definition at line 67 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos().
|
protectedinherited |
Definition at line 68 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos().
|
private |
The parent window.
Definition at line 127 of file GUIDialog_GLChosenEditor.h.
Referenced by GUIDialog_GLChosenEditor(), onCmdClear(), onCmdDeselect(), onCmdLoad(), and ~GUIDialog_GLChosenEditor().
|
private |
The storage.
Definition at line 130 of file GUIDialog_GLChosenEditor.h.
Referenced by GUIDialog_GLChosenEditor(), and ~GUIDialog_GLChosenEditor().
|
protectedinherited |
whether window size shall be stored
Definition at line 59 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos(), and GUIPersistentWindowPos::saveWindowPos().
|
protectedinherited |
Name for storing in the registry.
Definition at line 56 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos(), and GUIPersistentWindowPos::saveWindowPos().