43FXIMPLEMENT_ABSTRACT(
GNEAdditionalDialog, FXTopWindow, GNEAdditionalDialogMap, ARRAYNUMBER(GNEAdditionalDialogMap))
50 FXTopWindow(editedAdditional->getNet()->getViewNet(), ("Edit '" + editedAdditional->getID() + "' data").c_str(), editedAdditional->getACIcon(), editedAdditional->getACIcon(),
GUIDesignDialogBoxExplicit(width, height)),
51 myEditedAdditional(editedAdditional),
52 myUpdatingElement(updatingElement),
53 myChangesDescription("change " + editedAdditional->getTagStr() + " values"),
54 myNumberOfChanges(0) {
71 getParent()->setFocus();
84 return getApp()->runModalFor(
this);
96 return FXTopWindow::onKeyPress(sender, sel, ptr);
102 return FXTopWindow::onKeyRelease(sender, sel, ptr);
109 setTitle(newHeader.c_str());
125 if (myNumberOfChanges < myEditedAdditional->getNet()->getViewNet()->getUndoList()->currentCommandGroupSize()) {
FXDEFMAP(GNEAdditionalDialog) GNEAdditionalDialogMap[]
@ MID_GNE_BUTTON_CANCEL
cancel button
@ MID_GNE_BUTTON_RESET
reset button
@ MID_GNE_BUTTON_ACCEPT
accept button
#define GUIDesignDialogBoxExplicit(width, height)
design for dialog box with specific width and height (for example, additional dialogs)
#define GUIDesignButtonAccept
Accept Button.
#define GUIDesignButtonCancel
Cancel Button.
#define GUIDesignContentsFrame
design for the main content frame of every frame/dialog with padding and spacing
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignButtonReset
Reset Button.
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frame extended in all directions
#define GUIDesignHorizontalFrame
Horizontal frame extended over frame parent with padding and spacing.
Dialog to edit sequences, parameters, etc.. of Additionals.
virtual long onCmdCancel(FXObject *sender, FXSelector sel, void *ptr)=0
event after press cancel button
virtual long onCmdAccept(FXObject *sender, FXSelector sel, void *ptr)=0
void changeAdditionalDialogHeader(const std::string &newHeader)
change additional dialog header
~GNEAdditionalDialog()
destructor
int myNumberOfChanges
number of GNEChanges_... in dialog
GNEAdditional * getEditedAdditional() const
get edited Additional
void acceptChanges()
Accept changes did in this dialog.
std::string myChangesDescription
description of changes did in this additional dialog
long onKeyPress(FXObject *sender, FXSelector sel, void *ptr)
event after press a key
void cancelChanges()
Cancel changes did in this dialog.
FXint openAsModalDialog(FXuint placement=PLACEMENT_CURSOR)
execute dialog as modal
GNEAdditional * myEditedAdditional
pointer to edited additional
void initChanges()
init a new group of changes that will be do it in dialog
void resetChanges()
reset changes did in this dialog.
virtual long onCmdReset(FXObject *, FXSelector, void *)=0
event after press cancel button
long onKeyRelease(FXObject *sender, FXSelector sel, void *ptr)
event after release a key
An Element which don't belong to GNENet but has influence in the simulation.
GNENet * getNet() const
get pointer to net
GNEViewNet * getViewNet() const
get view net
void end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise,...
void begin(GUIIcon icon, const std::string &description)
Begin undo command sub-group with current supermode. This begins a new group of commands that are tre...
int currentCommandGroupSize() const
get size of current CommandGroup
void abortLastChangeGroup()
reverts last active chained change group
GNEUndoList * getUndoList() const
get the undoList object
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon