diff options
author | Sylvain Joubert <joubert.sy@gmail.com> | 2019-11-05 16:07:42 (GMT) |
---|---|---|
committer | Sylvain Joubert <joubert.sy@gmail.com> | 2019-11-16 07:27:32 (GMT) |
commit | 88cfef0821933dfa4e840c793cdb9352d4b4423b (patch) | |
tree | 47b496dfe637483adfc08a93d6ca1914deb0e296 /Source/CursesDialog/cmCursesLongMessageForm.h | |
parent | a10e11fd7c36a2086223384d35f3d5325ef84f05 (diff) | |
download | CMake-88cfef0821933dfa4e840c793cdb9352d4b4423b.zip CMake-88cfef0821933dfa4e840c793cdb9352d4b4423b.tar.gz CMake-88cfef0821933dfa4e840c793cdb9352d4b4423b.tar.bz2 |
ccmake: redirect stdout/stderr to the displayed logs
Use cmSystemTools to report some messages.
These should now be caught and displayed properly,
both in ccmake and cmake-gui
Avoid log display flickering during processing
- Don't clear the screen each time the long message form is rendered.
It always renders the whole screen again so clearing it only causes
flickering.
- Add scroll down capabilities to the long message form so that it can
draw itself directly in the correct state. This removes the need to
programatically scroll down just after that also caused flickering.
Fixes #19882
Fixes #13288
Diffstat (limited to 'Source/CursesDialog/cmCursesLongMessageForm.h')
-rw-r--r-- | Source/CursesDialog/cmCursesLongMessageForm.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Source/CursesDialog/cmCursesLongMessageForm.h b/Source/CursesDialog/cmCursesLongMessageForm.h index dde5bff..88efe62 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.h +++ b/Source/CursesDialog/cmCursesLongMessageForm.h @@ -14,8 +14,14 @@ class cmCursesLongMessageForm : public cmCursesForm { public: + enum class ScrollBehavior + { + NoScroll, + ScrollDown + }; + cmCursesLongMessageForm(std::vector<std::string> const& messages, - const char* title); + const char* title, ScrollBehavior scrollBehavior); ~cmCursesLongMessageForm() override; cmCursesLongMessageForm(cmCursesLongMessageForm const&) = delete; @@ -26,10 +32,6 @@ public: void HandleInput() override; // Description: - // Scroll down to the end of the content - void ScrollDown(); - - // Description: // Display form. Use a window of size width x height, starting // at top, left. void Render(int left, int top, int width, int height) override; @@ -47,6 +49,7 @@ public: protected: std::string Messages; std::string Title; + ScrollBehavior Scrolling; FIELD* Fields[2]; }; |