45 FXIMPLEMENT_ABSTRACT(
GNEDemandElementDialog, FXTopWindow, GNEDemandElementDialogMap, ARRAYNUMBER(GNEDemandElementDialogMap))
52 FXTopWindow(editedDemandElement->getViewNet(), ("Edit '" + editedDemandElement->getID() + "' data").c_str(), editedDemandElement->getIcon(), editedDemandElement->getIcon(),
GUIDesignDialogBoxExplicit(width, height)),
53 myEditedDemandElement(editedDemandElement),
54 myUpdatingElement(updatingElement),
55 myChangesDescription("change " + editedDemandElement->getTagStr() + " values"),
56 myNumberOfChanges(0) {
73 getParent()->setFocus();
86 return getApp()->runModalFor(
this);
98 return FXTopWindow::onKeyPress(sender, sel, ptr);
104 return FXTopWindow::onKeyRelease(sender, sel, ptr);
111 setTitle(newHeader.c_str());
127 if (myNumberOfChanges < myEditedDemandElement->getViewNet()->getUndoList()->currentCommandGroupSize()) {
#define GUIDesignHorizontalFrame
void acceptChanges()
Accept changes did in this dialog.
virtual long onCmdAccept(FXObject *sender, FXSelector sel, void *ptr)=0
int myNumberOfChanges
number of GNEChanges_... in dialog
void cancelChanges()
Cancel changes did in this dialog.
#define GUIDesignContentsFrame
design for the main content frame of every frame/dialog
GNEDemandElement * myEditedDemandElement
pointer to edited aditional
#define GUIDesignButtonCancel
Cancel Button.
long onKeyPress(FXObject *sender, FXSelector sel, void *ptr)
event after press a key
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...
void initChanges()
init a new group of changes that will be do it in dialog
FXDEFMAP(GNEDemandElementDialog) GNEDemandElementDialogMap[]
void changeDemandElementDialogHeader(const std::string &newHeader)
change additional dialog header
virtual long onCmdCancel(FXObject *sender, FXSelector sel, void *ptr)=0
event after press cancel button
void resetChanges()
reset changes did in this dialog.
GNEUndoList * getUndoList() const
get the undoList object
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions ...
#define GUIDesignDialogBoxExplicit(width, height)
design for dialog box with specift width and height (for example, additional dialogs) ...
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.
int currentCommandGroupSize() const
get size of current CommandGroup
void p_abortLastCommandGroup()
reverts last command group
#define GUIDesignButtonAccept
Accept Button.
GNEDemandElement * getEditedDemandElement() const
get edited DemandElement
~GNEDemandElementDialog()
destructor
long onKeyRelease(FXObject *sender, FXSelector sel, void *ptr)
event after release a key
virtual long onCmdReset(FXObject *, FXSelector, void *)=0
event after press cancel button
Dialog to edit sequences, parameters, etc.. of DemandElements.
GNEViewNet * getViewNet() const
Returns a pointer to GNEViewNet in which demand element element is located.
std::string myChangesDescription
description of changes did in this additional dialog
FXint openAsModalDialog(FXuint placement=PLACEMENT_CURSOR)
execute dialog as modal
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
An Element which don't belongs to GNENet but has influency in the simulation.