cmCursesBoolWidget.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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 "cmCursesWidget.h"
  13. class cmCursesMainForm;
  14. class cmCursesBoolWidget : public cmCursesWidget
  15. {
  16. public:
  17. cmCursesBoolWidget(int width, int height, int left, int top);
  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. virtual bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w);
  23. // Description:
  24. // Set/Get the value (on/off).
  25. void SetValueAsBool(bool value);
  26. bool GetValueAsBool();
  27. protected:
  28. cmCursesBoolWidget(const cmCursesBoolWidget& from);
  29. void operator=(const cmCursesBoolWidget&);
  30. };
  31. #endif // __cmCursesBoolWidget_h