64 if( !wxIsdigit(
name.GetChar( ii ) ) )
67 while( ii >= 0 && wxIsdigit(
name.GetChar( ii ) ) )
74 wxString litt_number =
name.Right( nn );
76 if( litt_number.ToLong( &number ) )
98 static int TemplateIN_HN[] = { 6, 0, 0, -1, -1, -2, -1, -2, 1, -1, 1, 0, 0 };
99 static int TemplateIN_HI[] = { 6, 0, 0, 1, 1, 2, 1, 2, -1, 1, -1, 0, 0 };
100 static int TemplateIN_UP[] = { 6, 0, 0, 1, -1, 1, -2, -1, -2, -1, -1, 0, 0 };
101 static int TemplateIN_BOTTOM[] = { 6, 0, 0, 1, 1, 1, 2, -1, 2, -1, 1, 0, 0 };
103 static int TemplateOUT_HN[] = { 6, -2, 0, -1, 1, 0, 1, 0, -1, -1, -1, -2, 0 };
104 static int TemplateOUT_HI[] = { 6, 2, 0, 1, -1, 0, -1, 0, 1, 1, 1, 2, 0 };
105 static int TemplateOUT_UP[] = { 6, 0, -2, 1, -1, 1, 0, -1, 0, -1, -1, 0, -2 };
106 static int TemplateOUT_BOTTOM[] = { 6, 0, 2, 1, 1, 1, 0, -1, 0, -1, 1, 0, 2 };
108 static int TemplateUNSPC_HN[] = { 5, 0, -1, -2, -1, -2, 1, 0, 1, 0, -1 };
109 static int TemplateUNSPC_HI[] = { 5, 0, -1, 2, -1, 2, 1, 0, 1, 0, -1 };
110 static int TemplateUNSPC_UP[] = { 5, 1, 0, 1, -2, -1, -2, -1, 0, 1, 0 };
111 static int TemplateUNSPC_BOTTOM[] = { 5, 1, 0, 1, 2, -1, 2, -1, 0, 1, 0 };
113 static int TemplateBIDI_HN[] = { 5, 0, 0, -1, -1, -2, 0, -1, 1, 0, 0 };
114 static int TemplateBIDI_HI[] = { 5, 0, 0, 1, -1, 2, 0, 1, 1, 0, 0 };
115 static int TemplateBIDI_UP[] = { 5, 0, 0, -1, -1, 0, -2, 1, -1, 0, 0 };
116 static int TemplateBIDI_BOTTOM[] = { 5, 0, 0, -1, 1, 0, 2, 1, 1, 0, 0 };
118 static int Template3STATE_HN[] = { 5, 0, 0, -1, -1, -2, 0, -1, 1, 0, 0 };
119 static int Template3STATE_HI[] = { 5, 0, 0, 1, -1, 2, 0, 1, 1, 0, 0 };
120 static int Template3STATE_UP[] = { 5, 0, 0, -1, -1, 0, -2, 1, -1, 0, 0 };
121 static int Template3STATE_BOTTOM[] = { 5, 0, 0, -1, 1, 0, 2, 1, 1, 0, 0 };
137 m_isDangling( false ),
151 m_shape( aText.m_shape ),
152 m_isDangling( aText.m_isDangling ),
153 m_connectionType( aText.m_connectionType ),
154 m_spin_style( aText.m_spin_style )
187 text_offset.x = -dist;
192 text_offset.y = -dist;
257 wxASSERT_MSG( 1,
"Bad spin style" );
309 auto other = static_cast<const SCH_TEXT*>( &aItem );
311 if(
GetLayer() != other->GetLayer() )
312 return GetLayer() < other->GetLayer();
320 return GetText() < other->GetText();
329 ratio = static_cast<const SCH_RENDER_SETTINGS*>( aSettings )->m_TextOffsetRatio;
363 aItemList.push_back( item );
378 for(
unsigned ii = 0; ii < aItemList.size(); ii++ )
412 wxCHECK_MSG( ii < aItemList.size(), previousState !=
m_isDangling,
413 wxT(
"Dangling end type list overflow. Bad programmer!" ) );
430 auto sch_item = static_cast<SCH_ITEM*>( item.
GetItem() );
432 sch_item->AddConnectionTo( *aPath,
this );
470 wxPoint end = rect.
GetEnd();
493 default:
return wxT(
"???" );
501 aVars->push_back( wxT(
"CONNECTION_TYPE" ) );
504 static_cast<SCH_SHEET*>(
m_parent )->GetContextualTextVars( aVars );
510 std::function<bool( wxString* )> textResolver =
511 [&]( wxString* token ) ->
bool 516 && token->IsSameAs( wxT(
"CONNECTION_TYPE" ) ) )
532 if( token->Contains(
':' ) )
550 bool processTextVars =
false;
553 if( processTextVars )
555 wxCHECK_MSG(
Schematic(), wxEmptyString,
"No parent SCHEMATIC set for SCH_TEXT!" );
604 static std::vector<wxPoint> s_poly;
617 std::vector<wxPoint> positions;
618 wxArrayString strings_list;
620 positions.reserve( strings_list.Count() );
624 for(
unsigned ii = 0; ii < strings_list.Count(); ii++ )
627 wxString& txt = strings_list.Item( ii );
671 default: msg = wxT(
"???" );
break;
676 wxString textStyle[] = {
_(
"Normal" ),
_(
"Italic" ),
_(
"Bold" ),
_(
"Bold Italic" ) };
704 conn->AppendInfoToMsgPanel( aList );
707 const wxString& netname = conn->Name(
true );
712 aList.push_back(
MSG_PANEL_ITEM(
_(
"Assigned Netclass" ), netclassName ) );
720 void SCH_TEXT::Show(
int nestLevel, std::ostream& os )
const 725 NestedSpace( nestLevel, os ) <<
'<' << s.Lower().mb_str()
726 <<
" layer=\"" <<
m_layer <<
'"' 727 <<
" shape=\"" << static_cast<int>(
m_shape ) <<
'"' 731 <<
"</" << s.Lower().mb_str() <<
">\n";
761 wxCHECK_MSG(
Schematic(),
false,
"No parent SCHEMATIC set for SCH_LABEL!" );
765 for(
const KICAD_T* p = aScanTypes; *p !=
EOT; ++p )
773 if( connection->IsType( wireTypes ) )
783 if( connection->IsType( busTypes ) )
803 wxPoint end = rect.
GetEnd();
835 m_intersheetRefsField( { 0, 0 }, 0, this )
840 SetMultilineAllowed(
false );
844 m_intersheetRefsField.SetText( wxT(
"${INTERSHEET_REFS}" ) );
853 m_intersheetRefsField( { 0, 0 }, 0, this )
855 m_intersheetRefsField = aGlobalLabel.m_intersheetRefsField;
860 m_fieldsAutoplaced = aGlobalLabel.m_fieldsAutoplaced;
890 for(
const KICAD_T* p = aFilterTypes; (stype = *p) !=
EOT; ++p )
955 wxASSERT_MSG( 1,
"Bad spin style" );
1074 wxPoint delta = old_pos - pos;
1086 wxPoint delta = old_pos - pos;
1112 wxPoint offset( -penOffset, -penOffset );
1120 offset.x = - ( labelLen + margin / 2 );
1126 offset.y = - ( labelLen + margin / 2 );
1132 offset.x = labelLen + margin /2 ;
1138 offset.y = labelLen + margin / 2;
1150 if( token->IsSameAs( wxT(
"INTERSHEET_REFS" ) ) &&
Schematic() )
1154 if( it !=
Schematic()->GetPageRefsMap().end() )
1157 std::vector<wxString> pageListCopy;
1159 pageListCopy.insert( pageListCopy.end(), it->second.begin(), it->second.end() );
1160 std::sort( pageListCopy.begin(), pageListCopy.end() );
1167 pageListCopy.front(),
1168 pageListCopy.back() ) );
1172 for(
const wxString& pageNo : pageListCopy )
1175 if( !token->IsEmpty() && token->Last() ==
',' )
1176 token->RemoveLast();
1191 static std::vector<wxPoint> s_poly;
1203 GRPoly(
nullptr, DC, s_poly.size(), &s_poly[0],
false, penWidth,
color,
color );
1220 std::vector<wxPoint>& aPoints,
const wxPoint& Pos )
1227 int x = symb_len + linewidth + 3;
1228 int y = halfSize + linewidth + 3;
1233 aPoints.emplace_back( wxPoint( 0, 0 ) );
1234 aPoints.emplace_back( wxPoint( 0, -y ) );
1235 aPoints.emplace_back( wxPoint( -x, -y ) );
1236 aPoints.emplace_back( wxPoint( -x, 0 ) );
1237 aPoints.emplace_back( wxPoint( -x, y ) );
1238 aPoints.emplace_back( wxPoint( 0, y ) );
1245 x_offset = -halfSize;
1246 aPoints[0].x += halfSize;
1250 aPoints[3].x -= halfSize;
1255 x_offset = -halfSize;
1256 aPoints[0].x += halfSize;
1257 aPoints[3].x -= halfSize;
1277 for( wxPoint& aPoint : aPoints )
1279 aPoint.x += x_offset;
1287 aPoints.push_back( aPoints[0] );
1297 int height = ( (
GetTextHeight() * 15 ) / 10 ) + penWidth + margin;
1332 EDA_RECT box( wxPoint( x, y ), wxSize( dx, dy ) );
1372 switch( aSpinStyle )
1375 wxLogWarning(
"SetLabelSpinStyle bad spin style" );
1409 wxCHECK_RET(
Schematic(),
"No parent SCHEMATIC set for SCH_LABEL!" );
1411 static std::vector <wxPoint> Poly;
1415 bool isBus = conn && conn->
IsBus();
1423 GRPoly(
nullptr, DC, Poly.size(), &Poly[0],
false, penWidth,
color,
color );
1428 std::vector<wxPoint>& aPoints,
const wxPoint& Pos )
1432 int imax = *Template;
1437 for(
int ii = 0; ii < imax; ii++ )
1440 corner.x = ( halfSize * (*Template) ) + Pos.x;
1443 corner.y = ( halfSize * (*Template) ) + Pos.y;
1446 aPoints.push_back( corner );
1497 EDA_RECT box( wxPoint( x, y ), wxSize( dx, dy ) );
1505 wxPoint text_offset;
1538 #include "sch_text_help_md.h" 1542 wxSize sz( 320, 320 );
1544 dlg->SetMinSize( dlg->ConvertDialogToPixels( sz ) );
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
void RunOnChildren(const std::function< void(SCH_ITEM *)> &aFunction) override
#define TEXT_ANGLE_HORIZ
Frequent text rotations, used with {Set,Get}TextAngle(), in 0.1 degrees for now, hoping to migrate to...
void Offset(int dx, int dy)
BITMAP_DEF GetMenuImage() const override
Return a pointer to an image to be used in menus.
static int Template3STATE_HN[]
EDA_ITEM * m_parent
Linked list: Link (parent struct)
std::map< wxString, wxString > m_NetClassAssignments
wxString MessageTextFromValue(EDA_UNITS aUnits, int aValue, bool aAddUnitLabel, EDA_DATA_TYPE aType)
Convert a value to a string using double notation.
void SwapEffects(EDA_TEXT &aTradingPartner)
Swap the text effects of the two involved instances.
static int TemplateUNSPC_HN[]
Plot settings, and plotting engines (PostScript, Gerber, HPGL and DXF)
wxPoint GetPosition() const
static int Template3STATE_HI[]
EDA_TEXT_VJUSTIFY_T GetVertJustify() const
static int TemplateUNSPC_HI[]
void Merge(const EDA_RECT &aRect)
Modify the position and size of the rectangle in order to contain aRect.
Container for project specific data.
PNG memory record (file in memory).
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject)
Holds all the data relating to one schematic A schematic may consist of one or more sheets (and one r...
SCH_SHEET * Last() const
Return a pointer to the last SCH_SHEET of the list.
static int TemplateOUT_UP[]
void ConvertMarkdown2Html(const wxString &aMarkdownInput, wxString &aHtmlOutput)
void Print(const RENDER_SETTINGS *aSettings, const wxPoint &offset) override
Print a schematic item.
void AddConnectionTo(const SCH_SHEET_PATH &aPath, SCH_ITEM *aItem)
Adds a connection link between this item and another.
LABEL_SPIN_STYLE m_spin_style
The orientation of text and any associated drawing elements of derived objects.
wxPoint GetSchematicTextOffset(const RENDER_SETTINGS *aSettings) const override
bool m_isDangling
True if not connected to another object if the object derive from SCH_TEXT supports connections.
void GRPoly(EDA_RECT *ClipBox, wxDC *DC, int n, const wxPoint *Points, bool Fill, int width, COLOR4D Color, COLOR4D BgColor)
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
static int TemplateOUT_HN[]
virtual PROJECT_FILE & GetProjectFile() const
bool HitTest(const wxPoint &aPosition, int aAccuracy=0) const override
Test if aPosition is contained within or on the bounding box of an item.
SCHEMATIC_SETTINGS & Settings() const
void SetItalic(bool isItalic)
EDA_RECT GetTextBox(int aLine=-1, bool aInvertY=false) const
Useful in multiline texts to calculate the full text or a line area (for zones filling,...
static int TemplateUNSPC_UP[]
void SetTextPos(const wxPoint &aPoint)
SCHEMATIC * Schematic() const
Searches the item hierarchy to find a SCHEMATIC.
static int TemplateIN_UP[]
const BITMAP_OPAQUE text_xpm[1]
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
double GetTextAngle() const
static int TemplateOUT_HI[]
void CreateGraphicShape(const RENDER_SETTINGS *aRenderSettings, std::vector< wxPoint > &aPoints, const wxPoint &aPos) override
Calculate the graphic shape (a polygon) associated to the text.
void SetOrigin(const wxPoint &pos)
NET_SETTINGS & NetSettings()
virtual void PlotPoly(const std::vector< wxPoint > &aCornerList, FILL_TYPE aFill, int aWidth=USE_DEFAULT_LINE_WIDTH, void *aData=NULL)=0
Draw a polygon ( filled or not )
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
static int TemplateBIDI_HI[]
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
Schematic editor (Eeschema) main window.
#define KI_FALLTHROUGH
The KI_FALLTHROUGH macro is to be used when switch statement cases should purposely fallthrough from ...
void SetTextSize(const wxSize &aNewSize)
void RotatePoint(int *pX, int *pY, double angle)
void Print(const RENDER_SETTINGS *aSettings, const wxPoint &offset) override
Print a schematic item.
const BITMAP_OPAQUE add_hierarchical_label_xpm[1]
void Plot(PLOTTER *aPlotter) override
Plot the schematic item to aPlotter.
SCH_GLOBALLABEL(const wxPoint &aPos=wxPoint(0, 0), const wxString &aText=wxEmptyString)
int GetTextThickness() const
The base class for create windows for drawing purpose.
CONNECTION_TYPE m_connectionType
virtual wxPoint GetSchematicTextOffset(const RENDER_SETTINGS *aSettings) const
const BITMAP_OPAQUE add_line_label_xpm[1]
bool Contains(const wxPoint &aPoint) const
FIELDS_AUTOPLACED m_fieldsAutoplaced
static int Template3STATE_BOTTOM[]
const INSPECTOR_FUNC & INSPECTOR
search types array terminator (End Of Types)
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
void MirrorSpinStyle(bool aLeftRight) override
virtual void SetParent(EDA_ITEM *aParent)
int GetEffectiveTextPenWidth(int aDefaultWidth=0) const
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultWidth.
BITMAP_DEF GetMenuImage() const override
Return a pointer to an image to be used in menus.
int GetTextHeight() const
virtual void Text(const wxPoint &aPos, const COLOR4D aColor, const wxString &aText, double aOrient, const wxSize &aSize, enum EDA_TEXT_HJUSTIFY_T aH_justify, enum EDA_TEXT_VJUSTIFY_T aV_justify, int aWidth, bool aItalic, bool aBold, bool aMultilineAllowed=false, void *aData=NULL)
Draws text with the plotter.
SCH_CONNECTION * Connection(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve the connection associated with this object in the given sheet.
bool TestSegmentHit(const wxPoint &aRefPoint, wxPoint aStart, wxPoint aEnd, int aDist)
Test if aRefPoint is with aDistance on the line defined by aStart and aEnd.
static int TemplateIN_BOTTOM[]
int GetPenWidth() const override
No connection to this item.
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
void CreateGraphicShape(const RENDER_SETTINGS *aSettings, std::vector< wxPoint > &aPoints, const wxPoint &Pos) override
Calculate the graphic shape (a polygon) associated to the text.
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
static int TemplateOUT_BOTTOM[]
void GetContextualTextVars(wxArrayString *aVars) const
Returns the set of contextual text variable tokens for this text item.
const wxPoint GetEnd() const
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
int LenSize(const wxString &aLine, int aThickness) const
bool m_IntersheetRefsShow
bool ResolveTextVar(wxString *token, int aDepth) const
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
EDA_TEXT_HJUSTIFY_T GetHorizJustify() const
virtual void SetText(const wxString &aText)
#define DANGLING_SYMBOL_SIZE
wxPoint GetSchematicTextOffset(const RENDER_SETTINGS *aSettings) const override
const wxPoint GetOrigin() const
void SetEnd(int x, int y)
static int TemplateIN_HI[]
const wxSize & GetTextSize() const
void SetVertJustify(EDA_TEXT_VJUSTIFY_T aType)
static int Template3STATE_UP[]
bool IncrementLabel(int aIncrement)
Increment the label text, if it ends with a number.
bool ResolveCrossReference(wxString *token, int aDepth) const
Resolves text vars that refer to other items.
Helper dialog and control classes.
wxString ShortenedShownText() const
Returns a shortened version (max 15 characters) of the shown text.
virtual void CreateGraphicShape(const RENDER_SETTINGS *aSettings, std::vector< wxPoint > &aPoints, const wxPoint &Pos)
Calculate the graphic shape (a polygon) associated to the text.
EDA_ITEM * GetItem() const
static int TemplateBIDI_HN[]
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
void SetLabelSpinStyle(LABEL_SPIN_STYLE aSpinStyle) override
Set a spin or rotation angle, along with specific horizontal and vertical justification styles with e...
NET_SETTINGS stores various net-related settings in a project context.
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
wxString m_IntersheetRefsSuffix
virtual bool IsType(const KICAD_T aScanTypes[]) const
Check whether the item is one of the listed types.
void GetEndPoints(std::vector< DANGLING_END_ITEM > &aItemList) override
Add the schematic item end points to aItemList if the item has end points.
wxDC * GetPrintDC() const
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
LABEL_SPIN_STYLE GetLabelSpinStyle() const
int GetTextOffset(const RENDER_SETTINGS *aSettings=nullptr) const
SEARCH_RESULT Visit(INSPECTOR inspector, void *testData, const KICAD_T scanTypes[]) override
May be re-implemented for each derived class in order to handle all the types given by its member dat...
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
void UpdateIntersheetRefProps()
wxString GetShownText(int aDepth=0) const override
Return the string actually shown after processing of the base text.
wxPoint GetPosition() const override
void Print(const RENDER_SETTINGS *aSettings, const wxPoint &offset) override
Print a schematic item.
std::unordered_map< SCH_SHEET_PATH, SCH_ITEM_SET > m_connected_items
Stores pointers to other items that are connected to this one, per sheet.
void SetMultilineAllowed(bool aAllow)
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
bool IsMultilineAllowed() const
static int TemplateBIDI_BOTTOM[]
This item represents a net.
void wxStringSplit(const wxString &aText, wxArrayString &aStrings, wxChar aSplitter)
Split aString to a string list separated at aSplitter.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
PROJECT & Prj() const override
Return a reference to the project this schematic is part of.
virtual void Rotate90(bool aClockwise)
SCH_LAYER_ID GetLayer() const
Return the layer this item is on.
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
wxHtmlWindow * m_htmlWindow
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
void ShowModeless()
Show a modeless version of the dialog (without an OK button).
void SetDialogSizeInDU(int aWidth, int aHeight)
set the dialog size, using a "logical" value.
void Normalize()
Ensures that the height ant width are positive.
const BITMAP_OPAQUE add_glabel_xpm[1]
SCH_FIELD * GetIntersheetRefs()
Base plotter engine class.
bool operator<(const SCH_ITEM &aItem) const override
static HTML_MESSAGE_BOX * ShowSyntaxHelp(wxWindow *aParentWindow)
void SwapText(EDA_TEXT &aTradingPartner)
void Plot(PLOTTER *aPlotter) override
Plot the schematic item to aPlotter.
void Print(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset, COLOR4D aColor, OUTLINE_MODE aDisplay_mode=FILLED)
Print this text object to the device context aDC.
RENDER_SETTINGS * RenderSettings()
static int TemplateBIDI_UP[]
SCH_FIELD m_intersheetRefsField
void Plot(PLOTTER *aPlotter) override
Plot the schematic item to aPlotter.
std::vector< wxPoint > GetConnectionPoints() const override
Add all the connection points for this item to aPoints.
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
void SetHorizJustify(EDA_TEXT_HJUSTIFY_T aType)
void SwapData(SCH_ITEM *aItem) override
Swap the internal data structures aItem with the schematic item.
wxString UnescapeString(const wxString &aSource)
void Rotate(wxPoint aPosition) override
Rotate the item around aPosition 90 degrees in the clockwise direction.
virtual wxString GetClass() const override
Return the class name.
static DIRECTION_45::AngleType angle(const VECTOR2I &a, const VECTOR2I &b)
BITMAP_DEF GetMenuImage() const override
Return a pointer to an image to be used in menus.
Handle the component boundary box.
DANGLING_END_T GetType() const
T MIRRORVAL(T aPoint, T aMirrorRef)
Returns the mirror of aPoint relative to the aMirrorRef.
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
static int * TemplateShape[5][4]
A base class for most all the KiCad significant classes used in schematics and boards.
void AutoplaceFields(SCH_SCREEN *aScreen, bool aManual) override
These settings were stored in SCH_BASE_FRAME previously.
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.
std::vector< MSG_PANEL_ITEM > MSG_PANEL_ITEMS
bool Intersects(const EDA_RECT &aRect) const
Test for a common area between rectangles.
void GetLinePositions(std::vector< wxPoint > &aPositions, int aLineCount) const
Populate aPositions with the position of each line of a multiline text, according to the vertical jus...
const EDA_RECT GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
std::map< wxString, std::set< wxString > > & GetPageRefsMap()
SCH_RENDER_SETTINGS Stores schematic-specific render settings.
wxString getElectricalTypeLabel(PINSHEETLABEL_SHAPE aType)
int GetDefaultPenWidth() const
const wxPoint & GetTextPos() const
PINSHEETLABEL_SHAPE m_shape
int GetMinPenWidth() const
void SetTextThickness(int aWidth)
The TextThickness is that set by the user.
virtual void MirrorSpinStyle(bool aLeftRight)
Helper class used to store the state of schematic items that can be connected to other schematic item...
bool ResolveTextVar(wxString *token, int aDepth=0) const
Resolve any references to system tokens supported by the sheet.
virtual void SetTextAngle(double aAngle)
void SetLabelSpinStyle(LABEL_SPIN_STYLE aSpinStyle) override
Set a spin or rotation angle, along with specific horizontal and vertical justification styles with e...
bool IsType(const KICAD_T aScanTypes[]) const override
Check whether the item is one of the listed types.
SCH_HIERLABEL(const wxPoint &aPos=wxPoint(0, 0), const wxString &aText=wxEmptyString, KICAD_T aType=SCH_HIER_LABEL_T)
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
EDA_MSG_ITEM is used EDA_MSG_PANEL as the item type for displaying messages.
static int TemplateUNSPC_BOTTOM[]
virtual void SetLabelSpinStyle(LABEL_SPIN_STYLE aSpinStyle)
Set a spin or rotation angle, along with specific horizontal and vertical justification styles with e...
SCH_SHEET_PATH & CurrentSheet() const override
wxString GetSelectMenuText(EDA_UNITS aUnits) const override
Return the text to display to be used in the selection clarification context menu when multiple items...
Message panel definition file.
void Print(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset) override
Print a schematic item.
BITMAP_DEF GetMenuImage() const override
Return a pointer to an image to be used in menus.
void Rotate90(bool aClockwise) override
SCH_TEXT(const wxPoint &aPos=wxPoint(0, 0), const wxString &aText=wxEmptyString, KICAD_T aType=SCH_TEXT_T)
void SetPosition(const wxPoint &aPosition) override
SCH_LABEL(const wxPoint &aPos=wxPoint(0, 0), const wxString &aText=wxEmptyString)
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.
void Rotate(wxPoint aPosition) override
Rotate the item around aPosition 90 degrees in the clockwise direction.
virtual wxString GetShownText(int aDepth=0) const
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.
#define DEFAULT_TEXT_OFFSET_RATIO
The offset of the pin name string from the end of the pin in mils.
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
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.
This item represents a bus vector.
bool IncrementLabelMember(wxString &name, int aIncrement)
EDA_RECT & Inflate(wxCoord dx, wxCoord dy)
Inflate the rectangle horizontally by dx and vertically by dy.
static int TemplateIN_HN[]
wxString m_IntersheetRefsPrefix
PINSHEETLABEL_SHAPE GetShape() const
KICAD_T Type() const
Returns the type of object.
bool m_IntersheetRefsFormatShort
virtual void SetCurrentLineWidth(int width, void *aData=NULL)=0
Set the line width for the next drawing.
A color representation with 4 components: red, green, blue, alpha.