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
6 #include "cmConfigure.h" // IWYU pragma: keep
11 #include "cmCursesForm.h"
12 #include "cmCursesStandardIncludes.h"
14 class cmCursesLongMessageForm : public cmCursesForm
17 enum class ScrollBehavior
23 cmCursesLongMessageForm(std::vector<std::string> const& messages,
24 const char* title, ScrollBehavior scrollBehavior);
25 ~cmCursesLongMessageForm() override;
27 cmCursesLongMessageForm(cmCursesLongMessageForm const&) = delete;
28 cmCursesLongMessageForm& operator=(cmCursesLongMessageForm const&) = delete;
30 void UpdateContent(std::string const& output, std::string const& title);
34 void HandleInput() override;
37 // Display form. Use a window of size width x height, starting
39 void Render(int left, int top, int width, int height) override;
42 // This method should normally called only by the form.
43 // The only exception is during a resize.
47 // This method should normally called only by the form.
48 // The only exception is during a resize.
49 void UpdateStatusBar() override;
52 static constexpr int MAX_CONTENT_SIZE = 60000;
54 void DrawMessage(const char* msg) const;
58 ScrollBehavior Scrolling;
63 #endif // cmCursesLongMessageForm_h