MCPcopy Create free account
hub / github.com/Kitware/CMake / HandleInput

Method HandleInput

Source/CursesDialog/cmCursesOptionsWidget.cxx:29–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27}
28
29bool 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
59void cmCursesOptionsWidget::AddOption(std::string const& option)
60{

Callers

nothing calls this directly

Calls 6

NextOptionMethod · 0.95
PreviousOptionMethod · 0.95
touchwinFunction · 0.85
wrefreshFunction · 0.85
ctrlFunction · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected