cmCursesBoolWidget.h 732 B

1234567891011121314151617181920212223242526272829
  1. #ifndef __cmCursesBoolWidget_h
  2. #define __cmCursesBoolWidget_h
  3. #include "cmCursesWidget.h"
  4. class cmCursesMainForm;
  5. class cmCursesBoolWidget : public cmCursesWidget
  6. {
  7. public:
  8. cmCursesBoolWidget(int width, int height, int left, int top);
  9. // Description:
  10. // Handle user input. Called by the container of this widget
  11. // when this widget has focus. Returns true if the input was
  12. // handled.
  13. virtual bool HandleInput(int& key, cmCursesMainForm* fm, WINDOW* w);
  14. // Description:
  15. // Set/Get the value (on/off).
  16. void SetValueAsBool(bool value);
  17. bool GetValueAsBool();
  18. protected:
  19. cmCursesBoolWidget(const cmCursesBoolWidget& from);
  20. void operator=(const cmCursesBoolWidget&);
  21. };
  22. #endif // __cmCursesBoolWidget_h