35#define TARGET_PIN_RADIUS schIUScale.MilsToIU( 15 )
38#define PIN_INVISIBLE 1
66 return wxT(
"LIB_PIN" );
119 m_name.Replace( wxT(
" " ), wxT(
"_" ) );
129 m_number.Replace( wxT(
" " ), wxT(
"_" ) );
151 const TRANSFORM& aTransform,
bool aDimmed )
override;
163 LIB_PIN(
LIB_SYMBOL* aParent,
const wxString& aName,
const wxString& aNumber,
int aOrientation,
165 int aConvert,
const VECTOR2I& aPos,
int aUnit );
175 void Show(
int nestLevel, std::ostream& os )
const override;
178 bool HitTest(
const VECTOR2I& aPosition,
int aAccuracy = 0 )
const override;
180 bool HitTest(
const BOX2I& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
186 void ViewGetLayers(
int aLayers[],
int& aCount )
const override;
196 bool aIncludeElectricalType )
const;
219 bool aDrawPinNum,
bool aDrawPinName,
bool aDimmed )
const;
222 bool aDimmed )
const;
235 void Rotate(
const VECTOR2I& aCenter,
bool aRotateCCW =
true )
override;
238 const TRANSFORM& aTransform,
bool aDimmed )
const override;
275 int aTextInside,
bool aDrawPinNum,
bool aDrawPinName,
bool aDimmed );
281 int aOrientation,
bool aDimmed );
293 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.
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 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.
ELECTRICAL_PINTYPE GetType() const
void SetPosition(const VECTOR2I &aPos) override
void PlotPinTexts(PLOTTER *aPlotter, const VECTOR2I &aPinPos, int aPinOrient, int aTextInside, bool aDrawPinNum, bool aDrawPinName, bool aDimmed) const
Plot the pin number and pin text info, given the pin line coordinates.
int GetOrientation() const
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 SetType(ELECTRICAL_PINTYPE aType)
const BOX2I ViewBBox() const override
Return the bounding box of the item covering all its layers.
wxString GetShownNumber() const
LIB_PIN(LIB_SYMBOL *aParent)
int GetNumberTextSize() const
void printPinSymbol(const RENDER_SETTINGS *aSettings, const VECTOR2I &aPos, int aOrientation, bool aDimmed)
Print the pin symbol without text.
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.
void SetOperatingPoint(const wxString &aText)
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
const wxString & GetNumber() const
wxString const GetElectricalTypeName() const
std::map< wxString, ALT > m_alternates
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.
ALT GetAlt(const wxString &aAlt)
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.
int PinDrawOrient(const TRANSFORM &aTransform) const
Return the pin real orientation (PIN_UP, PIN_DOWN, PIN_RIGHT, PIN_LEFT), according to its orientation...
wxString GetTypeName() const override
Provide a user-consumable name of the object type.
void SetLength(int aLength)
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.
int GetPenWidth() const override
void printPinElectricalTypeName(const RENDER_SETTINGS *aSettings, VECTOR2I &aPosition, int aOrientation, bool aDimmed)
Draw the electrical type text of the pin (only for the footprint editor)
void PlotSymbol(PLOTTER *aPlotter, const VECTOR2I &aPosition, int aOrientation, bool aDimmed) const
void SetOrientation(int aOrientation)
void SetNumberTextSize(int aSize)
wxString m_operatingPoint
void printPinTexts(const RENDER_SETTINGS *aSettings, VECTOR2I &aPinPos, int aPinOrient, int aTextInside, bool aDrawPinNum, bool aDrawPinName, bool aDimmed)
Put the pin number and pin text info, given the pin line coordinates.
Define a library symbol object.
Base plotter engine class.
DrawPinOrient
The symbol library pin object orientations.
wxString ElectricalPinTypeGetText(ELECTRICAL_PINTYPE aType)
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
@ PT_POWER_IN
power input (GND, VCC for ICs). Must be connected to a power output.
ELECTRICAL_PINTYPE m_Type