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()) {
212 myTextFieldTooltip->setEditable(
false);
214 horizontalFrame->create();
216 myTextFieldTooltip->create();
221 delete myRadioButton;
223 delete myTextFieldTooltip;
230 myIcon->setIcon(row.
icon);
232 if (row.
text.size() > 57) {
233 std::string textFieldTrimmed;
234 for (
int i = 0; i < 57; i++) {
235 textFieldTrimmed.push_back(row.
text.at(i));
237 textFieldTrimmed.append(
"...");
238 myTextFieldTooltip->setText(textFieldTrimmed.c_str());
239 myTextFieldTooltip->setToolTipText(row.
text.c_str());
241 myTextFieldTooltip->setText(row.
text.c_str());
242 myTextFieldTooltip->setToolTipText(
"");
255 return myRadioButton;
261 myRadioButton->setCheck(FALSE);
262 myRadioButton->setBackColor(FXRGBA(255, 213, 213, 255));
268 myRadioButton->setCheck(FALSE);
269 myRadioButton->setBackColor(FXRGBA(210, 233, 255, 255));
275 myRadioButton->setCheck(TRUE);
276 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 specift width and height (for example, additional dialogs)
#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) frames used to pack another frames extended in all directions
#define GUIDesignHorizontalFrame
Horizontal frame extended over frame parent.
#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 the Netedit.
GNEUndoList * getUndoList()
get pointer to undoList
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 blackground
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 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
UndoListRow(const int index_, FXIcon *icon_, const std::string text_)
constructor
std::string text
definition of undo/redo operation