32class NETLIST_OBJECT_LIST;
61 return wxT(
"SCH_LINE" );
74 bool IsType(
const std::vector<KICAD_T>& aScanTypes )
const override
79 for(
KICAD_T scanType : aScanTypes )
171 void SetLineColor(
const double r,
const double g,
const double b,
const double a );
194 return style_a == style_b
195 || ( style_a == LINE_STYLE::DEFAULT && style_b == LINE_STYLE::SOLID )
196 || ( style_a == LINE_STYLE::SOLID && style_b == LINE_STYLE::DEFAULT );
199 void ViewGetLayers(
int aLayers[],
int& aCount )
const override;
255 void GetEndPoints( std::vector<DANGLING_END_ITEM>& aItemList )
override;
290 bool HitTest(
const VECTOR2I& aPosition,
int aAccuracy = 0 )
const override;
291 bool HitTest(
const BOX2I& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
306 void Show(
int nestLevel, std::ostream& os )
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.
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.
Hold a (potentially large) number of VIEW_ITEMs and renders them on a graphics device provided by the...
Base plotter engine class.
Base class for any item which can be embedded within the SCHEMATIC container class,...
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
Segment description base class to describe items which have 2 end points (track, wire,...
int GetPenWidth() const override
void Rotate(const VECTOR2I &aCenter) override
Rotate the item around aCenter 90 degrees in the clockwise direction.
bool doIsConnected(const VECTOR2I &aPosition) const override
Provide the object specific test to see if it is connected to aPosition.
void GetEndPoints(std::vector< DANGLING_END_ITEM > &aItemList) override
Add the schematic item end points to aItemList if the item has end points.
void SetStartPoint(const VECTOR2I &aPosition)
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.
void SetOperatingPoint(const wxString &aText)
bool m_startIsDangling
True if start point is not connected.
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
bool IsPointClickableAnchor(const VECTOR2I &aPos) const override
void SetPosition(const VECTOR2I &aPosition) override
void StoreAngle()
Saves the current line angle.
std::vector< VECTOR2I > GetConnectionPoints() const override
Add all the connection points for this item to aPoints.
int GetReverseAngleFrom(const VECTOR2I &aPoint) const
double ViewGetLOD(int aLayer, KIGFX::VIEW *aView) const override
Return the level of detail (LOD) of the item.
virtual bool HasLineStroke() const override
Check if this schematic item has line stoke properties.
bool IsWire() const
Return true if the line is a wire.
bool IsStartDangling() const
SCH_LINE(const VECTOR2D &pos, int layer=LAYER_NOTES)
void RotateEnd(const VECTOR2I &aCenter)
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
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 SetLineColor(const COLOR4D &aColor)
bool CanConnect(const SCH_ITEM *aItem) const override
EDA_ANGLE GetStoredAngle() const
Returns the angle stored by StoreAngle()
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider) const override
Return a user-visible description string of this item.
bool IsParallel(const SCH_LINE *aLine) const
void SetLineWidth(const int aSize)
void RotateStart(const VECTOR2I &aCenter)
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
virtual STROKE_PARAMS GetStroke() const override
int GetAngleFrom(const VECTOR2I &aPoint) const
void GetSelectedPoints(std::vector< VECTOR2I > &aPoints) const
COLOR4D m_lastResolvedColor
LINE_STYLE GetEffectiveLineStyle() const
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.
EDA_ANGLE Angle() const
Gets the angle between the start and end lines.
wxString m_operatingPoint
wxString GetClass() const override
Return the class name.
static bool ClassOf(const EDA_ITEM *aItem)
VECTOR2I GetMidPoint() const
VECTOR2I GetEndPoint() const
VECTOR2I GetStartPoint() const
bool ConnectionPropagatesTo(const EDA_ITEM *aItem) const override
Return true if this item should propagate connection info to aItem.
LINE_STYLE m_lastResolvedLineStyle
VECTOR2I GetPosition() const override
bool IsEndDangling() const
SCH_LINE * MergeOverlap(SCH_SCREEN *aScreen, SCH_LINE *aLine, bool aCheckJunctions)
Check line against aLine to see if it overlaps and merge if it does.
VECTOR2I m_start
Line start point.
bool IsBus() const
Return true if the line is a bus.
void StoreAngle(const EDA_ANGLE &aAngle)
void SetLineStyle(const LINE_STYLE aStyle)
VECTOR2I m_end
Line end point.
void Move(const VECTOR2I &aMoveVector) override
Move the item by aMoveVector to a new position.
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.
LINE_STYLE GetLineStyle() const
void MoveEnd(const VECTOR2I &aMoveVector)
VECTOR2I GetSortPosition() const override
Return the coordinates that should be used for sorting this element visually compared to other elemen...
STROKE_PARAMS m_stroke
Line stroke properties.
EDA_ANGLE m_storedAngle
Stored angle.
bool m_endIsDangling
True if end point is not connected.
void SwapData(SCH_ITEM *aItem) override
Swap the internal data structures aItem with the schematic item.
bool IsConnectable() const override
wxString GetFriendlyName() const override
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
bool operator==(const SCH_ITEM &aOther) const override
bool operator<(const SCH_ITEM &aItem) const override
virtual void SetStroke(const STROKE_PARAMS &aStroke) override
void Print(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset) override
Print a schematic item.
wxString GetNetname(const SCH_SHEET_PATH &aSheet)
This function travel though all the connected wire segments to look for connected labels.
bool IsEndPoint(const VECTOR2I &aPoint) const
bool IsStrokeEquivalent(const SCH_LINE *aLine)
void SetLastResolvedState(const SCH_ITEM *aItem) override
bool IsGraphicLine() const
Return if the line is a graphic (non electrical line)
void Plot(PLOTTER *aPlotter, bool aBackground, const SCH_PLOT_SETTINGS &aPlotSettings) const override
Plot the schematic item to aPlotter.
static enum wxPenStyle PenStyle[]
COLOR4D GetLineColor() const
Returns COLOR4D::UNSPECIFIED if a custom color hasn't been set for this line.
void MoveStart(const VECTOR2I &aMoveVector)
SCH_LINE * BreakAt(const VECTOR2I &aPoint)
Break this segment into two at the specified point.
bool IsOrthogonal() const
Checks if line is orthogonal (to the grid).
wxString FindWireSegmentNetNameRecursive(SCH_LINE *line, std::list< const SCH_LINE * > &checkedLines, const SCH_SHEET_PATH &aSheet) const
Recursively called function to travel through the connected wires and find a connected net name label...
void SetEndPoint(const VECTOR2I &aPosition)
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
bool IsDangling() const override
const wxString & GetOperatingPoint() const
double Similarity(const SCH_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Simple container to manage line stroke parameters.
LINE_STYLE GetLineStyle() const
KIGFX::COLOR4D GetColor() const
LINE_STYLE
Dashed line types.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
@ SCH_ITEM_LOCATE_GRAPHIC_LINE_T