38 #define TARGET_PIN_RADIUS Mils2iu( 15 ) 41 #define PIN_INVISIBLE 1 // Set makes pin invisible 95 int aTextInside,
bool aDrawPinNum,
bool aDrawPinName );
117 return wxT(
"LIB_PIN" );
162 m_name.Replace( wxT(
" " ), wxT(
"_" ) );
171 m_number.Replace( wxT(
" " ), wxT(
"_" ) );
205 LIB_PIN(
LIB_PART* aParent,
const wxString& aName,
const wxString& aNumber,
int aOrientation,
207 int aConvert,
const wxPoint& aPos,
int aUnit );
212 void Show(
int nestLevel, std::ostream& os )
const override;
215 bool HitTest(
const wxPoint& aPosition,
int aAccuracy = 0 )
const override;
217 bool HitTest(
const EDA_RECT& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
250 int aTextInside,
bool aDrawPinNum,
bool aDrawPinName );
252 void PlotSymbol(
PLOTTER* aPlotter,
const wxPoint& aPosition,
int aOrientation );
254 void Offset(
const wxPoint& aOffset )
override;
256 void MoveTo(
const wxPoint& aNewPosition )
override;
263 void Rotate(
const wxPoint& aCenter,
bool aRotateCCW =
true )
override;
265 void Plot(
PLOTTER* aPlotter,
const wxPoint& aPffset,
bool aFill,
278 void CalcEdit(
const wxPoint& aPosition )
override;
295 #endif // CLASS_PIN_H void SetNumberTextSize(int aSize)
wxString GetClass() const override
Return the class name.
power input (GND, VCC for ICs). Must be connected to a power output.
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
void Rotate(const wxPoint &aCenter, bool aRotateCCW=true) override
Rotate the object about aCenter point.
PNG memory record (file in memory).
void SetOrientation(int aOrientation)
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
void MoveTo(const wxPoint &aNewPosition) override
Move a draw object to aPosition.
int GetOrientation() const
LIB_PART * GetParent() const
void printPinTexts(const RENDER_SETTINGS *aSettings, wxPoint &aPinPos, int aPinOrient, int aTextInside, bool aDrawPinNum, bool aDrawPinName)
Put the pin number and pin text info, given the pin line coordinates.
BITMAP_DEF GetMenuImage() const override
Return a pointer to an image to be used in menus.
wxString ElectricalPinTypeGetText(ELECTRICAL_PINTYPE aType)
void SetShape(GRAPHIC_PINSHAPE aShape)
GRAPHIC_PINSHAPE GetShape() const
void SetWidth(int aWidth) override
void SetLength(int aLength)
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is contained within or on the bounding box of an item.
ALT GetAlt(const wxString &aAlt)
const EDA_RECT GetBoundingBox() const override
The base class for create windows for drawing purpose.
int PinDrawOrient(const TRANSFORM &aTransform) const
Return the pin real orientation (PIN_UP, PIN_DOWN, PIN_RIGHT, PIN_LEFT), according to its orientation...
void SetPosition(const wxPoint &aPos) override
int GetWidth() const override
ELECTRICAL_PINTYPE m_Type
The base class for drawable items used by schematic library components.
bool IsPowerConnection() const
Return whether this pin forms an implicit power connection: i.e., is hidden and of type POWER_IN.
void MirrorVertical(const wxPoint &aCenter) override
Mirror the draw object along the MirrorVertical (Y) axis about aCenter point.
void SetNumber(const wxString &aNumber)
void printPinSymbol(const RENDER_SETTINGS *aSettings, const wxPoint &aPos, int aOrientation)
Print the pin symbol without text.
void SetType(ELECTRICAL_PINTYPE aType)
void PlotSymbol(PLOTTER *aPlotter, const wxPoint &aPosition, int aOrientation)
wxString const GetElectricalTypeName() const
COMPARE_FLAGS
The list of flags used by the compare function.
const wxString & GetName() const
Define a library symbol object.
void SetVisible(bool aVisible)
int GetPenWidth() const override
int compare(const LIB_ITEM &aOther, LIB_ITEM::COMPARE_FLAGS aCompareFlags=LIB_ITEM::COMPARE_FLAGS::NORMAL) const override
Provide the draw object specific comparison called by the == and < operators.
int GetNameTextSize() const
void PlotPinTexts(PLOTTER *aPlotter, wxPoint &aPinPos, int aPinOrient, int aTextInside, bool aDrawPinNum, bool aDrawPinName)
Plot the pin number and pin text info, given the pin line coordinates.
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.
void CalcEdit(const wxPoint &aPosition) override
Calculates the attributes of an item at aPosition when it is being edited.
LIB_PIN(LIB_PART *aParent)
wxPoint GetPosition() const override
const wxString & GetNumber() const
ELECTRICAL_PINTYPE GetType() const
Base plotter engine class.
std::map< wxString, ALT > m_alternates
std::map< wxString, ALT > & GetAlternates()
int GetNumberTextSize() const
void SetName(const wxString &aName)
void SetNameTextSize(int aSize)
ELECTRICAL_PINTYPE
The component library pin object electrical types used in ERC tests.
void printPinElectricalTypeName(const RENDER_SETTINGS *aSettings, wxPoint &aPosition, int aOrientation)
Draw the electrical type text of the pin (only for the footprint editor)
Handle the component boundary box.
A base class for most all the KiCad significant classes used in schematics and boards.
ELECTRICAL_PINTYPE m_type
DrawPinOrient
The component library pin object orientations.
wxString GetTypeName() const override
Provide a user-consumable name of the object type.
wxString const GetCanonicalElectricalTypeName() const
void Plot(PLOTTER *aPlotter, const wxPoint &aPffset, bool aFill, const TRANSFORM &aTransform) override
Plot the draw item using the plot object.
void Offset(const wxPoint &aOffset) override
Set the drawing object by aOffset from the current position.
void print(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset, void *aData, const TRANSFORM &aTransform) override
Print a pin, with or without the pin texts.
void MirrorHorizontal(const wxPoint &aCenter) override
Mirror the draw object along the horizontal (X) axis about aCenter point.