cmCursesPathWidget.h 1014 B

12345678910111213141516171819202122232425262728293031323334353637
  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 cmCursesPathWidget_h
  4. #define cmCursesPathWidget_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include "cmCursesStandardIncludes.h"
  7. #include "cmCursesStringWidget.h"
  8. #include <string>
  9. class cmCursesMainForm;
  10. class cmCursesPathWidget : public cmCursesStringWidget
  11. {
  12. CM_DISABLE_COPY(cmCursesPathWidget)
  13. public:
  14. cmCursesPathWidget(int width, int height, int left, int top);
  15. /**
  16. * This method is called when different keys are pressed. The
  17. * subclass can have a special implementation handler for this.
  18. */
  19. void OnTab(cmCursesMainForm* fm, WINDOW* w) override;
  20. void OnReturn(cmCursesMainForm* fm, WINDOW* w) override;
  21. void OnType(int& key, cmCursesMainForm* fm, WINDOW* w) override;
  22. protected:
  23. std::string LastString;
  24. std::string LastGlob;
  25. bool Cycle;
  26. std::string::size_type CurrentIndex;
  27. };
  28. #endif // cmCursesPathWidget_h