diff options
Diffstat (limited to 'Source/CursesDialog/cmCursesLongMessageForm.cxx')
-rw-r--r-- | Source/CursesDialog/cmCursesLongMessageForm.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/CursesDialog/cmCursesLongMessageForm.cxx b/Source/CursesDialog/cmCursesLongMessageForm.cxx index 91d759e..afd2b6b 100644 --- a/Source/CursesDialog/cmCursesLongMessageForm.cxx +++ b/Source/CursesDialog/cmCursesLongMessageForm.cxx @@ -35,6 +35,22 @@ cmCursesLongMessageForm::~cmCursesLongMessageForm() } } +void cmCursesLongMessageForm::UpdateContent(std::string const& output, + std::string const& title) +{ + this->Title = title; + + if (!output.empty() && this->Messages.size() < MAX_CONTENT_SIZE) { + this->Messages.append("\n" + output); + form_driver(this->Form, REQ_NEW_LINE); + this->DrawMessage(output.c_str()); + } + + this->UpdateStatusBar(); + touchwin(stdscr); + refresh(); +} + void cmCursesLongMessageForm::UpdateStatusBar() { int x; |