Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Source/CursesDialog/cmCursesBoolWidget.h
4998 views
1
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2
file LICENSE.rst or https://cmake.org/licensing for details. */
3
#pragma once
4
5
#include "cmConfigure.h" // IWYU pragma: keep
6
7
#include "cmCursesStandardIncludes.h"
8
#include "cmCursesWidget.h"
9
10
class cmCursesBoolWidget : public cmCursesWidget
11
{
12
public:
13
cmCursesBoolWidget(int width, int height, int left, int top);
14
15
cmCursesBoolWidget(cmCursesBoolWidget const&) = delete;
16
cmCursesBoolWidget& operator=(cmCursesBoolWidget const&) = delete;
17
18
// Description:
19
// Handle user input. Called by the container of this widget
20
// when this widget has focus. Returns true if the input was
21
// handled.
22
bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) override;
23
24
// Description:
25
// Set/Get the value (on/off).
26
void SetValueAsBool(bool value);
27
bool GetValueAsBool();
28
};
29
30