33#include <wx/textctrl.h>
34#include <wx/statusbr.h>
46 wxT(
"No wxTextCtrl object defined in WX_TEXT_CTRL_REPORTER." ) );
61 wxCHECK_MSG(
m_string !=
nullptr, *
this,
62 wxT(
"No wxString object defined in WX_STRING_REPORTER." ) );
77 wxCHECK_MSG(
m_panel !=
nullptr, *
this,
78 wxT(
"No WX_HTML_REPORT_PANEL object defined in WX_HTML_PANEL_REPORTER." ) );
87 wxCHECK_MSG(
m_panel !=
nullptr, *
this,
88 wxT(
"No WX_HTML_REPORT_PANEL object defined in WX_HTML_PANEL_REPORTER." ) );
97 wxCHECK_MSG(
m_panel !=
nullptr, *
this,
98 wxT(
"No WX_HTML_REPORT_PANEL object defined in WX_HTML_PANEL_REPORTER." ) );
119 static REPORTER* s_nullReporter =
nullptr;
121 if( !s_nullReporter )
124 return *s_nullReporter;
142 std::cout << aMsg << std::endl;
150 static REPORTER* s_stdoutReporter =
nullptr;
152 if( !s_stdoutReporter )
155 return *s_stdoutReporter;
179 static REPORTER* s_wxLogReporter =
nullptr;
181 if( !s_wxLogReporter )
184 return *s_wxLogReporter;
213 m_message.reset(
new wxString( aText ) );
237 int icon = wxICON_NONE;
void Finalize()
Update the infobar with the reported text.
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
std::unique_ptr< wxString > m_message
virtual ~INFOBAR_REPORTER()
bool HasMessage() const override
Returns true if the reporter client is non-empty.
static REPORTER & GetInstance()
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
A pure virtual class used to derive REPORTER objects from.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
wxStatusBar * m_statusBar
bool HasMessage() const override
Returns true if the reporter client is non-empty.
REPORTER & Report(const wxString &aMsg, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
static REPORTER & GetInstance()
REPORTER & Report(const wxString &aMsg, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
static REPORTER & GetInstance()
bool HasMessage() const override
Returns true if the reporter client is non-empty.
REPORTER & ReportTail(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Places the report at the end of the list, for objects that support report ordering.
REPORTER & ReportHead(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Places the report at the beginning of the list for objects that support ordering.
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
WX_HTML_REPORT_PANEL * m_panel
int Count(int severityMask)
sets the frame label
void Report(const wxString &aText, SEVERITY aSeverity, REPORTER::LOCATION aLocation=REPORTER::LOC_BODY)
Reports the string.
void QueueShowMessage(const wxString &aMessage, int aFlags=wxICON_INFORMATION)
Send the infobar an event telling it to show a message.
void QueueDismiss()
Send the infobar an event telling it to hide itself.
bool HasMessage() const override
Returns true if the reporter client is non-empty.
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
bool HasMessage() const override
Returns true if the reporter client is non-empty.
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
This file contains miscellaneous commonly used macros and functions.
static wxString FROM_UTF8(const char *cstring)
Convert a UTF8 encoded C string to a wxString for all wxWidgets build modes.