KiCad PCB EDA Suite
Loading...
Searching...
No Matches
sch_field.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 2022 CERN
6 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, you may find one here:
20 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
21 * or you may search the http://www.gnu.org website for the version 2 license,
22 * or you may write to the Free Software Foundation, Inc.,
23 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24 */
25
26#ifndef CLASS_SCH_FIELD_H
27#define CLASS_SCH_FIELD_H
28
29
30#include <eda_text.h>
31#include <sch_item.h>
32#include <template_fieldnames.h>
33#include <general.h>
34#include <string_utils.h>
35#include "scintilla_tricks.h"
36#include <algorithm>
37
38class SCH_EDIT_FRAME;
39class SCH_TEXT;
40
41
42class SCH_FIELD : public SCH_ITEM, public EDA_TEXT
43{
44public:
45 SCH_FIELD(); // For std::map::operator[]
46
47 SCH_FIELD( SCH_ITEM* aParent, FIELD_T aFieldId = FIELD_T::USER,
48 const wxString& aName = wxEmptyString );
49
50 SCH_FIELD( SCH_ITEM* aParent, SCH_TEXT* aText );
51
52 SCH_FIELD( const SCH_FIELD& aText );
53
54 ~SCH_FIELD() override
55 { }
56
57 SCH_FIELD& operator=( const SCH_FIELD& aField );
58
59 static bool ClassOf( const EDA_ITEM* aItem )
60 {
61 return aItem && SCH_FIELD_T == aItem->Type();
62 }
63
64 wxString GetClass() const override
65 {
66 return wxT( "SCH_FIELD" );
67 }
68
69 bool IsType( const std::vector<KICAD_T>& aScanTypes ) const override
70 {
71 if( SCH_ITEM::IsType( aScanTypes ) )
72 return true;
73
74 for( KICAD_T scanType : aScanTypes )
75 {
76 if( scanType == SCH_FIELD_LOCATE_REFERENCE_T && m_id == FIELD_T::REFERENCE )
77 return true;
78 else if ( scanType == SCH_FIELD_LOCATE_VALUE_T && m_id == FIELD_T::VALUE )
79 return true;
80 else if ( scanType == SCH_FIELD_LOCATE_FOOTPRINT_T && m_id == FIELD_T::FOOTPRINT )
81 return true;
82 else if ( scanType == SCH_FIELD_LOCATE_DATASHEET_T && m_id == FIELD_T::DATASHEET )
83 return true;
84 }
85
86 return false;
87 }
88
89 wxString GetFriendlyName() const override
90 {
91 return _( "Field" );
92 }
93
94 bool IsHypertext() const override;
95
96 void DoHypertextAction( EDA_DRAW_FRAME* aFrame ) const override;
97
104 wxString GetName( bool aUseDefaultName = true ) const;
105
110 wxString GetCanonicalName() const;
111
112 void SetName( const wxString& aName );
113
114 void SetText( const wxString& aText ) override;
115
116 FIELD_T GetId() const { return m_id; }
117
118 int GetOrdinal() const
119 {
120 return IsMandatory() ? (int) m_id : m_ordinal;
121 }
122 void SetOrdinal( int aOrdinal )
123 {
124 m_id = FIELD_T::USER;
125 m_ordinal = aOrdinal;
126 }
127
133 wxString GetShownName() const;
134 wxString GetShownText( const SCH_SHEET_PATH* aPath, bool aAllowExtraText,
135 int aDepth = 0 ) const;
136
137 wxString GetShownText( bool aAllowExtraText, int aDepth = 0 ) const override;
138
148 wxString GetFullText( int unit = 1 ) const;
149
155 bool IsEmpty()
156 {
157 wxString name( m_name );
158 wxString value( GetText() );
159
160 return name.Trim().empty() && value.Trim().empty();
161 }
162
163 int GetSchTextSize() const { return GetTextWidth(); }
164 void SetSchTextSize( int aSize ) { SetTextSize( VECTOR2I( aSize, aSize ) ); }
165
166 COLOR4D GetFieldColor() const;
167
168 void SetLastResolvedState( const SCH_ITEM* aItem ) override
169 {
170 const SCH_FIELD* aField = dynamic_cast<const SCH_FIELD*>( aItem );
171
172 if( aField )
174 }
175
176 std::vector<int> ViewGetLayers() const override;
177
179
183 EDA_ANGLE GetDrawRotation() const override;
184
185 KIFONT::FONT* GetDrawFont( const RENDER_SETTINGS* aSettings ) const override;
186
187 const BOX2I GetBoundingBox() const override;
188
193 bool IsHorizJustifyFlipped() const;
194 bool IsVertJustifyFlipped() const;
195
198
201
202 bool IsNameShown() const { return m_showName; }
203 void SetNameShown( bool aShown = true ) { m_showName = aShown; }
204
211 bool IsGeneratedField() const { return m_isGeneratedField; }
212
213 bool CanAutoplace() const { return m_allowAutoPlace; }
214 void SetCanAutoplace( bool aCanPlace ) { m_allowAutoPlace = aCanPlace; }
215
216 void swapData( SCH_ITEM* aItem ) override;
217
218 int GetPenWidth() const override;
219
220 bool IsAutoAdded() const { return m_autoAdded; }
221 void SetAutoAdded( bool aAutoAdded ) { m_autoAdded = aAutoAdded; }
222
223 bool ShowInChooser() const { return m_showInChooser; }
224 void SetShowInChooser( bool aShow = true ) { m_showInChooser = aShow; }
225
226 void ClearCaches() override;
227 void ClearRenderCache() override;
228
229 std::vector<std::unique_ptr<KIFONT::GLYPH>>*
230 GetRenderCache( const wxString& forResolvedText, const VECTOR2I& forPosition,
231 TEXT_ATTRIBUTES& aAttrs ) const;
232
233 void Move( const VECTOR2I& aMoveVector ) override
234 {
235 Offset( aMoveVector );
236 }
237
238 void Rotate( const VECTOR2I& aCenter, bool aRotateCCW ) override;
239
240 void MirrorVertically( int aCenter ) override;
241 void MirrorHorizontally( int aCenter ) override;
242
243 void BeginEdit( const VECTOR2I& aStartPoint ) override;
244 void CalcEdit( const VECTOR2I& aPosition ) override;
245
246 void OnScintillaCharAdded( SCINTILLA_TRICKS* aScintillaTricks,
247 wxStyledTextEvent &aEvent ) const;
248
249 bool Matches( const EDA_SEARCH_DATA& aSearchData, void* aAuxData ) const override;
250
251 bool Replace( const EDA_SEARCH_DATA& aSearchData, void* aAuxData = nullptr ) override;
252
253 wxString GetItemDescription( UNITS_PROVIDER* aUnitsProvider, bool aFull ) const override;
254 void GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList ) override;
255
256 BITMAPS GetMenuImage() const override;
257
258 bool IsReplaceable() const override;
259
261
262 VECTOR2I GetPosition() const override;
263 void SetPosition( const VECTOR2I& aPosition ) override;
264
266
267 bool HitTest( const VECTOR2I& aPosition, int aAccuracy = 0 ) const override;
268 bool HitTest( const BOX2I& aRect, bool aContained, int aAccuracy = 0 ) const override;
269
270 void Plot( PLOTTER* aPlotter, bool aBackground, const SCH_PLOT_OPTS& aPlotOpts,
271 int aUnit, int aBodyStyle, const VECTOR2I& aOffset, bool aDimmed ) override;
272
273 EDA_ITEM* Clone() const override;
274
282 void ImportValues( const SCH_FIELD& aSource );
283
291 void Copy( SCH_FIELD* aTarget ) const;
292
293 bool IsMandatory() const;
294
295 bool operator <( const SCH_ITEM& aItem ) const override;
296
297 double Similarity( const SCH_ITEM& aItem ) const override;
298
299 bool operator==( const SCH_ITEM& aItem ) const override;
300 bool operator==( const SCH_FIELD& aItem ) const;
301
302#if defined(DEBUG)
303 void Show( int nestLevel, std::ostream& os ) const override { ShowDummy( os ); }
304#endif
305
306protected:
308
309 const KIFONT::METRICS& getFontMetrics() const override { return GetFontMetrics(); }
310
323 int compare( const SCH_ITEM& aOther, int aCompareFlags = 0 ) const override;
324
325 void setId( FIELD_T aId );
326
327private:
330 wxString m_name;
331
336
339
340 mutable bool m_renderCacheValid;
342 mutable std::vector<std::unique_ptr<KIFONT::GLYPH>> m_renderCache;
343
345};
346
347
348inline int NextFieldOrdinal( const std::vector<SCH_FIELD>& aFields )
349{
350 int ordinal = 42; // Arbitrarily larger than any mandatory FIELD_T id
351
352 for( const SCH_FIELD& field : aFields )
353 ordinal = std::max( ordinal, field.GetOrdinal() + 1 );
354
355 return ordinal;
356}
357
358
359inline const SCH_FIELD* FindField( const std::vector<SCH_FIELD>& aFields, FIELD_T aFieldId )
360{
361 for( const SCH_FIELD& field : aFields )
362 {
363 if( field.GetId() == aFieldId )
364 return &field;
365 }
366
367 return nullptr;
368}
369
370
371inline SCH_FIELD* FindField( std::vector<SCH_FIELD>& aFields, FIELD_T aFieldId )
372{
373 auto& constFields = const_cast<const std::vector<SCH_FIELD>&>( aFields );
374 return const_cast<SCH_FIELD*>( FindField( constFields, aFieldId ) );
375}
376
377
378inline const SCH_FIELD* FindField( const std::vector<SCH_FIELD>& aFields,
379 const wxString& aFieldName )
380{
381 for( const SCH_FIELD& field : aFields )
382 {
383 if( field.GetName() == aFieldName )
384 return &field;
385 }
386
387 return nullptr;
388}
389
390
391inline SCH_FIELD* FindField( std::vector<SCH_FIELD>& aFields, const wxString& aFieldName )
392{
393 auto& constFields = const_cast<const std::vector<SCH_FIELD>&>( aFields );
394 return const_cast<SCH_FIELD*>( FindField( constFields, aFieldName ) );
395}
396
397
398inline wxString GetFieldValue( const std::vector<SCH_FIELD>* aFields, FIELD_T aFieldType )
399{
400 if( !aFields )
401 return wxEmptyString;
402
403 if( const SCH_FIELD* field = FindField( *aFields, aFieldType ) )
404 return field->GetText();
405
406 return wxEmptyString;
407}
408
409
410inline std::string GetFieldValue( const std::vector<SCH_FIELD>* aFields,
411 const wxString& aFieldName, bool aResolve, int aDepth )
412{
413 if( !aFields )
414 return "";
415
416 if( const SCH_FIELD* field = FindField( *aFields, aFieldName ) )
417 return ( aResolve ? field->GetShownText( false, aDepth ) : field->GetText() ).ToStdString();
418
419 return "";
420}
421
422
423inline void SetFieldValue( std::vector<SCH_FIELD>& aFields, const wxString& aFieldName,
424 const std::string& aValue, bool aIsVisible = true )
425{
426 if( aValue == "" )
427 {
428 std::erase_if( aFields, [&]( const SCH_FIELD& field )
429 {
430 return field.GetName() == aFieldName;
431 } );
432 return;
433 }
434
435 if( SCH_FIELD* field = FindField( aFields, aFieldName ) )
436 {
437 field->SetText( aValue );
438 return;
439 }
440
441 SCH_ITEM* parent = static_cast<SCH_ITEM*>( aFields.at( 0 ).GetParent() );
442 aFields.emplace_back( parent, FIELD_T::USER, aFieldName );
443 aFields.back().SetText( aValue );
444 aFields.back().SetVisible( aIsVisible );
445}
446
447
448
449#endif /* CLASS_SCH_FIELD_H */
const char * name
Definition: DXF_plotter.cpp:62
BITMAPS
A list of all bitmap identifiers.
Definition: bitmaps_list.h:33
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:98
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:110
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition: eda_text.h:79
const VECTOR2I & GetTextPos() const
Definition: eda_text.h:270
void SetTextSize(VECTOR2I aNewSize, bool aEnforceMinTextSize=true)
Definition: eda_text.cpp:533
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition: eda_text.h:97
int GetTextWidth() const
Definition: eda_text.h:261
void Offset(const VECTOR2I &aOffset)
Definition: eda_text.cpp:596
FONT is an abstract base class for both outline and stroke fonts.
Definition: font.h:131
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
Base plotter engine class.
Definition: plotter.h:121
Schematic editor (Eeschema) main window.
void ClearRenderCache() override
Definition: sch_field.cpp:340
int compare(const SCH_ITEM &aOther, int aCompareFlags=0) const override
Provide the draw object specific comparison called by the == and < operators.
Definition: sch_field.cpp:1486
wxString GetClass() const override
Return the class name.
Definition: sch_field.h:64
void SetOrdinal(int aOrdinal)
Definition: sch_field.h:122
COLOR4D m_lastResolvedColor
Definition: sch_field.h:344
bool IsAutoAdded() const
Definition: sch_field.h:220
GR_TEXT_V_ALIGN_T GetEffectiveVertJustify() const
Definition: sch_field.cpp:617
bool IsMandatory() const
Definition: sch_field.cpp:1359
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
Definition: sch_field.cpp:971
void Rotate(const VECTOR2I &aCenter, bool aRotateCCW) override
Rotate the item around aCenter 90 degrees in the clockwise direction.
Definition: sch_field.cpp:873
wxString GetFullText(int unit=1) const
Return the text of a field.
Definition: sch_field.cpp:301
~SCH_FIELD() override
Definition: sch_field.h:54
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Definition: sch_field.cpp:489
std::vector< std::unique_ptr< KIFONT::GLYPH > > m_renderCache
Definition: sch_field.h:342
void swapData(SCH_ITEM *aItem) override
Swap the internal data structures aItem with the schematic item.
Definition: sch_field.cpp:399
VECTOR2I GetPosition() const override
Definition: sch_field.cpp:1337
void SetEffectiveHorizJustify(GR_TEXT_H_ALIGN_T)
Definition: sch_field.cpp:540
int GetSchTextSize() const
Definition: sch_field.h:163
bool Replace(const EDA_SEARCH_DATA &aSearchData, void *aAuxData=nullptr) override
Perform a text replace using the find and replace criteria in aSearchData on items that support text ...
Definition: sch_field.cpp:826
void SetLastResolvedState(const SCH_ITEM *aItem) override
Definition: sch_field.h:168
bool m_showName
Render the field name in addition to its value.
Definition: sch_field.h:332
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.
Definition: sch_field.cpp:1202
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
Definition: sch_field.h:69
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
Definition: sch_field.cpp:166
BITMAPS GetMenuImage() const override
Return a pointer to an image to be used in menus.
Definition: sch_field.cpp:1133
static bool ClassOf(const EDA_ITEM *aItem)
Definition: sch_field.h:59
bool IsNameShown() const
Definition: sch_field.h:202
bool IsHypertext() const override
Allow items to support hypertext actions when hovered/clicked.
Definition: sch_field.cpp:1018
bool m_autoAdded
Was this field automatically added to a LIB_SYMBOL?
Definition: sch_field.h:337
double Similarity(const SCH_ITEM &aItem) const override
Return a measure of how likely the other object is to represent the same object.
Definition: sch_field.cpp:1445
bool IsGeneratedField() const
Generated fields are fields whose names are variables like ${VAR}.
Definition: sch_field.h:211
bool HitTest(const VECTOR2I &aPosition, int aAccuracy=0) const override
Test if aPosition is inside or on the boundary of this item.
Definition: sch_field.cpp:1150
SCH_LAYER_ID GetDefaultLayer() const
Definition: sch_field.cpp:443
bool IsHorizJustifyFlipped() const
Return whether the field will be rendered with the horizontal justification inverted due to rotation ...
Definition: sch_field.cpp:517
bool IsVertJustifyFlipped() const
Definition: sch_field.cpp:574
EDA_ANGLE GetDrawRotation() const override
Adjusters to allow EDA_TEXT to draw/print/etc.
Definition: sch_field.cpp:467
void SetEffectiveVertJustify(GR_TEXT_V_ALIGN_T)
Definition: sch_field.cpp:597
void CalcEdit(const VECTOR2I &aPosition) override
Calculate the attributes of an item at aPosition when it is being edited.
Definition: sch_field.cpp:965
bool Matches(const EDA_SEARCH_DATA &aSearchData, void *aAuxData) const override
Compare the item against the search criteria in aSearchData.
Definition: sch_field.cpp:631
void MirrorVertically(int aCenter) override
Mirror item vertically about aCenter.
Definition: sch_field.cpp:947
FIELD_T GetId() const
Definition: sch_field.h:116
void SetCanAutoplace(bool aCanPlace)
Definition: sch_field.h:214
void DoHypertextAction(EDA_DRAW_FRAME *aFrame) const override
Definition: sch_field.cpp:1030
int GetPenWidth() const override
Definition: sch_field.cpp:316
wxString GetCanonicalName() const
Get a non-language-specific name for a field which can be used for storage, variable look-up,...
Definition: sch_field.cpp:1117
bool m_isGeneratedField
If the field name is a variable name (e.g.
Definition: sch_field.h:334
int m_ordinal
Sort order for non-mandatory fields.
Definition: sch_field.h:329
COLOR4D GetFieldColor() const
Definition: sch_field.cpp:417
wxString GetFriendlyName() const override
Definition: sch_field.h:89
bool operator==(const SCH_ITEM &aItem) const override
Definition: sch_field.cpp:1395
SCH_FIELD & operator=(const SCH_FIELD &aField)
Definition: sch_field.cpp:135
void ImportValues(const SCH_FIELD &aSource)
Copy parameters from a SCH_FIELD source.
Definition: sch_field.cpp:390
void SetAutoAdded(bool aAutoAdded)
Definition: sch_field.h:221
bool operator<(const SCH_ITEM &aItem) const override
Definition: sch_field.cpp:1372
FIELD_T m_id
Field id,.
Definition: sch_field.h:328
wxString GetShownName() const
Get the field's name as displayed on the schematic or in the symbol fields table.
Definition: sch_field.cpp:185
VECTOR2I GetLibPosition() const
Definition: sch_field.h:260
void setId(FIELD_T aId)
Definition: sch_field.cpp:178
int GetOrdinal() const
Definition: sch_field.h:118
bool IsEmpty()
Return true if both the name and value of the field are empty.
Definition: sch_field.h:155
bool m_renderCacheValid
Definition: sch_field.h:340
KIFONT::FONT * GetDrawFont(const RENDER_SETTINGS *aSettings) const override
Definition: sch_field.cpp:322
void BeginEdit(const VECTOR2I &aStartPoint) override
Begin drawing a symbol library draw item at aPosition.
Definition: sch_field.cpp:959
void SetShowInChooser(bool aShow=true)
Definition: sch_field.h:224
bool IsReplaceable() const override
Override this method in any derived object that supports test find and replace.
Definition: sch_field.cpp:816
void SetSchTextSize(int aSize)
Definition: sch_field.h:164
GR_TEXT_H_ALIGN_T GetEffectiveHorizJustify() const
Definition: sch_field.cpp:560
std::vector< int > ViewGetLayers() const override
Return the all the layers within the VIEW the object is painted on.
Definition: sch_field.cpp:437
wxString GetName(bool aUseDefaultName=true) const
Return the field name (not translated).
Definition: sch_field.cpp:1103
void SetPosition(const VECTOR2I &aPosition) override
Definition: sch_field.cpp:1317
void SetName(const wxString &aName)
Definition: sch_field.cpp:1079
wxString GetShownText(const SCH_SHEET_PATH *aPath, bool aAllowExtraText, int aDepth=0) const
Definition: sch_field.cpp:191
void Move(const VECTOR2I &aMoveVector) override
Move the item by aMoveVector to a new position.
Definition: sch_field.h:233
VECTOR2I m_renderCachePos
Definition: sch_field.h:341
bool CanAutoplace() const
Definition: sch_field.h:213
std::vector< std::unique_ptr< KIFONT::GLYPH > > * GetRenderCache(const wxString &forResolvedText, const VECTOR2I &forPosition, TEXT_ATTRIBUTES &aAttrs) const
Definition: sch_field.cpp:348
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.
Definition: sch_field.cpp:979
bool ShowInChooser() const
Definition: sch_field.h:223
void ClearCaches() override
Definition: sch_field.cpp:333
void SetText(const wxString &aText) override
Definition: sch_field.cpp:1089
VECTOR2I GetParentPosition() const
Definition: sch_field.cpp:1353
const KIFONT::METRICS & getFontMetrics() const override
Definition: sch_field.h:309
bool m_showInChooser
This field is available as a data column for the chooser.
Definition: sch_field.h:338
void OnScintillaCharAdded(SCINTILLA_TRICKS *aScintillaTricks, wxStyledTextEvent &aEvent) const
Definition: sch_field.cpp:688
wxString m_name
Definition: sch_field.h:330
void SetNameShown(bool aShown=true)
Definition: sch_field.h:203
void MirrorHorizontally(int aCenter) override
Mirror item horizontally about aCenter.
Definition: sch_field.cpp:935
void Copy(SCH_FIELD *aTarget) const
Copy parameters of this field to another field.
Definition: sch_field.cpp:172
bool m_allowAutoPlace
This field can be autoplaced.
Definition: sch_field.h:333
Object to parser s-expression symbol library and schematic file formats.
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:168
const KIFONT::METRICS & GetFontMetrics() const
Definition: sch_item.cpp:617
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
Definition: sch_item.h:183
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
Add cut/copy/paste, dark theme, autocomplete and brace highlighting to a wxStyleTextCtrl instance.
#define _(s)
SCH_LAYER_ID
Eeschema drawing layers.
Definition: layer_ids.h:439
wxString GetFieldValue(const std::vector< SCH_FIELD > *aFields, FIELD_T aFieldType)
Definition: sch_field.h:398
const SCH_FIELD * FindField(const std::vector< SCH_FIELD > &aFields, FIELD_T aFieldId)
Definition: sch_field.h:359
int NextFieldOrdinal(const std::vector< SCH_FIELD > &aFields)
Definition: sch_field.h:348
void SetFieldValue(std::vector< SCH_FIELD > &aFields, const wxString &aFieldName, const std::string &aValue, bool aIsVisible=true)
Definition: sch_field.h:423
FIELD_T
The set of all field indices assuming an array like sequence that a SCH_COMPONENT or LIB_PART can hol...
@ USER
The field ID hasn't been set yet; field is invalid.
GR_TEXT_H_ALIGN_T
This is API surface mapped to common.types.HorizontalAlignment.
GR_TEXT_V_ALIGN_T
This is API surface mapped to common.types.VertialAlignment.
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:78
@ SCH_FIELD_LOCATE_REFERENCE_T
Definition: typeinfo.h:181
@ SCH_FIELD_LOCATE_FOOTPRINT_T
Definition: typeinfo.h:183
@ SCH_FIELD_T
Definition: typeinfo.h:151
@ SCH_FIELD_LOCATE_VALUE_T
Definition: typeinfo.h:182
@ SCH_FIELD_LOCATE_DATASHEET_T
Definition: typeinfo.h:184
VECTOR2< int32_t > VECTOR2I
Definition: vector2d.h:695