246    auto other = 
static_cast<const SCH_TEXT*
>( &aItem );
 
  248    if( 
GetLayer() != other->GetLayer() )
 
  249        return GetLayer() < other->GetLayer();
 
  260    return GetText() < other->GetText();
 
 
  323        sheet = aPath->
Last();
 
  325        sheet = schematic->CurrentSheet().Last();
 
  327    std::function<bool( wxString* )> textResolver =
 
  328            [&]( wxString* token ) -> 
bool 
  332                    if( sch_symbol->ResolveTextVar( aPath, token, aDepth + 1 ) )
 
  337                    if( lib_symbol->ResolveTextVar( token, aDepth + 1 ) )
 
  358    if( 
text.Contains( wxT( 
"@{" ) ) )
 
 
  368                 wxT( 
"Calling a hypertext menu on a SCH_TEXT with no hyperlink?" ) );
 
 
  377    return wxString::Format( 
_( 
"Graphic Text '%s'" ),
 
 
  444                     int aUnit, 
int aBodyStyle, 
const VECTOR2I& aOffset, 
bool aDimmed )
 
  457        if( connection && connection->
IsBus() )
 
  475    penWidth = std::max( penWidth, renderSettings->
GetMinPenWidth() );
 
  522            int      adjust = 
KiROUND( sizeDiff * 0.4 );
 
  523            VECTOR2I adjust_offset( 0, - adjust );
 
  526            text_offset += adjust_offset;
 
  529        std::vector<VECTOR2I> positions;
 
  530        wxArrayString strings_list;
 
  532        positions.reserve( strings_list.Count() );
 
  538        for( 
unsigned ii = 0; ii < strings_list.Count(); ii++ )
 
  540            VECTOR2I  textpos = positions[ii] + text_offset;
 
  541            wxString& txt = strings_list.Item( ii );
 
 
  561        aList.emplace_back( 
_( 
"Exclude from" ), 
_( 
"Simulation" ) );
 
  563    aList.emplace_back( 
_( 
"Font" ), 
GetFont() ? 
GetFont()->GetName() : 
_( 
"Default" ) );
 
  565    wxString textStyle[] = { 
_( 
"Normal" ), 
_( 
"Italic" ), 
_( 
"Bold" ), 
_( 
"Bold Italic" ) };
 
  567    aList.emplace_back( 
_( 
"Style" ), textStyle[style] );
 
  581        aList.emplace_back( 
_( 
"H Justification" ), msg );
 
  591        aList.emplace_back( 
_( 
"V Justification" ), msg );
 
  595        aList.emplace_back( 
_( 
"Justification" ), msg );
 
 
  675void SCH_TEXT::Show( 
int nestLevel, std::ostream& os )
 const 
  680    NestedSpace( nestLevel, os ) << 
'<' << s.Lower().mb_str()
 
  681                                 << 
" layer=\"" << 
m_layer << 
'"' 
  684                                 << 
"</" << s.Lower().mb_str() << 
">\n";
 
  708                _HKI( 
"Text Properties" ) );
 
 
 
constexpr EDA_IU_SCALE schIUScale
 
BITMAPS
A list of all bitmap identifiers.
 
constexpr BOX2I KiROUND(const BOX2D &aBoxD)
 
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
 
constexpr BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
 
constexpr const Vec GetEnd() const
 
constexpr void SetOrigin(const Vec &pos)
 
constexpr BOX2< Vec > & Normalize()
Ensure that the height and width are positive.
 
constexpr size_type GetWidth() const
 
constexpr Vec Centre() const
 
constexpr size_type GetHeight() const
 
constexpr bool Contains(const Vec &aPoint) const
 
constexpr const Vec & GetOrigin() const
 
constexpr void SetEnd(coord_type x, coord_type y)
 
constexpr bool Intersects(const BOX2< Vec > &aRect) const
 
static const COLOR4D WHITE
 
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
 
The base class for create windows for drawing purpose.
 
KICAD_T Type() const
Returns the type of object.
 
EDA_ITEM * m_parent
Owner.
 
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
 
int GetTextHeight() const
 
const VECTOR2I & GetTextPos() const
 
COLOR4D GetTextColor() const
 
const EDA_ANGLE & GetTextAngle() const
 
virtual const wxString & GetText() const
Return the string associated with the text object.
 
virtual bool IsVisible() const
 
void SetTextPos(const VECTOR2I &aPoint)
 
KIFONT::FONT * GetFont() const
 
virtual EDA_ANGLE GetDrawRotation() const
 
wxString m_hyperlink
A hyperlink URL.
 
BOX2I GetTextBox(const RENDER_SETTINGS *aSettings, int aLine=-1) const
Useful in multiline texts to calculate the full text or a line area (for zones filling,...
 
virtual bool HasHyperlink() const
 
void SetVertJustify(GR_TEXT_V_ALIGN_T aType)
 
wxString GetHyperlink() const
 
GR_TEXT_H_ALIGN_T GetHorizJustify() const
 
bool HasTextVars() const
Indicates the ShownText has text var references which need to be processed.
 
EDA_TEXT(const EDA_IU_SCALE &aIuScale, const wxString &aText=wxEmptyString)
 
double Similarity(const EDA_TEXT &aOther) const
 
wxString EvaluateText(const wxString &aText) const
 
const TEXT_ATTRIBUTES & GetAttributes() const
 
int GetEffectiveTextPenWidth(int aDefaultPenWidth=0) const
The EffectiveTextPenWidth uses the text thickness if > 1 or aDefaultPenWidth.
 
void SwapAttributes(EDA_TEXT &aTradingPartner)
Swap the text attributes of the two involved instances.
 
void GetLinePositions(const RENDER_SETTINGS *aSettings, std::vector< VECTOR2I > &aPositions, int aLineCount) const
Populate aPositions with the position of each line of a multiline text, according to the vertical jus...
 
GR_TEXT_V_ALIGN_T GetVertJustify() const
 
virtual wxString GetShownText(bool aAllowExtraText, int aDepth=0) const
Return the string actually shown after processing of the base text.
 
virtual void SetTextAngle(const EDA_ANGLE &aAngle)
 
void SwapText(EDA_TEXT &aTradingPartner)
 
bool operator==(const EDA_TEXT &aRhs) const
 
void SetMultilineAllowed(bool aAllow)
 
VECTOR2I GetTextSize() const
 
void SetHorizJustify(GR_TEXT_H_ALIGN_T aType)
 
FONT is an abstract base class for both outline and stroke fonts.
 
static FONT * GetFont(const wxString &aFontName=wxEmptyString, bool aBold=false, bool aItalic=false, const std::vector< wxString > *aEmbeddedFiles=nullptr, bool aForDrawingSheet=false)
 
virtual bool IsOutline() 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.
 
int GetDefaultPenWidth() const
 
int GetMinPenWidth() const
 
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
 
Base plotter engine class.
 
RENDER_SETTINGS * RenderSettings()
 
virtual void HyperlinkBox(const BOX2I &aBox, const wxString &aDestinationURL)
Create a clickable hyperlink with a rectangular click area.
 
bool GetColorMode() const
 
virtual void SetCurrentLineWidth(int width, void *aData=nullptr)=0
Set the line width for the next drawing.
 
virtual void PlotText(const VECTOR2I &aPos, const COLOR4D &aColor, const wxString &aText, const TEXT_ATTRIBUTES &aAttributes, KIFONT::FONT *aFont=nullptr, const KIFONT::METRICS &aFontMetrics=KIFONT::METRICS::Default(), void *aData=nullptr)
 
Provide class metadata.Helper macro to map type hashes to names.
 
void InheritsAfter(TYPE_ID aDerived, TYPE_ID aBase)
Declare an inheritance relationship between types.
 
void Mask(TYPE_ID aDerived, TYPE_ID aBase, const wxString &aName)
Sets a base class property as masked in a derived class.
 
static PROPERTY_MANAGER & Instance()
 
PROPERTY_BASE & AddProperty(PROPERTY_BASE *aProperty, const wxString &aGroup=wxEmptyString)
Register a property.
 
void AddTypeCast(TYPE_CAST_BASE *aCast)
Register a type converter.
 
Holds all the data relating to one schematic.
 
SCHEMATIC_SETTINGS & Settings() const
 
SCH_SHEET_PATH & CurrentSheet() const
 
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
 
Base class for any item which can be embedded within the SCHEMATIC container class,...
 
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.
 
SCH_RENDER_SETTINGS * getRenderSettings(PLOTTER *aPlotter) const
 
SCHEMATIC * Schematic() const
Search the item hierarchy to find a SCHEMATIC.
 
SCH_LAYER_ID GetLayer() const
Return the layer this item is on.
 
virtual int compare(const SCH_ITEM &aOther, int aCompareFlags=0) const
Provide the draw object specific comparison called by the == and < operators.
 
const wxString & GetDefaultFont(const RENDER_SETTINGS *aSettings) const
 
SCH_ITEM(EDA_ITEM *aParent, KICAD_T aType, int aUnit=0, int aBodyStyle=0)
 
SCH_CONNECTION * Connection(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve the connection associated with this object in the given sheet.
 
const KIFONT::METRICS & GetFontMetrics() const
 
double SimilarityBase(const SCH_ITEM &aItem) const
Calculate the boilerplate similarity for all LIB_ITEMs without preventing the use above of a pure vir...
 
VECTOR2I TransformCoordinate(const VECTOR2I &aPoint) const
 
const KIGFX::COLOR4D & GetBackgroundColor() const override
Return current background color settings.
 
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
 
SCH_SHEET * Last() const
Return a pointer to the last SCH_SHEET of the list.
 
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
 
bool ResolveTextVar(const SCH_SHEET_PATH *aPath, wxString *token, int aDepth=0) const
Resolve any references to system tokens supported by the sheet.
 
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
 
void DoHypertextAction(EDA_DRAW_FRAME *aFrame) const override
 
int compare(const SCH_ITEM &aOther, int aCompareFlags=0) const override
Provide the draw object specific comparison called by the == and < operators.
 
bool IsHypertext() const override
Allow items to support hypertext actions when hovered/clicked.
 
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
 
int GetSchTextSize() const
 
void swapData(SCH_ITEM *aItem) override
Swap the internal data structures aItem with the schematic item.
 
KIFONT::FONT * GetDrawFont(const RENDER_SETTINGS *aSettings) const override
 
bool GetExcludedFromSim(const SCH_SHEET_PATH *aInstance=nullptr, const wxString &aVariantName=wxEmptyString) const override
 
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
 
void Rotate(const VECTOR2I &aCenter, bool aRotateCCW) override
Rotate the item around aCenter 90 degrees in the clockwise direction.
 
void CalcEdit(const VECTOR2I &aPosition) override
Calculate the attributes of an item at aPosition when it is being edited.
 
wxString GetClass() const override
Return the class name.
 
void NormalizeJustification(bool inverse)
 
bool operator<(const SCH_ITEM &aItem) const override
 
VECTOR2I GetPosition() const override
 
virtual void Rotate90(bool aClockwise)
 
std::vector< int > ViewGetLayers() const override
Return the layers the item is drawn on (which may be more than its "home" layer)
 
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
 
double Similarity(const SCH_ITEM &aItem) const override
Return a measure of how likely the other object is to represent the same object.
 
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
 
int GetPenWidth() const override
 
void SetSchTextSize(int aSize)
 
virtual wxString GetShownText(const SCH_SHEET_PATH *aPath, bool aAllowExtraText, int aDepth=0) const
 
void Plot(PLOTTER *aPlotter, bool aBackground, const SCH_PLOT_OPTS &aPlotOpts, int aUnit, int aBodyStyle, const VECTOR2I &aOffset, bool aDimmed) override
Plot the item to aPlotter.
 
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
 
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.
 
void BeginEdit(const VECTOR2I &aStartPoint) override
Begin drawing a symbol library draw item at aPosition.
 
virtual VECTOR2I GetSchematicTextOffset(const RENDER_SETTINGS *aSettings) const
This offset depends on the orientation, the type of text, and the area required to draw the associate...
 
virtual void MirrorSpinStyle(bool aLeftRight)
 
bool operator==(const SCH_ITEM &aItem) const override
 
int GetTextOffset(const RENDER_SETTINGS *aSettings=nullptr) const
 
SCH_TEXT(const VECTOR2I &aPos={ 0, 0 }, const wxString &aText=wxEmptyString, SCH_LAYER_ID aLayer=LAYER_NOTES, KICAD_T aType=SCH_TEXT_T)
 
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
 
GR_TEXT_H_ALIGN_T m_Halign
 
GR_TEXT_V_ALIGN_T m_Valign
 
wxString MessageTextFromValue(double aValue, bool aAddUnitLabel=true, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE) const
A lower-precision version of StringFromValue().
 
wxString ExpandTextVars(const wxString &aSource, const PROJECT *aProject, int aFlags)
 
#define DEFAULT_TEXT_OFFSET_RATIO
Ratio of the font height to space around global labels.
 
static constexpr EDA_ANGLE ANGLE_90
 
static constexpr EDA_ANGLE ANGLE_VERTICAL
 
static constexpr EDA_ANGLE ANGLE_HORIZONTAL
 
static constexpr EDA_ANGLE ANGLE_270
 
#define STRUCT_DELETED
flag indication structures to be erased
 
#define SKIP_STRUCT
flag indicating that the structure should be ignored
 
a few functions useful in geometry calculations.
 
SCH_LAYER_ID
Eeschema drawing layers.
 
@ LAYER_SELECTION_SHADOWS
 
constexpr T MIRRORVAL(T aPoint, T aMirrorRef)
Returns the mirror of aPoint relative to the aMirrorRef.
 
Message panel definition file.
 
bool BoxHitTest(const VECTOR2I &aHitPoint, const BOX2I &aHittee, int aAccuracy)
Perform a point-to-box hit test.
 
KICOMMON_API wxString EllipsizeMenuText(const wxString &aString)
Ellipsize text (at the end) to be no more than 36 characters.
 
KICOMMON_API wxString EllipsizeStatusText(wxWindow *aWindow, const wxString &aString)
Ellipsize text (at the end) to be no more than 1/3 of the window width.
 
@ PT_SIZE
Size expressed in distance units (mm/inch)
 
static struct SCH_TEXT_DESC _SCH_TEXT_DESC
 
void wxStringSplit(const wxString &aText, wxArrayString &aStrings, wxChar aSplitter)
Split aString to a string list separated at aSplitter.
 
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
 
wxString result
Test unit parsing edge cases and error handling.
 
@ GR_TEXT_H_ALIGN_INDETERMINATE
 
@ GR_TEXT_V_ALIGN_INDETERMINATE
 
void RotatePoint(int *pX, int *pY, const EDA_ANGLE &aAngle)
Calculate the new point of coord coord pX, pY, for a rotation center 0, 0.
 
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
 
#define INDETERMINATE_STATE
Used for holding indeterminate values, such as with multiple selections holding different values or c...
 
VECTOR2< int32_t > VECTOR2I