KiCad PCB EDA Suite
ERC_HTML_LISTFRAME Class Reference

Class ERC_HTML_LISTFRAME is used to display a DRC_ITEM_LIST. More...

#include <dialog_erc_listbox.h>

Inheritance diagram for ERC_HTML_LISTFRAME:

Public Member Functions

 ERC_HTML_LISTFRAME (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=0)
 
 ~ERC_HTML_LISTFRAME ()
 
void AppendToList (SCH_MARKER *aMarker)
 Function AppendToList. More...
 
void DisplayList ()
 Function DisplayList(); Build the Html marker list and show it. More...
 
const SCH_MARKERGetItem (unsigned aIndex)
 Function GetItem returns a requested DRC_ITEM* or NULL. More...
 
void ClearList ()
 Function ClearList deletes all items shown in the list. More...
 

Private Attributes

std::vector< SCH_MARKER * > m_MarkerListReferences
 

Detailed Description

Class ERC_HTML_LISTFRAME is used to display a DRC_ITEM_LIST.

Definition at line 38 of file dialog_erc_listbox.h.

Constructor & Destructor Documentation

ERC_HTML_LISTFRAME::ERC_HTML_LISTFRAME ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint pos = wxDefaultPosition,
const wxSize &  size = wxDefaultSize,
long  style = 0 
)
inline

Definition at line 44 of file dialog_erc_listbox.h.

47  :
48  wxHtmlWindow( parent, id, pos, size, style | wxHW_NO_SELECTION )
49  {
50  }
ERC_HTML_LISTFRAME::~ERC_HTML_LISTFRAME ( )
inline

Definition at line 52 of file dialog_erc_listbox.h.

53  {
54  }

Member Function Documentation

void ERC_HTML_LISTFRAME::AppendToList ( SCH_MARKER aMarker)
inline

Function AppendToList.

Parameters
aMarkeris the SCH_MARKER* to add to the current list which will be later displayed in the wxHtmlWindow

Definition at line 62 of file dialog_erc_listbox.h.

Referenced by DIALOG_ERC::DisplayERC_MarkersList().

63  {
64  m_MarkerListReferences.push_back( aMarker );
65  }
std::vector< SCH_MARKER * > m_MarkerListReferences
void ERC_HTML_LISTFRAME::ClearList ( )
inline

Function ClearList deletes all items shown in the list.

Does not erase markers in schematic

Definition at line 111 of file dialog_erc_listbox.h.

Referenced by DIALOG_ERC::DisplayERC_MarkersList(), DIALOG_ERC::OnEraseDrcMarkersClick(), and DIALOG_ERC::OnErcCmpClick().

112  {
113  m_MarkerListReferences.clear();
114  SetPage( wxEmptyString );
115  }
std::vector< SCH_MARKER * > m_MarkerListReferences
void ERC_HTML_LISTFRAME::DisplayList ( )
inline

Function DisplayList(); Build the Html marker list and show it.

Definition at line 71 of file dialog_erc_listbox.h.

Referenced by DIALOG_ERC::DisplayERC_MarkersList().

72  {
73  wxString htmlpage;
74 
75  // for each marker, build a link like:
76  // <A HREF="marker_index">text to click</A>
77  // The "text to click" is the error name (first line of the full error text).
78  wxString marker_text;
79 
80  for( unsigned ii = 0; ii < m_MarkerListReferences.size(); ii++ )
81  {
82  marker_text.Printf( wxT( "<A HREF=\"%d\">" ), ii );
83  marker_text << m_MarkerListReferences[ii]->GetReporter().ShowHtml();
84  marker_text.Replace( wxT( "<ul>" ), wxT( "</A><ul>" ), false );
85  htmlpage += marker_text;
86  }
87 
88  SetPage( htmlpage );
89  }
std::vector< SCH_MARKER * > m_MarkerListReferences
const SCH_MARKER* ERC_HTML_LISTFRAME::GetItem ( unsigned  aIndex)
inline

Function GetItem returns a requested DRC_ITEM* or NULL.

Definition at line 95 of file dialog_erc_listbox.h.

Referenced by DIALOG_ERC::OnLeftClickMarkersList().

96  {
97  if( m_MarkerListReferences.size() > aIndex )
98  {
99  return m_MarkerListReferences[ aIndex ];
100  }
101 
102  return NULL;
103  }
std::vector< SCH_MARKER * > m_MarkerListReferences

Member Data Documentation

std::vector<SCH_MARKER*> ERC_HTML_LISTFRAME::m_MarkerListReferences
private

Definition at line 41 of file dialog_erc_listbox.h.


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