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;
141 std::cout << aMsg << std::endl;
149 static REPORTER* s_stdoutReporter =
nullptr;
151 if( !s_stdoutReporter )
154 return *s_stdoutReporter;
177 static REPORTER* s_wxLogReporter =
nullptr;
179 if( !s_wxLogReporter )
182 return *s_wxLogReporter;
211 m_message.reset(
new wxString( aText ) );
235 int icon = wxICON_NONE;
bool HasMessage() const override
Returns true if the reporter client is non-empty.
static REPORTER & GetInstance()
REPORTER & Report(const wxString &aMsg, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
static wxString FROM_UTF8(const char *cstring)
Convert a UTF8 encoded C string to a wxString for all wxWidgets build modes.
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.
bool HasMessage() const override
Returns true if the reporter client is non-empty.
WX_HTML_REPORT_PANEL * m_panel
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.
bool HasMessage() const override
Returns true if the reporter client is non-empty.
This file contains miscellaneous commonly used macros and functions.
REPORTER & Report(const wxString &aMsg, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
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.
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
Report a string with a given severity.
int Count(int severityMask)
sets the frame label
REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
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.
void Finalize()
Update the infobar with the reported text.
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.
static REPORTER & GetInstance()
virtual ~INFOBAR_REPORTER()
void QueueDismiss()
Send the infobar an event telling it to hide itself.
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.
static REPORTER & GetInstance()
wxStatusBar * m_statusBar
bool HasMessage() const override
Returns true if the reporter client is non-empty.
std::unique_ptr< wxString > m_message