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-2019 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<SCH_PIN> SCH_PINS;
72 
74 typedef std::unordered_map<LIB_PIN*, unsigned> SCH_PIN_MAP;
75 
77 typedef std::vector<SCH_FIELD> SCH_FIELDS;
78 
79 typedef std::weak_ptr<LIB_PART> PART_REF;
80 
81 
82 extern std::string toUTFTildaText( const wxString& txt );
83 
84 
89 class SCH_COMPONENT : public SCH_ITEM
90 {
91 public:
93 
94 private:
95 
97 
100 
101  int m_unit;
102  int m_convert;
103  wxString m_prefix;
111 
113  std::unique_ptr< LIB_PART > m_part;
114 
117 
119 
121 
128  wxArrayString m_PathsAndReferences;
129 
130  void Init( const wxPoint& pos = wxPoint( 0, 0 ) );
131 
132 public:
133  SCH_COMPONENT( const wxPoint& pos = wxPoint( 0, 0 ), SCH_ITEM* aParent = NULL );
134 
148  SCH_COMPONENT( LIB_PART& aPart, LIB_ID aLibId, SCH_SHEET_PATH* aSheet,
149  int unit = 0, int convert = 0,
150  const wxPoint& pos = wxPoint( 0, 0 ) );
151 
153  const wxPoint& pos = wxPoint( 0, 0 ) );
163  SCH_COMPONENT( const SCH_COMPONENT& aComponent );
164 
166 
167  static inline bool ClassOf( const EDA_ITEM* aItem )
168  {
169  return aItem && SCH_COMPONENT_T == aItem->Type();
170  }
171 
172  wxString GetClass() const override
173  {
174  return wxT( "SCH_COMPONENT" );
175  }
176 
177  const wxArrayString& GetPathsAndReferences() const { return m_PathsAndReferences; }
178 
179  void ViewGetLayers( int aLayers[], int& aCount ) const override;
180 
194  bool IsMovableFromAnchorPoint() override { return true; }
195 
196  void SetLibId( const LIB_ID& aName, PART_LIBS* aLibs=NULL );
197  void SetLibId( const LIB_ID& aLibId, SYMBOL_LIB_TABLE* aSymLibTable, PART_LIB* aCacheLib );
198 
199  const LIB_ID& GetLibId() const { return m_lib_id; }
200 
201  std::unique_ptr< LIB_PART >& GetPartRef() { return m_part; }
202 
206  wxString GetDescription() const;
207 
211  wxString GetDatasheet() const;
212 
218  bool Resolve( PART_LIBS* aLibs );
219 
220  bool Resolve( SYMBOL_LIB_TABLE& aLibTable, PART_LIB* aCacheLib = NULL );
221 
222  static void ResolveAll( std::vector<SCH_COMPONENT*>& aComponents, SYMBOL_LIB_TABLE& aLibTable,
223  PART_LIB* aCacheLib = NULL );
224 
225  int GetUnit() const { return m_unit; }
226 
230  void UpdatePins( SCH_SHEET_PATH* aSheet = nullptr );
231 
235  SCH_CONNECTION* GetConnectionForPin( LIB_PIN* aPin, const SCH_SHEET_PATH& aSheet );
236 
246  void SetUnit( int aUnit );
247 
256  void UpdateUnit( int aUnit );
257 
258  int GetConvert() const { return m_convert; }
259 
260  void SetConvert( int aConvert );
261 
262  wxString GetPrefix() const { return m_prefix; }
263 
264  void SetPrefix( const wxString& aPrefix ) { m_prefix = aPrefix; }
265 
266  TRANSFORM& GetTransform() const { return const_cast< TRANSFORM& >( m_transform ); }
267 
268  void SetTransform( const TRANSFORM& aTransform );
269 
275  int GetUnitCount() const;
276 
283  void SetOrientation( int aOrientation );
284 
300  int GetOrientation();
301 
302  void GetMsgPanelInfo( EDA_UNITS aUnits, std::vector<MSG_PANEL_ITEM>& aList ) override;
303 
312  void ClearAnnotation( SCH_SHEET_PATH* aSheetPath );
313 
325  bool AddSheetPathReferenceEntryIfMissing( const wxString& aSheetPathName );
326 
334  void SetTimeStamp( timestamp_t aNewTimeStamp );
335 
339  bool ClearAllHighlightFlags();
340 
341  const EDA_RECT GetBoundingBox() const override;
342 
347 
348 
349  //-----<Fields>-----------------------------------------------------------
350 
358  SCH_FIELD* GetField( int aFieldNdx ) const;
359 
365  wxString GetFieldText( const wxString& aFieldName, SCH_EDIT_FRAME* aFrame ) const;
366 
373  void GetFields( std::vector<SCH_FIELD*>& aVector, bool aVisibleOnly );
374 
382  SCH_FIELD* AddField( const SCH_FIELD& aField );
383 
389  void RemoveField( const wxString& aFieldName );
390 
399  SCH_FIELD* FindField( const wxString& aFieldName, bool aIncludeDefaultFields = true );
400 
406  void SetFields( const SCH_FIELDS& aFields )
407  {
408  m_Fields = aFields; // vector copying, length is changed possibly
409  }
410 
416  void UpdateFields( bool aResetStyle, bool aResetRef = false );
417 
421  int GetFieldCount() const { return (int)m_Fields.size(); }
422 
427 
432 
442  void AutoplaceFields( SCH_SCREEN* aScreen, bool aManual );
443 
453  {
454  if( GetFieldsAutoplaced() )
456  }
457 
458 
459  //-----</Fields>----------------------------------------------------------
460 
461 
469  LIB_PIN* GetPin( const wxString& number );
470 
476  void GetPins( std::vector<LIB_PIN*>& aPinsList );
477 
478  SCH_PINS& GetPins() { return m_pins; }
479 
487  void Print( wxDC* aDC, const wxPoint& aOffset ) override;
488 
489  void SwapData( SCH_ITEM* aItem ) override;
490 
491  // returns a unique ID, in the form of a path.
492  wxString GetPath( const SCH_SHEET_PATH* sheet ) const;
493 
503  static bool IsReferenceStringValid( const wxString& aReferenceString );
504 
510  const wxString GetRef( const SCH_SHEET_PATH* aSheet );
511 
518  void SetRef( const SCH_SHEET_PATH* aSheet, const wxString& aReference );
519 
525  bool IsAnnotated( const SCH_SHEET_PATH* aSheet );
526 
535  void AddHierarchicalReference( const wxString& aPath,
536  const wxString& aRef,
537  int aMulti );
538 
539  // returns the unit selection, for the given sheet path.
540  int GetUnitSelection( SCH_SHEET_PATH* aSheet );
541 
542  // Set the unit selection, for the given sheet path.
543  void SetUnitSelection( SCH_SHEET_PATH* aSheet, int aUnitSelection );
544 
545  // Geometric transforms (used in block operations):
546 
547  void Move( const wxPoint& aMoveVector ) override
548  {
549  if( aMoveVector == wxPoint( 0, 0 ) )
550  return;
551 
552  m_Pos += aMoveVector;
553 
554  for( int ii = 0; ii < GetFieldCount(); ii++ )
555  GetField( ii )->Move( aMoveVector );
556 
557  SetModified();
558  }
559 
560  void MirrorY( int aYaxis_position ) override;
561  void MirrorX( int aXaxis_position ) override;
562  void Rotate( wxPoint aPosition ) override;
563 
564  bool Matches( wxFindReplaceData& aSearchData, void* aAuxData ) override;
565 
566  void GetEndPoints( std::vector<DANGLING_END_ITEM>& aItemList ) override;
567 
579  bool UpdateDanglingState( std::vector<DANGLING_END_ITEM>& aItemList ) override;
580 
581  wxPoint GetPinPhysicalPosition( const LIB_PIN* Pin ) const;
582 
583  bool IsConnectable() const override { return true; }
584 
585  bool CanConnect( const SCH_ITEM* aItem ) const override
586  {
587  return ( aItem->Type() == SCH_LINE_T && aItem->GetLayer() == LAYER_WIRE ) ||
588  ( aItem->Type() == SCH_NO_CONNECT_T ) ||
589  ( aItem->Type() == SCH_JUNCTION_T ) ||
590  ( aItem->Type() == SCH_COMPONENT_T ) ;
591  }
592 
598  bool IsInNetlist() const;
599 
600  void GetConnectionPoints( std::vector<wxPoint>& aPoints ) const override;
601 
602  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
603 
612  LIB_ITEM* GetDrawItem( const wxPoint& aPosition, KICAD_T aType = TYPE_NOT_INIT );
613 
614  wxString GetSelectMenuText( EDA_UNITS aUnits ) const override;
615 
616  BITMAP_DEF GetMenuImage() const override;
617 
618  void GetNetListItem( NETLIST_OBJECT_LIST& aNetListItems, SCH_SHEET_PATH* aSheetPath ) override;
619 
620  bool operator <( const SCH_ITEM& aItem ) const override;
621 
622  bool operator==( const SCH_COMPONENT& aComponent) const;
623  bool operator!=( const SCH_COMPONENT& aComponent) const;
624 
625  SCH_COMPONENT& operator=( const SCH_ITEM& aItem );
626 
627  bool IsReplaceable() const override { return true; }
628 
629  wxPoint GetPosition() const override { return m_Pos; }
630  void SetPosition( const wxPoint& aPosition ) override { Move( aPosition - m_Pos ); }
631 
632  bool HitTest( const wxPoint& aPosition, int aAccuracy = 0 ) const override;
633  bool HitTest( const EDA_RECT& aRect, bool aContained, int aAccuracy = 0 ) const override;
634 
635  void Plot( PLOTTER* aPlotter ) override;
636 
637  EDA_ITEM* Clone() const override;
638 
639 #if defined(DEBUG)
640  void Show( int nestLevel, std::ostream& os ) const override;
641 #endif
642 
643  void ClearBrightenedPins();
644 
645  bool HasBrightenedPins();
646 
647  void BrightenPin( LIB_PIN* aPin );
648 
649  void ClearHighlightedPins();
650 
651  bool HasHighlightedPins();
652 
653  void HighlightPin( LIB_PIN* aPin );
654 
655 private:
656  bool doIsConnected( const wxPoint& aPosition ) const override;
657 };
658 
659 #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.
void Move(const wxPoint &aMoveVector) override
Function Move moves the item by aMoveVector to a new position.
Definition: sch_field.h:153
EDA_UNITS
Definition: common.h:72
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...
AUTOPLACED GetFieldsAutoplaced() const
Return whether the fields have been automatically placed.
void SetTimeStamp(timestamp_t aNewTimeStamp)
Change the time stamp to aNewTimeStamp and updates the reference path.
SCH_FIELD instances are attached to a component and provide a place for the component's value,...
Definition: sch_field.h:52
void SetModified()
Definition: base_struct.cpp:95
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)
void AutoAutoplaceFields(SCH_SCREEN *aScreen)
Autoplace fields only if correct to do so automatically.
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
the component's pins
bool operator==(const SCH_COMPONENT &aComponent) const
std::vector< SCH_PIN > SCH_PINS
A container for several SCH_PIN items.
Definition: sch_component.h:67
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.
wxArrayString m_PathsAndReferences
Defines the hierarchical path and reference of the component.
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".
Definition: sch_component.h:96
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.
int GetUnitSelection(SCH_SHEET_PATH *aSheet)
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:74
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()
wxString GetPath(const SCH_SHEET_PATH *sheet) const
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 SetUnitSelection(SCH_SHEET_PATH *aSheet, int aUnitSelection)
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
bool UpdateDanglingState(std::vector< DANGLING_END_ITEM > &aItemList) override
Test if the component's dangling state has changed for all pins.
const wxArrayString & GetPathsAndReferences() const
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
void GetFields(std::vector< SCH_FIELD * > &aVector, bool aVisibleOnly)
Populates a std::vector with SCH_FIELDs.
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.
void ClearFieldsAutoplaced()
Set fields automatically placed flag false.
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:77
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.
void UpdatePins(SCH_SHEET_PATH *aSheet=nullptr)
Updates the local cache of SCH_PIN_CONNECTION objects for each pin.
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::unique_ptr< LIB_PART > m_part
void ClearAnnotation(SCH_SHEET_PATH *aSheetPath)
Clear exiting component annotation.
const wxString GetRef(const SCH_SHEET_PATH *aSheet)
Return the reference for the given sheet path.
int GetFieldCount() const
Return the number of fields in this symbol.
std::weak_ptr< LIB_PART > PART_REF
Definition: sch_component.h:79
SCH_LAYER_ID GetLayer() const
Function GetLayer returns the layer this item is on.
Definition: sch_item.h:212
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:103
wxString GetFieldText(const wxString &aFieldName, SCH_EDIT_FRAME *aFrame) const
Search for a field named aFieldName and returns text associated with this field.
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.
Board layer functions and definitions.
void AutoplaceFields(SCH_SCREEN *aScreen, bool aManual)
Automatically orient all the fields in the component.
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
void AddHierarchicalReference(const wxString &aPath, const wxString &aRef, int aMulti)
Add a full hierarchical reference to this symbol.
SCH_PINS & GetPins()
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
SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:89
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:163
The common library.
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()
bool AddSheetPathReferenceEntryIfMissing(const wxString &aSheetPathName)
Add aSheetPath in m_PathsAndReferences alternate references list, if this entry does not exist Do not...
int GetConvert() const
uint32_t timestamp_t
timestamp_t is our type to represent unique IDs for all kinds of elements; historically simply the ti...
Definition: common.h:52
int m_convert
The alternate body style for components that have more than one body style defined.
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.
AUTOPLACED m_fieldsAutoplaced
indicates status of field autoplacement
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:136
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:207
void SetOrientation(int aOrientation)
Compute the new transform matrix based on aOrientation for the symbol which is applied to the current...