KiCad PCB EDA Suite
sch_component.h
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) 2014 Dick Hollenbeck, dick@softplc.com
6  * Copyright (C) 2015 Wayne Stambaugh <stambaughw@gmail.com>
7  * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, you may find one here:
21  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22  * or you may search the http://www.gnu.org website for the version 2 license,
23  * or you may write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25  */
26 
27 #ifndef COMPONENT_CLASS_H
28 #define COMPONENT_CLASS_H
29 
30 #include <base_struct.h>
31 #include <common.h>
32 #include <core/typeinfo.h>
34 #include <lib_id.h>
35 #include <msgpanel.h>
36 
37 #include <memory>
38 #include <string>
39 #include <unordered_map>
40 #include <vector>
41 #include <wx/arrstr.h>
42 #include <wx/chartype.h>
43 #include <wx/fdrepdlg.h>
44 #include <wx/gdicmn.h>
45 #include <wx/string.h>
46 
47 #include <bitmaps.h>
48 #include <class_libentry.h>
49 #include <lib_pin.h>
50 #include <sch_field.h>
51 #include <sch_item.h>
52 #include <sch_pin.h>
53 #include <sch_screen.h>
54 #include <symbol_lib_table.h>
55 #include <transform.h>
56 
57 class SCH_SCREEN;
58 class SCH_SHEET_PATH;
59 class LIB_ITEM;
60 class LIB_PIN;
61 class LIB_PART;
63 class PART_LIB;
64 class PART_LIBS;
65 class EE_COLLECTOR;
66 class SCH_SCREEN;
68 
69 
71 typedef std::vector<std::unique_ptr<SCH_PIN>> SCH_PINS;
72 
73 typedef std::vector<SCH_PIN*> SCH_PIN_PTRS;
74 
76 typedef std::unordered_map<LIB_PIN*, unsigned> SCH_PIN_MAP;
77 
79 typedef std::vector<SCH_FIELD> SCH_FIELDS;
80 
81 typedef std::weak_ptr<LIB_PART> PART_REF;
82 
83 
84 extern std::string toUTFTildaText( const wxString& txt );
85 
86 
88 {
90  wxString m_Reference;
91  int m_Unit;
92 };
93 
94 
99 class SCH_COMPONENT : public SCH_ITEM
100 {
101 public:
102 
103 private:
104 
106 
109 
110  int m_unit;
111  int m_convert;
112  wxString m_prefix;
120 
122  std::unique_ptr< LIB_PART > m_part;
123 
126 
128 
129  // Defines the hierarchical path and reference of the component. This allows support
130  // for multiple references to a single sub-sheet.
131  std::vector<COMPONENT_INSTANCE_REFERENCE> m_instanceReferences;
132 
133  void Init( const wxPoint& pos = wxPoint( 0, 0 ) );
134 
135 public:
136  SCH_COMPONENT( const wxPoint& pos = wxPoint( 0, 0 ), SCH_ITEM* aParent = NULL );
137 
151  SCH_COMPONENT( LIB_PART& aPart, LIB_ID aLibId, SCH_SHEET_PATH* aSheet,
152  int unit = 0, int convert = 0,
153  const wxPoint& pos = wxPoint( 0, 0 ) );
154 
156  const wxPoint& pos = wxPoint( 0, 0 ) );
166  SCH_COMPONENT( const SCH_COMPONENT& aComponent );
167 
169 
170  static inline bool ClassOf( const EDA_ITEM* aItem )
171  {
172  return aItem && SCH_COMPONENT_T == aItem->Type();
173  }
174 
175  wxString GetClass() const override
176  {
177  return wxT( "SCH_COMPONENT" );
178  }
179 
180  const std::vector<COMPONENT_INSTANCE_REFERENCE>& GetInstanceReferences()
181  {
182  return m_instanceReferences;
183  }
184 
185  void ViewGetLayers( int aLayers[], int& aCount ) const override;
186 
200  bool IsMovableFromAnchorPoint() override { return true; }
201 
202  void SetLibId( const LIB_ID& aName, PART_LIBS* aLibs=NULL );
203  void SetLibId( const LIB_ID& aLibId, SYMBOL_LIB_TABLE* aSymLibTable, PART_LIB* aCacheLib );
204 
205  const LIB_ID& GetLibId() const { return m_lib_id; }
206 
207  std::unique_ptr< LIB_PART >& GetPartRef() { return m_part; }
208 
212  wxString GetDescription() const;
213 
217  wxString GetDatasheet() const;
218 
224  bool Resolve( PART_LIBS* aLibs );
225 
226  bool Resolve( SYMBOL_LIB_TABLE& aLibTable, PART_LIB* aCacheLib = NULL );
227 
228  static void ResolveAll( std::vector<SCH_COMPONENT*>& aComponents, SYMBOL_LIB_TABLE& aLibTable,
229  PART_LIB* aCacheLib = NULL );
230 
231  int GetUnit() const { return m_unit; }
232 
236  void UpdatePins();
237 
241  SCH_CONNECTION* GetConnectionForPin( LIB_PIN* aPin, const SCH_SHEET_PATH& aSheet );
242 
252  void SetUnit( int aUnit );
253 
262  void UpdateUnit( int aUnit );
263 
264  int GetConvert() const { return m_convert; }
265 
266  void SetConvert( int aConvert );
267 
268  wxString GetPrefix() const { return m_prefix; }
269 
270  void SetPrefix( const wxString& aPrefix ) { m_prefix = aPrefix; }
271 
272  TRANSFORM& GetTransform() const { return const_cast< TRANSFORM& >( m_transform ); }
273 
274  void SetTransform( const TRANSFORM& aTransform );
275 
281  int GetUnitCount() const;
282 
289  void SetOrientation( int aOrientation );
290 
306  int GetOrientation();
307 
308  void GetMsgPanelInfo( EDA_UNITS aUnits, std::vector<MSG_PANEL_ITEM>& aList ) override;
309 
318  void ClearAnnotation( SCH_SHEET_PATH* aSheetPath );
319 
331  bool AddSheetPathReferenceEntryIfMissing( const KIID_PATH& aSheetPath );
332 
336  bool ClearAllHighlightFlags();
337 
338  const EDA_RECT GetBoundingBox() const override;
339 
344 
345 
346  //-----<Fields>-----------------------------------------------------------
347 
355  SCH_FIELD* GetField( int aFieldNdx ) const;
356 
362  wxString GetFieldText( const wxString& aFieldName, SCH_EDIT_FRAME* aFrame ) const;
363 
370  void GetFields( std::vector<SCH_FIELD*>& aVector, bool aVisibleOnly );
371 
375  std::vector<SCH_FIELD*> GetFields();
376 
384  SCH_FIELD* AddField( const SCH_FIELD& aField );
385 
391  void RemoveField( const wxString& aFieldName );
392 
401  SCH_FIELD* FindField( const wxString& aFieldName, bool aIncludeDefaultFields = true );
402 
408  void SetFields( const SCH_FIELDS& aFields )
409  {
410  m_Fields = aFields; // vector copying, length is changed possibly
411  }
412 
418  void UpdateFields( bool aResetStyle, bool aResetRef = false );
419 
423  int GetFieldCount() const { return (int)m_Fields.size(); }
424 
434  void AutoplaceFields( SCH_SCREEN* aScreen, bool aManual ) override;
435 
436 
437  //-----</Fields>----------------------------------------------------------
438 
439 
447  LIB_PIN* GetPin( const wxString& number );
448 
454  void GetPins( std::vector<LIB_PIN*>& aPinsList );
455 
462  SCH_PIN_PTRS GetSchPins( const SCH_SHEET_PATH* aSheet = nullptr ) const;
463 
471  void Print( wxDC* aDC, const wxPoint& aOffset ) override;
472 
473  void SwapData( SCH_ITEM* aItem ) override;
474 
484  static bool IsReferenceStringValid( const wxString& aReferenceString );
485 
491  const wxString GetRef( const SCH_SHEET_PATH* aSheet, bool aIncludeUnit = false );
492 
499  void SetRef( const SCH_SHEET_PATH* aSheet, const wxString& aReference );
500 
506  bool IsAnnotated( const SCH_SHEET_PATH* aSheet );
507 
516  void AddHierarchicalReference( const KIID_PATH& aPath,
517  const wxString& aRef,
518  int aUnit );
519 
520  // returns the unit selection, for the given sheet path.
521  int GetUnitSelection( const SCH_SHEET_PATH* aSheet ) const;
522 
523  // Set the unit selection, for the given sheet path.
524  void SetUnitSelection( const SCH_SHEET_PATH* aSheet, int aUnitSelection );
525 
526  // Geometric transforms (used in block operations):
527 
528  void Move( const wxPoint& aMoveVector ) override
529  {
530  if( aMoveVector == wxPoint( 0, 0 ) )
531  return;
532 
533  m_Pos += aMoveVector;
534 
535  for( SCH_FIELD& field : m_Fields )
536  field.Move( aMoveVector );
537 
538  SetModified();
539  }
540 
541  void MirrorY( int aYaxis_position ) override;
542  void MirrorX( int aXaxis_position ) override;
543  void Rotate( wxPoint aPosition ) override;
544 
545  bool Matches( wxFindReplaceData& aSearchData, void* aAuxData ) override;
546 
547  void GetEndPoints( std::vector<DANGLING_END_ITEM>& aItemList ) override;
548 
560  bool UpdateDanglingState( std::vector<DANGLING_END_ITEM>& aItemList,
561  const SCH_SHEET_PATH* aPath = nullptr ) override;
562 
563  wxPoint GetPinPhysicalPosition( const LIB_PIN* Pin ) const;
564 
565  bool IsConnectable() const override { return true; }
566 
567  bool CanConnect( const SCH_ITEM* aItem ) const override
568  {
569  return ( aItem->Type() == SCH_LINE_T && aItem->GetLayer() == LAYER_WIRE ) ||
570  ( aItem->Type() == SCH_NO_CONNECT_T ) ||
571  ( aItem->Type() == SCH_JUNCTION_T ) ||
572  ( aItem->Type() == SCH_COMPONENT_T ) ;
573  }
574 
580  bool IsInNetlist() const;
581 
582  void GetConnectionPoints( std::vector<wxPoint>& aPoints ) const override;
583 
584  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
585 
594  LIB_ITEM* GetDrawItem( const wxPoint& aPosition, KICAD_T aType = TYPE_NOT_INIT );
595 
596  wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
597 
598  BITMAP_DEF GetMenuImage() const override;
599 
600  void GetNetListItem( NETLIST_OBJECT_LIST& aNetListItems, SCH_SHEET_PATH* aSheetPath ) override;
601 
602  bool operator <( const SCH_ITEM& aItem ) const override;
603 
604  bool operator==( const SCH_COMPONENT& aComponent) const;
605  bool operator!=( const SCH_COMPONENT& aComponent) const;
606 
607  SCH_COMPONENT& operator=( const SCH_ITEM& aItem );
608 
609  bool IsReplaceable() const override { return true; }
610 
611  wxPoint GetPosition() const override { return m_Pos; }
612  void SetPosition( const wxPoint& aPosition ) override { Move( aPosition - m_Pos ); }
613 
614  bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override;
615  bool HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy = 0 ) const override;
616 
617  void Plot( PLOTTER* aPlotter ) override;
618 
619  EDA_ITEM* Clone() const override;
620 
621 #if defined(DEBUG)
622  void Show( int nestLevel, std::ostream& os ) const override;
623 #endif
624 
625  void ClearBrightenedPins();
626 
627  bool HasBrightenedPins();
628 
629  void BrightenPin( LIB_PIN* aPin );
630 
631  void ClearHighlightedPins();
632 
633  bool HasHighlightedPins();
634 
635  void HighlightPin( LIB_PIN* aPin );
636 
637 private:
638  bool doIsConnected( const wxPoint& aPosition ) const override;
639 };
640 
641 #endif /* COMPONENT_CLASS_H */
bool operator!=(const SCH_COMPONENT &aComponent) const
void UpdateFields(bool aResetStyle, bool aResetRef=false)
Restores fields to the original library values.
EDA_UNITS
Definition: common.h:184
void GetMsgPanelInfo(EDA_UNITS aUnits, std::vector< MSG_PANEL_ITEM > &aList) override
Function GetMsgPanelInfo populates aList of MSG_PANEL_ITEM objects with it's internal state for displ...
SCH_FIELD instances are attached to a component and provide a place for the component's value,...
Definition: sch_field.h:52
std::vector< SCH_PIN * > SCH_PIN_PTRS
Definition: sch_component.h:73
void SetModified()
Definition: base_struct.cpp:94
void Rotate(wxPoint aPosition) override
Function Rotate rotates the item around aPosition 90 degrees in the clockwise direction.
static bool ClassOf(const EDA_ITEM *aItem)
SCH_FIELD * FindField(const wxString &aFieldName, bool aIncludeDefaultFields=true)
Search for a SCH_FIELD with aFieldName.
void Plot(PLOTTER *aPlotter) override
Function Plot plots the schematic item to aPlotter.
void SetTransform(const TRANSFORM &aTransform)
PNG memory record (file in memory).
Definition: bitmap_def.h:29
void UpdateUnit(int aUnit)
Change the unit number to aUnit without setting any internal flags.
int GetOrientation()
Get the display symbol orientation.
void HighlightPin(LIB_PIN *aPin)
bool Matches(wxFindReplaceData &aSearchData, void *aAuxData) override
Function Matches compares the item against the search criteria in aSearchData.
SCH_PINS m_pins
a SCH_PIN for every LIB_PIN (across all units)
bool operator==(const SCH_COMPONENT &aComponent) const
std::string toUTFTildaText(const wxString &txt)
Convert a wxString to UTF8 and replace any control characters with a ~, where a control character is ...
SCH_FIELDS m_Fields
Variable length list of fields.
bool Resolve(PART_LIBS *aLibs)
Assigns the current LIB_PART from aLibs which this symbol is based on.
bool IsConnectable() const override
Function IsConnectable returns true if the schematic item can connect to another schematic item.
wxPoint m_Pos
Name and library where symbol was loaded from, i.e. "74xx:74LS00".
void Print(wxDC *aDC, const wxPoint &aOffset) override
Print a component.
void GetConnectionPoints(std::vector< wxPoint > &aPoints) const override
Function GetConnectionPoints add all the connection points for this item to aPoints.
void GetEndPoints(std::vector< DANGLING_END_ITEM > &aItemList) override
Function GetEndPoints adds the schematic item end points to aItemList if the item has end points.
std::unordered_map< LIB_PIN *, unsigned > SCH_PIN_MAP
A map from the library pin pointer to the SCH_PIN's index.
Definition: sch_component.h:76
int GetUnitCount() const
Return the number of units per package of the symbol.
void MirrorX(int aXaxis_position) override
Function MirrorX mirrors item relative to the X axis about aXaxis_position.
wxString GetPrefix() const
bool IsInNetlist() const
void ClearBrightenedPins()
std::vector< COMPONENT_INSTANCE_REFERENCE > m_instanceReferences
EE_COLLECTOR.
Definition: ee_collectors.h:39
void SetPosition(const wxPoint &aPosition) override
Function SetPosition set the schematic item position to aPosition.
LIB_PIN * GetPin(const wxString &number)
Find a symbol pin by number.
wxString GetDescription() const
Return information about the aliased parts.
Schematic editor (Eeschema) main window.
bool HasHighlightedPins()
LIB_ITEM * GetDrawItem(const wxPoint &aPosition, KICAD_T aType=TYPE_NOT_INIT)
Return the component library item at aPosition that is part of this component.
void SwapData(SCH_ITEM *aItem) override
Function SwapData swap the internal data structures aItem with the schematic item.
bool ClearAllHighlightFlags()
Clear the HIGHLIGHTED flag of all items of the component (fields, pins ...)
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:51
KICAD_T
Enum KICAD_T is the set of class identification values, stored in EDA_ITEM::m_StructType.
Definition: typeinfo.h:78
bool CanConnect(const SCH_ITEM *aItem) const override
The base class for drawable items used by schematic library components.
Definition: lib_item.h:60
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.
NETLIST_OBJECT_LIST is a container holding and owning NETLIST_OBJECTs, which are connected items in a...
SCH_FIELD * GetField(int aFieldNdx) const
Returns a field in this symbol.
void SetConvert(int aConvert)
BITMAP_DEF GetMenuImage() const override
Function GetMenuImage returns a pointer to an image to be used in menus.
const INSPECTOR_FUNC & INSPECTOR
Definition: base_struct.h:108
void SetLibId(const LIB_ID &aName, PART_LIBS *aLibs=NULL)
int GetUnit() const
void BrightenPin(LIB_PIN *aPin)
void Move(const wxPoint &aMoveVector) override
Function Move moves the item by aMoveVector to a new position.
static void ResolveAll(std::vector< SCH_COMPONENT * > &aComponents, SYMBOL_LIB_TABLE &aLibTable, PART_LIB *aCacheLib=NULL)
for transforming drawing coordinates for a wxDC device context.
Definition: transform.h:45
bool IsMovableFromAnchorPoint() override
Return true for items which are moved with the anchor point at mouse cursor and false for items moved...
void SetFields(const SCH_FIELDS &aFields)
Set multiple schematic fields.
#define NULL
bool m_isInNetlist
True if the component should appear in the netlist.
TRANSFORM & GetTransform() const
EDA_RECT GetBodyBoundingBox() const
Return a bounding box for the symbol body but not the fields.
Class LIB_PIN definition.
std::vector< SCH_FIELD > SCH_FIELDS
A container for several SCH_FIELD items.
Definition: sch_component.h:79
bool operator<(const SCH_ITEM &aItem) const override
EDA_ITEM * Clone() const override
Function Clone creates a duplicate of this item with linked list members set to NULL.
const std::vector< COMPONENT_INSTANCE_REFERENCE > & GetInstanceReferences()
SCH_COMPONENT(const wxPoint &pos=wxPoint(0, 0), SCH_ITEM *aParent=NULL)
Define a library symbol object.
SCH_FIELD * AddField(const SCH_FIELD &aField)
Add a field to the symbol.
void GetNetListItem(NETLIST_OBJECT_LIST &aNetListItems, SCH_SHEET_PATH *aSheetPath) override
Function GetNetListItem creates a new NETLIST_OBJECT for the schematic object and adds it to aNetList...
SCH_CONNECTION * GetConnectionForPin(LIB_PIN *aPin, const SCH_SHEET_PATH &aSheet)
Retrieves the connection for a given pin of the component.
wxString GetDatasheet() const
Return the documentation text for the given part alias.
bool IsAnnotated(const SCH_SHEET_PATH *aSheet)
Checks if the component has a valid annotation (reference) for the given sheet path.
void SetUnit(int aUnit)
Change the unit number to aUnit.
SCH_SHEET_PATH.
std::unique_ptr< LIB_PART > & GetPartRef()
bool IsReplaceable() const override
Function IsReplaceable.
std::vector< SCH_FIELD * > GetFields()
Returns a vector of fields from the component.
std::unique_ptr< LIB_PART > m_part
const wxString GetRef(const SCH_SHEET_PATH *aSheet, bool aIncludeUnit=false)
Return the reference for the given sheet path.
void ClearAnnotation(SCH_SHEET_PATH *aSheetPath)
Clear exiting component annotation.
int GetFieldCount() const
Return the number of fields in this symbol.
std::weak_ptr< LIB_PART > PART_REF
Definition: sch_component.h:81
SCH_LAYER_ID GetLayer() const
Function GetLayer returns the layer this item is on.
Definition: sch_item.h:224
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
A collection of PART_LIB objects.
int m_unit
The unit for multiple part per package components.
void Init(const wxPoint &pos=wxPoint(0, 0))
void SetRef(const SCH_SHEET_PATH *aSheet, const wxString &aReference)
Set the reference for the given sheet path for this symbol.
Base plotter engine class.
Definition: plotter.h:104
void SetUnitSelection(const SCH_SHEET_PATH *aSheet, int aUnitSelection)
wxString GetFieldText(const wxString &aFieldName, SCH_EDIT_FRAME *aFrame) const
Search for a field named aFieldName and returns text associated with this field.
void GetPins(std::vector< LIB_PIN * > &aPinsList)
Populate a vector with all the pins from the library object.
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Function HitTest tests if aPosition is contained within or on the bounding box of an item.
std::vector< std::unique_ptr< SCH_PIN > > SCH_PINS
A container for several SCH_PIN items.
Definition: sch_component.h:67
Board layer functions and definitions.
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
SCH_PIN_MAP m_pinMap
the component's pins mapped by LIB_PIN*
void MirrorY(int aYaxis_position) override
Function MirrorY mirrors item relative to the Y axis about aYaxis_position.
bool HasBrightenedPins()
EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
void AutoplaceFields(SCH_SCREEN *aScreen, bool aManual) override
Automatically orient all the fields in the component.
SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:99
void SetPrefix(const wxString &aPrefix)
wxPoint GetPosition() const override
Function GetPosition.
void RemoveField(const wxString &aFieldName)
Removes a user field from the symbol.
EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boards.
Definition: base_struct.h:166
The common library.
bool UpdateDanglingState(std::vector< DANGLING_END_ITEM > &aItemList, const SCH_SHEET_PATH *aPath=nullptr) override
Test if the component's dangling state has changed for all pins.
SEARCH_RESULT Visit(INSPECTOR inspector, void *testData, const KICAD_T scanTypes[]) override
Function Visit may be re-implemented for each derived class in order to handle all the types given by...
void ClearHighlightedPins()
int GetConvert() const
int m_convert
The alternate body style for components that have more than one body style defined.
void AddHierarchicalReference(const KIID_PATH &aPath, const wxString &aRef, int aUnit)
Add a full hierarchical reference to this symbol.
void UpdatePins()
Updates the cache of SCH_PIN objects for each pin.
SEARCH_RESULT
Definition: base_struct.h:54
static bool IsReferenceStringValid(const wxString &aReferenceString)
Tests for an acceptable reference string.
void ViewGetLayers(int aLayers[], int &aCount) const override
Function ViewGetLayers() Returns the all the layers within the VIEW the object is painted on.
wxString GetClass() const override
Function GetClass returns the class name.
Message panel definition file.
wxString m_prefix
C, R, U, Q etc - the first character which typically indicates what the component is.
const LIB_ID & GetLibId() const
SCH_COMPONENT & operator=(const SCH_ITEM &aItem)
wxPoint GetPinPhysicalPosition(const LIB_PIN *Pin) const
Object used to load, save, search, and otherwise manipulate symbol library files.
TRANSFORM m_transform
The rotation/mirror transformation matrix.
SCH_ITEM is a base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:147
bool AddSheetPathReferenceEntryIfMissing(const KIID_PATH &aSheetPath)
Add an instance to the alternate references list (m_instanceReferences), if this entry does not alrea...
int GetUnitSelection(const SCH_SHEET_PATH *aSheet) const
SCH_PIN_PTRS GetSchPins(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieves a list of the SCH_PINs for the given sheet path.
bool doIsConnected(const wxPoint &aPosition) const override
Function doIsConnected provides the object specific test to see if it is connected to aPosition.
KICAD_T Type() const
Function Type()
Definition: base_struct.h:212
void SetOrientation(int aOrientation)
Compute the new transform matrix based on aOrientation for the symbol which is applied to the current...