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)
 
 ~WX_HTML_REPORT_BOX ()
 
REPORTERReport (const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED) override
 Report a string with a given severity.
 
bool HasMessage () const override
 Returns true if any messages were reported.
 
void SetUnits (EDA_UNITS aUnits)
 
EDA_UNITS GetUnits () const override
 
void SetImmediateMode ()
 In immediate mode, messages are flushed as they are added.
 
void Flush ()
 Build the HTML messages page.
 
void Clear () override
 Delete the stored messages.
 
bool SetPage (const wxString &aSource) override
 
bool AppendToPage (const wxString &aSource)
 
void ThemeChanged ()
 
bool ScrollToAnchor (const wxString &aAnchor)
 
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.
 
virtual REPORTERReportHead (const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)
 Places the report at the beginning of the list for objects that support ordering.
 
REPORTERoperator<< (const wxString &aText)
 
virtual bool HasMessageOfSeverity (int aSeverityMask) const
 Returns true if the reporter has one or more messages matching the specified severity mask.
 

Private Member Functions

void onThemeChanged (wxSysColourChangedEvent &aEvent)
 
void onRightClick (wxMouseEvent &event)
 
void onMenuEvent (wxMenuEvent &event)
 
wxString generateHtml (const wxString &aLine)
 

Private Attributes

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

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 88 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 )

◆ ~WX_HTML_REPORT_BOX()

WX_HTML_REPORT_BOX::~WX_HTML_REPORT_BOX ( )

Definition at line 47 of file wx_html_report_box.cpp.

References onRightClick().

Member Function Documentation

◆ AppendToPage()

bool HTML_WINDOW::AppendToPage ( const wxString & aSource)
inherited

Definition at line 69 of file html_window.cpp.

References m_pageSource, and SetPage().

◆ Clear()

void WX_HTML_REPORT_BOX::Clear ( )
overridevirtual

Delete the stored messages.

Reimplemented from REPORTER.

Definition at line 137 of file wx_html_report_box.cpp.

References REPORTER::Clear(), and m_messages.

◆ Flush()

◆ generateHtml()

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

Definition at line 118 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 45 of file wx_html_report_box.h.

References m_units.

◆ HasMessage()

bool WX_HTML_REPORT_BOX::HasMessage ( ) const
inlineoverridevirtual

Returns true if any messages were reported.

Reimplemented from REPORTER.

Definition at line 42 of file wx_html_report_box.h.

References m_messages.

Referenced by SCH_EDIT_FRAME::importFile(), PANEL_FP_LIB_TABLE::onMigrateLibraries(), and PCB_EDIT_FRAME::OpenProjectFiles().

◆ HasMessageOfSeverity()

◆ onMenuEvent()

void WX_HTML_REPORT_BOX::onMenuEvent ( wxMenuEvent & event)
private

Definition at line 71 of file wx_html_report_box.cpp.

◆ onRightClick()

void WX_HTML_REPORT_BOX::onRightClick ( wxMouseEvent & event)
private

Definition at line 63 of file wx_html_report_box.cpp.

Referenced by WX_HTML_REPORT_BOX(), and ~WX_HTML_REPORT_BOX().

◆ onThemeChanged()

void WX_HTML_REPORT_BOX::onThemeChanged ( wxSysColourChangedEvent & aEvent)
private

Definition at line 55 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 129 of file reporter.h.

References Report(), and REPORTER().

◆ Report() [1/2]

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

Definition at line 49 of file reporter.cpp.

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

◆ Report() [2/2]

REPORTER & WX_HTML_REPORT_BOX::Report ( const wxString & aText,
SEVERITY aSeverity = RPT_SEVERITY_UNDEFINED )
overridevirtual

Report a string with a given severity.

Parameters
aTextis the string to report.
aSeverityis an indicator ( RPT_UNDEFINED, RPT_INFO, RPT_WARNING, RPT_ERROR, RPT_ACTION ) used to filter and format messages

Reimplemented from REPORTER.

Definition at line 90 of file wx_html_report_box.cpp.

References Flush(), m_immediateMode, m_messages, and REPORTER::REPORTER().

Referenced by BOARD_INSPECTION_TOOL::DiffFootprint(), SCH_INSPECTION_TOOL::DiffSymbol(), BOARD_INSPECTION_TOOL::InspectClearance(), BOARD_INSPECTION_TOOL::InspectConstraints(), and BOARD_INSPECTION_TOOL::InspectDRCError().

◆ ReportHead()

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

Places the report at the beginning of the list for objects that support ordering.

Reimplemented in WX_HTML_PANEL_REPORTER.

Definition at line 121 of file reporter.h.

References Report(), REPORTER(), and RPT_SEVERITY_UNDEFINED.

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), DIALOG_IMPORT_NETLIST::loadNetlist(), WX_HTML_PANEL_REPORTER::ReportHead(), DIALOG_EXPORT_NETLIST::TransferDataFromWindow(), and SCH_EDIT_FRAME::WriteNetListFile().

◆ ReportTail()

◆ ScrollToAnchor()

bool HTML_WINDOW::ScrollToAnchor ( const wxString & aAnchor)
inherited

Definition at line 81 of file html_window.cpp.

References result.

◆ 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 52 of file wx_html_report_box.h.

References m_immediateMode.

◆ SetPage()

bool HTML_WINDOW::SetPage ( const wxString & aSource)
overrideinherited

◆ SetUnits()

void WX_HTML_REPORT_BOX::SetUnits ( EDA_UNITS aUnits)
inline

Definition at line 44 of file wx_html_report_box.h.

References m_units.

Referenced by DIALOG_BOOK_REPORTER::AddHTMLPage().

◆ ThemeChanged()

void HTML_WINDOW::ThemeChanged ( )
inherited

Definition at line 75 of file html_window.cpp.

References m_pageSource, and SetPage().

Referenced by onThemeChanged().

Member Data Documentation

◆ m_immediateMode

bool WX_HTML_REPORT_BOX::m_immediateMode
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 78 of file wx_html_report_box.h.

Referenced by Report(), SetImmediateMode(), and WX_HTML_REPORT_BOX().

◆ m_messages

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

copy of the report, stored for filtering.

Definition at line 81 of file wx_html_report_box.h.

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

◆ m_pageSource

wxString HTML_WINDOW::m_pageSource
privateinherited

Definition at line 61 of file html_window.h.

Referenced by AppendToPage(), SetPage(), and ThemeChanged().

◆ m_reportedSeverityMask

int REPORTER::m_reportedSeverityMask
privateinherited

Definition at line 159 of file reporter.h.

Referenced by Clear(), HasMessage(), HasMessageOfSeverity(), Report(), and REPORTER().

◆ m_units

EDA_UNITS WX_HTML_REPORT_BOX::m_units
private

Definition at line 74 of file wx_html_report_box.h.

Referenced by GetUnits(), SetUnits(), and WX_HTML_REPORT_BOX().


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