36 #define TARGET_PIN_RADIUS Mils2iu( 15 ) 39 #define PIN_INVISIBLE 1 // Set makes pin invisible 67 return wxT(
"LIB_PIN" );
113 m_name.Replace( wxT(
" " ), wxT(
"_" ) );
123 m_number.Replace( wxT(
" " ), wxT(
"_" ) );
157 LIB_PIN(
LIB_SYMBOL* aParent,
const wxString& aName,
const wxString& aNumber,
int aOrientation,
159 int aConvert,
const wxPoint& aPos,
int aUnit );
164 void Show(
int nestLevel, std::ostream& os )
const override;
167 bool HitTest(
const wxPoint& aPosition,
int aAccuracy = 0 )
const override;
169 bool HitTest(
const EDA_RECT& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
173 void ViewGetLayers(
int aLayers[],
int& aCount )
const override;
204 int aTextInside,
bool aDrawPinNum,
bool aDrawPinName )
const;
206 void PlotSymbol(
PLOTTER* aPlotter,
const wxPoint& aPosition,
int aOrientation )
const;
208 void Offset(
const wxPoint& aOffset )
override;
210 void MoveTo(
const wxPoint& aNewPosition )
override;
219 void Rotate(
const wxPoint& aCenter,
bool aRotateCCW =
true )
override;
221 void Plot(
PLOTTER* aPlotter,
const wxPoint& aPffset,
bool aFill,
222 const TRANSFORM& aTransform )
const override;
230 void CalcEdit(
const wxPoint& aPosition )
override;
258 int aTextInside,
bool aDrawPinNum,
bool aDrawPinName );
276 int compare(
const LIB_ITEM& aOther,
int aCompareFlags = 0 )
const override;
294 #endif // CLASS_PIN_H int compare(const LIB_ITEM &aOther, int aCompareFlags=0) const override
Provide the draw object specific comparison called by the == and < operators.
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...
wxString GetShownNumber() const
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.
void Plot(PLOTTER *aPlotter, const wxPoint &aPffset, bool aFill, const TRANSFORM &aTransform) const override
Plot the draw item using the plot object.
void PlotPinTexts(PLOTTER *aPlotter, const wxPoint &aPinPos, int aPinOrient, int aTextInside, bool aDrawPinNum, bool aDrawPinName) const
Plot the pin number and pin text info, given the pin line coordinates.
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.
void ViewGetLayers(int aLayers[], int &aCount) const override
Return the all the layers within the VIEW the object is painted on.
int GetOrientation() 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.
wxString ElectricalPinTypeGetText(ELECTRICAL_PINTYPE aType)
void SetShape(GRAPHIC_PINSHAPE aShape)
GRAPHIC_PINSHAPE GetShape() const
LIB_PIN(LIB_SYMBOL *aParent)
void PlotSymbol(PLOTTER *aPlotter, const wxPoint &aPosition, int aOrientation) const
void SetLength(int aLength)
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this 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
Define a library symbol object.
ELECTRICAL_PINTYPE m_Type
The base class for drawable items used by schematic library symbols.
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)
wxPoint GetPinRoot() const
void printPinSymbol(const RENDER_SETTINGS *aSettings, const wxPoint &aPos, int aOrientation)
Print the pin symbol without text.
void SetType(ELECTRICAL_PINTYPE aType)
wxString const GetElectricalTypeName() const
const wxString & GetName() const
void SetVisible(bool aVisible)
int GetPenWidth() const override
int GetNameTextSize() const
wxString GetShownName() const
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
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
Calculate the attributes of an item at aPosition when it is being edited.
wxPoint GetPosition() const override
const wxString & GetNumber() const
ELECTRICAL_PINTYPE GetType() const
LIB_SYMBOL * GetParent() const
Base plotter engine class.
std::map< wxString, ALT > m_alternates
std::map< wxString, ALT > & GetAlternates()
int GetNumberTextSize() const
void SetName(const wxString &aName)
BITMAPS
A list of all bitmap identifiers.
void SetNameTextSize(int aSize)
ELECTRICAL_PINTYPE
The symbol 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 symbol library pin object orientations.
wxString GetTypeName() const override
Provide a user-consumable name of the object type.
wxString const GetCanonicalElectricalTypeName() const
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.