KiCad PCB EDA Suite
WX_HTML_REPORT_PANEL Class Reference

Class WX_HTML_REPORT_PANEL. More...

#include <wx_html_report_panel.h>

Inheritance diagram for WX_HTML_REPORT_PANEL:
WX_HTML_REPORT_PANEL_BASE

Classes

struct  REPORT_LINE
 

Public Member Functions

 WX_HTML_REPORT_PANEL (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(500, 300), long style=wxTAB_TRAVERSAL)
 
 ~WX_HTML_REPORT_PANEL ()
 
void MsgPanelSetMinSize (const wxSize &aMinSize)
 

Set the min size of the area which displays html messages:

More...
 
REPORTERReporter ()
 

returns the reporter object that reports to this panel

More...
 
void Report (const wxString &aText, REPORTER::SEVERITY aSeverity, REPORTER::LOCATION aLocation=REPORTER::LOC_BODY)
 Reports the string. More...
 
void Clear ()
 

clears the report panel

More...
 
int Count (int severityMask)
 

return the number of messages matching the given severity mask.

More...
 
void SetLabel (const wxString &aLabel) override
 

sets the frame label

More...
 
void SetLazyUpdate (bool aLazyUpdate)
 

Sets the lasy update.

More...
 
void Flush (bool aSort=false)
 

Forces updating the HTML page, after the report is built in lazy mode If aSort = true, the body messages will be ordered by severity

More...
 
void SetVisibleSeverities (int aSeverities)
 

Set the visible severity filter.

More...
 
int GetVisibleSeverities ()
 

More...
 

Protected Attributes

wxStaticBoxSizer * m_box
 
wxFlexGridSizer * m_fgSizer
 
wxHtmlWindow * m_htmlView
 
wxStaticText * m_staticTextShow
 
wxCheckBox * m_checkBoxShowAll
 
wxCheckBox * m_checkBoxShowErrors
 
wxStaticBitmap * m_errorsBadge
 
wxCheckBox * m_checkBoxShowWarnings
 
wxStaticBitmap * m_warningsBadge
 
wxCheckBox * m_checkBoxShowActions
 
wxCheckBox * m_checkBoxShowInfos
 
wxButton * m_btnSaveReportToFile
 

Private Types

typedef std::vector< REPORT_LINEREPORT_LINES
 

Private Member Functions

wxString addHeader (const wxString &aBody)
 
wxString generateHtml (const REPORT_LINE &aLine)
 
wxString generatePlainText (const REPORT_LINE &aLine)
 
void updateBadges ()
 
void scrollToBottom ()
 
void syncCheckboxes ()
 
void onRightClick (wxMouseEvent &event) override
 
void onMenuEvent (wxMenuEvent &event)
 
void onCheckBoxShowAll (wxCommandEvent &event) override
 
void onCheckBoxShowWarnings (wxCommandEvent &event) override
 
void onCheckBoxShowErrors (wxCommandEvent &event) override
 
void onCheckBoxShowInfos (wxCommandEvent &event) override
 
void onCheckBoxShowActions (wxCommandEvent &event) override
 
void onBtnSaveToFile (wxCommandEvent &event) override
 

Private Attributes

REPORT_LINES m_report
 

copy of the report, stored for filtering

More...
 
REPORT_LINES m_reportTail
 

Lines to print at the very end of the report, regardless of sorting

More...
 
REPORT_LINES m_reportHead
 

Lines to print at the very beginning of the report, regardless of sorting

More...
 
WX_HTML_PANEL_REPORTER m_reporter
 

the reporter

More...
 
int m_severities
 

message severities to display (mask)

More...
 
bool m_lazyUpdate
 

Detailed Description

Class WX_HTML_REPORT_PANEL.

A widget for browsing a rich text error/status report. Used in numerous dialogs in eeschema and pcbnew. Provides error filtering functionality and saving report files.

The messages are reported throuth a REPORTER object

Definition at line 41 of file wx_html_report_panel.h.

Member Typedef Documentation

◆ REPORT_LINES

typedef std::vector<REPORT_LINE> WX_HTML_REPORT_PANEL::REPORT_LINES
private

Definition at line 97 of file wx_html_report_panel.h.

Constructor & Destructor Documentation

◆ WX_HTML_REPORT_PANEL()

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

Definition at line 30 of file wx_html_report_panel.cpp.

34  :
35  WX_HTML_REPORT_PANEL_BASE( parent, id, pos, size, style ),
36  m_reporter( this ),
37  m_severities( -1 ),
38  m_lazyUpdate( false )
39 {
41  m_htmlView->SetPage( addHeader( "" ) );
42 
43  Connect( wxEVT_COMMAND_MENU_SELECTED,
44  wxMenuEventHandler( WX_HTML_REPORT_PANEL::onMenuEvent ), NULL, this );
45 }
wxString addHeader(const wxString &aBody)
WX_HTML_REPORT_PANEL_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(567, 228), long style=wxTAB_TRAVERSAL)
WX_HTML_PANEL_REPORTER m_reporter
the reporter
void onMenuEvent(wxMenuEvent &event)
int m_severities
message severities to display (mask)

References addHeader(), WX_HTML_REPORT_PANEL_BASE::m_htmlView, onMenuEvent(), and syncCheckboxes().

◆ ~WX_HTML_REPORT_PANEL()

WX_HTML_REPORT_PANEL::~WX_HTML_REPORT_PANEL ( )

Definition at line 48 of file wx_html_report_panel.cpp.

49 {
50 }

Member Function Documentation

◆ addHeader()

wxString WX_HTML_REPORT_PANEL::addHeader ( const wxString &  aBody)
private

Definition at line 210 of file wx_html_report_panel.cpp.

211 {
212  wxColour bgcolor = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW );
213  wxColour fgcolor = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
214 
215  return wxString::Format( wxT( "<html><body bgcolor='%s' text='%s'>%s</body></html>" ),
216  bgcolor.GetAsString( wxC2S_HTML_SYNTAX ),
217  fgcolor.GetAsString( wxC2S_HTML_SYNTAX ),
218  aBody );
219 }
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205

References Format().

Referenced by Flush(), and WX_HTML_REPORT_PANEL().

◆ Clear()

void WX_HTML_REPORT_PANEL::Clear ( )

clears the report panel

Definition at line 412 of file wx_html_report_panel.cpp.

413 {
414  m_report.clear();
415  m_reportHead.clear();
416  m_reportTail.clear();
417 }
REPORT_LINES m_reportHead
Lines to print at the very beginning of the report, regardless of sorting
REPORT_LINES m_reportTail
Lines to print at the very end of the report, regardless of sorting
REPORT_LINES m_report
copy of the report, stored for filtering

References m_report, m_reportHead, and m_reportTail.

Referenced by DIALOG_NETLIST::loadNetlist(), DIALOG_ANNOTATE::OnApplyClick(), DIALOG_EXCHANGE_FOOTPRINTS::OnApplyClicked(), DIALOG_NETLIST::onFilenameChanged(), and DIALOG_UPDATE_PCB::PerformUpdate().

◆ Count()

int WX_HTML_REPORT_PANEL::Count ( int  severityMask)

return the number of messages matching the given severity mask.

Definition at line 222 of file wx_html_report_panel.cpp.

223 {
224  int count = 0;
225 
226  for( const REPORT_LINE& reportLine : m_report )
227  if( severityMask & reportLine.severity )
228  count++;
229 
230  return count;
231 }
REPORT_LINES m_report
copy of the report, stored for filtering

References m_report.

Referenced by WX_HTML_PANEL_REPORTER::HasMessage(), and updateBadges().

◆ Flush()

void WX_HTML_REPORT_PANEL::Flush ( bool  aSort = false)

Forces updating the HTML page, after the report is built in lazy mode If aSort = true, the body messages will be ordered by severity

Definition at line 94 of file wx_html_report_panel.cpp.

95 {
96  wxString html;
97 
98  if( aSort )
99  {
100  std::sort( m_report.begin(), m_report.end(),
101  []( const REPORT_LINE& a, const REPORT_LINE& b)
102  {
103  return a.severity < b.severity;
104  });
105  }
106 
107  for( auto line : m_reportHead )
108  html += generateHtml( line );
109 
110  for( auto line : m_report )
111  html += generateHtml( line );
112 
113  for( auto line : m_reportTail )
114  html += generateHtml( line );
115 
116  m_htmlView->SetPage( addHeader( html ) );
117  scrollToBottom();
118 }
wxString addHeader(const wxString &aBody)
REPORT_LINES m_reportHead
Lines to print at the very beginning of the report, regardless of sorting
REPORT_LINES m_reportTail
Lines to print at the very end of the report, regardless of sorting
REPORT_LINES m_report
copy of the report, stored for filtering
wxString generateHtml(const REPORT_LINE &aLine)

References addHeader(), generateHtml(), WX_HTML_REPORT_PANEL_BASE::m_htmlView, m_report, m_reportHead, m_reportTail, scrollToBottom(), and WX_HTML_REPORT_PANEL::REPORT_LINE::severity.

Referenced by DIALOG_NETLIST::loadNetlist(), DIALOG_ANNOTATE::OnApplyClick(), DIALOG_EXCHANGE_FOOTPRINTS::OnApplyClicked(), onCheckBoxShowActions(), onCheckBoxShowAll(), onCheckBoxShowErrors(), onCheckBoxShowInfos(), onCheckBoxShowWarnings(), and DIALOG_UPDATE_PCB::PerformUpdate().

◆ generateHtml()

wxString WX_HTML_REPORT_PANEL::generateHtml ( const REPORT_LINE aLine)
private

Definition at line 234 of file wx_html_report_panel.cpp.

235 {
236  wxString retv;
237 
238  if( !( m_severities & aLine.severity ) )
239  return retv;
240 
241  switch( aLine.severity )
242  {
243  case REPORTER::RPT_ERROR:
244  retv = "<font color=\"red\" size=2><b>" + _( "Error: " ) + "</b></font><font size=2>" +
245  aLine.message + "</font><br>";
246  break;
248  retv = "<font color=\"orange\" size=2><b>" + _( "Warning: " ) +
249  "</b></font><font size=2>" + aLine.message + "</font><br>";
250  break;
251  case REPORTER::RPT_INFO:
252  retv = "<font color=\"dark gray\" size=2><b>" + _( "Info: " ) + "</b>" + aLine.message +
253  "</font><br>";
254  break;
256  retv = "<font color=\"dark green\" size=2>" + aLine.message + "</font><br>";
257  break;
258  default:
259  retv = "<font size=2>" + aLine.message + "</font><br>";
260  }
261 
262  return retv;
263 }
#define _(s)
int m_severities
message severities to display (mask)

References _, m_severities, WX_HTML_REPORT_PANEL::REPORT_LINE::message, REPORTER::RPT_ACTION, REPORTER::RPT_ERROR, REPORTER::RPT_INFO, REPORTER::RPT_WARNING, and WX_HTML_REPORT_PANEL::REPORT_LINE::severity.

Referenced by Flush(), and Report().

◆ generatePlainText()

wxString WX_HTML_REPORT_PANEL::generatePlainText ( const REPORT_LINE aLine)
private

Definition at line 266 of file wx_html_report_panel.cpp.

267 {
268  switch( aLine.severity )
269  {
270  case REPORTER::RPT_ERROR:
271  return _( "Error: " ) + aLine.message + wxT( "\n" );
273  return _( "Warning: " ) + aLine.message + wxT( "\n" );
274  case REPORTER::RPT_INFO:
275  return _( "Info: " ) + aLine.message + wxT( "\n" );
276  default:
277  return aLine.message + wxT( "\n" );
278  }
279 }
#define _(s)

References _, WX_HTML_REPORT_PANEL::REPORT_LINE::message, REPORTER::RPT_ERROR, REPORTER::RPT_INFO, REPORTER::RPT_WARNING, and WX_HTML_REPORT_PANEL::REPORT_LINE::severity.

Referenced by onBtnSaveToFile().

◆ GetVisibleSeverities()

int WX_HTML_REPORT_PANEL::GetVisibleSeverities ( )

Returns
the visible severity filter. If the m_showAll option is set, the mask is < 0

Definition at line 437 of file wx_html_report_panel.cpp.

438 {
439  return m_severities;
440 }
int m_severities
message severities to display (mask)

References m_severities.

Referenced by DIALOG_ANNOTATE::~DIALOG_ANNOTATE(), DIALOG_NETLIST::~DIALOG_NETLIST(), and DIALOG_UPDATE_PCB::~DIALOG_UPDATE_PCB().

◆ MsgPanelSetMinSize()

void WX_HTML_REPORT_PANEL::MsgPanelSetMinSize ( const wxSize &  aMinSize)

Set the min size of the area which displays html messages:

Definition at line 53 of file wx_html_report_panel.cpp.

54 {
55  m_fgSizer->SetMinSize( aMinSize );
56  GetSizer()->SetSizeHints( this );
57 }

References WX_HTML_REPORT_PANEL_BASE::m_fgSizer.

Referenced by DIALOG_GEN_FOOTPRINT_POSITION::initDialog(), and DIALOG_ANNOTATE::InitValues().

◆ onBtnSaveToFile()

void WX_HTML_REPORT_PANEL::onBtnSaveToFile ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from WX_HTML_REPORT_PANEL_BASE.

Definition at line 376 of file wx_html_report_panel.cpp.

377 {
378  wxFileName fn( "./report.txt" );
379 
380  wxFileDialog dlg( this, _( "Save Report to File" ), fn.GetPath(), fn.GetFullName(),
381  TextFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
382 
383  if( dlg.ShowModal() != wxID_OK )
384  return;
385 
386  fn = dlg.GetPath();
387 
388  if( fn.GetExt().IsEmpty() )
389  fn.SetExt( "txt" );
390 
391  wxFile f( fn.GetFullPath(), wxFile::write );
392 
393  if( !f.IsOpened() )
394  {
395  wxString msg;
396 
397  msg.Printf( _( "Cannot write report to file \"%s\"." ),
398  fn.GetFullPath().GetData() );
399  wxMessageBox( msg, _( "File save error" ), wxOK | wxICON_ERROR, this );
400  return;
401  }
402 
403  for( const REPORT_LINE& l : m_report )
404  {
405  f.Write( generatePlainText( l ) );
406  }
407 
408  f.Close();
409 }
wxString generatePlainText(const REPORT_LINE &aLine)
#define _(s)
REPORT_LINES m_report
copy of the report, stored for filtering
wxString TextFileWildcard()

References _, generatePlainText(), m_report, and TextFileWildcard().

◆ onCheckBoxShowActions()

void WX_HTML_REPORT_PANEL::onCheckBoxShowActions ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from WX_HTML_REPORT_PANEL_BASE.

Definition at line 364 of file wx_html_report_panel.cpp.

365 {
366  if( event.IsChecked() )
368  else
369  m_severities &= ~REPORTER::RPT_ACTION;
370 
371  syncCheckboxes();
372  Flush( true );
373 }
void Flush(bool aSort=false)
Forces updating the HTML page, after the report is built in lazy mode If aSort = true,...
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
int m_severities
message severities to display (mask)

References Flush(), m_severities, REPORTER::RPT_ACTION, and syncCheckboxes().

◆ onCheckBoxShowAll()

void WX_HTML_REPORT_PANEL::onCheckBoxShowAll ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from WX_HTML_REPORT_PANEL_BASE.

Definition at line 306 of file wx_html_report_panel.cpp.

307 {
308  if( event.IsChecked() )
310  else
311  m_severities = 0;
312 
313  syncCheckboxes();
314  Flush( true );
315 }
void Flush(bool aSort=false)
Forces updating the HTML page, after the report is built in lazy mode If aSort = true,...
static constexpr int RPT_ALL
Definition: reporter.h:82
int m_severities
message severities to display (mask)

References Flush(), m_severities, REPORTER::RPT_ALL, and syncCheckboxes().

◆ onCheckBoxShowErrors()

void WX_HTML_REPORT_PANEL::onCheckBoxShowErrors ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from WX_HTML_REPORT_PANEL_BASE.

Definition at line 340 of file wx_html_report_panel.cpp.

341 {
342  if( event.IsChecked() )
344  else
345  m_severities &= ~REPORTER::RPT_ERROR;
346 
347  syncCheckboxes();
348  Flush( true );
349 }
void Flush(bool aSort=false)
Forces updating the HTML page, after the report is built in lazy mode If aSort = true,...
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
int m_severities
message severities to display (mask)

References Flush(), m_severities, REPORTER::RPT_ERROR, and syncCheckboxes().

◆ onCheckBoxShowInfos()

void WX_HTML_REPORT_PANEL::onCheckBoxShowInfos ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from WX_HTML_REPORT_PANEL_BASE.

Definition at line 352 of file wx_html_report_panel.cpp.

353 {
354  if( event.IsChecked() )
356  else
357  m_severities &= ~REPORTER::RPT_INFO;
358 
359  syncCheckboxes();
360  Flush( true );
361 }
void Flush(bool aSort=false)
Forces updating the HTML page, after the report is built in lazy mode If aSort = true,...
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
int m_severities
message severities to display (mask)

References Flush(), m_severities, REPORTER::RPT_INFO, and syncCheckboxes().

◆ onCheckBoxShowWarnings()

void WX_HTML_REPORT_PANEL::onCheckBoxShowWarnings ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from WX_HTML_REPORT_PANEL_BASE.

Definition at line 328 of file wx_html_report_panel.cpp.

329 {
330  if( event.IsChecked() )
332  else
333  m_severities &= ~REPORTER::RPT_WARNING;
334 
335  syncCheckboxes();
336  Flush( true );
337 }
void Flush(bool aSort=false)
Forces updating the HTML page, after the report is built in lazy mode If aSort = true,...
Class REPORTER is a pure virtual class used to derive REPORTER objects from.
Definition: reporter.h:61
int m_severities
message severities to display (mask)

References Flush(), m_severities, REPORTER::RPT_WARNING, and syncCheckboxes().

◆ onMenuEvent()

void WX_HTML_REPORT_PANEL::onMenuEvent ( wxMenuEvent &  event)
private

Definition at line 290 of file wx_html_report_panel.cpp.

291 {
292  if( event.GetId() == wxID_COPY )
293  {
294  if( wxTheClipboard->Open() )
295  {
296  bool primarySelection = wxTheClipboard->IsUsingPrimarySelection();
297  wxTheClipboard->UsePrimarySelection( false ); // required to use the main clipboard
298  wxTheClipboard->SetData( new wxTextDataObject( m_htmlView->SelectionToText() ) );
299  wxTheClipboard->Close();
300  wxTheClipboard->UsePrimarySelection( primarySelection );
301  }
302  }
303 }

References WX_HTML_REPORT_PANEL_BASE::m_htmlView.

Referenced by WX_HTML_REPORT_PANEL().

◆ onRightClick()

void WX_HTML_REPORT_PANEL::onRightClick ( wxMouseEvent &  event)
overrideprivatevirtual

Reimplemented from WX_HTML_REPORT_PANEL_BASE.

Definition at line 282 of file wx_html_report_panel.cpp.

283 {
284  wxMenu popup;
285  popup.Append( wxID_COPY, "Copy" );
286  PopupMenu( &popup );
287 }

◆ Report()

void WX_HTML_REPORT_PANEL::Report ( const wxString &  aText,
REPORTER::SEVERITY  aSeverity,
REPORTER::LOCATION  aLocation = REPORTER::LOC_BODY 
)

Reports the string.

Parameters
aTextstring message to report
aSeveritystring classification level bitfield
aLocationREPORTER::LOCATION enum for placement of message

Definition at line 66 of file wx_html_report_panel.cpp.

68 {
69  REPORT_LINE line;
70  line.message = aText;
71  line.severity = aSeverity;
72 
73  if( aLocation == REPORTER::LOC_HEAD )
74  m_reportHead.push_back( line );
75  else if( aLocation == REPORTER::LOC_TAIL )
76  m_reportTail.push_back( line );
77  else
78  m_report.push_back( line );
79 
80  if( !m_lazyUpdate )
81  {
82  m_htmlView->AppendToPage( generateHtml( line ) );
84  }
85 }
REPORT_LINES m_reportHead
Lines to print at the very beginning of the report, regardless of sorting
REPORT_LINES m_reportTail
Lines to print at the very end of the report, regardless of sorting
REPORT_LINES m_report
copy of the report, stored for filtering
wxString generateHtml(const REPORT_LINE &aLine)

References generateHtml(), REPORTER::LOC_HEAD, REPORTER::LOC_TAIL, WX_HTML_REPORT_PANEL_BASE::m_htmlView, m_lazyUpdate, m_report, m_reportHead, m_reportTail, WX_HTML_REPORT_PANEL::REPORT_LINE::message, scrollToBottom(), and WX_HTML_REPORT_PANEL::REPORT_LINE::severity.

Referenced by WX_HTML_PANEL_REPORTER::Report(), WX_HTML_PANEL_REPORTER::ReportHead(), and WX_HTML_PANEL_REPORTER::ReportTail().

◆ Reporter()

◆ scrollToBottom()

void WX_HTML_REPORT_PANEL::scrollToBottom ( )
private

Definition at line 121 of file wx_html_report_panel.cpp.

122 {
123  int x, y, xUnit, yUnit;
124 
125  m_htmlView->GetVirtualSize( &x, &y );
126  m_htmlView->GetScrollPixelsPerUnit( &xUnit, &yUnit );
127  m_htmlView->Scroll( 0, y / yUnit );
128 
129  updateBadges();
130 }

References WX_HTML_REPORT_PANEL_BASE::m_htmlView, and updateBadges().

Referenced by Flush(), and Report().

◆ SetLabel()

void WX_HTML_REPORT_PANEL::SetLabel ( const wxString &  aLabel)
override

◆ SetLazyUpdate()

void WX_HTML_REPORT_PANEL::SetLazyUpdate ( bool  aLazyUpdate)

Sets the lasy update.

If this mode is on, messages are stored but the display is not updated (Updating display can be very time consumming if there are many messages) A call to Flush() will be needed after build the report

Definition at line 88 of file wx_html_report_panel.cpp.

89 {
90  m_lazyUpdate = aLazyUpdate;
91 }

References m_lazyUpdate.

Referenced by DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), DIALOG_NETLIST::loadNetlist(), and DIALOG_ANNOTATE::OnApplyClick().

◆ SetVisibleSeverities()

void WX_HTML_REPORT_PANEL::SetVisibleSeverities ( int  aSeverities)

Set the visible severity filter.

if aSeverities < 0 the m_showAll option is set

Definition at line 426 of file wx_html_report_panel.cpp.

427 {
428  if( aSeverities < 0 )
430  else
431  m_severities = aSeverities;
432 
433  syncCheckboxes();
434 }
static constexpr int RPT_ALL
Definition: reporter.h:82
int m_severities
message severities to display (mask)

References m_severities, REPORTER::RPT_ALL, and syncCheckboxes().

Referenced by DIALOG_NETLIST::DIALOG_NETLIST(), DIALOG_UPDATE_PCB::DIALOG_UPDATE_PCB(), and DIALOG_ANNOTATE::InitValues().

◆ syncCheckboxes()

void WX_HTML_REPORT_PANEL::syncCheckboxes ( )
private

Definition at line 318 of file wx_html_report_panel.cpp.

References WX_HTML_REPORT_PANEL_BASE::m_checkBoxShowActions, WX_HTML_REPORT_PANEL_BASE::m_checkBoxShowAll, WX_HTML_REPORT_PANEL_BASE::m_checkBoxShowErrors, WX_HTML_REPORT_PANEL_BASE::m_checkBoxShowInfos, WX_HTML_REPORT_PANEL_BASE::m_checkBoxShowWarnings, m_severities, REPORTER::RPT_ACTION, REPORTER::RPT_ALL, REPORTER::RPT_ERROR, REPORTER::RPT_INFO, and REPORTER::RPT_WARNING.

Referenced by onCheckBoxShowActions(), onCheckBoxShowAll(), onCheckBoxShowErrors(), onCheckBoxShowInfos(), onCheckBoxShowWarnings(), SetVisibleSeverities(), and WX_HTML_REPORT_PANEL().

◆ updateBadges()

void WX_HTML_REPORT_PANEL::updateBadges ( )
private

Definition at line 200 of file wx_html_report_panel.cpp.

201 {
202  int count = Count( REPORTER::RPT_ERROR );
203  m_errorsBadge->SetBitmap( makeBadge( REPORTER::RPT_ERROR, count, m_errorsBadge ) );
204 
205  count = Count( REPORTER::RPT_WARNING );
207 }
static wxBitmap makeBadge(REPORTER::SEVERITY aStyle, int aCount, wxWindow *aWindow)
int Count(int severityMask)
return the number of messages matching the given severity mask.

References Count(), WX_HTML_REPORT_PANEL_BASE::m_errorsBadge, WX_HTML_REPORT_PANEL_BASE::m_warningsBadge, makeBadge(), REPORTER::RPT_ERROR, and REPORTER::RPT_WARNING.

Referenced by scrollToBottom().

Member Data Documentation

◆ m_box

wxStaticBoxSizer* WX_HTML_REPORT_PANEL_BASE::m_box
protectedinherited

◆ m_btnSaveReportToFile

wxButton* WX_HTML_REPORT_PANEL_BASE::m_btnSaveReportToFile
protectedinherited

◆ m_checkBoxShowActions

wxCheckBox* WX_HTML_REPORT_PANEL_BASE::m_checkBoxShowActions
protectedinherited

◆ m_checkBoxShowAll

wxCheckBox* WX_HTML_REPORT_PANEL_BASE::m_checkBoxShowAll
protectedinherited

◆ m_checkBoxShowErrors

wxCheckBox* WX_HTML_REPORT_PANEL_BASE::m_checkBoxShowErrors
protectedinherited

◆ m_checkBoxShowInfos

wxCheckBox* WX_HTML_REPORT_PANEL_BASE::m_checkBoxShowInfos
protectedinherited

◆ m_checkBoxShowWarnings

wxCheckBox* WX_HTML_REPORT_PANEL_BASE::m_checkBoxShowWarnings
protectedinherited

◆ m_errorsBadge

wxStaticBitmap* WX_HTML_REPORT_PANEL_BASE::m_errorsBadge
protectedinherited

◆ m_fgSizer

wxFlexGridSizer* WX_HTML_REPORT_PANEL_BASE::m_fgSizer
protectedinherited

◆ m_htmlView

◆ m_lazyUpdate

bool WX_HTML_REPORT_PANEL::m_lazyUpdate
private

Definition at line 132 of file wx_html_report_panel.h.

Referenced by Report(), and SetLazyUpdate().

◆ m_report

REPORT_LINES WX_HTML_REPORT_PANEL::m_report
private

copy of the report, stored for filtering

Definition at line 118 of file wx_html_report_panel.h.

Referenced by Clear(), Count(), Flush(), onBtnSaveToFile(), and Report().

◆ m_reporter

WX_HTML_PANEL_REPORTER WX_HTML_REPORT_PANEL::m_reporter
private

the reporter

Definition at line 127 of file wx_html_report_panel.h.

Referenced by Reporter().

◆ m_reportHead

REPORT_LINES WX_HTML_REPORT_PANEL::m_reportHead
private

Lines to print at the very beginning of the report, regardless of sorting

Definition at line 124 of file wx_html_report_panel.h.

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

◆ m_reportTail

REPORT_LINES WX_HTML_REPORT_PANEL::m_reportTail
private

Lines to print at the very end of the report, regardless of sorting

Definition at line 121 of file wx_html_report_panel.h.

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

◆ m_severities

int WX_HTML_REPORT_PANEL::m_severities
private

◆ m_staticTextShow

wxStaticText* WX_HTML_REPORT_PANEL_BASE::m_staticTextShow
protectedinherited

◆ m_warningsBadge

wxStaticBitmap* WX_HTML_REPORT_PANEL_BASE::m_warningsBadge
protectedinherited

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