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 
110 
112  SCH_MARKER_T,
117 // SCH_LINE_T,
118  SCH_BITMAP_T,
119  SCH_TEXT_T,
120  SCH_LABEL_T,
123  SCH_FIELD_T,
126  SCH_SHEET_T,
127  EOT
128 };
129 
130 
135  SCH_LINE_T,
136  SCH_LABEL_T,
140  SCH_SHEET_T,
141  EOT
142 };
143 
144 
146  SCH_TEXT_T,
147  SCH_LABEL_T,
150  SCH_FIELD_T,
152  SCH_SHEET_T,
153  SCH_BITMAP_T,
154  EOT
155 };
156 
157 
159  SCH_MARKER_T,
164  SCH_LINE_T,
165  SCH_TEXT_T,
166  SCH_LABEL_T,
171  SCH_SHEET_T,
172  SCH_BITMAP_T,
173  EOT
174 };
175 
176 
179  EOT
180 };
181 
182 
184  SCH_SHEET_T,
185  EOT
186 };
187 
188 
191  SCH_SHEET_T,
192  EOT
193 };
194 
195 
198  SCH_BITMAP_T,
199  SCH_SHEET_T,
200  EOT
201 };
202 
203 
205  SCH_TEXT_T,
206  SCH_LABEL_T,
210  EOT
211 };
212 
213 
215  SCH_TEXT_T,
216  SCH_LABEL_T,
220  SCH_SHEET_T,
221  SCH_BITMAP_T,
222  SCH_FIELD_T,
223  SCH_MARKER_T,
224  EOT
225 };
226 
227 
229 {
230  if( aItem->Type() != LIB_PIN_T && !aItem->HitTest( m_RefPos ) )
231  return SEARCH_CONTINUE;
232 
233  // Pins have special hit testing requirements that are relative to their parent
234  // SCH_COMPONENT item.
235  if( aItem->Type() == LIB_PIN_T )
236  {
237  wxCHECK_MSG( aTestData && ( (EDA_ITEM*) aTestData )->Type() == SCH_COMPONENT_T,
238  SEARCH_CONTINUE, wxT( "Cannot inspect invalid data. Bad programmer!" ) );
239 
240  // Pin hit testing is relative to the components position and orientation in the
241  // schematic. The hit test position must be converted to library coordinates.
242  SCH_COMPONENT* component = (SCH_COMPONENT*) aTestData;
243  TRANSFORM transform = component->GetTransform().InverseTransform();
244  wxPoint position = transform.TransformCoordinate( m_RefPos - component->GetPosition() );
245 
246  position.y *= -1; // Y axis polarity in schematic is inverted from library.
247 
248  if( !aItem->HitTest( position ) )
249  return SEARCH_CONTINUE;
250  }
251 
252  Append( aItem );
253 
254  return SEARCH_CONTINUE;
255 }
256 
257 
258 void SCH_COLLECTOR::Collect( SCH_ITEM* aItem, const KICAD_T aFilterList[],
259  const wxPoint& aPosition )
260 {
261  Empty(); // empty the collection just in case
262 
263  SetScanTypes( aFilterList );
264 
265  // remember where the snapshot was taken from and pass refPos to the Inspect() function.
266  SetRefPos( aPosition );
267 
269 }
270 
271 
273 {
274  if( GetCount() != 2 )
275  return false;
276 
277  bool is_busentry0 = (dynamic_cast<SCH_BUS_ENTRY_BASE*>( m_List[0] ) != NULL);
278  bool is_busentry1 = (dynamic_cast<SCH_BUS_ENTRY_BASE*>( m_List[1] ) != NULL);
279 
280  if( (m_List[0]->Type() == SCH_LINE_T) && (m_List[1]->Type() == SCH_LINE_T) )
281  return ( ( SCH_LINE* ) m_List[0])->GetLayer() == ( ( SCH_LINE* ) m_List[1])->GetLayer();
282 
283  if( (m_List[0]->Type() == SCH_LINE_T) && is_busentry1 )
284  return true;
285 
286  if( is_busentry0 && (m_List[1]->Type() == SCH_LINE_T) )
287  return true;
288 
289  return false;
290 }
291 
292 
293 bool SCH_COLLECTOR::IsNode( bool aIncludePins ) const
294 {
295  for( size_t i = 0; i < m_List.size(); i++ )
296  {
297  SCH_ITEM* item = (SCH_ITEM*) m_List[ i ];
298  KICAD_T type = item->Type();
299 
300  if( type == SCH_JUNCTION_T )
301  continue;
302 
303  if( type == SCH_LINE_T )
304  {
305  if( item->GetLayer() != LAYER_WIRE )
306  return false;
307 
308  continue;
309  }
310 
311  if( type == LIB_PIN_T )
312  {
313  if( !aIncludePins )
314  return false;
315 
316  continue;
317  }
318 
319  // Any other item types indicate that this collection is not a node.
320  return false;
321  }
322 
323  return true;
324 }
325 
326 
328 {
329  for( size_t i = 0; i < m_List.size(); i++ )
330  if( ( (SCH_ITEM*) m_List[ i ] )->Type() == SCH_JUNCTION_T )
331  return true;
332 
333  return false;
334 }
335 
336 
342 {
343 public:
345  SCH_ITEM( nullptr, NOT_USED )
346  {}
347 
348  wxString GetSelectMenuText() const override { return _( "(Deleted Item)" ); }
349  wxString GetClass() const override { return wxT( "DELETED_SCH_ITEM" ); }
350 
351  // define pure virtuals:
352  wxPoint GetPosition() const override { return wxPoint(); }
353  void SetPosition( const wxPoint& ) override {}
354  void Draw( EDA_DRAW_PANEL* , wxDC* , const wxPoint& , GR_DRAWMODE , COLOR4D ) override {}
355 
356 #if defined(DEBUG)
357  void Show( int , std::ostream& ) const override {}
358 #endif
359 
360  void Move( const wxPoint& ) override {}
361  void MirrorY( int ) override {}
362  void MirrorX( int ) override {}
363  void Rotate( wxPoint ) override {}
364 };
365 
366 
368 
369 
371 {
372  if( (unsigned)ndx >= (unsigned)GetCount() )
373  return NULL;
374 
375  // Do not simply return m_List[ ndx ] as it might have been deleted. Instead
376  // treat it as a weak reference and search the sheets for an item with the same
377  // pointer value.
378 
379  void* weakRef = m_List[ ndx ];
380  SCH_ITEM* item = &g_DeletedSchItem;
381 
382  INSPECTOR_FUNC inspector = [&] ( EDA_ITEM* candidate, void* testData )
383  {
384  if( (void*) candidate == weakRef )
385  {
386  item = (SCH_ITEM*) candidate;
387  return SEARCH_QUIT;
388  }
389 
390  return SEARCH_CONTINUE;
391  };
392 
393  for( unsigned i = 0; i < m_sheetPaths.size(); i++ )
394  {
395  EDA_ITEM::IterateForward( m_sheetPaths[ i ].LastDrawList(),
396  inspector, nullptr, SCH_COLLECTOR::AllItems );
397  }
398 
399  return item;
400 }
401 
402 
404 {
405  return GetItem( ndx );
406 }
407 
408 
410 {
411  bool retv = false;
412 
413  wxUint32 flags = m_findReplaceData.GetFlags();
414 
415  if( GetCount() == 0 )
416  return true;
417 
418  if( !(flags & FR_SEARCH_WRAP) || (flags & FR_SEARCH_REPLACE) )
419  {
420  if( flags & wxFR_DOWN )
421  {
422  if( m_foundIndex >= GetCount() )
423  retv = true;
424  }
425  else
426  {
427  if( m_foundIndex < 0 )
428  retv = true;
429  }
430  }
431 
432  return retv;
433 }
434 
435 
436 #if defined(DEBUG)
437 
439 {
440  int tmp = m_foundIndex;
441 
442  wxLogTrace( traceFindReplace, wxT( "%d items found to replace %s with %s." ),
443  GetCount(), GetChars( m_findReplaceData.GetFindString() ),
444  GetChars( m_findReplaceData.GetReplaceString() ) );
445 
446  for( m_foundIndex = 0; m_foundIndex < GetCount(); m_foundIndex++ )
447  wxLogTrace( traceFindReplace, wxT( " " ) + GetText() );
448 
449  m_foundIndex = tmp;
450 }
451 
452 #endif
453 
454 
456 {
457  wxUint32 flags = m_findReplaceData.GetFlags();
458 
459  if( flags & wxFR_DOWN )
460  {
461  if( m_foundIndex < GetCount() )
462  m_foundIndex += 1;
463  if( (m_foundIndex >= GetCount()) && (flags & FR_SEARCH_WRAP) )
464  m_foundIndex = 0;
465  }
466  else
467  {
468  if( m_foundIndex >= 0 )
469  m_foundIndex -= 1;
470  if( (m_foundIndex < 0) && (flags & FR_SEARCH_WRAP) )
471  m_foundIndex = GetCount() - 1;
472  }
473 }
474 
475 
477 {
478  wxCHECK_MSG( (unsigned) aIndex < m_data.size(), SCH_FIND_COLLECTOR_DATA(),
479  wxT( "Attempt to get find data outside of list boundary." ) );
480 
481  return m_data[ aIndex ];
482 }
483 
484 
486 {
487  wxCHECK_MSG( (GetCount() != 0) && IsValidIndex( m_foundIndex ), wxEmptyString,
488  wxT( "Cannot get found item at invalid index." ) );
489 
490  SCH_FIND_COLLECTOR_DATA data = m_data[ m_foundIndex ];
491  EDA_ITEM* foundItem = GetItem( m_foundIndex );
492 
493  wxString msg;
494 
495  if( data.GetParent() )
496  {
497  msg.Printf( _( "Child item %s of parent item %s found in sheet %s" ),
498  GetChars( foundItem->GetSelectMenuText() ),
499  GetChars( data.GetParent()->GetSelectMenuText() ),
500  GetChars( data.GetSheetPath() ) );
501  }
502  else
503  {
504  msg.Printf( _( "Item %s found in sheet %s" ),
505  GetChars( foundItem->GetSelectMenuText() ),
506  GetChars( data.GetSheetPath() ) );
507  }
508 
509  return msg;
510 }
511 
512 
514 {
515  if( PassedEnd() )
516  return NULL;
517 
518  aData = m_data[ m_foundIndex ];
519  return GetItem( m_foundIndex );
520 }
521 
522 
524 {
525  if( PassedEnd() )
526  return false;
527 
528  wxCHECK_MSG( IsValidIndex( m_foundIndex ), false,
529  wxT( "Invalid replace list index in SCH_FIND_COLLECTOR." ) );
530 
531  EDA_ITEM* item = GetItem( m_foundIndex );
532 
533  bool replaced = item->Replace( m_findReplaceData, aSheetPath );
534 
535  return replaced;
536 }
537 
538 
540 {
541  wxPoint position;
542 
543  if( aItem->Matches( m_findReplaceData, m_currentSheetPath, &position ) )
544  {
545  if( aItem->Type() == LIB_PIN_T )
546  {
547  wxCHECK_MSG( aTestData && ( (EDA_ITEM*) aTestData )->Type() == SCH_COMPONENT_T,
548  SEARCH_CONTINUE, wxT( "Cannot inspect invalid data. Bad programmer!" ) );
549 
550  // Pin positions are relative to their parent component's position and
551  // orientation in the schematic. The pin's position must be converted
552  // schematic coordinates.
553  SCH_COMPONENT* component = (SCH_COMPONENT*) aTestData;
554  TRANSFORM transform = component->GetTransform();
555  position.y = -position.y;
556  position = transform.TransformCoordinate( position ) + component->GetPosition();
557  }
558 
559  Append( aItem );
560  m_data.push_back( SCH_FIND_COLLECTOR_DATA( position,
561  m_currentSheetPath->PathHumanReadable(),
562  (SCH_ITEM*) aTestData ) );
563  }
564 
565  return SEARCH_CONTINUE;
566 }
567 
568 
569 void SCH_FIND_COLLECTOR::SetReplaceString( const wxString &aReplaceString )
570 {
571  m_findReplaceData.SetReplaceString( aReplaceString );
572 }
573 
574 
576  SCH_SHEET_PATH* aSheetPath )
577 {
578  if( !IsSearchRequired( aFindReplaceData ) && !m_List.empty() && !m_forceSearch )
579  return;
580 
581  m_findReplaceData = aFindReplaceData;
582  Empty(); // empty the collection just in case
583  m_data.clear();
584  m_foundIndex = 0;
585  m_sheetPaths.clear();
586  SetForceSearch( false );
587 
588  if( aSheetPath )
589  {
590  m_currentSheetPath = aSheetPath;
591  m_sheetPaths.push_back( *m_currentSheetPath );
593  }
594  else
595  {
596  SCH_SHEET_LIST schematic( g_RootSheet );
597 
598  for( unsigned i = 0; i < schematic.size(); i++ )
599  {
600  m_currentSheetPath = &schematic[i];
601  m_sheetPaths.push_back( *m_currentSheetPath );
602  EDA_ITEM::IterateForward( m_currentSheetPath->LastDrawList(), m_inspector, NULL, m_ScanTypes );
603  }
604  }
605 
606 #if defined(DEBUG)
607  dump();
608 #endif
609 
610  if( m_List.size() != m_data.size() )
611  {
612  wxFAIL_MSG( wxT( "List size mismatch." ) );
613  m_List.clear();
614  m_data.clear();
615  }
616 }
617 
618 
620 {
621  // The Vist() function only visits the testItem if its type was in the
622  // the scanList, so therefore we can collect anything given to us here.
623  Append( aItem );
624 
625  return SEARCH_CONTINUE;
626 }
627 
628 
629 void SCH_TYPE_COLLECTOR::Collect( SCH_ITEM* aItem, const KICAD_T aFilterList[] )
630 {
631  Empty(); // empty the collection
632 
633  SetScanTypes( aFilterList );
634 
636 }
SCH_ITEM * LastDrawList() const
Function LastDrawList.
void Empty()
Function Empty sets the list to empty.
Definition: collector.h:115
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:106
KICAD_T Type() const
Function Type()
Definition: base_struct.h:209
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:75
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
wxString GetSelectMenuText() const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
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:97
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:207
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:411
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.
SCH_LAYER_ID GetLayer() const
Function GetLayer returns the layer this item is on.
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.
virtual wxString GetSelectMenuText() const
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
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:125
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:55
wxString dump(const wxArrayString &aArray)
Debug helper for printing wxArrayString contents.
void SetRefPos(const wxPoint &aRefPos)
Definition: collector.h:222
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:299
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 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:162
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 GetText()
Function GetText()
SEARCH_RESULT
Definition: base_struct.h:64
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...
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.
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.