55 #ifdef CHECK_MEMORY_LEAKS
57 #endif // CHECK_MEMORY_LEAKS
63 #define INVALID_VALUE -1
64 #define INVALID_VALUE_STR "-1"
86 :
FXMainWindow(parent->getApp(), "Breakpoints Editor", NULL, NULL, DECOR_ALL, 20, 20, 300, 300),
92 myTable->setVisibleRows(20);
93 myTable->setVisibleColumns(1);
94 myTable->setTableSize(20, 1);
95 myTable->setBackColor(FXRGB(255, 255, 255));
96 myTable->setCellType(0,
CT_REAL);
102 myTable->setNumberCellParams(0, begin / 1000, end / 1000, 1, 10, 100,
"%.2f");
103 myTable->getRowHeader()->setWidth(0);
106 FXVerticalFrame* layout =
new FXVerticalFrame(hbox, LAYOUT_TOP, 0, 0, 0, 0, 4, 4, 4, 4);
108 new FXButton(layout,
"Load\t\t", 0,
this,
MID_CHOOSEN_LOAD, ICON_BEFORE_TEXT | LAYOUT_FILL_X | FRAME_THICK | FRAME_RAISED, 0, 0, 0, 0, 4, 4, 3, 3);
110 new FXButton(layout,
"Save\t\t", 0,
this,
MID_CHOOSEN_SAVE, ICON_BEFORE_TEXT | LAYOUT_FILL_X | FRAME_THICK | FRAME_RAISED, 0, 0, 0, 0, 4, 4, 3, 3);
111 new FXHorizontalSeparator(layout, SEPARATOR_GROOVE | LAYOUT_FILL_X);
113 new FXButton(layout,
"Clear\t\t", 0,
this,
MID_CHOOSEN_CLEAR, ICON_BEFORE_TEXT | LAYOUT_FILL_X | FRAME_THICK | FRAME_RAISED, 0, 0, 0, 0, 4, 4, 3, 3);
114 new FXHorizontalSeparator(layout, SEPARATOR_GROOVE | LAYOUT_FILL_X);
116 new FXButton(layout,
"Close\t\t", 0,
this,
MID_CANCEL, ICON_BEFORE_TEXT | LAYOUT_FILL_X | FRAME_THICK | FRAME_RAISED, 0, 0, 0, 0, 4, 4, 3, 3);
119 myParent->addChild(
this);
134 myTable->setColumnText(0,
"Time");
135 FXHeader* header =
myTable->getColumnHeader();
136 header->setHeight(getApp()->getNormalFont()->getFontHeight() + getApp()->getNormalFont()->getFontAscent());
138 for (k = 0; k < 1; k++) {
139 header->setItemJustify(k, JUSTIFY_CENTER_X);
143 std::vector<int>::iterator j;
149 for (k = 0; k < 1; k++) {
150 myTable->setItemText(row, k,
" ");
157 FXFileDialog opendialog(
this,
"Save Breakpoints");
159 opendialog.setSelectMode(SELECTFILE_ANY);
160 opendialog.setPatternList(
"*.txt");
164 if (opendialog.execute()) {
166 std::string file = opendialog.getFilename().text();
167 std::ifstream strm(file.c_str());
168 while (strm.good()) {
175 WRITE_ERROR(
" A breakpoint-value must be an int, is:" + val);
196 FXMessageBox::error(
this, MBOX_OK,
"Storing failed!",
"%s", e.what());
204 std::ostringstream strm;
234 std::string value = i->
item->getText().text();
236 if (value.find_first_not_of(
" ") == std::string::npos) {
250 std::string msg =
"The value must be an int, is:" + value;
251 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());