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