| 22 | } |
| 23 | |
| 24 | bool cmCursesBoolWidget::HandleInput(int& key, cmCursesMainForm* /*fm*/, |
| 25 | WINDOW* w) |
| 26 | { |
| 27 | |
| 28 | // toggle boolean values with enter or space |
| 29 | // 10 == enter |
| 30 | if (key == 10 || key == KEY_ENTER || key == ' ') { |
| 31 | if (this->GetValueAsBool()) { |
| 32 | this->SetValueAsBool(false); |
| 33 | } else { |
| 34 | this->SetValueAsBool(true); |
| 35 | } |
| 36 | |
| 37 | touchwin(w); |
| 38 | wrefresh(w); |
| 39 | return true; |
| 40 | } |
| 41 | return false; |
| 42 | } |
| 43 | |
| 44 | void cmCursesBoolWidget::SetValueAsBool(bool value) |
| 45 | { |
nothing calls this directly
no test coverage detected