KiCad PCB EDA Suite
sch_collectors.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) 2011 Wayne Stambaugh <stambaughw@gmail.com>
5  * Copyright (C) 2004-2018 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
29 #include <macros.h>
30 #include <trace_helpers.h>
31 
32 #include <sch_sheet_path.h>
33 #include <transform.h>
34 #include <sch_collectors.h>
35 #include <sch_component.h>
36 #include <sch_line.h>
37 #include <sch_bus_entry.h>
38 
39 
46  SCH_LINE_T,
48  SCH_TEXT_T,
54  LIB_PIN_T,
57  EOT
58 };
59 
60 
67  SCH_LINE_T,
69  SCH_TEXT_T,
77  EOT
78 };
79 
80 
82  SCH_TEXT_T,
91  SCH_LINE_T,
92  EOT
93 };
94 
97  EOT
98 };
99 
102  EOT
103 };
104 
107  EOT
108 };
109 
112  EOT
113 };
114 
115 
117  SCH_MARKER_T,
122 // SCH_LINE_T,
123  SCH_BITMAP_T,
124  SCH_TEXT_T,
125  SCH_LABEL_T,
128  SCH_FIELD_T,
131  SCH_SHEET_T,
132  EOT
133 };
134 
135 
140  SCH_LINE_T,
141  SCH_LABEL_T,
145  SCH_SHEET_T,
146  SCH_TEXT_T,
147  EOT
148 };
149 
150 
152  SCH_TEXT_T,
153  SCH_LABEL_T,
156  SCH_FIELD_T,
158  SCH_SHEET_T,
159  SCH_BITMAP_T,
162  EOT
163 };
164 
165 
167  SCH_MARKER_T,
172  SCH_LINE_T,
173  SCH_TEXT_T,
174  SCH_LABEL_T,
179  SCH_SHEET_T,
180  SCH_BITMAP_T,
181  EOT
182 };
183 
184 
187  EOT
188 };
189 
190 
192  SCH_SHEET_T,
193  EOT
194 };
195 
196 
199  SCH_SHEET_T,
200  EOT
201 };
202 
203 
208  SCH_BITMAP_T,
209  SCH_SHEET_T,
210  EOT
211 };
212 
213 
215  SCH_TEXT_T,
216  SCH_LABEL_T,
220  EOT
221 };
222 
223 
225  SCH_TEXT_T,
226  SCH_LABEL_T,
230  SCH_SHEET_T,
231  SCH_BITMAP_T,
232  SCH_FIELD_T,
233  SCH_MARKER_T,
234  EOT
235 };
236 
237 
239 {
240  if( aItem->Type() != LIB_PIN_T && !aItem->HitTest( m_RefPos ) )
241  return SEARCH_CONTINUE;
242 
243  // Pins have special hit testing requirements that are relative to their parent
244  // SCH_COMPONENT item.
245  if( aItem->Type() == LIB_PIN_T )
246  {
247  wxCHECK_MSG( aTestData && ( (EDA_ITEM*) aTestData )->Type() == SCH_COMPONENT_T,
248  SEARCH_CONTINUE, wxT( "Cannot inspect invalid data. Bad programmer!" ) );
249 
250  // Pin hit testing is relative to the components position and orientation in the
251  // schematic. The hit test position must be converted to library coordinates.
252  SCH_COMPONENT* component = (SCH_COMPONENT*) aTestData;
253  TRANSFORM transform = component->GetTransform().InverseTransform();
254  wxPoint position = transform.TransformCoordinate( m_RefPos - component->GetPosition() );
255 
256  position.y *= -1; // Y axis polarity in schematic is inverted from library.
257 
258  if( !aItem->HitTest( position ) )
259  return SEARCH_CONTINUE;
260  }
261 
262  Append( aItem );
263 
264  return SEARCH_CONTINUE;
265 }
266 
267 
268 void SCH_COLLECTOR::Collect( SCH_ITEM* aItem, const KICAD_T aFilterList[],
269  const wxPoint& aPosition )
270 {
271  Empty(); // empty the collection just in case
272 
273  SetScanTypes( aFilterList );
274 
275  // remember where the snapshot was taken from and pass refPos to the Inspect() function.
276  SetRefPos( aPosition );
277 
279 }
280 
281 
283 {
284  if( GetCount() != 2 )
285  return false;
286 
287  bool is_busentry0 = (dynamic_cast<SCH_BUS_ENTRY_BASE*>( m_List[0] ) != NULL);
288  bool is_busentry1 = (dynamic_cast<SCH_BUS_ENTRY_BASE*>( m_List[1] ) != NULL);
289 
290  if( (m_List[0]->Type() == SCH_LINE_T) && (m_List[1]->Type() == SCH_LINE_T) )
291  return ( ( SCH_LINE* ) m_List[0])->GetLayer() == ( ( SCH_LINE* ) m_List[1])->GetLayer();
292 
293  if( (m_List[0]->Type() == SCH_LINE_T) && is_busentry1 )
294  return true;
295 
296  if( is_busentry0 && (m_List[1]->Type() == SCH_LINE_T) )
297  return true;
298 
299  return false;
300 }
301 
302 
303 bool SCH_COLLECTOR::IsNode( bool aIncludePins ) const
304 {
305  for( size_t i = 0; i < m_List.size(); i++ )
306  {
307  SCH_ITEM* item = (SCH_ITEM*) m_List[ i ];
308  KICAD_T type = item->Type();
309 
310  if( type == SCH_JUNCTION_T )
311  continue;
312 
313  if( type == SCH_LINE_T )
314  {
315  if( item->GetLayer() != LAYER_WIRE )
316  return false;
317 
318  continue;
319  }
320 
321  if( type == LIB_PIN_T )
322  {
323  if( !aIncludePins )
324  return false;
325 
326  continue;
327  }
328 
329  // Any other item types indicate that this collection is not a node.
330  return false;
331  }
332 
333  return true;
334 }
335 
336 
338 {
339  for( size_t i = 0; i < m_List.size(); i++ )
340  if( ( (SCH_ITEM*) m_List[ i ] )->Type() == SCH_JUNCTION_T )
341  return true;
342 
343  return false;
344 }
345 
346 
352 {
353 public:
355  SCH_ITEM( nullptr, NOT_USED )
356  {}
357 
358  wxString GetSelectMenuText( EDA_UNITS_T aUnits ) const override
359  {
360  return _( "(Deleted Item)" );
361  }
362  wxString GetClass() const override
363  {
364  return wxT( "DELETED_SCH_ITEM" );
365  }
366 
367  // define pure virtuals:
368  wxPoint GetPosition() const override { return wxPoint(); }
369  void SetPosition( const wxPoint& ) override {}
370  void Draw( EDA_DRAW_PANEL* , wxDC* , const wxPoint& , GR_DRAWMODE , COLOR4D ) override {}
371 
372 #if defined(DEBUG)
373  void Show( int , std::ostream& ) const override {}
374 #endif
375 
376  void Move( const wxPoint& ) override {}
377  void MirrorY( int ) override {}
378  void MirrorX( int ) override {}
379  void Rotate( wxPoint ) override {}
380 };
381 
382 
384 
385 
387 {
388  if( (unsigned)ndx >= (unsigned)GetCount() )
389  return NULL;
390 
391  // Do not simply return m_List[ ndx ] as it might have been deleted. Instead
392  // treat it as a weak reference and search the sheets for an item with the same
393  // pointer value.
394 
395  void* weakRef = m_List[ ndx ];
396  SCH_ITEM* item = &g_DeletedSchItem;
397 
398  INSPECTOR_FUNC inspector = [&] ( EDA_ITEM* candidate, void* testData )
399  {
400  if( (void*) candidate == weakRef )
401  {
402  item = (SCH_ITEM*) candidate;
403  return SEARCH_QUIT;
404  }
405 
406  return SEARCH_CONTINUE;
407  };
408 
409  for( unsigned i = 0; i < m_sheetPaths.size(); i++ )
410  {
411  EDA_ITEM::IterateForward( m_sheetPaths[ i ].LastDrawList(),
412  inspector, nullptr, SCH_COLLECTOR::AllItems );
413  }
414 
415  return item;
416 }
417 
418 
420 {
421  return GetItem( ndx );
422 }
423 
424 
426 {
427  bool retv = false;
428 
429  wxUint32 flags = m_findReplaceData.GetFlags();
430 
431  if( GetCount() == 0 )
432  return true;
433 
434  if( !(flags & FR_SEARCH_WRAP) || (flags & FR_SEARCH_REPLACE) )
435  {
436  if( flags & wxFR_DOWN )
437  {
438  if( m_foundIndex >= GetCount() )
439  retv = true;
440  }
441  else
442  {
443  if( m_foundIndex < 0 )
444  retv = true;
445  }
446  }
447 
448  return retv;
449 }
450 
451 
452 #if defined(DEBUG)
453 
455 {
456  int tmp = m_foundIndex;
457 
458  wxLogTrace( traceFindReplace, wxT( "%d items found to replace %s with %s." ),
459  GetCount(), GetChars( m_findReplaceData.GetFindString() ),
460  GetChars( m_findReplaceData.GetReplaceString() ) );
461 
463  wxLogTrace( traceFindReplace, wxT( " " ) + GetText( MILLIMETRES ) );
464 
465  m_foundIndex = tmp;
466 }
467 
468 #endif
469 
470 
472 {
473  wxUint32 flags = m_findReplaceData.GetFlags();
474 
475  if( flags & wxFR_DOWN )
476  {
477  if( m_foundIndex < GetCount() )
478  m_foundIndex += 1;
479  if( (m_foundIndex >= GetCount()) && (flags & FR_SEARCH_WRAP) )
480  m_foundIndex = 0;
481  }
482  else
483  {
484  if( m_foundIndex >= 0 )
485  m_foundIndex -= 1;
486  if( (m_foundIndex < 0) && (flags & FR_SEARCH_WRAP) )
487  m_foundIndex = GetCount() - 1;
488  }
489 }
490 
491 
493 {
494  wxCHECK_MSG( (unsigned) aIndex < m_data.size(), SCH_FIND_COLLECTOR_DATA(),
495  wxT( "Attempt to get find data outside of list boundary." ) );
496 
497  return m_data[ aIndex ];
498 }
499 
500 
502 {
503  wxCHECK_MSG( (GetCount() != 0) && IsValidIndex( m_foundIndex ), wxEmptyString,
504  wxT( "Cannot get found item at invalid index." ) );
505 
507  EDA_ITEM* foundItem = GetItem( m_foundIndex );
508 
509  if( data.GetParent() )
510  {
511  return wxString::Format( _( "Match %i of %i: %s of %s in sheet %s" ),
512  m_foundIndex + 1,
513  GetCount(),
514  foundItem->GetSelectMenuText( aUnits ),
515  data.GetParent()->GetSelectMenuText( aUnits ),
516  data.GetSheetPath() );
517  }
518  else
519  {
520  return wxString::Format( _( "Match %i of %i: %s in sheet %s" ),
521  m_foundIndex + 1,
522  GetCount(),
523  foundItem->GetSelectMenuText( aUnits ),
524  data.GetSheetPath() );
525  }
526 }
527 
528 
530 {
531  if( PassedEnd() )
532  return NULL;
533 
534  aData = m_data[ m_foundIndex ];
535  return GetItem( m_foundIndex );
536 }
537 
538 
540 {
541  if( PassedEnd() )
542  return false;
543 
544  wxCHECK_MSG( IsValidIndex( m_foundIndex ), false,
545  wxT( "Invalid replace list index in SCH_FIND_COLLECTOR." ) );
546 
547  EDA_ITEM* item = GetItem( m_foundIndex );
548 
549  bool replaced = item->Replace( m_findReplaceData, aSheetPath );
550 
551  return replaced;
552 }
553 
554 
556 {
557  wxPoint position;
558 
559  if( aItem->Matches( m_findReplaceData, m_currentSheetPath, &position ) )
560  {
561  if( aItem->Type() == LIB_PIN_T )
562  {
563  wxCHECK_MSG( aTestData && ( (EDA_ITEM*) aTestData )->Type() == SCH_COMPONENT_T,
564  SEARCH_CONTINUE, wxT( "Cannot inspect invalid data. Bad programmer!" ) );
565 
566  // Pin positions are relative to their parent component's position and
567  // orientation in the schematic. The pin's position must be converted
568  // schematic coordinates.
569  SCH_COMPONENT* component = (SCH_COMPONENT*) aTestData;
570  TRANSFORM transform = component->GetTransform();
571  position.y = -position.y;
572  position = transform.TransformCoordinate( position ) + component->GetPosition();
573  }
574 
575  Append( aItem );
576  m_data.push_back( SCH_FIND_COLLECTOR_DATA( position,
578  (SCH_ITEM*) aTestData ) );
579  }
580 
581  return SEARCH_CONTINUE;
582 }
583 
584 
585 void SCH_FIND_COLLECTOR::SetReplaceString( const wxString &aReplaceString )
586 {
587  m_findReplaceData.SetReplaceString( aReplaceString );
588 }
589 
590 
592  SCH_SHEET_PATH* aSheetPath )
593 {
594  if( !IsSearchRequired( aFindReplaceData ) && !m_List.empty() && !m_forceSearch )
595  return;
596 
597  m_findReplaceData = aFindReplaceData;
598  Empty(); // empty the collection just in case
599  m_data.clear();
600  m_foundIndex = 0;
601  m_sheetPaths.clear();
602  SetForceSearch( false );
603 
604  if( aSheetPath )
605  {
606  m_currentSheetPath = aSheetPath;
607  m_sheetPaths.push_back( *m_currentSheetPath );
609  }
610  else
611  {
612  SCH_SHEET_LIST schematic( g_RootSheet );
613 
614  for( unsigned i = 0; i < schematic.size(); i++ )
615  {
616  m_currentSheetPath = &schematic[i];
617  m_sheetPaths.push_back( *m_currentSheetPath );
619  }
620  }
621 
622 #if defined(DEBUG)
623  dump();
624 #endif
625 
626  if( m_List.size() != m_data.size() )
627  {
628  wxFAIL_MSG( wxT( "List size mismatch." ) );
629  m_List.clear();
630  m_data.clear();
631  }
632 }
633 
634 
636 {
637  // The Vist() function only visits the testItem if its type was in the
638  // the scanList, so therefore we can collect anything given to us here.
639  Append( aItem );
640 
641  return SEARCH_CONTINUE;
642 }
643 
644 
645 void SCH_TYPE_COLLECTOR::Collect( SCH_ITEM* aItem, const KICAD_T aFilterList[] )
646 {
647  Empty(); // empty the collection
648 
649  SetScanTypes( aFilterList );
650 
652 }
void Empty()
Function Empty sets the list to empty.
Definition: collector.h:123
Class SCH_SHEET_LIST.
static const KICAD_T ParentItems[]
A scan list for only parent schematic items.
static SEARCH_RESULT IterateForward(EDA_ITEM *listStart, INSPECTOR inspector, void *testData, const KICAD_T scanTypes[])
Function IterateForward walks through the object tree calling the inspector() on each object type req...
static const KICAD_T SheetsAndSheetLabels[]
A scan list for schematic sheet and sheet label items.
const wxChar *const traceFindReplace
Flag to enable find and replace debug tracing.
std::function< SEARCH_RESULT(EDA_ITEM *aItem, void *aTestData) > INSPECTOR_FUNC
Typedef INSPECTOR is used to inspect and possibly collect the (search) results of iterating over a li...
Definition: base_struct.h:77
bool IsSearchRequired(const SCH_FIND_REPLACE_DATA &aFindReplaceData)
Function IsSearchRequired checks the current collector state against aFindReplaceData to see if a new...
static const KICAD_T RotatableItems[]
A scan list for all rotatable schematic items.
SEARCH_RESULT Inspect(EDA_ITEM *aItem, void *aTestData) override
static const KICAD_T AllItems[]
A scan list for all schematic items.
bool IsValidIndex(int aIndex)
Function IsValidIndex tests if aIndex is with the limits of the list of collected items.
Definition: collector.h:105
static const KICAD_T DoubleClickItems[]
A scan list for schematic items that react to a double-click.
bool IsDraggableJunction() const
Function IsDraggableJunction tests to see if the collected items form a draggable junction.
SCH_SHEET_PATH * m_currentSheetPath
The path of the sheet currently being iterated over.
bool Replace(wxFindReplaceData &aSearchData, wxString &aText)
Helper function used in search and replace dialog Function Replace performs a text replace on aText u...
void SetScanTypes(const KICAD_T *scanTypes)
Function SetScanTypes records the list of KICAD_T types to consider for collection by the Inspect() f...
Definition: collector.h:215
the 3d code uses this value
Definition: typeinfo.h:80
virtual bool Matches(wxFindReplaceData &aSearchData, void *aAuxData, wxPoint *aFindLocation)
Function Matches compares the item against the search criteria in aSearchData.
Definition: base_struct.h:420
SEARCH_RESULT Inspect(EDA_ITEM *testItem, void *testData) override
Function Inspect is the examining function within the INSPECTOR which is passed to the Iterate functi...
TRANSFORM InverseTransform() const
Calculate the Inverse mirror/rotation transform.
Definition: transform.cpp:58
void Collect(SCH_ITEM *aItem, const KICAD_T aFilterList[], const wxPoint &aPosition)
Function Collect scans a SCH_ITEM using this class's Inspector method, which does the collection.
static const KICAD_T ComponentsOnly[]
A scan list for schematic component items only.
SCH_ITEM * operator[](int ndx) const
wxPoint GetPosition() const override
Function GetPosition.
static const KICAD_T CmpFieldDatasheetOnly[]
A scan list for a specific editable field: Datasheet.
virtual bool HitTest(const wxPoint &aPosition) const
Function HitTest tests if aPosition is contained within or on the bounding area of an item.
Definition: base_struct.h:308
Wrap around the beginning or end of search list.
static const KICAD_T AllItemsButPins[]
A scan list for all schematic items except pins.
Class SCH_FIND_COLLECTOR_DATA is used as a data container for the associated item found by the SCH_FI...
static const KICAD_T MovableItems[]
A scan list for all movable schematic items.
std::vector< SCH_FIND_COLLECTOR_DATA > m_data
Data associated with each found item.
void Move(const wxPoint &) override
Function Move moves the item by aMoveVector to a new position.
DELETED_SCH_ITEM g_DeletedSchItem
search types array terminator (End Of Types)
Definition: typeinfo.h:82
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:78
wxPoint TransformCoordinate(const wxPoint &aPoint) const
Calculate a new coordinate according to the mirror/rotation transform.
Definition: transform.cpp:41
This file contains miscellaneous commonly used macros and functions.
void Append(EDA_ITEM *item)
Function Append adds an item to the end of the list.
Definition: collector.h:133
int GetCount() const
Function GetCount returns the number of objects in the list.
Definition: collector.h:114
static const KICAD_T CmpFieldValueOnly[]
A scan list for a specific editable field: Value.
bool IsCorner() const
Function IsCorner tests if the collected items forms as corner of two line segments.
INSPECTOR_FUNC m_inspector
a class common bridge into the polymorphic Inspect()
Definition: collector.h:59
A singleton item of this class is returned for a weak reference that no longer exists.
Class for tranforming drawing coordinates for a wxDC device context.
Definition: transform.h:45
SCH_SHEET_PATHS m_sheetPaths
The paths of the all the sheets in the collector.
void SetForceSearch(bool doSearch=true)
SCH_SHEET * g_RootSheet
Definition: eeschema.cpp:56
SCH_ITEM * GetItem(int ndx) const
wxString dump(const wxArrayString &aArray)
Debug helper for printing wxArrayString contents.
void SetRefPos(const wxPoint &aRefPos)
Definition: collector.h:230
SCH_FIND_COLLECTOR_DATA GetFindData(int aIndex)
Function GetFindData returns the data associated with the item found at aIndex.
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
Definition: gr_basic.h:37
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.
TRANSFORM & GetTransform() const
static const KICAD_T CmpFieldFootprintOnly[]
A scan list for a specific editable field: Footprint.
void Rotate(wxPoint) override
Function Rotate rotates the item around aPosition 90 degrees in the clockwise direction.
wxLogTrace helper definitions.
wxString GetSheetPath() const
Class SCH_SHEET_PATH.
void Draw(EDA_DRAW_PANEL *, wxDC *, const wxPoint &, GR_DRAWMODE, COLOR4D) override
Function Draw Draw a schematic item.
SCH_ITEM * LastDrawList() const
Function LastDrawList.
SCH_LAYER_ID GetLayer() const
Function GetLayer returns the layer this item is on.
static const KICAD_T EditableItems[]
A scan list for all editable schematic items.
Definition the SCH_COMPONENT class for Eeschema.
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
void SetReplaceString(const wxString &aReplaceString)
Update the replace string without changing anything else.
static const KICAD_T DraggableItems[]
A scan list for all draggable schematic items.
void MirrorX(int) override
Function MirrorX mirrors item relative to the X axis about aXaxis_position.
Segment description base class to describe items which have 2 end points (track, wire,...
Definition: sch_line.h:41
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
bool IsNode(bool aIncludePins=true) const
Function IsNode tests if the collected items form a node.
void Collect(SCH_FIND_REPLACE_DATA &aFindReplaceData, SCH_SHEET_PATH *aSheetPath=NULL)
Function Collect scans aSheetPath using this class's Inspector method for items matching aFindReplace...
int m_foundIndex
The current found item list index.
static const KICAD_T CmpFieldReferenceOnly[]
A scan list for a specific editable field: Reference.
Class SCH_FIND_REPLACE_DATA adds missing useful comparison and assignment operators to the wxFindRepl...
size_t i
Definition: json11.cpp:597
Perform a search for a item that has replaceable text.
Class SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:70
virtual wxString GetSelectMenuText(EDA_UNITS_T aUnits) const
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
static const KICAD_T CopyableItems[]
A scan list for schematic items that can be copied/duplicated.
wxPoint GetPosition() const override
Function GetPosition.
SEARCH_RESULT Inspect(EDA_ITEM *aItem, void *aTestData) override
void Collect(SCH_ITEM *aBoard, const KICAD_T aScanList[])
Function Collect scans a BOARD_ITEM using this class's Inspector method, which does the collection.
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:154
wxString GetText(EDA_UNITS_T aUnits)
Function GetText()
bool PassedEnd() const
Function PassedEnd tests if m_foundIndex is beyond the end of the list give the current find/replace ...
static const KICAD_T SheetsOnly[]
A scan list for schematic sheet items only.
static bool GetLayer(MODEL_VRML &aModel, LAYER_NUM layer, VRML_LAYER **vlayer)
void MirrorY(int) override
Function MirrorY mirrors item relative to the Y axis about aYaxis_position.
wxPoint m_RefPos
A point to test against, and that was used to make the collection.
Definition: collector.h:68
wxString PathHumanReadable() const
Function PathHumanReadable returns the sheet path in a human readable form, i.e.
SEARCH_RESULT
Definition: base_struct.h:66
Definition of the SCH_SHEET_PATH and SCH_SHEET_LIST classes for Eeschema.
std::vector< EDA_ITEM * > m_List
A place to hold collected objects without taking ownership of their memory.
Definition: collector.h:65
const KICAD_T * m_ScanTypes
Which object types to scan.
Definition: collector.h:62
bool m_forceSearch
A flag to indicate that the schemtic has been modified and a new search must be performed even if the...
Class SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container clas...
EDA_UNITS_T
Definition: common.h:160
wxString GetClass() const override
Function GetClass returns the class name.
static const KICAD_T OrientableItems[]
A scan list for schematic items that can be mirrored.
wxString GetSelectMenuText(EDA_UNITS_T aUnits) const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
SCH_ITEM * GetParent() const
SCH_FIND_REPLACE_DATA m_findReplaceData
The criteria used to test for matching items.
KICAD_T Type() const
Function Type()
Definition: base_struct.h:201
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39
void SetPosition(const wxPoint &) override
Function SetPosition set the schematic item position to aPosition.