cmCursesPathWidget.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include "cmConfigure.h" // IWYU pragma: keep
  5. #include <string>
  6. #include "cmCursesStandardIncludes.h"
  7. #include "cmCursesStringWidget.h"
  8. class cmCursesMainForm;
  9. class cmCursesPathWidget : public cmCursesStringWidget
  10. {
  11. public:
  12. cmCursesPathWidget(int width, int height, int left, int top);
  13. cmCursesPathWidget(cmCursesPathWidget const&) = delete;
  14. cmCursesPathWidget& operator=(cmCursesPathWidget const&) = delete;
  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. };