35#define TARGET_PIN_RADIUS schIUScale.MilsToIU( 15 )
38#define PIN_INVISIBLE 1
55 return wxT(
"LIB_PIN" );
113 m_name.Replace( wxT(
" " ), wxT(
"_" ) );
124 m_number.Replace( wxT(
" " ), wxT(
"_" ) );
155 const TRANSFORM& aTransform,
bool aDimmed )
override;
169 int aNameTextSize,
int aNumTextSize,
int aConvert,
const VECTOR2I& aPos,
int aUnit );
179 void Show(
int nestLevel, std::ostream& os )
const override;
182 bool HitTest(
const VECTOR2I& aPosition,
int aAccuracy = 0 )
const override;
184 bool HitTest(
const BOX2I& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
190 void ViewGetLayers(
int aLayers[],
int& aCount )
const override;
200 bool aIncludeElectricalType )
const;
209 return GetType() == ELECTRICAL_PINTYPE::PT_POWER_IN
223 int aTextInside,
bool aDrawPinNum,
bool aDrawPinName,
bool aDimmed )
const;
226 bool aDimmed )
const;
245 void Rotate(
const VECTOR2I& aCenter,
bool aRotateCCW =
true )
override;
248 const TRANSFORM& aTransform,
bool aDimmed )
const override;
306 bool aDrawPinName,
bool aDimmed );
313 std::ostream&
operator<<( std::ostream& aStream );
325 int compare(
const LIB_ITEM& aOther,
int aCompareFlags = 0 )
const override;
BITMAPS
A list of all bitmap identifiers.
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
FONT is an abstract base class for both outline and stroke fonts.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
The base class for drawable items used by schematic library symbols.
LIB_SYMBOL * GetParent() const
bool IsGlobalPower() const
Return whether this pin forms a global power connection: i.e., is part of a power symbol and of type ...
void printPinElectricalTypeName(const RENDER_SETTINGS *aSettings, VECTOR2I &aPosition, PIN_ORIENTATION aOrientation, bool aDimmed)
Draw the electrical type text of the pin (only for the footprint editor)
void SetShape(GRAPHIC_PINSHAPE aShape)
void ViewGetLayers(int aLayers[], int &aCount) const override
Return the all the layers within the VIEW the object is painted on.
void MirrorHorizontal(const VECTOR2I &aCenter) override
Mirror the draw object along the horizontal (X) axis about aCenter point.
void Offset(const VECTOR2I &aOffset) override
Set the drawing object by aOffset from the current position.
bool operator<(const LIB_PIN &aRhs) const
ELECTRICAL_PINTYPE GetType() const
void SetPosition(const VECTOR2I &aPos) override
const BOX2I GetBoundingBox() const override
void SetName(const wxString &aName)
void MirrorVertical(const VECTOR2I &aCenter) override
Mirror the draw object along the MirrorVertical (Y) axis about aCenter point.
int compare(const LIB_ITEM &aOther, int aCompareFlags=0) const override
Provide the draw object specific comparison called by the == and < operators.
void SetNameTextSize(int aSize)
void validateExtentsCache(KIFONT::FONT *aFont, int aSize, const wxString &aText, EXTENTS_CACHE *aCache) const
void PlotPinTexts(PLOTTER *aPlotter, const VECTOR2I &aPinPos, PIN_ORIENTATION aPinOrient, int aTextInside, bool aDrawPinNum, bool aDrawPinName, bool aDimmed) const
Plot the pin number and pin text info, given the pin line coordinates.
void SetType(ELECTRICAL_PINTYPE aType)
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
PIN_ORIENTATION GetOrientation() const
wxString getItemDescription(ALT *aAlt) const
std::ostream & operator<<(std::ostream &aStream)
wxString GetShownNumber() const
int GetNumberTextSize() const
void SetVisible(bool aVisible)
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Display basic info (type, part and convert) about the current item in message panel.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
wxString GetShownName() const
void Rotate(const VECTOR2I &aCenter, bool aRotateCCW=true) override
Rotate the object about aCenter point.
void ChangeLength(int aLength)
Change the length of a pin and adjust its position based on orientation.
wxString const GetCanonicalElectricalTypeName() const
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
void MoveTo(const VECTOR2I &aNewPosition) override
Move a draw object to aPosition.
wxString GetClass() const override
Return the class name.
bool operator==(const LIB_ITEM &aItem) const override
Test LIB_ITEM objects for equivalence.
void SetOperatingPoint(const wxString &aText)
static bool ClassOf(const EDA_ITEM *aItem)
EXTENTS_CACHE m_nameExtentsCache
VECTOR2I GetPosition() const override
void CalcEdit(const VECTOR2I &aPosition) override
Calculate the attributes of an item at aPosition when it is being edited.
std::map< wxString, ALT > & GetAlternates()
const wxString & GetOperatingPoint() const
bool operator!=(const LIB_ITEM &aItem) const
const wxString & GetNumber() const
PIN_ORIENTATION PinDrawOrient(const TRANSFORM &aTransform) const
Return the pin real orientation (PIN_UP, PIN_DOWN, PIN_RIGHT, PIN_LEFT), according to its orientation...
wxString const GetElectricalTypeName() const
std::map< wxString, ALT > m_alternates
void SetOrientation(PIN_ORIENTATION aOrientation)
EXTENTS_CACHE m_numExtentsCache
GRAPHIC_PINSHAPE GetShape() const
void SetNumber(const wxString &aNumber)
void print(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset, void *aData, const TRANSFORM &aTransform, bool aDimmed) override
Print a pin, with or without the pin texts.
void printPinSymbol(const RENDER_SETTINGS *aSettings, const VECTOR2I &aPos, PIN_ORIENTATION aOrientation, bool aDimmed)
Print the pin symbol without text.
PIN_ORIENTATION m_orientation
ALT GetAlt(const wxString &aAlt)
void printPinTexts(const RENDER_SETTINGS *aSettings, VECTOR2I &aPinPos, PIN_ORIENTATION aPinOrient, int aTextInside, bool aDrawPinNum, bool aDrawPinName, bool aDimmed)
Put the pin number and pin text info, given the pin line coordinates.
ELECTRICAL_PINTYPE m_type
const wxString & GetName() const
void Plot(PLOTTER *aPlotter, bool aBackground, const VECTOR2I &aOffset, const TRANSFORM &aTransform, bool aDimmed) const override
Plot the draw item using the plot object.
double Similarity(const LIB_ITEM &aItem) const override
Return a measure of how likely the other object is to represent the same object.
wxString GetTypeName() const override
Provide a user-consumable name of the object type.
void SetLength(int aLength)
void PlotSymbol(PLOTTER *aPlotter, const VECTOR2I &aPosition, PIN_ORIENTATION aOrientation, bool aDimmed) const
int GetNameTextSize() const
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
VECTOR2I GetPinRoot() const
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
bool operator>(const LIB_PIN &aRhs) const
int GetPenWidth() const override
void SetNumberTextSize(int aSize)
wxString m_operatingPoint
Define a library symbol object.
Base plotter engine class.
wxString ElectricalPinTypeGetText(ELECTRICAL_PINTYPE aType)
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
PIN_ORIENTATION
The symbol library pin object orientations.
ELECTRICAL_PINTYPE m_Type