KiCad PCB EDA Suite
Loading...
Searching...
No Matches
WX_HTML_REPORT_BOX Class Reference

A slimmed down version of WX_HTML_REPORT_PANEL. More...

#include <wx_html_report_box.h>

Inheritance diagram for WX_HTML_REPORT_BOX:
HTML_WINDOW REPORTER

Public Types

enum  LOCATION { LOC_HEAD = 0 , LOC_BODY , LOC_TAIL }
 Location where the message is to be reported. More...
 

Public Member Functions

 WX_HTML_REPORT_BOX (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(500, 300), long style=wxTAB_TRAVERSAL)
 
REPORTERReport (const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
 Report a string with a given severity. More...
 
bool HasMessage () const override
 Returns true if the reporter client is non-empty. More...
 
void SetUnits (EDA_UNITS aUnits)
 
EDA_UNITS GetUnits () const override
 
void SetImmediateMode ()
 In immediate mode, messages are flushed as they are added. More...
 
void Flush ()
 Build the HTML messages page. More...
 
void Clear ()
 Delete the stored messages. More...
 
bool SetPage (const wxString &aSource) override
 
bool AppendToPage (const wxString &aSource)
 
void ThemeChanged ()
 
REPORTERReport (const char *aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
 
virtual REPORTERReportTail (const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
 Places the report at the end of the list, for objects that support report ordering. More...
 
virtual REPORTERReportHead (const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
 Places the report at the beginning of the list for objects that support ordering. More...
 
REPORTERoperator<< (const wxString &aText)
 

Private Member Functions

void onThemeChanged (wxSysColourChangedEvent &aEvent)
 
wxString generateHtml (const wxString &aLine)
 

Private Attributes

EDA_UNITS m_units
 Indicates messages should be flushed as they are added. More...
 
bool m_immediateMode
 copy of the report, stored for filtering More...
 
std::vector< wxString > m_messages
 
wxString m_pageSource
 

Detailed Description

A slimmed down version of WX_HTML_REPORT_PANEL.

Definition at line 31 of file wx_html_report_box.h.

Member Enumeration Documentation

◆ LOCATION

enum REPORTER::LOCATION
inherited

Location where the message is to be reported.

LOC_HEAD messages are printed before all others (typically intro messages) LOC_BODY messages are printed in the middle LOC_TAIL messages are printed after all others (typically status messages)

Enumerator
LOC_HEAD 
LOC_BODY 
LOC_TAIL 

Definition at line 79 of file reporter.h.

Constructor & Destructor Documentation

◆ WX_HTML_REPORT_BOX()

WX_HTML_REPORT_BOX::WX_HTML_REPORT_BOX ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize( 500,300 ),
long  style = wxTAB_TRAVERSAL 
)

Definition at line 28 of file wx_html_report_box.cpp.

References Flush(), and onThemeChanged().

Member Function Documentation

◆ AppendToPage()

◆ Clear()

void WX_HTML_REPORT_BOX::Clear ( )

◆ Flush()

◆ generateHtml()

wxString WX_HTML_REPORT_BOX::generateHtml ( const wxString &  aLine)
private

Definition at line 76 of file wx_html_report_box.cpp.

References KiROUND().

Referenced by Flush().

◆ GetUnits()

EDA_UNITS WX_HTML_REPORT_BOX::GetUnits ( ) const
inlineoverridevirtual

Reimplemented from REPORTER.

Definition at line 43 of file wx_html_report_box.h.

References m_units.

◆ HasMessage()

bool WX_HTML_REPORT_BOX::HasMessage ( ) const
inlineoverridevirtual

Returns true if the reporter client is non-empty.

Implements REPORTER.

Definition at line 40 of file wx_html_report_box.h.

References m_messages.

Referenced by SCH_EDIT_FRAME::importFile().

◆ onThemeChanged()

void WX_HTML_REPORT_BOX::onThemeChanged ( wxSysColourChangedEvent &  aEvent)
private

Definition at line 41 of file wx_html_report_box.cpp.

References Flush().

Referenced by WX_HTML_REPORT_BOX().

◆ operator<<()

REPORTER & REPORTER::operator<< ( const wxString &  aText)
inlineinherited

Definition at line 116 of file reporter.h.

References REPORTER::Report().

◆ Report() [1/2]

REPORTER & REPORTER::Report ( const char *  aText,
SEVERITY  aSeverity = RPT_SEVERITY_UNDEFINED 
)
inherited

Definition at line 38 of file reporter.cpp.

References From_UTF8(), and REPORTER::Report().

◆ Report() [2/2]

◆ ReportHead()

virtual REPORTER & REPORTER::ReportHead ( const wxString &  aText,
SEVERITY  aSeverity = RPT_SEVERITY_UNDEFINED 
)
inlinevirtualinherited

◆ ReportTail()

◆ SetImmediateMode()

void WX_HTML_REPORT_BOX::SetImmediateMode ( )
inline

In immediate mode, messages are flushed as they are added.

Required for progress-related reports, but can be very slow for larger reports.

Definition at line 49 of file wx_html_report_box.h.

References m_immediateMode.

Referenced by DIALOG_DRC::DIALOG_DRC(), DIALOG_ERC::DIALOG_ERC(), and DIALOG_PCM_PROGRESS::DIALOG_PCM_PROGRESS().

◆ SetPage()

◆ SetUnits()

void WX_HTML_REPORT_BOX::SetUnits ( EDA_UNITS  aUnits)
inline

Definition at line 42 of file wx_html_report_box.h.

References m_units.

Referenced by DIALOG_BOOK_REPORTER::AddHTMLPage().

◆ ThemeChanged()

Member Data Documentation

◆ m_immediateMode

bool WX_HTML_REPORT_BOX::m_immediateMode
private

copy of the report, stored for filtering

Definition at line 72 of file wx_html_report_box.h.

Referenced by Report(), and SetImmediateMode().

◆ m_messages

std::vector<wxString> WX_HTML_REPORT_BOX::m_messages
private

Definition at line 75 of file wx_html_report_box.h.

Referenced by Clear(), Flush(), HasMessage(), and Report().

◆ m_pageSource

wxString HTML_WINDOW::m_pageSource
privateinherited

◆ m_units

EDA_UNITS WX_HTML_REPORT_BOX::m_units
private

Indicates messages should be flushed as they are added.

Required for progress-related reports, but can be very slow for larger reports.

Definition at line 68 of file wx_html_report_box.h.

Referenced by GetUnits(), and SetUnits().


The documentation for this class was generated from the following files: