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-2017 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 
32 #ifndef COMPONENT_CLASS_H
33 #define COMPONENT_CLASS_H
34 
35 #include <lib_id.h>
36 
37 #include <sch_field.h>
38 #include <transform.h>
39 #include <general.h>
40 #include <vector>
41 #include <set>
42 #include <lib_draw_item.h>
43 
44 class SCH_SCREEN;
45 class SCH_SHEET_PATH;
46 class LIB_ITEM;
47 class LIB_PIN;
48 class LIB_PART;
50 class PART_LIB;
51 class PART_LIBS;
52 class SCH_COLLECTOR;
53 class SCH_SCREEN;
55 
56 
58 typedef std::vector<SCH_FIELD> SCH_FIELDS;
59 
60 typedef std::weak_ptr<LIB_PART> PART_REF;
61 
62 
63 extern std::string toUTFTildaText( const wxString& txt );
64 
65 
70 class SCH_COMPONENT : public SCH_ITEM
71 {
72 public:
74 private:
75 
76  wxPoint m_Pos;
77 
80 
81  int m_unit;
82  int m_convert;
83  wxString m_prefix;
91 
93 
94  std::vector<bool> m_isDangling;
95  std::vector<wxPoint> m_Pins;
96  std::set<wxString> m_highlightedPins;
97 
99 
107 
114  wxArrayString m_PathsAndReferences;
115 
116  void Init( const wxPoint& pos = wxPoint( 0, 0 ) );
117 
118 public:
119  SCH_COMPONENT( const wxPoint& pos = wxPoint( 0, 0 ), SCH_ITEM* aParent = NULL );
120 
134  SCH_COMPONENT( LIB_PART& aPart, LIB_ID aLibId, SCH_SHEET_PATH* aSheet,
135  int unit = 0, int convert = 0,
136  const wxPoint& pos = wxPoint( 0, 0 ),
137  bool setNewItemFlag = false );
138 
148  SCH_COMPONENT( const SCH_COMPONENT& aComponent );
149 
151 
152  static inline bool ClassOf( const EDA_ITEM* aItem )
153  {
154  return aItem && SCH_COMPONENT_T == aItem->Type();
155  }
156 
157  wxString GetClass() const override
158  {
159  return wxT( "SCH_COMPONENT" );
160  }
161 
162  const wxArrayString& GetPathsAndReferences() const { return m_PathsAndReferences; }
163 
164  void ViewGetLayers( int aLayers[], int& aCount ) const override;
165 
175  bool IsMovableFromAnchorPoint() override { return false; }
176 
177  void SetLibId( const LIB_ID& aName, PART_LIBS* aLibs=NULL );
178  void SetLibId( const LIB_ID& aLibId, SYMBOL_LIB_TABLE* aSymLibTable, PART_LIB* aCacheLib );
179 
180  const LIB_ID& GetLibId() const { return m_lib_id; }
181 
182  PART_REF& GetPartRef() { return m_part; }
183 
187  wxString GetDescription() const;
188 
192  wxString GetDatasheet() const;
193 
199  bool Resolve( PART_LIBS* aLibs );
200 
201  bool Resolve( SYMBOL_LIB_TABLE& aLibTable, PART_LIB* aCacheLib = NULL );
202 
203  static void ResolveAll( const SCH_COLLECTOR& aComponents, PART_LIBS* aLibs );
204 
205  static void ResolveAll( const SCH_COLLECTOR& aComponents, SYMBOL_LIB_TABLE& aLibTable,
206  PART_LIB* aCacheLib = NULL );
207 
208  int GetUnit() const { return m_unit; }
209 
213  void UpdatePinCache();
214 
220  static void UpdateAllPinCaches( const SCH_COLLECTOR& aComponents );
221 
231  void SetUnit( int aUnit );
232 
241  void UpdateUnit( int aUnit );
242 
243  int GetConvert() const { return m_convert; }
244 
245  void SetConvert( int aConvert );
246 
247  wxString GetPrefix() const { return m_prefix; }
248 
249  void SetPrefix( const wxString& aPrefix ) { m_prefix = aPrefix; }
250 
251  TRANSFORM& GetTransform() const { return const_cast< TRANSFORM& >( m_transform ); }
252 
253  void SetTransform( const TRANSFORM& aTransform );
254 
260  int GetUnitCount() const;
261 
268  void SetOrientation( int aOrientation );
269 
285  int GetOrientation();
286 
296  wxPoint GetScreenCoord( const wxPoint& aPoint );
297 
298  void GetMsgPanelInfo( EDA_UNITS_T aUnits, std::vector< MSG_PANEL_ITEM >& aList ) override;
299 
308  void ClearAnnotation( SCH_SHEET_PATH* aSheetPath );
309 
321  bool AddSheetPathReferenceEntryIfMissing( const wxString& aSheetPathName );
322 
330  void SetTimeStamp( timestamp_t aNewTimeStamp );
331 
336  void 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 
379  SCH_FIELD* AddField( const SCH_FIELD& aField );
380 
386  void RemoveField( const wxString& aFieldName );
387 
396  SCH_FIELD* FindField( const wxString& aFieldName, bool aIncludeDefaultFields = true );
397 
403  void SetFields( const SCH_FIELDS& aFields )
404  {
405  m_Fields = aFields; // vector copying, length is changed possibly
406  }
407 
413  void UpdateFields( bool aResetStyle, bool aResetRef = false );
414 
418  int GetFieldCount() const { return (int)m_Fields.size(); }
419 
424 
428  void ClearFieldsAutoplaced() { m_fieldsAutoplaced = AUTOPLACED_NO; }
429 
439  void AutoplaceFields( SCH_SCREEN* aScreen, bool aManual );
440 
450  {
451  if( GetFieldsAutoplaced() )
452  AutoplaceFields( aScreen, GetFieldsAutoplaced() == AUTOPLACED_MANUAL );
453  }
454 
455 
456  //-----</Fields>----------------------------------------------------------
457 
458 
466  LIB_PIN* GetPin( const wxString& number );
467 
473  void GetPins( std::vector<LIB_PIN*>& aPinsList );
474 
475  std::vector<bool>* GetDanglingPinFlags() { return &m_isDangling; }
476 
477  void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
478  GR_DRAWMODE aDrawMode, COLOR4D aColor = COLOR4D::UNSPECIFIED ) override
479  {
480  Draw( aPanel, aDC, aOffset, aDrawMode, aColor, true );
481  }
482 
496  void Draw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aOffset,
497  GR_DRAWMODE aDrawMode, COLOR4D aColor,
498  bool aDrawPinText );
499 
500  void SwapData( SCH_ITEM* aItem ) override;
501 
502  // returns a unique ID, in the form of a path.
503  wxString GetPath( const SCH_SHEET_PATH* sheet ) const;
504 
514  static bool IsReferenceStringValid( const wxString& aReferenceString );
515 
516  void SetCurrentSheetPath( const SCH_SHEET_PATH* aSheetPath )
517  {
518  m_currentSheetPath = aSheetPath;
519  }
520 
526  const wxString GetRef( const SCH_SHEET_PATH* aSheet );
527 
534  void SetRef( const SCH_SHEET_PATH* aSheet, const wxString& aReference );
535 
544  void AddHierarchicalReference( const wxString& aPath,
545  const wxString& aRef,
546  int aMulti );
547 
548  // returns the unit selection, for the given sheet path.
549  int GetUnitSelection( SCH_SHEET_PATH* aSheet );
550 
551  // Set the unit selection, for the given sheet path.
552  void SetUnitSelection( SCH_SHEET_PATH* aSheet, int aUnitSelection );
553 
554  // Geometric transforms (used in block operations):
555 
556  void Move( const wxPoint& aMoveVector ) override
557  {
558  if( aMoveVector == wxPoint( 0, 0 ) )
559  return;
560 
561  m_Pos += aMoveVector;
562 
563  for( int ii = 0; ii < GetFieldCount(); ii++ )
564  GetField( ii )->Move( aMoveVector );
565 
566  SetModified();
567  }
568 
569  void MirrorY( int aYaxis_position ) override;
570 
571  void MirrorX( int aXaxis_position ) override;
572 
573  void Rotate( wxPoint aPosition ) override;
574 
575  bool Matches( wxFindReplaceData& aSearchData, void* aAuxData, wxPoint* aFindLocation ) override;
576 
577  void GetEndPoints( std::vector<DANGLING_END_ITEM>& aItemList ) override;
578 
590  bool UpdateDanglingState( std::vector<DANGLING_END_ITEM>& aItemList ) override;
591 
592  wxPoint GetPinPhysicalPosition( const LIB_PIN* Pin ) const;
593 
594  bool IsSelectStateChanged( const wxRect& aRect ) override;
595 
596  bool IsConnectable() const override { return true; }
597 
598  bool CanConnect( const SCH_ITEM* aItem ) const override
599  {
600  return ( aItem->Type() == SCH_LINE_T && aItem->GetLayer() == LAYER_WIRE ) ||
601  ( aItem->Type() == SCH_NO_CONNECT_T ) ||
602  ( aItem->Type() == SCH_JUNCTION_T );
603  }
604 
610  bool IsInNetlist() const;
611 
612  void GetConnectionPoints( std::vector<wxPoint>& aPoints ) const override;
613 
614  SEARCH_RESULT Visit( INSPECTOR inspector, void* testData, const KICAD_T scanTypes[] ) override;
615 
624  LIB_ITEM* GetDrawItem( const wxPoint& aPosition, KICAD_T aType = TYPE_NOT_INIT );
625 
626  wxString GetSelectMenuText( EDA_UNITS_T aUnits ) const override;
627 
628  BITMAP_DEF GetMenuImage() const override;
629 
630  void GetNetListItem( NETLIST_OBJECT_LIST& aNetListItems,
631  SCH_SHEET_PATH* aSheetPath ) override;
632 
633  bool operator <( const SCH_ITEM& aItem ) const override;
634 
635  bool operator==( const SCH_COMPONENT& aComponent) const;
636  bool operator!=( const SCH_COMPONENT& aComponent) const;
637 
638  SCH_ITEM& operator=( const SCH_ITEM& aItem );
639 
640  bool IsReplaceable() const override { return true; }
641 
642  wxPoint GetPosition() const override { return m_Pos; }
643 
644  void SetPosition( const wxPoint& aPosition ) override { Move( aPosition - m_Pos ); }
645 
646  bool HitTest( const wxPoint& aPosition, int aAccuracy ) const override;
647 
648  bool HitTest( const EDA_RECT& aRect, bool aContained = false, int aAccuracy = 0 ) const override;
649 
650  void Plot( PLOTTER* aPlotter ) override;
651 
652  EDA_ITEM* Clone() const override;
653 
654 #if defined(DEBUG)
655  void Show( int nestLevel, std::ostream& os ) const override;
656 #endif
657 
658  void ClearHighlightedPins();
659 
660  void HighlightPin( LIB_PIN* aPin );
661 
662  bool IsPinHighlighted( const LIB_PIN* aPin );
663 
664 private:
665  bool doIsConnected( const wxPoint& aPosition ) const override;
666 };
667 
668 
669 #endif /* COMPONENT_CLASS_H */
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:148
bool HitTest(const wxPoint &aPosition, int aAccuracy) const override
Function HitTest tests if aPosition is contained within or on the bounding box of an item...
KICAD_T Type() const
Function Type()
Definition: base_struct.h:201
void SetTimeStamp(timestamp_t aNewTimeStamp)
Change the time stamp to aNewTimeStamp and updates the reference path.
Class SCH_FIELD instances are attached to a component and provide a place for the component&#39;s value...
Definition: sch_field.h:56
void SetModified()
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.
PART_REF & GetPartRef()
TRANSFORM & GetTransform() const
void SetTransform(const TRANSFORM &aTransform)
PNG memory record (file in memory).
Definition: bitmap_types.h:43
void UpdateUnit(int aUnit)
Change the unit number to aUnit without setting any internal flags.
wxString GetPath(const SCH_SHEET_PATH *sheet) const
std::vector< bool > * GetDanglingPinFlags()
long timestamp_t
timestamp_t is our type to represent unique IDs for all kinds of elements; historically simply the ti...
Definition: common.h:53
int GetOrientation()
Get the display symbol orientation.
wxString GetDatasheet() const
Return the documentation text for the given part alias.
void HighlightPin(LIB_PIN *aPin)
AUTOPLACED GetFieldsAutoplaced() const
Return whether the fields have been automatically placed.
std::string toUTFTildaText(const wxString &txt)
Function toUTFTildaText convert a wxString to UTF8 and replace any control characters with a ~...
SCH_FIELDS m_Fields
Variable length list of fields.
Definition: sch_component.h:90
const SCH_SHEET_PATH * m_currentSheetPath
A temporary sheet path is required to generate the correct reference designator string in complex hie...
wxPoint GetScreenCoord(const wxPoint &aPoint)
Returns the coordinate points relative to the orientation of the symbol to aPoint.
bool Resolve(PART_LIBS *aLibs)
Assigns the current LIB_PART from aLibs which this symbol is based on.
wxString GetSelectMenuText(EDA_UNITS_T aUnits) const override
Function GetSelectMenuText returns the text to display to be used in the selection clarification cont...
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:76
void GetConnectionPoints(std::vector< wxPoint > &aPoints) const override
Function GetConnectionPoints add all the connection points for this item to aPoints.
std::weak_ptr< LIB_PART > PART_REF
weak pointer to LIB_PART
wxString GetPrefix() const
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...
void MirrorX(int aXaxis_position) override
Function MirrorX mirrors item relative to the X axis about aXaxis_position.
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.
Schematic editor (Eeschema) main window.
SCH_LAYER_ID GetLayer() const
Function GetLayer returns the layer this item is on.
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.
int GetUnitCount() const
Return the number of units per package of the symbol.
std::vector< bool > m_isDangling
One isDangling per pin.
Definition: sch_component.h:94
EDA_RECT GetBodyBoundingBox() const
Return a bounding box for the symbol body but not the fields.
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:51
std::vector< wxPoint > m_Pins
Definition: sch_component.h:95
bool UpdateDanglingState(std::vector< DANGLING_END_ITEM > &aItemList) override
Test if the component&#39;s dangling state has changed for all pins.
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_draw_item.h:67
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.
Class NETLIST_OBJECT_LIST is a container holding and owning NETLIST_OBJECTs, which are connected item...
void SetConvert(int aConvert)
bool IsSelectStateChanged(const wxRect &aRect) override
Function IsSelectStateChanged checks if the selection state of an item inside aRect has changed...
BITMAP_DEF GetMenuImage() const override
Function GetMenuImage returns a pointer to an image to be used in menus.
void SetCurrentSheetPath(const SCH_SHEET_PATH *aSheetPath)
const INSPECTOR_FUNC & INSPECTOR
Definition: base_struct.h:102
Class SCH_COLLECTOR.
int GetConvert() const
void SetLibId(const LIB_ID &aName, PART_LIBS *aLibs=NULL)
void Move(const wxPoint &aMoveVector) override
Function Move moves the item by aMoveVector to a new position.
void UpdatePinCache()
Updates the local cache of pin positions.
Class for tranforming drawing coordinates for a wxDC device context.
Definition: transform.h:45
PART_REF m_part
points into the PROJECT&#39;s libraries to the LIB_PART for this component
Definition: sch_component.h:92
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.
SCH_FIELD * GetField(int aFieldNdx) const
Returns a field in this symbol.
static void ResolveAll(const SCH_COLLECTOR &aComponents, PART_LIBS *aLibs)
GR_DRAWMODE
Drawmode. Compositing mode plus a flag or two.
Definition: gr_basic.h:37
std::vector< SCH_FIELD > SCH_FIELDS
A container for several SCH_FIELD items.
Definition: sch_component.h:54
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 wxArrayString & GetPathsAndReferences() const
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.
std::set< wxString > m_highlightedPins
God forgive me - Tom.
Definition: sch_component.h:96
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...
void SetUnit(int aUnit)
Change the unit number to aUnit.
bool Matches(wxFindReplaceData &aSearchData, void *aAuxData, wxPoint *aFindLocation) override
Function Matches compares the item against the search criteria in aSearchData.
int GetUnit() const
Class SCH_SHEET_PATH.
bool IsInNetlist() const
bool IsReplaceable() const override
Function IsReplaceable.
wxString GetFieldText(const wxString &aFieldName, SCH_EDIT_FRAME *aFrame) const
Search for a field named aFieldName and returns text associated with this field.
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.
void GetMsgPanelInfo(EDA_UNITS_T aUnits, std::vector< MSG_PANEL_ITEM > &aList) override
Function GetMsgPanelInfo populates aList of MSG_PANEL_ITEM objects with it&#39;s internal state for displ...
bool operator==(const SCH_COMPONENT &aComponent) const
std::weak_ptr< LIB_PART > PART_REF
Definition: sch_component.h:60
SCH_ITEM & operator=(const SCH_ITEM &aItem)
A collection of PART_LIB objects.
int m_unit
The unit for multiple part per package components.
Definition: sch_component.h:81
wxString GetDescription() const
Return information about the aliased parts.
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:97
void GetPins(std::vector< LIB_PIN * > &aPinsList)
Populate a vector with all the pins.
void AutoplaceFields(SCH_SCREEN *aScreen, bool aManual)
Automatically orient all the fields in the component.
bool IsPinHighlighted(const LIB_PIN *aPin)
int GetFieldCount() const
Return the number of fields in this symbol.
void AddHierarchicalReference(const wxString &aPath, const wxString &aRef, int aMulti)
Add a full hierarchical reference to this symbol.
void MirrorY(int aYaxis_position) override
Function MirrorY mirrors item relative to the Y axis about aYaxis_position.
void Draw(EDA_DRAW_PANEL *aPanel, wxDC *aDC, const wxPoint &aOffset, GR_DRAWMODE aDrawMode, COLOR4D aColor=COLOR4D::UNSPECIFIED) override
Function Draw Draw a schematic item.
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
Class SCH_COMPONENT describes a real schematic component.
Definition: sch_component.h:70
void SetPrefix(const wxString &aPrefix)
wxPoint GetPosition() const override
Function GetPosition.
const LIB_ID & GetLibId() const
void RemoveField(const wxString &aFieldName)
Removes a user field from the symbol.
Class EDA_ITEM is a base class for most all the KiCad significant classes, used in schematics and boa...
Definition: base_struct.h:154
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 operator!=(const SCH_COMPONENT &aComponent) const
bool AddSheetPathReferenceEntryIfMissing(const wxString &aSheetPathName)
Add aSheetPath in m_PathsAndReferences alternate references list, if this entry does not exist Do not...
int m_convert
The alternate body style for components that have more than one body style defined.
Definition: sch_component.h:82
Definition of the SCH_FIELD class for Eeschema.
SEARCH_RESULT
Definition: base_struct.h:66
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.
AUTOPLACED m_fieldsAutoplaced
indicates status of field autoplacement
Definition: sch_component.h:98
wxString m_prefix
C, R, U, Q etc - the first character which typically indicates what the component is...
Definition: sch_component.h:85
Object used to load, save, search, and otherwise manipulate symbol library files. ...
void ClearAllHighlightFlags()
Clear the HIGHLIGHTED flag of all items of the component (fields, pins ...)
TRANSFORM m_transform
The rotation/mirror transformation matrix.
Definition: sch_component.h:89
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
bool doIsConnected(const wxPoint &aPosition) const override
Function doIsConnected provides the object specific test to see if it is connected to aPosition...
static void UpdateAllPinCaches(const SCH_COLLECTOR &aComponents)
Update the pin cache for all components in aComponents.
void SetOrientation(int aOrientation)
Compute the new transform matrix based on aOrientation for the symbol which is applied to the current...
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39
wxPoint GetPinPhysicalPosition(const LIB_PIN *Pin) const