cmCursesPathWidget.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef __cmCursesPathWidget_h
  11. #define __cmCursesPathWidget_h
  12. #include "cmCursesStringWidget.h"
  13. class cmCursesPathWidget : public cmCursesStringWidget
  14. {
  15. public:
  16. cmCursesPathWidget(int width, int height, int left, int top);
  17. /**
  18. * This method is called when different keys are pressed. The
  19. * subclass can have a special implementation handler for this.
  20. */
  21. virtual void OnTab(cmCursesMainForm* fm, WINDOW* w);
  22. virtual void OnReturn(cmCursesMainForm* fm, WINDOW* w);
  23. virtual void OnType(int& key, cmCursesMainForm* fm, WINDOW* w);
  24. protected:
  25. cmCursesPathWidget(const cmCursesPathWidget& from);
  26. void operator=(const cmCursesPathWidget&);
  27. std::string LastString;
  28. std::string LastGlob;
  29. bool Cycle;
  30. std::string::size_type CurrentIndex;
  31. };
  32. #endif // __cmCursesPathWidget_h