1
0

cmCursesBoolWidget.h 940 B

12345678910111213141516171819202122232425262728293031323334
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmCursesBoolWidget_h
  4. #define cmCursesBoolWidget_h
  5. #include <cmConfigure.h>
  6. #include "cmCursesStandardIncludes.h"
  7. #include "cmCursesWidget.h"
  8. class cmCursesMainForm;
  9. class cmCursesBoolWidget : public cmCursesWidget
  10. {
  11. public:
  12. cmCursesBoolWidget(int width, int height, int left, int top);
  13. // Description:
  14. // Handle user input. Called by the container of this widget
  15. // when this widget has focus. Returns true if the input was
  16. // handled.
  17. bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE;
  18. // Description:
  19. // Set/Get the value (on/off).
  20. void SetValueAsBool(bool value);
  21. bool GetValueAsBool();
  22. protected:
  23. cmCursesBoolWidget(const cmCursesBoolWidget& from);
  24. void operator=(const cmCursesBoolWidget&);
  25. };
  26. #endif // cmCursesBoolWidget_h