Eclipse SUMO - Simulation of Urban MObility
|
Editor for simulation breakpoints. More...
#include <GUIDialog_Breakpoints.h>
Public Member Functions | |
GUIDialog_Breakpoints (GUIApplicationWindow *parent, std::vector< SUMOTime > &breakpoints, FXMutex &breakpointLock, const SUMOTime simBegin) | |
Constructor. | |
virtual void | layout () |
void | loadWindowPos () |
void | rebuildList () |
Rebuilds the entire list. | |
void | saveWindowPos () |
void | show () |
sets the focus after the window is created | |
~GUIDialog_Breakpoints () | |
Destructor. | |
FOX-callbacks | |
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 | onCmdClear (FXObject *, FXSelector, void *) |
Called when the user presses the Clear-button. | |
long | onCmdUpdateBreakpoints (FXObject *, FXSelector, void *) |
Called when the user clicks a time link in the message window. | |
long | onCmdClose (FXObject *, FXSelector, void *) |
Called when the user presses the Close-button. | |
long | onCmdEditTable (FXObject *, FXSelector, void *) |
Called when the table was changed. | |
Protected Attributes | |
int | myDefaultHeight |
int | myDefaultWidth |
int | myDefaultX |
int | myDefaultY |
int | myMinSize |
int | myMinTitlebarHeight |
bool | myStoreSize |
whether window size shall be stored | |
std::string | myWindowName |
Name for storing in the registry. | |
Private Member Functions | |
std::string | encode2TXT () |
FOX need this. | |
Private Attributes | |
FXMutex * | myBreakpointLock |
Lock for modifying the list of breakpoints. | |
std::vector< SUMOTime > * | myBreakpoints |
List of breakpoints. | |
GUIApplicationWindow * | myParent |
The parent window. | |
SUMOTime | mySimBegin |
simulation begin | |
FXTable * | myTable |
The list that holds the ids. | |
Editor for simulation breakpoints.
This dialog shows and lets the user edit the list of breakpoints - simulation time steps where the simulation halts.
Definition at line 41 of file GUIDialog_Breakpoints.h.
GUIDialog_Breakpoints::GUIDialog_Breakpoints | ( | GUIApplicationWindow * | parent, |
std::vector< SUMOTime > & | breakpoints, | ||
FXMutex & | breakpointLock, | ||
const SUMOTime | simBegin | ||
) |
Constructor.
[in] | parent | The parent window |
Definition at line 68 of file GUIDialog_Breakpoints.cpp.
References GUIDesigns::buildFXButton(), CLEANJUNCTIONS, GUIIconSubSys::getIcon(), GUIDesignAuxiliarFrame, GUIDesignBreakpointTable, GUIDesignChooserButtons, GUIDesignChooserLayoutLeft, GUIDesignChooserLayoutRight, GUIDesignHorizontalSeparator, MID_CANCEL, MID_CHOOSEN_CLEAR, MID_CHOOSEN_LOAD, MID_CHOOSEN_SAVE, MID_TABLE, NO, OPEN, SAVE, and TL.
GUIDialog_Breakpoints::~GUIDialog_Breakpoints | ( | ) |
Destructor.
Definition at line 109 of file GUIDialog_Breakpoints.cpp.
References GUIApplicationWindow::eraseBreakpointDialog(), myParent, and GUIMainWindow::removeChild().
|
private |
FOX need this.
Builds a text representation of the items in the list
Definition at line 182 of file GUIDialog_Breakpoints.cpp.
References myBreakpointLock, myBreakpoints, and time2string().
Referenced by onCmdSave().
|
virtual |
Definition at line 255 of file GUIDialog_Breakpoints.cpp.
References myTable.
|
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 GUIParameterTableWindow::GUIParameterTableWindow().
long GUIDialog_Breakpoints::onCmdClear | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user presses the Clear-button.
Definition at line 194 of file GUIDialog_Breakpoints.cpp.
References myBreakpointLock, myBreakpoints, and rebuildList().
Referenced by FXDEFMAP().
long GUIDialog_Breakpoints::onCmdClose | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user presses the Close-button.
Definition at line 211 of file GUIDialog_Breakpoints.cpp.
Referenced by FXDEFMAP().
long GUIDialog_Breakpoints::onCmdEditTable | ( | FXObject * | , |
FXSelector | , | ||
void * | ptr | ||
) |
Called when the table was changed.
Definition at line 218 of file GUIDialog_Breakpoints.cpp.
References DELTA_T, myBreakpointLock, myBreakpoints, mySimBegin, myTable, StringUtils::prune(), rebuildList(), string2time(), and TL.
Referenced by FXDEFMAP().
long GUIDialog_Breakpoints::onCmdLoad | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user presses the Load-button.
Definition at line 143 of file GUIDialog_Breakpoints.cpp.
References EMPTY, gCurrentFolder, GUIIconSubSys::getIcon(), GUISettingsHandler::loadBreakpoints(), myBreakpointLock, myBreakpoints, rebuildList(), and TL.
Referenced by FXDEFMAP().
long GUIDialog_Breakpoints::onCmdSave | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user presses the Save-button.
Definition at line 164 of file GUIDialog_Breakpoints.cpp.
References OutputDevice::close(), EMPTY, encode2TXT(), gCurrentFolder, OutputDevice::getDevice(), MFXUtils::getFilename2Write(), GUIIconSubSys::getIcon(), and TL.
Referenced by FXDEFMAP().
long GUIDialog_Breakpoints::onCmdUpdateBreakpoints | ( | FXObject * | , |
FXSelector | , | ||
void * | |||
) |
Called when the user clicks a time link in the message window.
Definition at line 203 of file GUIDialog_Breakpoints.cpp.
References myBreakpointLock, and rebuildList().
Referenced by FXDEFMAP().
void GUIDialog_Breakpoints::rebuildList | ( | ) |
Rebuilds the entire list.
Definition at line 124 of file GUIDialog_Breakpoints.cpp.
References GUIDesignHeight, myBreakpoints, myTable, time2string(), and TL.
Referenced by onCmdClear(), onCmdEditTable(), onCmdLoad(), and onCmdUpdateBreakpoints().
|
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().
void GUIDialog_Breakpoints::show | ( | ) |
sets the focus after the window is created
Definition at line 117 of file GUIDialog_Breakpoints.cpp.
References myBreakpoints, and myTable.
|
private |
Lock for modifying the list of breakpoints.
Definition at line 105 of file GUIDialog_Breakpoints.h.
Referenced by encode2TXT(), onCmdClear(), onCmdEditTable(), onCmdLoad(), and onCmdUpdateBreakpoints().
|
private |
List of breakpoints.
Definition at line 102 of file GUIDialog_Breakpoints.h.
Referenced by encode2TXT(), onCmdClear(), onCmdEditTable(), onCmdLoad(), rebuildList(), and show().
|
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().
|
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 99 of file GUIDialog_Breakpoints.h.
Referenced by ~GUIDialog_Breakpoints().
|
private |
simulation begin
Definition at line 108 of file GUIDialog_Breakpoints.h.
Referenced by onCmdEditTable().
|
protectedinherited |
whether window size shall be stored
Definition at line 59 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos(), and GUIPersistentWindowPos::saveWindowPos().
|
private |
The list that holds the ids.
Definition at line 96 of file GUIDialog_Breakpoints.h.
Referenced by layout(), onCmdEditTable(), rebuildList(), and show().
|
protectedinherited |
Name for storing in the registry.
Definition at line 56 of file GUIPersistentWindowPos.h.
Referenced by GUIPersistentWindowPos::loadWindowPos(), and GUIPersistentWindowPos::saveWindowPos().