47 FXIMPLEMENT_ABSTRACT(
GNEAdditionalDialog, FXTopWindow, GNEAdditionalDialogMap, ARRAYNUMBER(GNEAdditionalDialogMap))
54 FXTopWindow(editedAdditional->getViewNet(), ("Edit '" + editedAdditional->getID() + "' data").c_str(), editedAdditional->getIcon(), editedAdditional->getIcon(),
GUIDesignDialogBoxExplicit, 0, 0, width, height, 0, 0, 0, 0, 4, 4),
55 myEditedAdditional(editedAdditional),
56 myUpdatingElement(updatingElement),
57 myChangesDescription("change " + editedAdditional->getTagStr() + " values"),
58 myNumberOfChanges(0) {
75 getParent()->setFocus();
88 return getApp()->runModalFor(
this);
100 return FXTopWindow::onKeyPress(sender, sel, ptr);
106 return FXTopWindow::onKeyRelease(sender, sel, ptr);
113 setTitle(newHeader.c_str());
129 if (myNumberOfChanges < myEditedAdditional->getViewNet()->getUndoList()->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...
GNEUndoList * getUndoList() const
get the undoList object
#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) ...
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 ...
#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.
GNEAdditional * myEditedAdditional
pointer to edited aditional
void acceptChanges()
Accept changes did in this dialog.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which additional element is located.
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.
GNEAdditional * getEditedAdditional() const
get edited Additional
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