28#include <wx/textctrl.h>
30#include "stx/optional.hpp"
39 explicit LogPane(wxWindow *parent, wxWindowID
id = wxID_ANY,
bool becomeLogTarget =
true);
48 if (m_errorRedirector)
49 m_errorRedirector->SetBatchMode();
57 bool IsLogTarget()
const {
return m_logPanelTarget.has_value();}
63 wxTextCtrl *m_textCtrl;
65 stx::optional<wxLogTextCtrl> m_logPanelTarget;
67 stx::optional<ErrorRedirector> m_errorRedirector;
69 stx::optional<wxStreamToTextRedirector> m_textRedirector;
This file defines the class ErrorRedirector that redirects wx Errors to a dialogue.
A "debug messages" sidepane.
Definition: LogPane.h:36
void DropLogTarget()
Stop receiving log messages.
Definition: LogPane.cpp:48
void BecomeLogTarget()
Causes this log pane to receive all log messages from wxWidgets.
Definition: LogPane.cpp:56
bool IsLogTarget() const
True, if this is the log panel that receives all log messages.
Definition: LogPane.h:57
void SetBatchMode()
Causes log messages to be output to stderr, as well.
Definition: LogPane.h:47
~LogPane()
The destructor.
Definition: LogPane.cpp:66