KiCad PCB EDA Suite
find.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) 2004 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com
5  * Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
6  * Copyright (C) 2004-2018 KiCad Developers, see change_log.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 /*
32  * Search a text (text, value, reference) within a component or
33  * search a component in libraries, a marker ...,
34  * in current sheet or whole the project
35  */
36 #include <fctsys.h>
37 #include <pgm_base.h>
38 #include <class_drawpanel.h>
39 #include <confirm.h>
40 #include <kicad_string.h>
41 #include <gestfich.h>
42 #include <sch_edit_frame.h>
43 #include <base_units.h>
44 #include <trace_helpers.h>
45 
46 #include <general.h>
47 #include <class_library.h>
48 #include <lib_pin.h>
49 #include <sch_marker.h>
50 #include <sch_component.h>
51 #include <sch_sheet.h>
52 #include <sch_sheet_path.h>
53 #include <symbol_lib_table.h>
54 
55 #include <kicad_device_context.h>
56 
58 
59 
60 void SCH_EDIT_FRAME::OnFindDrcMarker( wxFindDialogEvent& event )
61 {
62  static SCH_MARKER* lastMarker = NULL;
63 
64  wxString msg;
65  SCH_SHEET_LIST schematic( g_RootSheet );
66  SCH_SHEET_PATH* sheetFoundIn = NULL;
67  bool wrap = ( event.GetFlags() & FR_SEARCH_WRAP ) != 0;
68  bool warpCursor = ( ( event.GetId() == wxEVT_COMMAND_FIND_CLOSE ) ||
69  !( event.GetFlags() & FR_NO_WARP_CURSOR ) );
70 
71  if( event.GetFlags() & FR_CURRENT_SHEET_ONLY )
72  {
73  sheetFoundIn = m_CurrentSheet;
74  lastMarker = (SCH_MARKER*) m_CurrentSheet->FindNextItem( SCH_MARKER_T, lastMarker, wrap );
75  }
76  else
77  {
78  lastMarker = (SCH_MARKER*) schematic.FindNextItem( SCH_MARKER_T, &sheetFoundIn,
79  lastMarker, wrap );
80  }
81 
82  if( lastMarker != NULL )
83  {
84  if( *sheetFoundIn != *m_CurrentSheet )
85  {
86  sheetFoundIn->LastScreen()->SetZoom( GetScreen()->GetZoom() );
87  *m_CurrentSheet = *sheetFoundIn;
89  }
90 
91  SetCrossHairPosition( lastMarker->GetPosition() );
92 
93  RedrawScreen( lastMarker->GetPosition(), warpCursor );
94 
95  wxString path = sheetFoundIn->Path();
96  wxString units = GetAbbreviatedUnitsLabel();
97  double x = To_User_Unit( g_UserUnit, (double) lastMarker->GetPosition().x );
98  double y = To_User_Unit( g_UserUnit, (double) lastMarker->GetPosition().y );
99  msg.Printf( _( "Design rule check marker found in sheet %s at %0.3f%s, %0.3f%s" ),
100  GetChars( path ), x, GetChars( units ), y, GetChars( units) );
101  SetStatusText( msg );
102  }
103  else
104  {
105  SetStatusText( _( "No more markers were found." ) );
106  }
107 }
108 
109 
110 SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference,
111  bool aSearchHierarchy,
112  SCH_SEARCH_T aSearchType,
113  const wxString& aSearchText,
114  bool aWarpMouse )
115 {
116  SCH_SHEET_PATH* sheet = NULL;
117  SCH_SHEET_PATH* sheetWithComponentFound = NULL;
118  SCH_ITEM* item = NULL;
119  SCH_COMPONENT* Component = NULL;
120  wxPoint pos;
121  bool centerAndRedraw = false;
122  bool notFound = true;
123  LIB_PIN* pin;
124  SCH_SHEET_LIST sheetList( g_RootSheet );
125 
126  if( !aSearchHierarchy )
127  sheetList.push_back( *m_CurrentSheet );
128  else
129  sheetList.BuildSheetList( g_RootSheet );
130 
131  for( SCH_SHEET_PATHS_ITER it = sheetList.begin(); it != sheetList.end(); ++it )
132  {
133  sheet = &(*it);
134  item = (*it).LastDrawList();
135 
136  for( ; ( item != NULL ) && ( notFound == true ); item = item->Next() )
137  {
138  if( item->Type() != SCH_COMPONENT_T )
139  continue;
140 
141  SCH_COMPONENT* pSch = (SCH_COMPONENT*) item;
142 
143  if( aReference.CmpNoCase( pSch->GetRef( sheet ) ) == 0 )
144  {
145  Component = pSch;
146  sheetWithComponentFound = sheet;
147 
148  switch( aSearchType )
149  {
150  default:
151  case FIND_COMPONENT_ONLY: // Find component only
152  notFound = false;
153  pos = pSch->GetPosition();
154  break;
155 
156  case FIND_PIN: // find a pin
157  pos = pSch->GetPosition(); // temporary: will be changed if the pin is found.
158  pin = pSch->GetPin( aSearchText );
159 
160  if( pin == NULL )
161  break;
162 
163  notFound = false;
164  pos += pin->GetPosition();
165  break;
166 
167  case FIND_REFERENCE: // find reference
168  notFound = false;
169  pos = pSch->GetField( REFERENCE )->GetPosition();
170  break;
171 
172  case FIND_VALUE: // find value
173  pos = pSch->GetPosition();
174 
175  if( aSearchText.CmpNoCase( pSch->GetField( VALUE )->GetShownText() ) != 0 )
176  break;
177 
178  notFound = false;
179  pos = pSch->GetField( VALUE )->GetPosition();
180  break;
181  }
182  }
183  }
184 
185  if( notFound == false )
186  break;
187  }
188 
189  if( Component )
190  {
191  sheet = sheetWithComponentFound;
192 
193  if( *sheet != *m_CurrentSheet )
194  {
195  sheet->LastScreen()->SetZoom( GetScreen()->GetZoom() );
196  *m_CurrentSheet = *sheet;
198  sheet->LastScreen()->TestDanglingEnds();
199  centerAndRedraw = true;
200  }
201 
202  wxPoint delta;
203  pos -= Component->GetPosition();
204  delta = Component->GetTransform().TransformCoordinate( pos );
205  pos = delta + Component->GetPosition();
206 
207 
208  /* There may be need to reframe the drawing */
209  if( ! m_canvas->IsPointOnDisplay( pos ) )
210  {
211  centerAndRedraw = true;
212  }
213 
214  if( centerAndRedraw )
215  {
216  SetCrossHairPosition( pos );
217  RedrawScreen( pos, aWarpMouse );
218  }
219 
220  else
221  {
223 
224  m_canvas->CrossHairOff( &dc );
225 
226  if( aWarpMouse )
227  m_canvas->MoveCursor( pos );
228 
229  SetCrossHairPosition( pos );
230 
231  m_canvas->CrossHairOn( &dc );
232  }
233  }
234 
235 
236  /* Print diag */
237  wxString msg_item;
238  wxString msg;
239 
240  switch( aSearchType )
241  {
242  default:
243  case FIND_COMPONENT_ONLY: // Find component only
244  msg_item = _( "component" );
245  break;
246 
247  case FIND_PIN: // find a pin
248  msg_item.Printf( _( "pin %s" ), GetChars( aSearchText ) );
249  break;
250 
251  case FIND_REFERENCE: // find reference
252  msg_item.Printf( _( "reference %s" ), GetChars( aSearchText ) );
253  break;
254 
255  case FIND_VALUE: // find value
256  msg_item.Printf( _( "value %s" ), GetChars( aSearchText ) );
257  break;
258 
259  case FIND_FIELD: // find field. todo
260  msg_item.Printf( _( "field %s" ), GetChars( aSearchText ) );
261  break;
262  }
263 
264  if( Component )
265  {
266  if( !notFound )
267  {
268  msg.Printf( _( "%s %s found" ),
269  GetChars( aReference ), GetChars( msg_item ) );
270  }
271  else
272  {
273  msg.Printf( _( "%s found but %s not found" ),
274  GetChars( aReference ), GetChars( msg_item ) );
275  }
276  }
277  else
278  {
279  msg.Printf( _( "Component %s not found" ),
280  GetChars( aReference ) );
281  }
282 
283  SetStatusText( msg );
284 
285  return item;
286 }
287 
288 
290 {
291  int mod_hash = Prj().SchSymbolLibTable()->GetModifyHash();
292 
293  // the cache is obsolete whenever any library changes.
294  if( mod_hash != m_foundItems.GetLibHash() )
295  {
297  m_foundItems.SetLibHash( mod_hash );
298  return true;
299  }
300  else if( m_foundItems.IsSearchRequired( aSearchCriteria ) )
301  return true;
302  else
303  return false;
304 }
305 
306 
307 void SCH_EDIT_FRAME::OnFindSchematicItem( wxFindDialogEvent& aEvent )
308 {
309  SCH_FIND_REPLACE_DATA searchCriteria;
311 
312  searchCriteria.SetFlags( aEvent.GetFlags() );
313  searchCriteria.SetFindString( aEvent.GetFindString() );
314  searchCriteria.SetReplaceString( aEvent.GetReplaceString() );
315 
316  if( aEvent.GetEventType() == wxEVT_COMMAND_FIND_CLOSE )
317  {
318  if( m_foundItems.GetCount() == 0 )
319  return;
320  }
321  else if( IsSearchCacheObsolete( searchCriteria ) )
322  {
323  if( aEvent.GetFlags() & FR_CURRENT_SHEET_ONLY && g_RootSheet->CountSheets() > 1 )
324  {
325  m_foundItems.Collect( searchCriteria, m_CurrentSheet );
326  }
327  else
328  {
329  m_foundItems.Collect( searchCriteria );
330  }
331  }
332  else
333  {
334  EDA_ITEM* currentItem = m_foundItems.GetItem( data );
335 
336  if( currentItem != NULL )
337  currentItem->SetForceVisible( false );
338 
340  }
341 
342  updateFindReplaceView( aEvent );
343 }
344 
345 
346 void SCH_EDIT_FRAME::OnFindReplace( wxFindDialogEvent& aEvent )
347 {
348  SCH_ITEM* item;
349  SCH_SHEET_PATH* sheet;
350  SCH_SHEET_LIST schematic( g_RootSheet );
352  SCH_FIND_REPLACE_DATA searchCriteria;
353 
354  searchCriteria.SetFlags( aEvent.GetFlags() );
355  searchCriteria.SetFindString( aEvent.GetFindString() );
356  searchCriteria.SetReplaceString( aEvent.GetReplaceString() );
357  m_foundItems.SetReplaceString( aEvent.GetReplaceString() );
358 
359  if( IsSearchCacheObsolete( searchCriteria ) )
360  {
361  if( aEvent.GetFlags() & FR_CURRENT_SHEET_ONLY && g_RootSheet->CountSheets() > 1 )
362  {
363  m_foundItems.Collect( searchCriteria, m_CurrentSheet );
364  }
365  else
366  {
367  m_foundItems.Collect( searchCriteria );
368  }
369  }
370 
371  if( aEvent.GetEventType() == wxEVT_COMMAND_FIND_REPLACE_ALL )
372  {
373  while( ( item = (SCH_ITEM*) m_foundItems.GetItem( data ) ) != NULL )
374  {
375  SCH_ITEM* undoItem = data.GetParent();
376 
377  // Don't save child items in undo list.
378  if( undoItem == NULL )
379  undoItem = item;
380 
381  SetUndoItem( undoItem );
382 
383  sheet = schematic.GetSheetByPath( data.GetSheetPath() );
384 
385  wxCHECK_RET( sheet != NULL, wxT( "Could not find sheet path " ) + data.GetSheetPath() );
386 
387  if( m_foundItems.ReplaceItem( sheet ) )
388  {
389  OnModify();
390  SaveUndoItemInUndoList( undoItem );
391  updateFindReplaceView( aEvent );
392  }
393 
395 
396  if( m_foundItems.PassedEnd() )
397  break;
398  }
399  }
400  else
401  {
402  item = (SCH_ITEM*) m_foundItems.GetItem( data );
403 
404  wxCHECK_RET( item != NULL, wxT( "Invalid replace item in find collector list." ) );
405 
406  SCH_ITEM* undoItem = data.GetParent();
407 
408  if( undoItem == NULL )
409  undoItem = item;
410 
411  SetUndoItem( undoItem );
412 
413  sheet = schematic.GetSheetByPath( data.GetSheetPath() );
414 
415  wxCHECK_RET( sheet != NULL, wxT( "Could not find sheet path " ) + data.GetSheetPath() );
416 
417  if( m_foundItems.ReplaceItem( sheet ) )
418  {
419  OnModify();
420  SaveUndoItemInUndoList( undoItem );
421  updateFindReplaceView( aEvent );
422 
423  // A single replace is part of the search; it does not dirty it.
424  m_foundItems.SetForceSearch( false );
425  }
426 
428  }
429 
430  // End the replace if we are at the end if the list. This prevents an infinite loop if
431  // wrap search is selected and all of the items have been replaced with a value that
432  // still satisfies the search criteria.
433  if( m_foundItems.PassedEnd() )
434  aEvent.SetFlags( aEvent.GetFlags() & ~FR_REPLACE_ITEM_FOUND );
435 }
436 
437 
438 void SCH_EDIT_FRAME::updateFindReplaceView( wxFindDialogEvent& aEvent )
439 {
440  wxString msg;
441  SCH_SHEET_LIST schematic( g_RootSheet );
443  SCH_FIND_REPLACE_DATA searchCriteria;
444  bool warpCursor = !( aEvent.GetFlags() & FR_NO_WARP_CURSOR );
445 
446  searchCriteria.SetFlags( aEvent.GetFlags() );
447  searchCriteria.SetFindString( aEvent.GetFindString() );
448  searchCriteria.SetReplaceString( aEvent.GetReplaceString() );
449 
450  if( m_foundItems.GetItem( data ) != NULL )
451  {
452  wxLogTrace( traceFindReplace, wxT( "Found " ) + m_foundItems.GetText() );
453 
454  SCH_SHEET_PATH* sheet = schematic.GetSheetByPath( data.GetSheetPath() );
455 
456  wxCHECK_RET( sheet != NULL, wxT( "Could not find sheet path " ) +
457  data.GetSheetPath() );
458 
459  SCH_ITEM* item = (SCH_ITEM*)m_foundItems.GetItem( data );
460 
461  // Make the item temporarily visible just in case it's hide flag is set. This
462  // has no effect on objects that don't support hiding. If this is a close find
463  // dialog event, clear the temporary visibility flag.
464  if( item )
465  {
466  if( aEvent.GetEventType() == wxEVT_COMMAND_FIND_CLOSE )
467  item->SetForceVisible( false );
468  else if( item->Type() == SCH_FIELD_T && !( (SCH_FIELD*) item )->IsVisible() )
469  item->SetForceVisible( true );
470  }
471 
472  if( sheet->PathHumanReadable() != m_CurrentSheet->PathHumanReadable() )
473  {
474  sheet->LastScreen()->SetZoom( GetScreen()->GetZoom() );
475  *m_CurrentSheet = *sheet;
477  SetScreen( sheet->LastScreen() );
478  }
479 
480  // careful here
482 
483  RedrawScreen( data.GetPosition(), warpCursor );
484 
485  msg = m_foundItems.GetText();
486 
487  if( aEvent.GetFlags() & FR_SEARCH_REPLACE )
488  aEvent.SetFlags( aEvent.GetFlags() | FR_REPLACE_ITEM_FOUND );
489  }
490  else
491  {
492  if( aEvent.GetFlags() & FR_SEARCH_REPLACE )
493  aEvent.SetFlags( aEvent.GetFlags() & ~FR_REPLACE_ITEM_FOUND );
494 
495  msg.Printf( _( "No item found matching %s." ), GetChars( aEvent.GetFindString() ) );
496  }
497 
498  SetStatusText( msg );
499 }
Definition of the SCH_SHEET class for Eeschema.
void OnFindDrcMarker(wxFindDialogEvent &event)
Definition: find.cpp:60
Class SCH_SHEET_LIST.
int GetCount() const
Function GetCount returns the number of objects in the list.
Definition: collector.h:106
KICAD_T Type() const
Function Type()
Definition: base_struct.h:209
Class SCH_FIELD instances are attached to a component and provide a place for the component&#39;s value...
Definition: sch_field.h:56
SCH_ITEM * GetItem(int ndx) const
const wxChar *const traceFindReplace
Flag to enable find and replace debug tracing.
TRANSFORM & GetTransform() const
bool IsSearchRequired(const SCH_FIND_REPLACE_DATA &aFindReplaceData)
Function IsSearchRequired checks the current collector state against aFindReplaceData to see if a new...
SCH_SHEET_PATHS::iterator SCH_SHEET_PATHS_ITER
This file is part of the common library TODO brief description.
SCH_ITEM * FindNextItem(KICAD_T aType, SCH_SHEET_PATH **aSheetFound=NULL, SCH_ITEM *aLastItem=NULL, bool aWrap=true)
Function FindNextItem searches the entire schematic for the next schematic object.
Implementation of conversion functions that require both schematic and board internal units...
This file is part of the common library.
void OnModify()
Must be called after a schematic change in order to set the "modify" flag of the current screen* and ...
wxPoint GetPosition() const override
Function GetPosition.
Definition: sch_marker.h:101
void SetScreen(BASE_SCREEN *aScreen)
Definition: draw_frame.h:167
int CountSheets()
Count the number of sheets found in "this" sheet includeing all of the subsheets. ...
Definition: sch_sheet.cpp:625
wxString GetSheetPath() const
wxPoint GetPosition() const override
Function GetPosition.
Definition: sch_field.cpp:561
SCH_FIND_COLLECTOR m_foundItems
List of find/replace items.
Find a component in the schematic.
Find an item by it&#39;s value field.
Used by the search event handler to let the dialog know that a replaceable item has been found...
LIB_PIN * GetPin(const wxString &number)
Find a symbol pin by number.
SCH_SCREEN * LastScreen() const
Function LastScreen.
Wrap around the beginning or end of search list.
void MoveCursor(const wxPoint &aPosition)
Function MoveCursor moves the mouse pointer to aPosition in logical (drawing) units.
Definition: draw_panel.cpp:366
SCH_SHEET_PATH * GetSheetByPath(const wxString &aPath, bool aHumanReadable=true)
Function GetSheetByPath returns a sheet matching the path name in aPath.
void UpdateAllScreenReferences()
Function UpdateAllScreenReferences updates the reference and the m_Multi parameter (part selection) f...
Class SCH_FIND_COLLECTOR_DATA is used as a data container for the associated item found by the SCH_FI...
int GetLibHash() const
SCH_ITEM * Next() const
Field Reference of part, i.e. "IC21".
Find a component pin in the schematic.
static const int delta[8][2]
Definition: solve.cpp:112
void SaveUndoItemInUndoList(SCH_ITEM *aItem)
Swap the cloned item in member variable m_undoItem with aItem and saves it to the undo list then swap...
void updateFindReplaceView(wxFindDialogEvent &aEvent)
Definition: find.cpp:438
wxString Path() const
Function Path the path uses the time stamps which do not changes even when editing sheet parameters a...
virtual wxString GetShownText() const
Returns the string actually shown after processing of the base text.
Definition: eda_text.h:133
wxPoint TransformCoordinate(const wxPoint &aPoint) const
Calculate a new coordinate according to the mirror/rotation transform.
Definition: transform.cpp:41
SCH_SCREEN * GetScreen() const override
Function GetScreen returns a pointer to a BASE_SCREEN or one of its derivatives.
PROJECT & Prj() const
Function Prj returns a reference to the PROJECT "associated with" this KIWAY.
SCH_SHEET_PATH * m_CurrentSheet
which sheet we are presently working on.
void SetLibHash(int aHash)
void OnFindSchematicItem(wxFindDialogEvent &aEvent)
Find an item in the schematic matching the search criteria in aEvent.
Definition: find.cpp:307
wxPoint GetPosition() const
bool IsPointOnDisplay(const wxPoint &aPosition)
Function IsPointOnDisplay.
Definition: draw_panel.cpp:300
SCH_ITEM * GetParent() const
a helper to handle the real device context used in KiCad
void SetForceSearch(bool doSearch=true)
SCH_SHEET * g_RootSheet
Definition: eeschema.cpp:55
SCH_FIELD * GetField(int aFieldNdx) const
Returns a field in this symbol.
void UpdateIndex()
Function UpdateIndex updates the list index according to the current find and replace criteria...
bool ReplaceItem(SCH_SHEET_PATH *aSheetPath=NULL)
Function ReplaceItem performs a string replace of the item at the current index.
Subclass of DIALOG_SCH_FIND_BASE, which is generated by wxFormBuilder.
void SetForceVisible(bool aEnable)
Function SetForceVisible is used to set and cleag force visible flag used to force the item to be dra...
Definition: base_struct.h:276
wxString PathHumanReadable() const
Function PathHumanReadable returns the sheet path in a human readable form, i.e.
wxString GetAbbreviatedUnitsLabel(EDA_UNITS_T aUnit)
Definition: base_units.cpp:485
double GetZoom()
Function GetZoom.
Definition: draw_frame.cpp:536
SCH_ITEM * FindComponentAndItem(const wxString &aReference, bool aSearchHierarchy, SCH_SEARCH_T aSearchType, const wxString &aSearchText, bool aWarpMouse)
Finds a component in the schematic and an item in this component.
Definition: find.cpp:110
wxLogTrace helper definitions.
bool SetZoom(double iu_per_du)
Function SetZoom adjusts the current zoom factor.
Class SCH_SHEET_PATH.
bool IsSearchCacheObsolete(const SCH_FIND_REPLACE_DATA &aSearchCriteria)
Definition: find.cpp:289
Search the current sheet only.
void BuildSheetList(SCH_SHEET *aSheet)
Function BuildSheetList builds the list of sheets and their sheet path from aSheet.
void CrossHairOff(wxDC *DC)
Definition: draw_panel.cpp:265
const wxString GetRef(const SCH_SHEET_PATH *aSheet)
Return the reference for the given sheet path.
SCH_ITEM * FindNextItem(KICAD_T aType, SCH_ITEM *aLastItem=NULL, bool aWrap=false) const
Find the next schematic item in this sheet object.
wxPoint GetPosition() const override
Return the current draw object position.
Definition: lib_pin.h:462
EDA_UNITS_T g_UserUnit
Global variables definitions.
Definition: common.cpp:57
EDA_DRAW_PANEL * m_canvas
The area to draw on.
Definition: draw_frame.h:106
Find a component field.
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
Definition the SCH_COMPONENT class for Eeschema.
void CrossHairOn(wxDC *DC)
Definition: draw_panel.cpp:272
static const wxChar * GetChars(const wxString &s)
Function GetChars returns a wxChar* to the actual wxChar* data within a wxString, and is helpful for ...
Definition: macros.h:92
see class PGM_BASE
void SetReplaceString(const wxString &aReplaceString)
Update the replace string without changing anything else.
SCH_SEARCH_T
Schematic search type used by the socket link with Pcbnew.
Don&#39;t warp cursor to found item until the dialog is closed.
#define INSTALL_UNBUFFERED_DC(name, parent)
void Collect(SCH_FIND_REPLACE_DATA &aFindReplaceData, SCH_SHEET_PATH *aSheetPath=NULL)
Function Collect scans aSheetPath using this class&#39;s Inspector method for items matching aFindReplace...
bool TestDanglingEnds()
Test all of the connectable objects in the schematic for unused connection points.
Definition: sch_screen.cpp:913
Class SCH_FIND_REPLACE_DATA adds missing useful comparison and assignment operators to the wxFindRepl...
Find an item by it&#39;s reference designator.
Perform a search for a item that has replaceable text.
Class SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:69
wxPoint GetPosition() const override
Function GetPosition.
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:162
double To_User_Unit(EDA_UNITS_T aUnit, double aValue)
Function To_User_Unit convert aValue in internal units to the appropriate user units defined by aUnit...
Definition: base_units.cpp:91
wxString GetText()
Function GetText()
void SetUndoItem(const SCH_ITEM *aItem)
Clone aItem which can be used to restore the state of the item being edited when the user cancels the...
Definition for part library class.
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
void SetCrossHairPosition(const wxPoint &aPosition, bool aSnapToGrid=true)
Function SetCrossHairPosition sets the screen cross hair position to aPosition in logical (drawing) u...
#define VALUE
bool PassedEnd() const
Function PassedEnd tests if m_foundIndex is beyond the end of the list give the current find/replace ...
Class SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container clas...
void OnFindReplace(wxFindDialogEvent &aEvent)
Perform a search and replace of text in an item in the schematic matching the search and replace crit...
Definition: find.cpp:346