78 wxString::Format( wxT(
"SCH_SHEET_PIN object cannot swap data with %s object." ),
83 int tmp =
pin->GetNumber();
109 wxASSERT( aNumber >= 2 );
163 if( sheet ==
nullptr )
166 int leftSide = sheet->
m_pos.x;
168 int topSide = sheet->
m_pos.y;
173 sheetEdge.
Append( leftSide, topSide );
174 sheetEdge.
Append( rightSide, topSide );
175 sheetEdge.
Append( rightSide, botSide );
176 sheetEdge.
Append( leftSide, botSide );
177 sheetEdge.
Append( leftSide, topSide );
185 default: wxASSERT(
"Invalid segment number" );
215 wxASSERT(
"Undefined sheet side" );
253 wxPoint
delta = pt - aCenter;
303 std::vector<wxPoint>& aPoints,
const wxPoint& aPos )
const 327 aItemList.push_back( item );
355 void SCH_SHEET_PIN::Show(
int nestLevel, std::ostream& os )
const 358 NestedSpace( nestLevel, os ) <<
'<' <<
GetClass().Lower().mb_str() <<
">" 360 <<
'"' <<
"/>\n" << std::flush;
Plot settings, and plotting engines (PostScript, Gerber, HPGL and DXF)
static SHEET_SIDE GetOppositeSide(SHEET_SIDE aSide)
SCH_SHEET * GetParent() const
Get the parent sheet object of this sheet pin.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
SCH_SHEET_PIN(SCH_SHEET *parent, const wxPoint &pos=wxPoint(0, 0), const wxString &text=wxEmptyString)
#define DEFAULT_LINE_WIDTH_MILS
The default wire width in mils. (can be changed in preference menu)
void SetSide(SHEET_SIDE aEdge)
bool m_isDangling
True if not connected to another object if the object derive from SCH_TEXT supports connections.
SCHEMATIC_SETTINGS & Settings() const
void SetTextPos(const wxPoint &aPoint)
SCHEMATIC * Schematic() const
Searches the item hierarchy to find a SCHEMATIC.
wxString GetClass() const override
Return the class name.
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
void RotatePoint(int *pX, int *pY, double angle)
void Print(const RENDER_SETTINGS *aSettings, const wxPoint &offset) override
Print a schematic item.
void CreateGraphicShape(const RENDER_SETTINGS *aSettings, std::vector< wxPoint > &aPoints, const wxPoint &aPos) const override
Calculate the graphic shape (a polygon) associated to the text.
bool Contains(const wxPoint &aPoint) const
virtual void SetParent(EDA_ITEM *aParent)
void Append(int aX, int aY, bool aAllowDuplication=false)
Append a new point at the end of the line chain.
void Rotate(const wxPoint &aCenter) override
Rotate the item around aCenter 90 degrees in the clockwise direction.
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
SHEET_SIDE GetSide() const
void Print(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset) override
Print a schematic item.
wxString ShortenedShownText() const
Returns a shortened version (max 15 characters) of the shown text.
void SetLabelSpinStyle(LABEL_SPIN_STYLE aSpinStyle) override
Set a spin or rotation angle, along with specific horizontal and vertical justification styles with e...
void CreateGraphicShape(const RENDER_SETTINGS *aSettings, std::vector< wxPoint > &aPoints, const wxPoint &aPos) const override
Calculate the graphic shape (a polygon) associated to the text.
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Define a sheet pin (label) used in sheets to create hierarchical schematics.
int GetNumber() const
Get the sheet label number.
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
void ConstrainOnEdge(wxPoint Pos)
Adjust label position to edge based on proximity to vertical or horizontal edge of the parent sheet.
int GetPenWidth() const override
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
int NearestSegment(const VECTOR2I &aP) const
Find the segment nearest the given point.
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
void SetNumber(int aNumber)
Set the sheet label number.
BITMAPS
A list of all bitmap identifiers.
void GetEndPoints(std::vector< DANGLING_END_ITEM > &aItemList) override
Add the schematic item end points to aItemList if the item has end points.
int m_number
Label number use for saving sheet label to file.
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
bool IsVerticalOrientation() const
void SwapData(SCH_ITEM *aItem) override
Swap the internal data structures aItem with the schematic item.
Handle the component boundary box.
bool operator==(const SCH_SHEET_PIN *aPin) const
A base class for most all the KiCad significant classes used in schematics and boards.
void SwapData(SCH_ITEM *aItem) override
Swap the internal data structures aItem with the schematic item.
virtual wxString GetClass() const override
Return the class name.
const wxPoint & GetTextPos() const
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
PINSHEETLABEL_SHAPE m_shape
SHEET_SIDE
Define the edge of the sheet that the sheet pin is positioned.
Helper class used to store the state of schematic items that can be connected to other schematic item...
Base class for any item which can be embedded within the SCHEMATIC container class,...
virtual const wxString & GetText() const
Return the string associated with the text object.
EDA_RECT & Inflate(wxCoord dx, wxCoord dy)
Inflate the rectangle horizontally by dx and vertically by dy.
KICAD_T Type() const
Returns the type of object.