54 FXIMPLEMENT_ABSTRACT(
GNEAdditionalDialog, FXTopWindow, GNEAdditionalDialogMap, ARRAYNUMBER(GNEAdditionalDialogMap))
61 FXTopWindow(parent->getViewNet(), ("Edit '" + parent->getID() + "' data").c_str(), parent->getIcon(), parent->getIcon(),
GUIDesignDialogBoxExplicit, 0, 0, width, height, 0, 0, 0, 0, 4, 4),
62 myChangesDescription("change " +
toString(parent->getTag()) + " values"),
64 myUndoList(parent->getViewNet()->getUndoList()) {
91 return getApp()->runModalFor(
this);
97 return FXTopWindow::onKeyPress(sender, sel, ptr);
103 return FXTopWindow::onKeyRelease(sender, sel, ptr);
110 setTitle(newHeader.c_str());
126 if (myNumberOfChanges < myUndoList->currentCommandGroupSize()) {
long onKeyRelease(FXObject *sender, FXSelector sel, void *ptr)
event after release a key
void resetChanges()
reset changes did in this dialog.
virtual long onCmdReset(FXObject *, FXSelector, void *)=0
event after press cancel button
#define GUIDesignHorizontalFrame
~GNEAdditionalDialog()
destructor
#define GUIDesignContentsFrame
design for the main content frame of every frame/dialog
Dialog to edit sequences, parameters, etc.. of Additionals.
#define GUIDesignButtonCancel
Cancel Button.
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions ...
FXDEFMAP(GNEAdditionalDialog) GNEAdditionalDialogMap[]
#define GUIDesignDialogBoxExplicit
design for dialog box with specift width and height (for example, additional dialogs) ...
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
virtual long onCmdCancel(FXObject *sender, FXSelector sel, void *ptr)=0
event after press cancel button
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
GNEUndoList * myUndoList
pointer to UndoList
#define GUIDesignButtonReset
Reset Button.
virtual long onCmdAccept(FXObject *sender, FXSelector sel, void *ptr)=0
int currentCommandGroupSize() const
get size of current CommandGroup
void p_abortLastCommandGroup()
reverts last command group
std::string myChangesDescription
description of changes did in this additional dialog
#define GUIDesignButtonAccept
Accept Button.
void acceptChanges()
Accept changes did in this dialog.
void initChanges()
init a new group of changes that will be do it in dialog
An Element which don't belongs to GNENet but has influency in the simulation.
long onKeyPress(FXObject *sender, FXSelector sel, void *ptr)
event after press a key
void cancelChanges()
Cancel changes did in this dialog.
int myNumberOfChanges
number of GNEChanges_... in dialog
FXint openAsModalDialog(FXuint placement=PLACEMENT_CURSOR)
execute dialog as modal
void changeAdditionalDialogHeader(const std::string &newHeader)
change additional dialog header
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon