KiCad PCB EDA Suite
dialog_erc.cpp
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2012 Wayne Stambaugh <stambaughw@gmail.com>
6  * Copyright (C) 1992-2017 KiCad Developers, see AUTHORS.txt for contributors.
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, you may find one here:
20  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21  * or you may search the http://www.gnu.org website for the version 2 license,
22  * or you may write to the Free Software Foundation, Inc.,
23  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24  */
25 
31 #include <fctsys.h>
32 #include <class_drawpanel.h>
33 #include <kicad_string.h>
34 #include <gestfich.h>
35 #include <pgm_base.h>
36 #include <class_sch_screen.h>
37 #include <schframe.h>
38 #include <invoke_sch_dialog.h>
39 #include <project.h>
40 #include <kiface_i.h>
41 #include <bitmaps.h>
43 
44 #include <netlist.h>
45 #include <class_netlist_object.h>
46 #include <sch_marker.h>
47 #include <sch_sheet.h>
48 #include <lib_pin.h>
49 
50 #include <dialog_erc.h>
51 #include <erc.h>
52 #include <id.h>
53 
54 
57 
58 
59 bool DIALOG_ERC::m_writeErcFile = false; // saved only for the current session
60 bool DIALOG_ERC::m_TestSimilarLabels = true; // Save in project config
61 bool DIALOG_ERC::m_diagErcTableInit = false; // saved only for the current session
62 bool DIALOG_ERC::m_tstUniqueGlobalLabels = true; // saved only for the current session
63 
64 // Control identifiers for events
65 #define ID_MATRIX_0 1800
66 
67 
68 BEGIN_EVENT_TABLE( DIALOG_ERC, DIALOG_ERC_BASE )
70  wxEVT_COMMAND_BUTTON_CLICKED, DIALOG_ERC::ChangeErrorLevel )
71 END_EVENT_TABLE()
72 
73 
75  DIALOG_ERC_BASE( parent, ID_DIALOG_ERC // parent looks for this ID explicitly
76  )
77 {
78  m_parent = parent;
79  m_lastMarkerFound = NULL;
80  Init();
81 
82  // Now all widgets have the size fixed, call FinishDialogSettings
83  FinishDialogSettings();
84 }
85 
86 
88 {
91 }
92 
93 
95 {
96  m_initialized = false;
97 
98  for( int ii = 0; ii < PINTYPE_COUNT; ii++ )
99  {
100  for( int jj = 0; jj < PINTYPE_COUNT; jj++ )
101  m_buttonList[ii][jj] = NULL;
102  }
103 
104  m_WriteResultOpt->SetValue( m_writeErcFile );
107 
108  SCH_SCREENS screens;
109  updateMarkerCounts( &screens );
110 
112 
113  // Init Panel Matrix
115 
116  // Set the run ERC button as the default button.
117  m_buttonERC->SetDefault();
118 }
119 
120 
122 {
123  int markers = screens->GetMarkerCount( MARKER_BASE::MARKER_ERC,
125  int warnings = screens->GetMarkerCount( MARKER_BASE::MARKER_ERC,
127  int errors = screens->GetMarkerCount( MARKER_BASE::MARKER_ERC,
129 
130  wxString num;
131  num.Printf( wxT( "%d" ), markers );
132  m_TotalErrCount->SetValue( num );
133 
134  num.Printf( wxT( "%d" ), errors );
135  m_LastErrCount->SetValue( num );
136 
137  num.Printf( wxT( "%d" ), warnings );
138  m_LastWarningCount->SetValue( num );
139 }
140 
141 
142 /* Delete the old ERC markers, over the whole hierarchy
143  */
144 void DIALOG_ERC::OnEraseDrcMarkersClick( wxCommandEvent& event )
145 {
146  SCH_SCREENS ScreenList;
147 
149  updateMarkerCounts( &ScreenList );
150 
152  m_parent->GetCanvas()->Refresh();
153 }
154 
155 
156 
157 /* event handler for Close button
158 */
159 void DIALOG_ERC::OnButtonCloseClick( wxCommandEvent& event )
160 {
161  Close();
162 }
163 
164 
165 void DIALOG_ERC::OnCloseErcDialog( wxCloseEvent& event )
166 {
167  Destroy();
168 }
169 
170 
171 void DIALOG_ERC::OnResetMatrixClick( wxCommandEvent& event )
172 {
173  ResetDefaultERCDiag( event );
174 }
175 
176 
177 void DIALOG_ERC::OnErcCmpClick( wxCommandEvent& event )
178 {
179  wxBusyCursor();
181 
182  m_MessagesList->Clear();
183  wxSafeYield(); // m_MarkersList must be redraw
184  wxArrayString messageList;
185  TestErc( &messageList );
186 
187  for( unsigned ii = 0; ii < messageList.GetCount(); ii++ )
188  m_MessagesList->AppendText( messageList[ii] );
189 }
190 
191 
192 void DIALOG_ERC::OnLeftClickMarkersList( wxHtmlLinkEvent& event )
193 {
194  wxString link = event.GetLinkInfo().GetHref();
195 
196  m_lastMarkerFound = NULL;
197 
198  long index;
199 
200  if( !link.ToLong( &index ) )
201  return;
202 
203  const SCH_MARKER* marker = m_MarkersList->GetItem( index );
204 
205  if( marker == NULL )
206  return;
207 
208  // Search for the selected marker
209  unsigned i;
210  SCH_SHEET_LIST sheetList( g_RootSheet );
211  bool notFound = true;
212 
213  for( i = 0; i < sheetList.size(); i++ )
214  {
215  SCH_ITEM* item = (SCH_ITEM*) sheetList[i].LastDrawList();
216 
217  for( ; item; item = item->Next() )
218  {
219  if( item == marker )
220  {
221  notFound = false;
222  break;
223  }
224  }
225 
226  if( notFound == false )
227  break;
228  }
229 
230  if( notFound ) // Error
231  {
232  wxMessageBox( _( "Marker not found" ) );
233 
234  // The marker was deleted, so rebuild marker list
236  return;
237  }
238 
239  if( sheetList[i] != m_parent->GetCurrentSheet() )
240  {
241  sheetList[i].LastScreen()->SetZoom( m_parent->GetScreen()->GetZoom() );
242  m_parent->SetCurrentSheet( sheetList[i] );
244  }
245 
246  m_lastMarkerFound = marker;
247  m_parent->SetCrossHairPosition( marker->m_Pos );
248  m_parent->RedrawScreen( marker->m_Pos, false);
249 }
250 
251 
252 void DIALOG_ERC::OnLeftDblClickMarkersList( wxMouseEvent& event )
253 {
254  // Remember: OnLeftClickMarkersList was called just before
255  // and therefore m_lastMarkerFound was initialized.
256  // (NULL if not found)
257  if( m_lastMarkerFound )
258  {
261  // prevent a mouse left button release event in
262  // coming from the ERC dialog double click
263  // ( the button is released after closing this dialog and will generate
264  // an unwanted event in parent frame)
266  }
267 
268  Close();
269 }
270 
271 
273 {
274  // Try to know the size of bitmap button used in drc matrix
275  wxBitmapButton * dummy = new wxBitmapButton( m_matrixPanel, wxID_ANY, KiBitmap( ercerr_xpm ) );
276  wxSize bitmap_size = dummy->GetSize();
277  delete dummy;
278 
279  if( !m_diagErcTableInit )
280  {
281  memcpy( DiagErc, DefaultDiagErc, sizeof(DefaultDiagErc) );
282  m_diagErcTableInit = true;
283  }
284 
285  wxPoint pos;
286  // Get the current text size:use a dummy text.
287  wxStaticText* text = new wxStaticText( m_matrixPanel, -1, wxT( "W" ), pos );
288  int text_height = text->GetRect().GetHeight();
289  bitmap_size.y = std::max( bitmap_size.y, text_height );
290  delete text;
291 
292  // compute the Y pos interval:
293  pos.y = text_height;
294 
295  if( m_initialized == false )
296  {
297  // Print row labels
298  for( int ii = 0; ii < PINTYPE_COUNT; ii++ )
299  {
300  int y = pos.y + (ii * bitmap_size.y);
301  text = new wxStaticText( m_matrixPanel, -1, CommentERC_H[ii],
302  wxPoint( 5, y + ( bitmap_size.y / 2) - (text_height / 2) ) );
303 
304  int x = text->GetRect().GetRight();
305  pos.x = std::max( pos.x, x );
306  }
307 
308  pos.x += 5;
309  }
310  else
311  pos = m_buttonList[0][0]->GetPosition();
312 
313  for( int ii = 0; ii < PINTYPE_COUNT; ii++ )
314  {
315  int y = pos.y + (ii * bitmap_size.y);
316 
317  for( int jj = 0; jj <= ii; jj++ )
318  {
319  // Add column labels (only once)
320  int diag = DiagErc[ii][jj];
321  int x = pos.x + (jj * bitmap_size.x);
322 
323  if( (ii == jj) && !m_initialized )
324  {
325  wxPoint txtpos;
326  txtpos.x = x + (bitmap_size.x / 2);
327  txtpos.y = y - text_height;
328  text = new wxStaticText( m_matrixPanel, -1, CommentERC_V[ii], txtpos );
329  }
330 
331  int event_id = ID_MATRIX_0 + ii + ( jj * PINTYPE_COUNT );
332  BITMAP_DEF bitmap_butt = erc_green_xpm;
333 
334  delete m_buttonList[ii][jj];
335  m_buttonList[ii][jj] = new wxBitmapButton( m_matrixPanel,
336  event_id,
337  KiBitmap( bitmap_butt ),
338  wxPoint( x, y ) );
339  setDRCMatrixButtonState( m_buttonList[ii][jj], diag );
340  }
341  }
342 
343  m_initialized = true;
344 }
345 
346 
347 void DIALOG_ERC::setDRCMatrixButtonState( wxBitmapButton *aButton, int aState )
348 {
349  BITMAP_DEF bitmap_butt = NULL;
350  wxString tooltip;
351 
352  switch( aState )
353  {
354  case OK:
355  bitmap_butt = erc_green_xpm;
356  tooltip = _( "No error or warning" );
357  break;
358 
359  case WAR:
360  bitmap_butt = ercwarn_xpm;
361  tooltip = _( "Generate warning" );
362  break;
363 
364  case ERR:
365  bitmap_butt = ercerr_xpm;
366  tooltip = _( "Generate error" );
367  break;
368  }
369 
370  if( bitmap_butt )
371  {
372  aButton->SetBitmap( KiBitmap( bitmap_butt ) );
373  aButton->SetToolTip( tooltip );
374  }
375 }
376 
377 
379 {
380  SCH_SHEET_LIST sheetList( g_RootSheet);
382 
383  for( unsigned i = 0; i < sheetList.size(); i++ )
384  {
385  SCH_ITEM* item = sheetList[i].LastDrawList();
386 
387  for( ; item != NULL; item = item->Next() )
388  {
389  if( item->Type() != SCH_MARKER_T )
390  continue;
391 
392  SCH_MARKER* marker = (SCH_MARKER*) item;
393 
394  if( marker->GetMarkerType() != MARKER_BASE::MARKER_ERC )
395  continue;
396 
397  m_MarkersList->AppendToList( marker );
398  }
399  }
400 
402 }
403 
404 
405 void DIALOG_ERC::ResetDefaultERCDiag( wxCommandEvent& event )
406 {
407  memcpy( DiagErc, DefaultDiagErc, sizeof( DiagErc ) );
409  m_TestSimilarLabels = true;
413 }
414 
415 
416 void DIALOG_ERC::ChangeErrorLevel( wxCommandEvent& event )
417 {
418  int id, level, ii, x, y;
419  wxPoint pos;
420 
421  id = event.GetId();
422  ii = id - ID_MATRIX_0;
423  wxBitmapButton* butt = (wxBitmapButton*) event.GetEventObject();
424  pos = butt->GetPosition();
425 
426  x = ii / PINTYPE_COUNT; y = ii % PINTYPE_COUNT;
427 
428  level = DiagErc[y][x];
429 
430  //change to the next error level
431  switch( level )
432  {
433  case OK:
434  level = WAR;
435  break;
436 
437  case WAR:
438  level = ERR;
439  break;
440 
441  case ERR:
442  level = OK;
443  break;
444  }
445 
446  setDRCMatrixButtonState( butt, level );
447 
448  DiagErc[y][x] = DiagErc[x][y] = level;
449 }
450 
451 
452 void DIALOG_ERC::TestErc( wxArrayString* aMessagesList )
453 {
454  wxFileName fn;
455 
456  m_writeErcFile = m_WriteResultOpt->GetValue();
459 
460  // Build the whole sheet list in hierarchy (sheet, not screen)
461  SCH_SHEET_LIST sheets( g_RootSheet );
462  sheets.AnnotatePowerSymbols();
463 
464  if( m_parent->CheckAnnotate( aMessagesList, false ) )
465  {
466  if( aMessagesList )
467  {
468  wxString msg = _( "Annotation required!" );
469  msg += wxT( "\n" );
470  aMessagesList->Add( msg );
471  }
472 
473  return;
474  }
475 
476  SCH_SCREENS screens;
477 
478  // Erase all previous DRC markers.
480 
481  /* Test duplicate sheet names inside a given sheet, one cannot have sheets with
482  * duplicate names (file names can be duplicated).
483  */
484  TestDuplicateSheetNames( true );
485 
486  std::unique_ptr<NETLIST_OBJECT_LIST> objectsConnectedList( m_parent->BuildNetListBase() );
487 
488  // Reset the connection type indicator
489  objectsConnectedList->ResetConnectionsType();
490 
491  unsigned lastItemIdx;
492  unsigned nextItemIdx = lastItemIdx = 0;
493  int MinConn = NOC;
494 
495  /* The netlist generated by SCH_EDIT_FRAME::BuildNetListBase is sorted
496  * by net number, which means we can group netlist items into ranges
497  * that live in the same net. The range from nextItem to the current
498  * item (exclusive) needs to be checked against the current item. The
499  * lastItem variable is used as a helper to pass the last item's number
500  * from one loop iteration to the next, which simplifies the initial
501  * pass.
502  */
503 
504  for( unsigned itemIdx = 0; itemIdx < objectsConnectedList->size(); itemIdx++ )
505  {
506  auto item = objectsConnectedList->GetItem( itemIdx );
507  auto lastItem = objectsConnectedList->GetItem( lastItemIdx );
508 
509  auto lastNet = lastItem->GetNet();
510  auto net = item->GetNet();
511 
512  wxASSERT_MSG( lastNet <= net, wxT( "Netlist not correctly ordered" ) );
513 
514  if( lastNet != net )
515  {
516  // New net found:
517  MinConn = NOC;
518  nextItemIdx = itemIdx;
519  }
520 
521  switch( item->m_Type )
522  {
523  // These items do not create erc problems
525  case NET_SEGMENT:
526  case NET_BUS:
527  case NET_JUNCTION:
528  case NET_LABEL:
529  case NET_BUSLABELMEMBER:
530  case NET_PINLABEL:
532  break;
533 
534  case NET_HIERLABEL:
536  case NET_SHEETLABEL:
538  // ERC problems when pin sheets do not match hierarchical labels.
539  // Each pin sheet must match a hierarchical label
540  // Each hierarchical label must match a pin sheet
541  objectsConnectedList->TestforNonOrphanLabel( itemIdx, nextItemIdx );
542  break;
543  case NET_GLOBLABEL:
545  objectsConnectedList->TestforNonOrphanLabel( itemIdx, nextItemIdx );
546  break;
547 
548  case NET_NOCONNECT:
549 
550  // ERC problems when a noconnect symbol is connected to more than one pin.
551  MinConn = NET_NC;
552 
553  if( objectsConnectedList->CountPinsInNet( nextItemIdx ) > 1 )
554  Diagnose( item, NULL, MinConn, UNC );
555 
556  break;
557 
558  case NET_PIN:
559 
560  // Look for ERC problems between pins:
561  TestOthersItems( objectsConnectedList.get(), itemIdx, nextItemIdx, &MinConn );
562  break;
563  }
564 
565  lastItemIdx = itemIdx;
566  }
567 
568  // Test similar labels (i;e. labels which are identical when
569  // using case insensitive comparisons)
570  if( m_TestSimilarLabels )
571  objectsConnectedList->TestforSimilarLabels();
572 
573  // Displays global results:
574  updateMarkerCounts( &screens );
575 
576  // Display diags:
578 
579  // Display new markers:
580  m_parent->GetCanvas()->Refresh();
581 
582  // Display message
583  wxString msg = _( "Finished" );
584  msg += wxT( "\n" );
585  aMessagesList->Add( msg );
586 
587  if( m_writeErcFile )
588  {
589  fn = g_RootSheet->GetScreen()->GetFileName();
590  fn.SetExt( wxT( "erc" ) );
591 
592  wxFileDialog dlg( this, _( "ERC File" ), fn.GetPath(), fn.GetFullName(),
593  ErcFileWildcard(), wxFD_SAVE );
594 
595  if( dlg.ShowModal() == wxID_CANCEL )
596  return;
597 
598  if( WriteDiagnosticERC( dlg.GetPath() ) )
599  ExecuteFile( this, Pgm().GetEditorName(), QuoteFullPath( fn ) );
600  }
601 }
602 
603 
604 wxDialog* InvokeDialogERC( SCH_EDIT_FRAME* aCaller )
605 {
606  // This is a modeless dialog, so new it rather than instantiating on stack.
607  DIALOG_ERC* dlg = new DIALOG_ERC( aCaller );
608 
609  dlg->Show( true );
610 
611  return dlg; // wxDialog is information hiding about DIALOG_ERC.
612 }
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
Definition: schframe.cpp:585
Definition of the SCH_SHEET class for Eeschema.
Class SCH_SHEET_LIST.
KICAD_T Type() const
Function Type()
Definition: base_struct.h:225
void DisplayList()
Function DisplayList(); Build the Html marker list and show it.
static bool m_TestSimilarLabels
Definition: dialog_erc.h:51
wxTextCtrl * m_MessagesList
Definition: erc.h:43
NETLIST_OBJECT_LIST * BuildNetListBase(bool updateStatusText=true)
Create a flat list which stores all connected objects.
void DeleteAllMarkers(enum MARKER_BASE::TYPEMARKER aMarkerType)
Delete all electronic rules check markers of aMarkerType from all the screens in the list...
void setDRCMatrixButtonState(wxBitmapButton *aButton, int aState)
Definition: dialog_erc.cpp:347
PNG memory record (file in memory).
Definition: bitmap_types.h:38
void TestOthersItems(NETLIST_OBJECT_LIST *aList, unsigned aNetItemRef, unsigned aNetStart, int *aMinConnexion)
Perform ERC testing for electrical conflicts between NetItemRef and other items (mainly pin) on the s...
Definition: erc.cpp:364
static bool m_writeErcFile
Definition: dialog_erc.h:46
This file is part of the common library TODO brief description.
void Init()
Definition: dialog_erc.cpp:94
virtual void Refresh(bool eraseBackground=true, const wxRect *rect=NULL) override
Update the board display after modifying it bu a python script (note: it is automatically called by a...
Definition: draw_panel.cpp:325
EDA_DRAW_PANEL * GetCanvas()
Definition: draw_frame.h:331
Class DIALOG_ERC_BASE.
int CheckAnnotate(wxArrayString *aMessageList, bool aOneSheetOnly)
Check for annotation errors.
Definition: annotate.cpp:187
double GetZoom() const
Function GetZoom returns the current "zoom factor", which is a measure of "internal units per device ...
void OnEraseDrcMarkersClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:144
const wxString CommentERC_H[]
Definition: erc.cpp:87
const wxString & GetFileName() const
wxPoint m_Pos
position of the marker
int DefaultDiagErc[PINTYPE_COUNT][PINTYPE_COUNT]
Default Look up table which gives the ERC error level for a pair of connected pins Same as DiagErc...
Definition: erc.cpp:133
void Diagnose(NETLIST_OBJECT *aNetItemRef, NETLIST_OBJECT *aNetItemTst, int aMinConn, int aDiag)
Performs ERC testing and creates an ERC marker to show the ERC problem for aNetItemRef or between aNe...
Definition: erc.cpp:228
PGM_BASE & Pgm()
The global Program "get" accessor.
Definition: kicad.cpp:65
Schematic editor (Eeschema) main window.
Definition: schframe.h:118
wxTextCtrl * m_TotalErrCount
void SkipNextLeftButtonReleaseEvent()
function SkipNextLeftButtonReleaseEvent after calling this function, if the left mouse button is down...
Definition: draw_frame.cpp:286
void UpdateAllScreenReferences()
Function UpdateAllScreenReferences updates the reference and the m_Multi parameter (part selection) f...
SCH_SCREEN * GetScreen()
Definition: sch_sheet.h:279
SCH_ITEM * Next() const
#define ID_MATRIX_0
Definition: dialog_erc.cpp:65
ERC_HTML_LISTFRAME * m_MarkersList
bool WriteDiagnosticERC(const wxString &aFullFileName)
Function WriteDiagnosticERC save the ERC errors to aFullFileName.
Definition: erc.cpp:517
enum TYPEMARKER GetMarkerType() const
Definition: erc.h:42
SCH_SCREEN * GetScreen() const override
Function GetScreen returns a pointer to a BASE_SCREEN or one of its derivatives.
Definition: schframe.cpp:532
void ChangeErrorLevel(wxCommandEvent &event)
Definition: dialog_erc.cpp:416
void OnLeftClickMarkersList(wxHtmlLinkEvent &event) override
Definition: dialog_erc.cpp:192
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:36
Definition: erc.h:44
bool m_initialized
Definition: dialog_erc.h:44
void OnErcCmpClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:177
int TestDuplicateSheetNames(bool aCreateMarker)
Function TestDuplicateSheetNames( ) inside a given sheet, one cannot have sheets with duplicate names...
Definition: erc.cpp:177
wxBitmapButton * m_buttonList[PINTYPE_COUNT][PINTYPE_COUNT]
Definition: dialog_erc.h:43
SCH_SHEET * g_RootSheet
Definition: eeschema.cpp:55
Definitions for the Eeschema program SCH_SCREEN class.
wxButton * m_buttonERC
wxPanel * m_matrixPanel
SCH_SHEET_PATH & GetCurrentSheet()
Definition: schframe.cpp:577
void OnLeftDblClickMarkersList(wxMouseEvent &event) override
Definition: dialog_erc.cpp:252
The common library.
void OnButtonCloseClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:159
Definition: erc.h:45
void AppendToList(SCH_MARKER *aMarker)
Function AppendToList.
wxTextCtrl * m_LastWarningCount
SCH_EDIT_FRAME * m_parent
Definition: dialog_erc.h:42
wxCheckBox * m_cbTestUniqueGlbLabels
bool Show(bool show) override
void OnCloseErcDialog(wxCloseEvent &event) override
Definition: dialog_erc.cpp:165
int GetMarkerCount(enum MARKER_BASE::TYPEMARKER aMarkerType, enum MARKER_BASE::MARKER_SEVERITY aSeverity)
Return the number of ERC markers of aMarkerType from all of the screens in the list.
int DiagErc[PINTYPE_COUNT][PINTYPE_COUNT]
Definition: erc.cpp:124
Definition of the NETLIST_OBJECT class.
void ClearList()
Function ClearList deletes all items shown in the list.
void TestErc(wxArrayString *aMessagesList)
Definition: dialog_erc.cpp:452
eeschema ERC modeless dialog ID
Definition: id.h:272
wxString ErcFileWildcard()
void RedrawScreen(const wxPoint &aCenterPoint, bool aWarpPointer)
Function RedrawScreen redraws the entire screen area by updating the scroll bars and mouse pointer in...
Definition: zoom.cpp:46
static bool m_diagErcTableInit
Definition: dialog_erc.h:47
#define NOC
Definition: erc.h:69
see class PGM_BASE
const SCH_MARKER * GetItem(unsigned aIndex)
Function GetItem returns a requested DRC_ITEM* or NULL.
static LIB_PART * dummy()
Used when a LIB_PART is not found in library to draw a dummy shape This component is a 400 mils squar...
#define max(a, b)
Definition: auxiliary.h:86
wxString QuoteFullPath(wxFileName &fn, wxPathFormat format)
Quote return value of wxFileName::GetFullPath().
Definition: gestfich.cpp:417
void OnResetMatrixClick(wxCommandEvent &event) override
Definition: dialog_erc.cpp:171
void updateMarkerCounts(SCH_SCREENS *screens)
Definition: dialog_erc.cpp:121
static bool m_tstUniqueGlobalLabels
Definition: dialog_erc.h:48
wxCheckBox * m_WriteResultOpt
const wxString CommentERC_V[]
Definition: erc.cpp:103
void AnnotatePowerSymbols()
Function AnnotatePowerSymbols Silently annotates the not yet annotated power symbols of the entire hi...
EVT_COMMAND_RANGE(ID_MATRIX_0, ID_MATRIX_0+(PINTYPE_COUNT *PINTYPE_COUNT)-1, wxEVT_COMMAND_BUTTON_CLICKED, DIALOG_ERC::ChangeErrorLevel) DIALOG_ERC
Definition: dialog_erc.cpp:69
#define NET_NC
Definition: erc.h:67
void ReBuildMatrixPanel()
Definition: dialog_erc.cpp:272
void SetCrossHairPosition(const wxPoint &aPosition, bool aSnapToGrid=true)
Function SetCrossHairPosition sets the screen cross hair position to aPosition in logical (drawing) u...
wxTextCtrl * m_LastErrCount
void ResetDefaultERCDiag(wxCommandEvent &event)
Definition: dialog_erc.cpp:405
int ExecuteFile(wxWindow *frame, const wxString &ExecFile, const wxString &param, wxProcess *callback)
Function ExecuteFile calls the executable file ExecFile with the command line parameters param...
Definition: gestfich.cpp:208
Class SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container clas...
wxDialog * InvokeDialogERC(SCH_EDIT_FRAME *aCaller)
Create the modeless DIALOG_ERC and show it, return something to destroy or close it.
Definition: dialog_erc.cpp:604
const SCH_MARKER * m_lastMarkerFound
Definition: dialog_erc.h:45
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
void DisplayERC_MarkersList()
Definition: dialog_erc.cpp:378
wxCheckBox * m_cbTestSimilarLabels