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,
160  EOT
161 };
162 
163 
165  SCH_MARKER_T,
170  SCH_LINE_T,
171  SCH_TEXT_T,
172  SCH_LABEL_T,
177  SCH_SHEET_T,
178  SCH_BITMAP_T,
179  EOT
180 };
181 
182 
185  EOT
186 };
187 
188 
190  SCH_SHEET_T,
191  EOT
192 };
193 
194 
197  SCH_SHEET_T,
198  EOT
199 };
200 
201 
204  SCH_BITMAP_T,
205  SCH_SHEET_T,
206  EOT
207 };
208 
209 
211  SCH_TEXT_T,
212  SCH_LABEL_T,
216  EOT
217 };
218 
219 
221  SCH_TEXT_T,
222  SCH_LABEL_T,
226  SCH_SHEET_T,
227  SCH_BITMAP_T,
228  SCH_FIELD_T,
229  SCH_MARKER_T,
230  EOT
231 };
232 
233 
235 {
236  if( aItem->Type() != LIB_PIN_T && !aItem->HitTest( m_RefPos ) )
237  return SEARCH_CONTINUE;
238 
239  // Pins have special hit testing requirements that are relative to their parent
240  // SCH_COMPONENT item.
241  if( aItem->Type() == LIB_PIN_T )
242  {
243  wxCHECK_MSG( aTestData && ( (EDA_ITEM*) aTestData )->Type() == SCH_COMPONENT_T,
244  SEARCH_CONTINUE, wxT( "Cannot inspect invalid data. Bad programmer!" ) );
245 
246  // Pin hit testing is relative to the components position and orientation in the
247  // schematic. The hit test position must be converted to library coordinates.
248  SCH_COMPONENT* component = (SCH_COMPONENT*) aTestData;
249  TRANSFORM transform = component->GetTransform().InverseTransform();
250  wxPoint position = transform.TransformCoordinate( m_RefPos - component->GetPosition() );
251 
252  position.y *= -1; // Y axis polarity in schematic is inverted from library.
253 
254  if( !aItem->HitTest( position ) )
255  return SEARCH_CONTINUE;
256  }
257 
258  Append( aItem );
259 
260  return SEARCH_CONTINUE;
261 }
262 
263 
264 void SCH_COLLECTOR::Collect( SCH_ITEM* aItem, const KICAD_T aFilterList[],
265  const wxPoint& aPosition )
266 {
267  Empty(); // empty the collection just in case
268 
269  SetScanTypes( aFilterList );
270 
271  // remember where the snapshot was taken from and pass refPos to the Inspect() function.
272  SetRefPos( aPosition );
273 
275 }
276 
277 
279 {
280  if( GetCount() != 2 )
281  return false;
282 
283  bool is_busentry0 = (dynamic_cast<SCH_BUS_ENTRY_BASE*>( m_List[0] ) != NULL);
284  bool is_busentry1 = (dynamic_cast<SCH_BUS_ENTRY_BASE*>( m_List[1] ) != NULL);
285 
286  if( (m_List[0]->Type() == SCH_LINE_T) && (m_List[1]->Type() == SCH_LINE_T) )
287  return ( ( SCH_LINE* ) m_List[0])->GetLayer() == ( ( SCH_LINE* ) m_List[1])->GetLayer();
288 
289  if( (m_List[0]->Type() == SCH_LINE_T) && is_busentry1 )
290  return true;
291 
292  if( is_busentry0 && (m_List[1]->Type() == SCH_LINE_T) )
293  return true;
294 
295  return false;
296 }
297 
298 
299 bool SCH_COLLECTOR::IsNode( bool aIncludePins ) const
300 {
301  for( size_t i = 0; i < m_List.size(); i++ )
302  {
303  SCH_ITEM* item = (SCH_ITEM*) m_List[ i ];
304  KICAD_T type = item->Type();
305 
306  if( type == SCH_JUNCTION_T )
307  continue;
308 
309  if( type == SCH_LINE_T )
310  {
311  if( item->GetLayer() != LAYER_WIRE )
312  return false;
313 
314  continue;
315  }
316 
317  if( type == LIB_PIN_T )
318  {
319  if( !aIncludePins )
320  return false;
321 
322  continue;
323  }
324 
325  // Any other item types indicate that this collection is not a node.
326  return false;
327  }
328 
329  return true;
330 }
331 
332 
334 {
335  for( size_t i = 0; i < m_List.size(); i++ )
336  if( ( (SCH_ITEM*) m_List[ i ] )->Type() == SCH_JUNCTION_T )
337  return true;
338 
339  return false;
340 }
341 
342 
348 {
349 public:
351  SCH_ITEM( nullptr, NOT_USED )
352  {}
353 
354  wxString GetSelectMenuText( EDA_UNITS_T aUnits ) const override
355  {
356  return _( "(Deleted Item)" );
357  }
358  wxString GetClass() const override
359  {
360  return wxT( "DELETED_SCH_ITEM" );
361  }
362 
363  // define pure virtuals:
364  wxPoint GetPosition() const override { return wxPoint(); }
365  void SetPosition( const wxPoint& ) override {}
366  void Draw( EDA_DRAW_PANEL* , wxDC* , const wxPoint& , GR_DRAWMODE , COLOR4D ) override {}
367 
368 #if defined(DEBUG)
369  void Show( int , std::ostream& ) const override {}
370 #endif
371 
372  void Move( const wxPoint& ) override {}
373  void MirrorY( int ) override {}
374  void MirrorX( int ) override {}
375  void Rotate( wxPoint ) override {}
376 };
377 
378 
380 
381 
383 {
384  if( (unsigned)ndx >= (unsigned)GetCount() )
385  return NULL;
386 
387  // Do not simply return m_List[ ndx ] as it might have been deleted. Instead
388  // treat it as a weak reference and search the sheets for an item with the same
389  // pointer value.
390 
391  void* weakRef = m_List[ ndx ];
392  SCH_ITEM* item = &g_DeletedSchItem;
393 
394  INSPECTOR_FUNC inspector = [&] ( EDA_ITEM* candidate, void* testData )
395  {
396  if( (void*) candidate == weakRef )
397  {
398  item = (SCH_ITEM*) candidate;
399  return SEARCH_QUIT;
400  }
401 
402  return SEARCH_CONTINUE;
403  };
404 
405  for( unsigned i = 0; i < m_sheetPaths.size(); i++ )
406  {
407  EDA_ITEM::IterateForward( m_sheetPaths[ i ].LastDrawList(),
408  inspector, nullptr, SCH_COLLECTOR::AllItems );
409  }
410 
411  return item;
412 }
413 
414 
416 {
417  return GetItem( ndx );
418 }
419 
420 
422 {
423  bool retv = false;
424 
425  wxUint32 flags = m_findReplaceData.GetFlags();
426 
427  if( GetCount() == 0 )
428  return true;
429 
430  if( !(flags & FR_SEARCH_WRAP) || (flags & FR_SEARCH_REPLACE) )
431  {
432  if( flags & wxFR_DOWN )
433  {
434  if( m_foundIndex >= GetCount() )
435  retv = true;
436  }
437  else
438  {
439  if( m_foundIndex < 0 )
440  retv = true;
441  }
442  }
443 
444  return retv;
445 }
446 
447 
448 #if defined(DEBUG)
449 
451 {
452  int tmp = m_foundIndex;
453 
454  wxLogTrace( traceFindReplace, wxT( "%d items found to replace %s with %s." ),
455  GetCount(), GetChars( m_findReplaceData.GetFindString() ),
456  GetChars( m_findReplaceData.GetReplaceString() ) );
457 
458  for( m_foundIndex = 0; m_foundIndex < GetCount(); m_foundIndex++ )
459  wxLogTrace( traceFindReplace, wxT( " " ) + GetText( MILLIMETRES ) );
460 
461  m_foundIndex = tmp;
462 }
463 
464 #endif
465 
466 
468 {
469  wxUint32 flags = m_findReplaceData.GetFlags();
470 
471  if( flags & wxFR_DOWN )
472  {
473  if( m_foundIndex < GetCount() )
474  m_foundIndex += 1;
475  if( (m_foundIndex >= GetCount()) && (flags & FR_SEARCH_WRAP) )
476  m_foundIndex = 0;
477  }
478  else
479  {
480  if( m_foundIndex >= 0 )
481  m_foundIndex -= 1;
482  if( (m_foundIndex < 0) && (flags & FR_SEARCH_WRAP) )
483  m_foundIndex = GetCount() - 1;
484  }
485 }
486 
487 
489 {
490  wxCHECK_MSG( (unsigned) aIndex < m_data.size(), SCH_FIND_COLLECTOR_DATA(),
491  wxT( "Attempt to get find data outside of list boundary." ) );
492 
493  return m_data[ aIndex ];
494 }
495 
496 
498 {
499  wxCHECK_MSG( (GetCount() != 0) && IsValidIndex( m_foundIndex ), wxEmptyString,
500  wxT( "Cannot get found item at invalid index." ) );
501 
502  SCH_FIND_COLLECTOR_DATA data = m_data[ m_foundIndex ];
503  EDA_ITEM* foundItem = GetItem( m_foundIndex );
504 
505  if( data.GetParent() )
506  {
507  return wxString::Format( _( "Match %i of %i: %s of %s in sheet %s" ),
508  m_foundIndex + 1,
509  GetCount(),
510  foundItem->GetSelectMenuText( aUnits ),
511  data.GetParent()->GetSelectMenuText( aUnits ),
512  data.GetSheetPath() );
513  }
514  else
515  {
516  return wxString::Format( _( "Match %i of %i: %s in sheet %s" ),
517  m_foundIndex + 1,
518  GetCount(),
519  foundItem->GetSelectMenuText( aUnits ),
520  data.GetSheetPath() );
521  }
522 }
523 
524 
526 {
527  if( PassedEnd() )
528  return NULL;
529 
530  aData = m_data[ m_foundIndex ];
531  return GetItem( m_foundIndex );
532 }
533 
534 
536 {
537  if( PassedEnd() )
538  return false;
539 
540  wxCHECK_MSG( IsValidIndex( m_foundIndex ), false,
541  wxT( "Invalid replace list index in SCH_FIND_COLLECTOR." ) );
542 
543  EDA_ITEM* item = GetItem( m_foundIndex );
544 
545  bool replaced = item->Replace( m_findReplaceData, aSheetPath );
546 
547  return replaced;
548 }
549 
550 
552 {
553  wxPoint position;
554 
555  if( aItem->Matches( m_findReplaceData, m_currentSheetPath, &position ) )
556  {
557  if( aItem->Type() == LIB_PIN_T )
558  {
559  wxCHECK_MSG( aTestData && ( (EDA_ITEM*) aTestData )->Type() == SCH_COMPONENT_T,
560  SEARCH_CONTINUE, wxT( "Cannot inspect invalid data. Bad programmer!" ) );
561 
562  // Pin positions are relative to their parent component's position and
563  // orientation in the schematic. The pin's position must be converted
564  // schematic coordinates.
565  SCH_COMPONENT* component = (SCH_COMPONENT*) aTestData;
566  TRANSFORM transform = component->GetTransform();
567  position.y = -position.y;
568  position = transform.TransformCoordinate( position ) + component->GetPosition();
569  }
570 
571  Append( aItem );
572  m_data.push_back( SCH_FIND_COLLECTOR_DATA( position,
573  m_currentSheetPath->PathHumanReadable(),
574  (SCH_ITEM*) aTestData ) );
575  }
576 
577  return SEARCH_CONTINUE;
578 }
579 
580 
581 void SCH_FIND_COLLECTOR::SetReplaceString( const wxString &aReplaceString )
582 {
583  m_findReplaceData.SetReplaceString( aReplaceString );
584 }
585 
586 
588  SCH_SHEET_PATH* aSheetPath )
589 {
590  if( !IsSearchRequired( aFindReplaceData ) && !m_List.empty() && !m_forceSearch )
591  return;
592 
593  m_findReplaceData = aFindReplaceData;
594  Empty(); // empty the collection just in case
595  m_data.clear();
596  m_foundIndex = 0;
597  m_sheetPaths.clear();
598  SetForceSearch( false );
599 
600  if( aSheetPath )
601  {
602  m_currentSheetPath = aSheetPath;
603  m_sheetPaths.push_back( *m_currentSheetPath );
605  }
606  else
607  {
608  SCH_SHEET_LIST schematic( g_RootSheet );
609 
610  for( unsigned i = 0; i < schematic.size(); i++ )
611  {
612  m_currentSheetPath = &schematic[i];
613  m_sheetPaths.push_back( *m_currentSheetPath );
614  EDA_ITEM::IterateForward( m_currentSheetPath->LastDrawList(), m_inspector, NULL, m_ScanTypes );
615  }
616  }
617 
618 #if defined(DEBUG)
619  dump();
620 #endif
621 
622  if( m_List.size() != m_data.size() )
623  {
624  wxFAIL_MSG( wxT( "List size mismatch." ) );
625  m_List.clear();
626  m_data.clear();
627  }
628 }
629 
630 
632 {
633  // The Vist() function only visits the testItem if its type was in the
634  // the scanList, so therefore we can collect anything given to us here.
635  Append( aItem );
636 
637  return SEARCH_CONTINUE;
638 }
639 
640 
641 void SCH_TYPE_COLLECTOR::Collect( SCH_ITEM* aItem, const KICAD_T aFilterList[] )
642 {
643  Empty(); // empty the collection
644 
645  SetScanTypes( aFilterList );
646 
648 }
SCH_ITEM * LastDrawList() const
Function LastDrawList.
void Empty()
Function Empty sets the list to empty.
Definition: collector.h:123
SCH_ITEM * operator[](int ndx) const
Class SCH_SHEET_LIST.
int GetCount() const
Function GetCount returns the number of objects in the list.
Definition: collector.h:114
KICAD_T Type() const
Function Type()
Definition: base_struct.h:201
SCH_ITEM * GetItem(int ndx) const
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
TRANSFORM & GetTransform() const
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 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
wxString GetSheetPath() const
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...
void Collect(SCH_ITEM *aItem, const KICAD_T aFilterList[], const wxPoint &aPosition)
Function Collect scans a SCH_ITEM using this class&#39;s Inspector method, which does the collection...
static const KICAD_T ComponentsOnly[]
A scan list for schematic component items only.
wxPoint GetPosition() const override
Function GetPosition.
static const KICAD_T CmpFieldDatasheetOnly[]
A scan list for a specific editable field: Datasheet.
SCH_LAYER_ID GetLayer() const
Function GetLayer returns the layer this item is on.
Wrap around the beginning or end of search list.
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 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.
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
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
Base class for a bus or wire entry.
Definition: sch_bus_entry.h:41
wxPoint TransformCoordinate(const wxPoint &aPoint) const
Calculate a new coordinate according to the mirror/rotation transform.
Definition: transform.cpp:41
static const KICAD_T CmpFieldValueOnly[]
A scan list for a specific editable field: Value.
SCH_ITEM * GetParent() const
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
bool IsDraggableJunction() const
Function IsDraggableJunction tests to see if the collected items form a draggable junction...
SCH_SHEET * g_RootSheet
Definition: eeschema.cpp:56
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.
bool IsCorner() const
Function IsCorner tests if the collected items forms as corner of two line segments.
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.
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.
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
wxString GetText(GRAPHIC_PINSHAPE shape)
Definition: pin_shape.cpp:33
Class SCH_SHEET_PATH.
void Draw(EDA_DRAW_PANEL *, wxDC *, const wxPoint &, GR_DRAWMODE, COLOR4D) override
Function Draw Draw a schematic item.
static const KICAD_T EditableItems[]
A scan list for all editable schematic items.
bool IsNode(bool aIncludePins=true) const
Function IsNode tests if the collected items form a node.
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, draw line ...)
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
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...
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:69
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&#39;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()
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
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 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...
EDA_UNITS_T
Definition: common.h:159
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...
TRANSFORM InverseTransform() const
Calculate the Inverse mirror/rotation transform.
Definition: transform.cpp:58
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.