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

Editor for the list of chosen objects. More...

#include <GUIDialog_GLChosenEditor.h>

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

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
GUIMainWindowmyParent = nullptr
 The parent window.
GUISelectedStoragemyStorage = nullptr
 The storage.
bool myStoreSize
 whether window size shall be stored
std::string myWindowName
 Name for storing in the registry.

Detailed Description

Editor for the list of chosen objects.

See also
GUIMainWindow
GUISelectedStorage

Definition at line 48 of file GUIDialog_GLChosenEditor.h.

Constructor & Destructor Documentation

◆ GUIDialog_GLChosenEditor() [1/2]

◆ ~GUIDialog_GLChosenEditor()

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, and myStorage.

◆ GUIDialog_GLChosenEditor() [2/2]

GUIDialog_GLChosenEditor::GUIDialog_GLChosenEditor ( )
inlineprotected

FOX needs this.

Definition at line 120 of file GUIDialog_GLChosenEditor.h.

Member Function Documentation

◆ loadWindowPos()

void GUIPersistentWindowPos::loadWindowPos ( )
inherited

◆ onCmdClear()

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 gSelected, myList, and myParent.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdClose()

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().

Here is the caller graph for this function:

◆ onCmdDeselect()

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 GUIGlObject::getGlID(), gSelected, myList, myParent, and rebuildList().

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdLoad()

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.

Todo
Recheck loading/saving of selections

Definition at line 131 of file GUIDialog_GLChosenEditor.cpp.

References gCurrentFolder, GUIIconSubSys::getIcon(), gSelected, myParent, OPEN, rebuildList(), TL, and SUMOXMLDefinitions::TXTFileExtensions.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onCmdSave()

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.

Todo
Recheck loading/saving of selections

Definition at line 155 of file GUIDialog_GLChosenEditor.cpp.

References gCurrentFolder, MFXUtils::getFilename2Write(), GUIIconSubSys::getIcon(), gSelected, SAVE, TL, and SUMOXMLDefinitions::TXTFileExtensions.

Referenced by FXDEFMAP().

Here is the caller graph for this function:

◆ onKeyPress()

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().

Here is the caller graph for this function:

◆ rebuildList()

void GUIDialog_GLChosenEditor::rebuildList ( )

Rebuilds the entire list.

Definition at line 108 of file GUIDialog_GLChosenEditor.cpp.

References GUIGlObjectStorage::gIDStorage, gSelected, and myList.

Referenced by GUIDialog_GLChosenEditor(), onCmdDeselect(), onCmdLoad(), and selectionUpdated().

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:

◆ selectionUpdated()

void GUIDialog_GLChosenEditor::selectionUpdated ( )
virtual

called when selection is updated

Implements GUISelectedStorage::UpdateTarget.

Definition at line 124 of file GUIDialog_GLChosenEditor.cpp.

References rebuildList().

Field Documentation

◆ 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().

◆ myList

FXList* GUIDialog_GLChosenEditor::myList = nullptr
private

The list that holds the ids.

Definition at line 124 of file GUIDialog_GLChosenEditor.h.

Referenced by GUIDialog_GLChosenEditor(), onCmdClear(), onCmdDeselect(), and rebuildList().

◆ 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

GUIMainWindow* GUIDialog_GLChosenEditor::myParent = nullptr
private

◆ myStorage

GUISelectedStorage* GUIDialog_GLChosenEditor::myStorage = nullptr
private

The storage.

Definition at line 130 of file GUIDialog_GLChosenEditor.h.

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

◆ 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().

◆ 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().


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