30 class NETLIST_OBJECT_LIST;
52 SCH_LINE( wxPoint( pos.x, pos.y ), layer )
66 return wxT(
"SCH_LINE" );
74 for(
const KICAD_T* p = aScanTypes; *p !=
EOT; ++p )
120 void SetLineColor(
const double r,
const double g,
const double b,
const double a );
142 return style_a == style_b
158 void ViewGetLayers(
int aLayers[],
int& aCount )
const override;
171 void Move(
const wxPoint& aMoveVector )
override;
172 void MoveStart(
const wxPoint& aMoveVector );
173 void MoveEnd(
const wxPoint& aMoveVector );
177 void Rotate( wxPoint aPosition )
override;
208 void GetEndPoints( std::vector<DANGLING_END_ITEM>& aItemList )
override;
232 void SetPosition(
const wxPoint& aPosition )
override;
240 bool HitTest(
const wxPoint& aPosition,
int aAccuracy = 0 )
const override;
241 bool HitTest(
const EDA_RECT& aRect,
bool aContained,
int aAccuracy = 0 )
const override;
252 void Show(
int nestLevel, std::ostream& os )
const override;
277 bool doIsConnected(
const wxPoint& aPosition )
const override;
281 #endif // _SCH_LINE_H_ void Rotate(wxPoint aPosition) override
Rotate the item around aPosition 90 degrees in the clockwise direction.
void GetEndPoints(std::vector< DANGLING_END_ITEM > &aItemList) override
Add the schematic item end points to aItemList if the item has end points.
static const char * GetLineStyleName(PLOT_DASH_TYPE aStyle)
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.
COLOR4D GetLineColor() const
Returns COLOR4D::UNSPECIFIED if a custom color hasn't been set for this line.
wxString GetClass() const override
Return the class name.
bool IsGraphicLine() const
Returns if the line is a graphic (non electrical line)
PNG memory record (file in memory).
bool IsStrokeEquivalent(const SCH_LINE *aLine)
wxPoint GetStartPoint() const
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
bool IsWire() const
Returns true if the line is a wire.
bool m_endIsDangling
True if end point is not connected.
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
virtual bool HasLineStroke() const override
Check if this schematic item has line stoke properties.
void SetLineWidth(const int aSize)
void RotateEnd(wxPoint aPosition)
void MoveStart(const wxPoint &aMoveVector)
void Plot(PLOTTER *aPlotter) override
Plot the schematic item to aPlotter.
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.
bool CanConnect(const SCH_ITEM *aItem) const override
The base class for create windows for drawing purpose.
static bool ClassOf(const EDA_ITEM *aItem)
void ViewGetLayers(int aLayers[], int &aCount) const override
Return the layers the item is drawn on (which may be more than its "home" layer)
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
search types array terminator (End Of Types)
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is contained within or on the bounding box of an item.
void RotateStart(wxPoint aPosition)
bool UsesDefaultStroke() const
Test if the SCH_LINE object uses the default stroke settings.
void Move(const wxPoint &aMoveVector) override
Move the item by aMoveVector to a new position.
void SetEndPoint(const wxPoint &aPosition)
bool IsConnectable() const override
PLOT_DASH_TYPE GetDefaultStyle() const
void SetLineStyle(const PLOT_DASH_TYPE aStyle)
BITMAP_DEF GetMenuImage() const override
Return a pointer to an image to be used in menus.
PLOT_DASH_TYPE GetLineStyle() const
bool IsEndDangling() const
void SetStartPoint(const wxPoint &aPosition)
bool m_startIsDangling
True if start point is not connected.
int GetPenWidth() const override
PLOT_DASH_TYPE GetPlotStyle() const
virtual bool IsType(const KICAD_T aScanTypes[]) const
Check whether the item is one of the listed types.
bool IsDangling() const override
void SetLineColor(const COLOR4D &aColor)
bool IsEndPoint(const wxPoint &aPoint) const
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
bool doIsConnected(const wxPoint &aPosition) const override
Provide the object specific test to see if it is connected to aPosition.
void GetSelectedPoints(std::vector< wxPoint > &aPoints) const
static PLOT_DASH_TYPE GetLineStyleByName(const wxString &aStyleName)
wxPoint m_end
Line end point.
void SwapData(SCH_ITEM *aItem) override
Swap the internal data structures aItem with the schematic item.
STROKE_PARAMS m_stroke
Line stroke properties.
PLOT_DASH_TYPE
Dashed line types.
Base plotter engine class.
virtual void SetStroke(const STROKE_PARAMS &aStroke) override
PLOT_DASH_TYPE GetEffectiveLineStyle() const
static enum wxPenStyle PenStyle[]
Segment description base class to describe items which have 2 end points (track, wire,...
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
void MoveEnd(const wxPoint &aMoveVector)
bool operator<(const SCH_ITEM &aItem) const override
Simple container to manage line stroke parameters.
wxPoint GetPosition() const override
void Print(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset) override
Print a schematic item.
bool IsStartDangling() const
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
Handle the component boundary box.
A base class for most all the KiCad significant classes used in schematics and boards.
virtual STROKE_PARAMS GetStroke() const 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.
bool IsParallel(const SCH_LINE *aLine) const
bool IsSameQuadrant(const SCH_LINE *aLine, const wxPoint &aPosition) const
Check if two lines are in the same quadrant as each other, using a reference point as the origin.
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
bool IsPointClickableAnchor(const wxPoint &aPos) const override
void SetPosition(const wxPoint &aPosition) override
bool IsType(const KICAD_T aScanTypes[]) const override
Check whether the item is one of the listed types.
Base class for any item which can be embedded within the SCHEMATIC container class,...
wxPoint m_start
Line start point.
bool IsBus() const
Returns true if the line is a bus.
SCH_LINE(const wxPoint &pos=wxPoint(0, 0), int layer=LAYER_NOTES)
std::vector< wxPoint > GetConnectionPoints() const override
Add all the connection points for this item to aPoints.
KICAD_T Type() const
Returns the type of object.
A color representation with 4 components: red, green, blue, alpha.
SCH_LINE(const VECTOR2D &pos, int layer=LAYER_NOTES)
wxPoint GetEndPoint() const