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 the reporter client is non-empty.
 
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 ()
 Delete the stored messages.
 
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.
 
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
 Indicates messages should be flushed as they are added.
 
bool m_immediateMode
 copy of the report, stored for filtering
 
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 80 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 31 of file wx_html_report_box.cpp.

References Flush(), onRightClick(), and onThemeChanged().

◆ ~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()

◆ Clear()

void WX_HTML_REPORT_BOX::Clear ( )

◆ Flush()

◆ generateHtml()

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

Definition at line 117 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 the reporter client is non-empty.

Implements 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()

bool REPORTER::HasMessageOfSeverity ( int  aSeverityMask) const
virtualinherited

Returns true if the reporter has one or more messages matching the specified severity mask.

Reimplemented in WX_HTML_PANEL_REPORTER, and WX_STRING_REPORTER.

Definition at line 53 of file reporter.cpp.

References REPORTER::HasMessage().

Referenced by DIALOG_SIM_MODEL< T >::loadLibrary(), NETLIST_EXPORTER_SPICE::ReadSchematicAndLibraries(), and SIM_LIB_MGR::SetLibrary().

◆ 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 117 of file reporter.h.

◆ Report() [1/2]

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

Definition at line 46 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 51 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 44 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 76 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 79 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 72 of file wx_html_report_box.h.

Referenced by GetUnits(), and SetUnits().


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