cmCursesBoolWidget.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef __cmCursesBoolWidget_h
  14. #define __cmCursesBoolWidget_h
  15. #include "cmCursesWidget.h"
  16. class cmCursesMainForm;
  17. class cmCursesBoolWidget : public cmCursesWidget
  18. {
  19. public:
  20. cmCursesBoolWidget(int width, int height, int left, int top);
  21. // Description:
  22. // Handle user input. Called by the container of this widget
  23. // when this widget has focus. Returns true if the input was
  24. // handled.
  25. virtual bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w);
  26. // Description:
  27. // Set/Get the value (on/off).
  28. void SetValueAsBool(bool value);
  29. bool GetValueAsBool();
  30. protected:
  31. cmCursesBoolWidget(const cmCursesBoolWidget& from);
  32. void operator=(const cmCursesBoolWidget&);
  33. };
  34. #endif // __cmCursesBoolWidget_h