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

Method SetValueAsBool

Source/CursesDialog/cmCursesBoolWidget.cxx:44–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void cmCursesBoolWidget::SetValueAsBool(bool value)
45{
46 if (value) {
47 this->SetValue("ON");
48 if (cmCursesColor::HasColors()) {
49 set_field_fore(this->Field, COLOR_PAIR(cmCursesColor::BoolOn));
50 set_field_back(this->Field, COLOR_PAIR(cmCursesColor::BoolOn));
51 }
52 } else {
53 this->SetValue("OFF");
54 if (cmCursesColor::HasColors()) {
55 set_field_fore(this->Field, COLOR_PAIR(cmCursesColor::BoolOff));
56 set_field_back(this->Field, COLOR_PAIR(cmCursesColor::BoolOff));
57 }
58 }
59}
60
61bool cmCursesBoolWidget::GetValueAsBool()
62{

Callers 3

cmCursesBoolWidgetMethod · 0.95
HandleInputMethod · 0.95

Calls 1

SetValueMethod · 0.45

Tested by

no test coverage detected