39FXIMPLEMENT(
GNEUndoListDialog, FXTopWindow, GNEUndoListDialogMap, ARRAYNUMBER(GNEUndoListDialogMap))
54 new FXSeparator(mainFrame);
71 FXTopWindow::show(PLACEMENT_SCREEN);
73 myGNEApp->getApp()->runModalFor(
this);
88 return FXWindow::shown();
111 if (row->getRadioButton() == obj) {
112 index = row->getIndex();
117 for (
int i = 0; i < (index * -1); i++) {
121 for (
int i = 0; i < index; i++) {
134 std::vector<UndoListRow> undoListRows;
140 while (!itRedo.
end()) {
147 std::reverse(undoListRows.begin(), undoListRows.end());
153 while (!itUndo.
end()) {
160 for (
int i = 0; i < (int)undoListRows.size(); i++) {
161 myGUIRows.at(i)->update(undoListRows.at(i));
162 if (undoListRows.at(i).index < 0) {
164 }
else if (undoListRows.at(i).index > 0) {
182 while (!itRedo.
end()) {
188 while (!itUndo.
end()) {
201 description(description_),
202 timestamp(timestamp_) {}
213 myTextFieldDescription->setEditable(
false);
216 myTextFieldTimeStamp->setEditable(
false);
218 horizontalFrame->create();
220 myTextFieldDescription->create();
221 myTextFieldTimeStamp->create();
226 delete myRadioButton;
228 delete myTextFieldDescription;
229 delete myTextFieldTimeStamp;
236 myIcon->setIcon(row.
icon);
239 std::string textFieldTrimmed;
240 for (
int i = 0; i < 57; i++) {
243 textFieldTrimmed.append(
"...");
244 myTextFieldDescription->setText(textFieldTrimmed.c_str());
245 myTextFieldDescription->setToolTipText(row.
description.c_str());
247 myTextFieldDescription->setText(row.
description.c_str());
248 myTextFieldDescription->setToolTipText(
"");
250 myTextFieldTimeStamp->setText(row.
timestamp.c_str());
262 return myRadioButton;
268 myRadioButton->setCheck(FALSE);
269 myRadioButton->setBackColor(FXRGBA(255, 213, 213, 255));
275 myRadioButton->setCheck(FALSE);
276 myRadioButton->setBackColor(FXRGBA(210, 233, 255, 255));
282 myRadioButton->setCheck(TRUE);
283 myRadioButton->setBackColor(FXRGBA(240, 255, 205, 255));
FXDEFMAP(GNEUndoListDialog) GNEUndoListDialogMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
@ MID_CHOOSEN_OPERATION
set type of selection
@ MID_GNE_BUTTON_ACCEPT
accept button
#define GUIDesignDialogBoxExplicit(width, height)
design for dialog box with specific width and height (for example, additional dialogs)
#define GUIDesignTextFieldFixed(width)
text field with fixed width
#define GUIDesignButtonAccept
Accept Button.
#define GUIDesignTextField
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignRadioButtonSquared
design for radio button squared
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frame extended in all directions
#define GUIDesignHorizontalFrame
Horizontal frame extended over frame parent with padding and spacing.
#define GUIDesignContentsScrollUndoList
design for the content scroll of UndoList
#define GUIDesignLabelIconThick
label squared over frame with thick and with text justify to center
GUIIcon
An enumeration of icons used by the gui applications.
The main window of Netedit.
GNEUndoList * getUndoList()
get pointer to undoList
const std::string getTimeStamp() const
get timeStamp
const std::string getDescription() const
get description
bool end() const
check if iterator is at the end
FXIcon * getIcon() const
get icon
row used for show GUI row elements
void checkRow()
check row and set background green
const FXRadioButton * getRadioButton() const
get radio button (read only)
int getIndex() const
get index
void setBlueBackground()
set blue background
void setRedBackground()
set red background
GUIRow(GNEUndoListDialog *undoListDialog, FXVerticalFrame *mainFrame, MFXStaticToolTip *staticToolTip)
constructor
void update(const UndoListRow &row)
update row
Dialog for edit rerouters.
void updateList()
FOX needs this.
long onCmdSelectRow(FXObject *, FXSelector, void *)
event after select row
~GNEUndoListDialog()
destructor
long onCmdClose(FXObject *, FXSelector, void *)
bool shown() const
check if dialog is shown
void setFocus()
Move the focus to this window.
GNEApplicationWindow * myGNEApp
pointer to GNEApplicationWindow
FXVerticalFrame * myRowFrame
frame for rows
std::vector< GUIRow * > myGUIRows
vector with rows
void recalcList()
recalc list destroying and creating rows
void undo()
undo the last command group
void redo()
redo the last command group
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
MFXStaticToolTip * getStaticTooltipView() const
get static toolTip for view
int index
index uses for count undo/redos
FXIcon * icon
icon associated with undo/redo operation
std::string timestamp
timestamp
UndoListRow(const int index_, FXIcon *icon_, const std::string description_, const std::string timestamp_)
constructor
std::string description
definition of undo/redo operation