| 1 |
#include "DAPConsoleOutput.hpp" |
| 2 |
|
| 3 |
#include "globals.h" |
| 4 |
#include "macros.h" |
| 5 |
|
| 6 |
#include <wx/arrstr.h> |
| 7 |
#include <wx/tokenzr.h> |
| 8 |
|
| 9 |
DAPConsoleOutput::DAPConsoleOutput(wxWindow* parent, clModuleLogger& log) |
| 10 |
: DAPTerminalCtrlView(parent, log) |
| 11 |
{ |
| 12 |
} |
| 13 |
|
| 14 |
DAPConsoleOutput::~DAPConsoleOutput() {} |
| 15 |
|
| 16 |
void DAPConsoleOutput::AddOutputEvent(dap::OutputEvent* event) |
| 17 |
{ |
| 18 |
CHECK_PTR_RET(event); |
| 19 |
wxArrayString lines = wxStringTokenize(event->output, "\n", wxTOKEN_STRTOK); |
| 20 |
ScrollToEnd(); |
| 21 |
for(auto& line : lines) { |
| 22 |
line.Trim(); |
| 23 |
AppendLine(line); |
| 24 |
} |
| 25 |
ScrollToEnd(); |
| 26 |
} |