67 return static_cast<int>(
m_spin );
118 bool IsType(
const std::vector<KICAD_T>& aScanTypes )
const override;
124 switch( aItem->
Type() )
199 void Rotate90(
bool aClockwise )
override;
229 int aDepth = 0 )
const override;
231 wxString
GetShownText(
bool aAllowExtraText,
int aDepth = 0 )
const override
233 return GetShownText(
nullptr, aAllowExtraText, aDepth );
242 const std::vector<KICAD_T>& scanTypes )
override;
256 std::vector<VECTOR2I>& aPoints,
const VECTOR2I& Pos )
const
273 bool HitTest(
const VECTOR2I& aPosition,
int aAccuracy = 0 )
const override;
274 bool HitTest(
const BOX2I& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
278 void GetEndPoints( std::vector< DANGLING_END_ITEM >& aItemList )
override;
286 void ViewGetLayers(
int aLayers[],
int& aCount )
const override;
290 void Plot(
PLOTTER* aPlotter,
bool aBackground )
const override;
348 return wxT(
"SCH_LABEL" );
397 return wxT(
"SCH_DIRECTIVE_LABEL" );
413 const VECTOR2I& aPos )
const override;
450 return wxT(
"SCH_GLOBALLABEL" );
465 const VECTOR2I& aPos )
const override;
471 void ViewGetLayers(
int aLayers[],
int& aCount )
const override;
509 return wxT(
"SCH_HIERLABEL" );
517 const VECTOR2I& aPos )
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.
KICAD_T Type() const
Returns the type of object.
const VECTOR2I & GetTextPos() const
A color representation with 4 components: red, green, blue, alpha.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
Base plotter engine class.
void MirrorSpinStyle(bool aLeftRight) override
void SwapData(SCH_ITEM *aItem) override
Swap the internal data structures aItem with the schematic item.
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
void AutoplaceFields(SCH_SCREEN *aScreen, bool aManual) override
bool IsConnectable() const override
static bool ClassOf(const EDA_ITEM *aItem)
void CreateGraphicShape(const RENDER_SETTINGS *aSettings, std::vector< VECTOR2I > &aPoints, const VECTOR2I &aPos) const override
Calculate the graphic shape (a polygon) associated to the text.
int GetPenWidth() const override
bool AutoRotateOnPlacementSupported() const override
AutoRotateOnPlacementSupported.
wxString GetClass() const override
Return the class name.
void SetPinLength(int aLength)
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
Instances are attached to a symbol or sheet and provide a place for the symbol's value,...
bool IsConnectable() const override
void ViewGetLayers(int aLayers[], int &aCount) const override
Return the layers the item is drawn on (which may be more than its "home" layer)
void CreateGraphicShape(const RENDER_SETTINGS *aRenderSettings, std::vector< VECTOR2I > &aPoints, const VECTOR2I &aPos) const override
Calculate the graphic shape (a polygon) associated to the text.
bool ResolveTextVar(const SCH_SHEET_PATH *aPath, wxString *token, int aDepth) const override
Resolve any references to system tokens supported by the label.
static bool ClassOf(const EDA_ITEM *aItem)
int GetMandatoryFieldCount() override
bool doIsConnected(const VECTOR2I &aPosition) const override
Provide the object specific test to see if it is connected to aPosition.
VECTOR2I GetSchematicTextOffset(const RENDER_SETTINGS *aSettings) const override
This offset depends on the orientation, the type of text, and the area required to draw the associate...
void SetSpinStyle(SPIN_STYLE aSpinStyle) override
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
bool AutoRotateOnPlacementSupported() const override
AutoRotateOnPlacementSupported.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
bool IsPointClickableAnchor(const VECTOR2I &aPos) const override
wxString GetClass() const override
Return the class name.
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
bool doIsConnected(const VECTOR2I &aPosition) const override
Provide the object specific test to see if it is connected to aPosition.
static bool ClassOf(const EDA_ITEM *aItem)
wxString GetClass() const override
Return the class name.
const BOX2I GetBodyBoundingBox() const override
Return the bounding box of the label only, without taking in account its fields.
void SetSpinStyle(SPIN_STYLE aSpinStyle) override
void CreateGraphicShape(const RENDER_SETTINGS *aSettings, std::vector< VECTOR2I > &aPoints, const VECTOR2I &aPos) const override
Calculate the graphic shape (a polygon) associated to the text.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
bool IsPointClickableAnchor(const VECTOR2I &aPos) const override
bool IsConnectable() const override
VECTOR2I GetSchematicTextOffset(const RENDER_SETTINGS *aSettings) const override
This offset depends on the orientation, the type of text, and the area required to draw the associate...
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
bool AutoRotateOnPlacementSupported() const override
AutoRotateOnPlacementSupported.
Base class for any item which can be embedded within the SCHEMATIC container class,...
SCH_LAYER_ID GetLayer() const
Return the layer this item is on.
void SetLastResolvedState(const SCH_ITEM *aItem) override
const wxString & GetCachedDriverName() const override
void ViewGetLayers(int aLayers[], int &aCount) const override
Return the layers the item is drawn on (which may be more than its "home" layer)
COLOR4D m_lastResolvedColor
wxString GetShownText(const SCH_SHEET_PATH *aPath, bool aAllowExtraText, int aDepth=0) const override
void Move(const VECTOR2I &aMoveVector) override
Move the item by aMoveVector to a new position.
void AddFields(const std::vector< SCH_FIELD > &aFields)
void SetFields(const std::vector< SCH_FIELD > &aFields)
Set multiple schematic fields.
void SetIsDangling(bool aIsDangling)
void AddField(const SCH_FIELD &aField)
bool IsDangling() const override
INSPECT_RESULT Visit(INSPECTOR inspector, void *testData, const std::vector< KICAD_T > &scanTypes) override
May be re-implemented for each derived class in order to handle all the types given by its member dat...
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
bool HasCachedDriverName() const override
const std::vector< SCH_FIELD > & GetFields() const
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
void GetEndPoints(std::vector< DANGLING_END_ITEM > &aItemList) override
Add the schematic item end points to aItemList if the item has end points.
bool AutoRotateOnPlacement() const
autoRotateOnPlacement
void Rotate(const VECTOR2I &aCenter) override
Rotate the item around aCenter 90 degrees in the clockwise direction.
SCH_LABEL_BASE & operator=(const SCH_LABEL_BASE &aLabel)
std::vector< SCH_FIELD > m_fields
CONNECTION_TYPE m_connectionType
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
wxString GetShownText(bool aAllowExtraText, int aDepth=0) const override
Return the string actually shown after processing of the base text.
void SwapData(SCH_ITEM *aItem) override
Swap the internal data structures aItem with the schematic item.
SPIN_STYLE GetSpinStyle() const
void GetIntersheetRefs(std::vector< std::pair< wxString, wxString > > *pages)
Builds an array of { pageNumber, pageName } pairs.
void MirrorSpinStyle(bool aLeftRight) override
std::vector< VECTOR2I > GetConnectionPoints() const override
Add all the connection points for this item to aPoints.
COLOR4D GetLabelColor() const
void SetShape(LABEL_FLAG_SHAPE aShape)
LABEL_FLAG_SHAPE GetShape() const
const BOX2I GetBoundingBox() const override
Return the bounding box of the label including its fields.
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
virtual bool AutoRotateOnPlacementSupported() const =0
AutoRotateOnPlacementSupported.
void SetPosition(const VECTOR2I &aPosition) override
virtual bool ResolveTextVar(const SCH_SHEET_PATH *aPath, wxString *token, int aDepth) const
Resolve any references to system tokens supported by the label.
bool CanConnect(const SCH_ITEM *aItem) const override
bool m_autoRotateOnPlacement
wxString m_cached_driver_name
void Print(const RENDER_SETTINGS *aSettings, const VECTOR2I &offset) override
Print a schematic item.
int GetLabelBoxExpansion(const RENDER_SETTINGS *aSettings=nullptr) const
bool IncrementLabel(int aIncrement)
Increment the label text, if it ends with a number.
void SetAutoRotateOnPlacement(bool autoRotate=true)
setAutoRotateOnPlacement
void cacheShownText() override
void Rotate90(bool aClockwise) override
bool UpdateDanglingState(std::vector< DANGLING_END_ITEM > &aItemList, const SCH_SHEET_PATH *aPath=nullptr) override
Test the schematic item to aItemList to check if it's dangling state has changed.
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.
static const wxString GetDefaultFieldName(const wxString &aName, bool aUseDefaultName)
void AutoplaceFields(SCH_SCREEN *aScreen, bool aManual) override
void RunOnChildren(const std::function< void(SCH_ITEM *)> &aFunction) override
virtual int GetMandatoryFieldCount()
void GetContextualTextVars(wxArrayString *aVars) const
Return the list of system text vars & fields for this label.
virtual const BOX2I GetBodyBoundingBox() const
Return the bounding box of the label only, without taking in account its fields.
virtual void CreateGraphicShape(const RENDER_SETTINGS *aSettings, std::vector< VECTOR2I > &aPoints, const VECTOR2I &Pos) const
Calculate the graphic shape (a polygon) associated to the text.
std::vector< SCH_FIELD > & GetFields()
virtual wxString GetClass() const override=0
Return the class name.
VECTOR2I GetSchematicTextOffset(const RENDER_SETTINGS *aSettings) const override
This offset depends on the orientation, the type of text, and the area required to draw the associate...
virtual void SetSpinStyle(SPIN_STYLE aSpinStyle)
void Plot(PLOTTER *aPlotter, bool aBackground) const override
Plot the schematic item to aPlotter.
bool Replace(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) override
Perform a text replace using the find and replace criteria in aSearchData on items that support text ...
bool AutoRotateOnPlacementSupported() const override
AutoRotateOnPlacementSupported.
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
wxString GetClass() const override
Return the class name.
bool doIsConnected(const VECTOR2I &aPosition) const override
Provide the object specific test to see if it is connected to aPosition.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
bool IsPointClickableAnchor(const VECTOR2I &aPos) const override
const BOX2I GetBodyBoundingBox() const override
Return the bounding box of the label only, without taking in account its fields.
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
bool IsReplaceable() const override
Override this method in any derived object that supports test find and replace.
static bool ClassOf(const EDA_ITEM *aItem)
bool IsConnectable() const override
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
VECTOR2I GetPosition() const override
constexpr SPIN_STYLE(SPIN aSpin)
SPIN_STYLE MirrorX()
Mirror the label spin style across the X axis or simply swaps up and bottom.
constexpr bool operator!=(SPIN a) const
constexpr bool operator==(SPIN a) const
SPIN_STYLE MirrorY()
Mirror the label spin style across the Y axis or simply swaps left and right.
const INSPECTOR_FUNC & INSPECTOR
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.