| 27 | } |
| 28 | |
| 29 | bool cmCursesOptionsWidget::HandleInput(int& key, cmCursesMainForm* /*fm*/, |
| 30 | WINDOW* w) |
| 31 | { |
| 32 | if (this->Options.empty()) { |
| 33 | return false; |
| 34 | } |
| 35 | switch (key) { |
| 36 | case 10: // 10 == enter |
| 37 | case KEY_ENTER: |
| 38 | this->NextOption(); |
| 39 | touchwin(w); |
| 40 | wrefresh(w); |
| 41 | return true; |
| 42 | case KEY_LEFT: |
| 43 | case ctrl('b'): |
| 44 | touchwin(w); |
| 45 | wrefresh(w); |
| 46 | this->PreviousOption(); |
| 47 | return true; |
| 48 | case KEY_RIGHT: |
| 49 | case ctrl('f'): |
| 50 | this->NextOption(); |
| 51 | touchwin(w); |
| 52 | wrefresh(w); |
| 53 | return true; |
| 54 | default: |
| 55 | return false; |
| 56 | } |
| 57 | } |
| 58 | |
| 59 | void cmCursesOptionsWidget::AddOption(std::string const& option) |
| 60 | { |
nothing calls this directly
no test coverage detected