22 , running_child_idx_(-1)
23 , previously_executed_idx_(-1)
42 if(children_count == 0)
47 bool repeat_last =
false;
90 win = newwin(6, 70, 1, 1);
92 mvwprintw(win, 0, 0,
"No children.");
93 mvwprintw(win, 1, 0,
"Press: S to return SUCCESSFUL,");
94 mvwprintw(win, 2, 0,
" F to return FAILURE, or");
95 mvwprintw(win, 3, 0,
" R to return RUNNING.");
106 if(ch ==
's' || ch ==
'S')
111 else if(ch ==
'f' || ch ==
'F')
116 else if(ch ==
'r' || ch ==
'R')
134 std::vector<std::string>
list;
135 list.reserve(children_count);
142 for(
const auto& str :
list)
144 width = std::max(width, str.size() + 2);
151 win = newwin(children_count + 6, 70, 1, 1);
153 mvwprintw(win, 0, 0,
"Use UP/DOWN arrow to select the child, Enter to confirm.");
154 mvwprintw(win, 1, 0,
"Press: S to skip and return SUCCESSFUL,");
155 mvwprintw(win, 2, 0,
" F to skip and return FAILURE, or");
156 mvwprintw(win, 3, 0,
" R to skip and return RUNNING.");
159 for(
size_t i = 0; i <
list.size(); i++)
161 mvwprintw(win, i + 5, 0,
"%2ld. %s", i + 1,
list[i].c_str());
174 wattroff(win, A_STANDOUT);
175 mvwprintw(win, row + 5, 4,
"%s",
list[row].c_str());
179 row = (row == children_count - 1) ? 0 : row + 1;
181 else if(ch == KEY_UP)
183 row = (row == 0) ? (children_count - 1) : row - 1;
185 else if(ch == KEY_ENTER || ch == 10)
189 else if(ch ==
's' || ch ==
'S')
194 else if(ch ==
'f' || ch ==
'F')
199 else if(ch ==
'r' || ch ==
'R')
206 wattron(win, A_STANDOUT);
207 mvwprintw(win, row + 5, 4,
"%s",
list[row].c_str());