cmCursesBoolWidget.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmCursesBoolWidget_h
  11. #define cmCursesBoolWidget_h
  12. #include <cmConfigure.h>
  13. #include "cmCursesStandardIncludes.h"
  14. #include "cmCursesWidget.h"
  15. class cmCursesMainForm;
  16. class cmCursesBoolWidget : public cmCursesWidget
  17. {
  18. public:
  19. cmCursesBoolWidget(int width, int height, int left, int top);
  20. // Description:
  21. // Handle user input. Called by the container of this widget
  22. // when this widget has focus. Returns true if the input was
  23. // handled.
  24. bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w) CM_OVERRIDE;
  25. // Description:
  26. // Set/Get the value (on/off).
  27. void SetValueAsBool(bool value);
  28. bool GetValueAsBool();
  29. protected:
  30. cmCursesBoolWidget(const cmCursesBoolWidget& from);
  31. void operator=(const cmCursesBoolWidget&);
  32. };
  33. #endif // cmCursesBoolWidget_h