cmCursesPathWidget.h 1.1 KB

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