53#define MINIMUM_SELECTION_DISTANCE 2
111 switch ( aItem->
Type() )
162 virtual void EndEdit(
bool aClosed =
false ) {}
188 const TRANSFORM& aTransform,
bool aDimmed );
229 double similarity = 1.0;
243 void ViewGetLayers(
int aLayers[],
int& aCount )
const override;
252 bool HitTest(
const BOX2I& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
279 return *
this == *aOther;
340 const TRANSFORM& aTransform,
bool aDimmed )
const = 0;
357 void Show(
int nestLevel, std::ostream& os )
const override { ShowDummy( os ); }
381 virtual int compare(
const LIB_ITEM& aOther,
int aCompareFlags = 0 )
const;
392 const TRANSFORM& aTransform,
bool aDimmed ) = 0;
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
virtual const BOX2I GetBoundingBox() const
Return the orthogonal bounding box of this object for display purposes.
KICAD_T Type() const
Returns the type of object.
virtual bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const
Test if aPosition is inside or on the boundary of this item.
EDA_ITEM * m_parent
Linked list: Link (parent struct)
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.
int GetDefaultPenWidth() const
int GetMinPenWidth() const
The base class for drawable items used by schematic library symbols.
virtual wxString GetTypeName() const =0
Provide a user-consumable name of the object type.
virtual void Plot(PLOTTER *aPlotter, bool aBackground, const VECTOR2I &aOffset, const TRANSFORM &aTransform, bool aDimmed) const =0
Plot the draw item using the plot object.
virtual void EndEdit(bool aClosed=false)
End an object editing action.
virtual int GetPenWidth() const =0
const wxString & GetDefaultFont() const
virtual void print(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset, void *aData, const TRANSFORM &aTransform, bool aDimmed)=0
Print the item to aDC.
virtual bool operator==(const LIB_ITEM &aOther) const
Test LIB_ITEM objects for equivalence.
bool operator==(const LIB_ITEM *aOther) const
virtual void CalcEdit(const VECTOR2I &aPosition)
Calculate the attributes of an item at aPosition when it is being edited.
COMPARE_FLAGS
The list of flags used by the compare function.
virtual double Similarity(const LIB_ITEM &aItem) const =0
Return a measure of how likely the other object is to represent the same object.
virtual int compare(const LIB_ITEM &aOther, int aCompareFlags=0) const
Provide the draw object specific comparison called by the == and < operators.
virtual int GetEffectivePenWidth(const RENDER_SETTINGS *aSettings) const
static wxString GetUnitDescription(int aUnit)
virtual void MirrorHorizontal(const VECTOR2I &aCenter)=0
Mirror the draw object along the horizontal (X) axis about aCenter point.
virtual void Rotate(const VECTOR2I &aCenter, bool aRotateCCW=true)=0
Rotate the object about aCenter point.
LIB_ITEM * Duplicate() const
Create a copy of this LIB_ITEM (with a new Uuid).
virtual void MirrorVertical(const VECTOR2I &aCenter)=0
Mirror the draw object along the MirrorVertical (Y) axis about aCenter point.
double SimilarityBase(const LIB_ITEM &aItem) const
Calculate the boilerplate similarity for all LIB_ITEMs without preventing the use above of a pure vir...
virtual void Print(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset, void *aData, const TRANSFORM &aTransform, bool aDimmed)
Draw an item.
static bool ClassOf(const EDA_ITEM *aItem)
void SetPrivate(bool aPrivate)
virtual void MoveTo(const VECTOR2I &aPosition)=0
Move a draw object to aPosition.
const KIFONT::METRICS & GetFontMetrics() const
int m_bodyStyle
Shape identification for alternate body styles.
bool m_private
Private items are shown only in the Symbol Editor.
const BOX2I GetBoundingBox() const override
int m_unit
Unit identification for multiple parts per package.
virtual void Offset(const VECTOR2I &aOffset)=0
Set the drawing object by aOffset from the current position.
virtual bool ContinueEdit(const VECTOR2I &aPosition)
Continue an edit in progress at aPosition.
bool operator<(const LIB_ITEM &aOther) const
Test if another draw item is less than this draw object.
void SetPosition(const VECTOR2I &aPosition) override
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
static wxString GetBodyStyleDescription(int aBodyStyle)
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 SetBodyStyle(int aBodyStyle)
LIB_SYMBOL * GetParent() const
void ViewGetLayers(int aLayers[], int &aCount) const override
Return the all the layers within the VIEW the object is painted on.
virtual void BeginEdit(const VECTOR2I &aPosition)
Begin drawing a symbol library draw item at aPosition.
Define a library symbol object.
An abstract class from which implementation specific LINE_READERs may be derived to read single lines...
EDA_MSG_PANEL items for displaying messages.
Base plotter engine class.
std::vector< LIB_PIN * > LIB_PINS
Helper for defining a list of pin object pointers.
bool operator()(const LIB_ITEM *aFirst, const LIB_ITEM *aSecond) const
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.