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

Method HandleInput

Source/CursesDialog/cmCursesBoolWidget.cxx:24–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22}
23
24bool 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
44void cmCursesBoolWidget::SetValueAsBool(bool value)
45{

Callers

nothing calls this directly

Calls 4

GetValueAsBoolMethod · 0.95
SetValueAsBoolMethod · 0.95
touchwinFunction · 0.85
wrefreshFunction · 0.85

Tested by

no test coverage detected