30#ifndef CLASS_LIBENTRY_FIELDS_H
31#define CLASS_LIBENTRY_FIELDS_H
65 LIB_FIELD(
int aId,
const wxString& aName );
73 return wxT(
"LIB_FIELD" );
100 wxString
GetName(
bool aUseDefaultName =
true )
const;
117 void SetName(
const wxString& aName );
120 void SetId(
int aId );
133 void ViewGetLayers(
int aLayers[],
int& aCount )
const override;
139 bool HitTest(
const VECTOR2I& aPosition,
int aAccuracy = 0 )
const override;
155 wxString
GetShownText(
bool aAllowExtraText,
int aDepth = 0 )
const override;
169 void Rotate(
const VECTOR2I& aCenter,
bool aRotateCCW =
true )
override;
172 const TRANSFORM& aTransform,
bool aDimmed )
const override;
208 int compare(
const LIB_ITEM& aOther,
int aCompareFlags = 0 )
const override;
217 const TRANSFORM& aTransform,
bool aDimmed )
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.
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
const VECTOR2I & GetTextPos() const
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.
Field object used in symbol libraries.
bool m_allowAutoPlace
This field can be autoplaced when converted to a SCH_FIELD.
void SetAutoAdded(bool aAutoAdded)
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
wxString GetClass() const override
Return the class name.
void Offset(const VECTOR2I &aOffset) override
Set the drawing object by aOffset from the current position.
void Init(int aId)
Object constructor initialization helper.
bool m_autoAdded
Was this field automatically added to a LIB_SYMBOL?
bool ShowInChooser() const
KIFONT::FONT * getDrawFont() const override
void Rotate(const VECTOR2I &aCenter, bool aRotateCCW=true) override
Rotate the object about aCenter point.
wxString m_name
Name (not the field text value itself, that is #EDA_TEXT::m_Text)
void ViewGetLayers(int aLayers[], int &aCount) const override
Return the all the layers within the VIEW the object is painted on.
void print(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset, void *aData, const TRANSFORM &aTransform, bool aDimmed) override
Print the field.
wxString GetTypeName() const override
Provide a user-consumable name of the object type.
bool CanAutoplace() const
SCH_LAYER_ID GetDefaultLayer() 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.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
void SetName(const wxString &aName)
Set a user definable field name to aName.
void SetShowInChooser(bool aShow=true)
VECTOR2I GetPosition() const override
void Copy(LIB_FIELD *aTarget) const
Copy parameters of this field to another field.
bool m_showInChooser
This field is available as a data column for the chooser.
wxString GetFullText(int unit=1) const
Return the text of a field.
wxString GetName(bool aUseDefaultName=true) const
Return the field name (not translated).
void BeginEdit(const VECTOR2I &aStartPoint) override
Begin drawing a symbol library draw item at aPosition.
wxString GetCanonicalName() const
Get a non-language-specific name for a field which can be used for storage, variable look-up,...
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
int GetPenWidth() const override
wxString GetShownText(bool aAllowExtraText, int aDepth=0) const override
Return the string actually shown after processing of the base text.
void MirrorHorizontal(const VECTOR2I &aCenter) override
Mirror the draw object along the horizontal (X) axis about aCenter point.
void CalcEdit(const VECTOR2I &aPosition) override
Calculate the new circle at aPosition when editing.
void MirrorVertical(const VECTOR2I &aCenter) override
Mirror the draw object along the MirrorVertical (Y) axis about aCenter point.
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
void MoveTo(const VECTOR2I &aPosition) override
Move a draw object to aPosition.
void SetNameShown(bool aShown=true)
LIB_FIELD & operator=(const LIB_FIELD &field)
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
void SetCanAutoplace(bool aCanPlace)
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
static bool ClassOf(const EDA_ITEM *aItem)
bool m_showName
Render the field's name in addition to its value.
int compare(const LIB_ITEM &aOther, int aCompareFlags=0) const override
Provide the draw object specific comparison called by the == and < operators.
The base class for drawable items used by schematic library symbols.
Define a library symbol object.
Base plotter engine class.
A cache assistant for KiCad legacy symbol libraries.
SCH_LAYER_ID
Eeschema drawing layers.