cmCursesLongMessageForm.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 cmCursesLongMessageForm_h
  4. #define cmCursesLongMessageForm_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include "cmCursesForm.h"
  7. #include "cmCursesStandardIncludes.h"
  8. #include <string>
  9. #include <vector>
  10. class cmCursesLongMessageForm : public cmCursesForm
  11. {
  12. public:
  13. cmCursesLongMessageForm(std::vector<std::string> const& messages,
  14. const char* title);
  15. ~cmCursesLongMessageForm() override;
  16. cmCursesLongMessageForm(cmCursesLongMessageForm const&) = delete;
  17. cmCursesLongMessageForm& operator=(cmCursesLongMessageForm const&) = delete;
  18. // Description:
  19. // Handle user input.
  20. void HandleInput() override;
  21. // Description:
  22. // Display form. Use a window of size width x height, starting
  23. // at top, left.
  24. void Render(int left, int top, int width, int height) override;
  25. // Description:
  26. // This method should normally called only by the form.
  27. // The only exception is during a resize.
  28. void PrintKeys();
  29. // Description:
  30. // This method should normally called only by the form.
  31. // The only exception is during a resize.
  32. void UpdateStatusBar() override;
  33. protected:
  34. std::string Messages;
  35. std::string Title;
  36. FIELD* Fields[2];
  37. };
  38. #endif // cmCursesLongMessageForm_h