KiCad PCB EDA Suite
Loading...
Searching...
No Matches
eeschema/dialogs/dialog_global_edit_text_and_graphics.cpp
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 The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
22#include <string_utils.h>
23#include <sch_symbol.h>
24#include <sch_connection.h>
25#include <sch_edit_frame.h>
26#include <sch_shape.h>
27#include <sch_line.h>
28#include <sch_junction.h>
29#include <sch_sheet.h>
30#include <sch_sheet_pin.h>
31#include <schematic.h>
32#include <sch_commit.h>
33#include <tool/tool_manager.h>
35#include <tools/sch_edit_tool.h>
36#include <widgets/unit_binder.h>
37#include <widgets/font_choice.h>
38
39static wxString g_fieldnameFilter;
40static wxString g_referenceFilter;
41static wxString g_symbolFilter;
42static wxString g_netFilter;
43
44
46{
47public:
50
51protected:
52 void OnReferenceFilterText( wxCommandEvent& event ) override
53 {
54 m_referenceFilterOpt->SetValue( true );
55 }
56 void OnSymbolFilterText( wxCommandEvent& event ) override
57 {
58 m_symbolFilterOpt->SetValue( true );
59 }
60 void OnFieldNameFilterText( wxCommandEvent& event ) override
61 {
62 m_fieldnameFilterOpt->SetValue( true );
63 }
64 void OnNetFilterText( wxCommandEvent& event ) override
65 {
66 m_netFilterOpt->SetValue( true );
67 }
68
69 bool TransferDataToWindow() override;
70 bool TransferDataFromWindow() override;
71
72 void visitItem( SCH_COMMIT* aCommit, const SCH_SHEET_PATH& aSheetPath, SCH_ITEM* aItem );
73 void processItem( SCH_COMMIT* aCommit, const SCH_SHEET_PATH& aSheetPath, SCH_ITEM* aItem );
74
75private:
78
82};
83
84
90{
91 m_parent = parent;
92
94
95 // Allow indeterminate state in font control and rebuild list
96 m_fontCtrl->SetHasIndeterminateChoice();
97 m_fontCtrl->RefreshFonts();
98
99 m_textColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
100 m_textColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
101 m_colorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
102 m_colorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
103 m_fillColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
104 m_fillColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
105 m_dotColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
106 m_dotColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
107
108 m_staticText12->SetFont( KIUI::GetSmallInfoFont( this ).Italic() );
109 m_staticText13->SetFont( KIUI::GetSmallInfoFont( this ).Italic() );
110 m_staticText14->SetFont( KIUI::GetSmallInfoFont( this ).Italic() );
111 m_staticText15->SetFont( KIUI::GetSmallInfoFont( this ).Italic() );
112 m_staticText16->SetFont( KIUI::GetSmallInfoFont( this ).Italic() );
113
115
117}
118
119
127
128
130{
131 SCH_SELECTION_TOOL* selectionTool = m_parent->GetToolManager()->GetTool<SCH_SELECTION_TOOL>();
132 m_selection = selectionTool->GetSelection();
133
134 // SetValue() generates events, ChangeValue() does not
135 m_fieldnameFilter->ChangeValue( g_fieldnameFilter );
136 m_referenceFilter->ChangeValue( g_referenceFilter );
137 m_symbolFilter->ChangeValue( g_symbolFilter );
138 m_netFilter->ChangeValue( g_netFilter );
139
140 if( g_netFilter.IsEmpty() && !m_parent->GetHighlightedConnection().IsEmpty() )
141 m_netFilter->SetValue( m_parent->GetHighlightedConnection() );
142
143 m_fontCtrl->SetStringSelection( INDETERMINATE_ACTION );
144
146 m_orientation->SetStringSelection( INDETERMINATE_ACTION );
147 m_hAlign->SetStringSelection( INDETERMINATE_ACTION );
148 m_vAlign->SetStringSelection( INDETERMINATE_ACTION );
149 m_italic->Set3StateValue( wxCHK_UNDETERMINED );
150 m_bold->Set3StateValue( wxCHK_UNDETERMINED );
151 m_visible->Set3StateValue( wxCHK_UNDETERMINED );
152 m_showFieldNames->Set3StateValue( wxCHK_UNDETERMINED );
154 m_lineStyle->SetStringSelection( INDETERMINATE_ACTION );
156 m_setColor->SetValue( false );
157 m_setFillColor->SetValue( false );
158 m_setDotColor->SetValue( false );
159
160 return true;
161}
162
163
165 const SCH_SHEET_PATH& aSheetPath,
166 SCH_ITEM* aItem )
167{
168 if( m_selectedFilterOpt->GetValue() )
169 {
170 if( !aItem->IsSelected() && ( !aItem->GetParent() || !aItem->GetParent()->IsSelected() ) )
171 return;
172 }
173
174 aCommit->Modify( aItem, aSheetPath.LastScreen() );
175
176 if( EDA_TEXT* eda_text = dynamic_cast<EDA_TEXT*>( aItem ) )
177 {
178 if( !m_textSize.IsIndeterminate() )
179 eda_text->SetTextSize( VECTOR2I( m_textSize.GetIntValue(), m_textSize.GetIntValue() ) );
180
181 if( m_setTextColor->GetValue() )
182 eda_text->SetTextColor( m_textColorSwatch->GetSwatchColor() );
183
184 if( m_hAlign->GetStringSelection() != INDETERMINATE_ACTION )
185 {
186 GR_TEXT_H_ALIGN_T hAlign = EDA_TEXT::MapHorizJustify( m_hAlign->GetSelection() - 1 );
187 SCH_SYMBOL* parentSymbol = dynamic_cast<SCH_SYMBOL*>( aItem->GetParent() );
188
189 if( parentSymbol && parentSymbol->GetTransform().x1 < 0 )
190 {
191 if( hAlign == GR_TEXT_H_ALIGN_LEFT )
192 hAlign = GR_TEXT_H_ALIGN_RIGHT;
193 else if( hAlign == GR_TEXT_H_ALIGN_RIGHT )
194 hAlign = GR_TEXT_H_ALIGN_LEFT;
195 }
196
197 eda_text->SetHorizJustify( hAlign );
198 }
199
200 if( m_vAlign->GetStringSelection() != INDETERMINATE_ACTION )
201 {
202 GR_TEXT_V_ALIGN_T vAlign = EDA_TEXT::MapVertJustify( m_vAlign->GetSelection() - 1 );
203 SCH_SYMBOL* parentSymbol = dynamic_cast<SCH_SYMBOL*>( aItem->GetParent() );
204
205 if( parentSymbol && parentSymbol->GetTransform().y1 < 0 )
206 {
207 if( vAlign == GR_TEXT_V_ALIGN_TOP )
208 vAlign = GR_TEXT_V_ALIGN_BOTTOM;
209 else if( vAlign == GR_TEXT_V_ALIGN_BOTTOM )
210 vAlign = GR_TEXT_V_ALIGN_TOP;
211 }
212
213 eda_text->SetVertJustify( vAlign );
214 }
215
216 if( m_italic->Get3StateValue() != wxCHK_UNDETERMINED )
217 eda_text->SetItalic( m_italic->GetValue() );
218
219 // Must come after SetTextSize()
220 if( m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
221 eda_text->SetBold( m_bold->GetValue() );
222
223 // Must come after SetBold() & SetItalic()
224 if( m_fontCtrl->GetStringSelection() != INDETERMINATE_ACTION )
225 {
226 eda_text->SetFont( m_fontCtrl->GetFontSelection( eda_text->IsBold(),
227 eda_text->IsItalic() ) );
228 }
229 else if( m_italic->Get3StateValue() != wxCHK_UNDETERMINED
230 || m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
231 {
232 if( !eda_text->GetFontName().IsEmpty() )
233 {
234 eda_text->SetFont( KIFONT::FONT::GetFont( eda_text->GetFontName(),
235 eda_text->IsBold(),
236 eda_text->IsItalic() ) );
237 }
238 }
239 }
240
241 if( SCH_LABEL_BASE* sch_label = dynamic_cast<SCH_LABEL_BASE*>( aItem ) )
242 {
243 if( m_orientation->GetStringSelection() != INDETERMINATE_ACTION )
244 sch_label->SetSpinStyle( (SPIN_STYLE::SPIN) m_orientation->GetSelection() );
245 }
246
247 if( SCH_FIELD* sch_field = dynamic_cast<SCH_FIELD*>( aItem ) )
248 {
249 if( m_visible->Get3StateValue() != wxCHK_UNDETERMINED )
250 sch_field->SetVisible( m_visible->GetValue() );
251
252 if( m_showFieldNames->Get3StateValue() != wxCHK_UNDETERMINED )
253 sch_field->SetNameShown( m_showFieldNames->GetValue() );
254 }
255
256 if( aItem->HasLineStroke() )
257 {
258 STROKE_PARAMS stroke = aItem->GetStroke();
259
260 if( !m_lineWidth.IsIndeterminate() )
261 stroke.SetWidth( m_lineWidth.GetIntValue() );
262
263 if( m_lineStyle->GetStringSelection() != INDETERMINATE_ACTION )
264 stroke.SetLineStyle( (LINE_STYLE) m_lineStyle->GetSelection() );
265
266 if( m_setColor->GetValue() )
267 stroke.SetColor( m_colorSwatch->GetSwatchColor() );
268
269 aItem->SetStroke( stroke );
270 }
271
272 if( SCH_SHAPE* shape = dynamic_cast<SCH_SHAPE*>( aItem ) )
273 {
274 if( m_setFillColor->GetValue() )
275 {
276 shape->SetFillColor( m_fillColorSwatch->GetSwatchColor() );
277
278 if( m_fillColorSwatch->GetSwatchColor() == COLOR4D::UNSPECIFIED )
279 shape->SetFillMode( FILL_T::NO_FILL );
280 else
281 shape->SetFillMode( FILL_T::FILLED_WITH_COLOR );
282 }
283 }
284
285 if( SCH_JUNCTION* junction = dynamic_cast<SCH_JUNCTION*>( aItem ) )
286 {
287 if( !m_junctionSize.IsIndeterminate() )
288 junction->SetDiameter( m_junctionSize.GetIntValue() );
289
290 if( m_setDotColor->GetValue() )
291 junction->SetColor( m_dotColorSwatch->GetSwatchColor() );
292 }
293}
294
296 const SCH_SHEET_PATH& aSheetPath,
297 SCH_ITEM* aItem )
298{
299 if( m_netFilterOpt->GetValue() && !m_netFilter->GetValue().IsEmpty() )
300 {
301 const std::optional<wxString> netName = aItem->GetConnectionName( &aSheetPath );
302
303 if( !netName || !WildCompareString( m_netFilter->GetValue(), *netName, false ) )
304 return;
305 }
306
307 if( m_referenceFilterOpt->GetValue() && !m_referenceFilter->GetValue().IsEmpty() )
308 {
309 if( aItem->Type() == SCH_SYMBOL_T )
310 {
311 wxString ref = static_cast<SCH_SYMBOL*>( aItem )->GetRef( &aSheetPath );
312
313 if( !WildCompareString( m_referenceFilter->GetValue(), ref, false ) )
314 return;
315 }
316 }
317
318 if( m_symbolFilterOpt->GetValue() && !m_symbolFilter->GetValue().IsEmpty() )
319 {
320 if( aItem->Type() == SCH_SYMBOL_T )
321 {
322 wxString id = UnescapeString( static_cast<SCH_SYMBOL*>( aItem )->GetLibId().Format() );
323
324 if( !WildCompareString( m_symbolFilter->GetValue(), id, false ) )
325 return;
326 }
327 }
328
329 if( m_typeFilterOpt->GetValue() )
330 {
331 if( aItem->Type() == SCH_SYMBOL_T )
332 {
333 bool isPower = static_cast<SCH_SYMBOL*>( aItem )->IsPower();
334
335 if( isPower != ( m_typeFilter->GetSelection() == 1 ) )
336 return;
337 }
338 }
339
340 static const std::vector<KICAD_T> wireLabelTypes = { SCH_LABEL_LOCATE_WIRE_T };
341 static const std::vector<KICAD_T> busLabelTypes = { SCH_LABEL_LOCATE_BUS_T };
342
343 switch( aItem->Type() )
344 {
345 case SCH_SYMBOL_T:
346 {
347 SCH_SYMBOL* symbol = (SCH_SYMBOL*) aItem;
348
349 if( m_references->GetValue() )
350 processItem( aCommit, aSheetPath, symbol->GetField( FIELD_T::REFERENCE ) );
351
352 if( m_values->GetValue() )
353 processItem( aCommit, aSheetPath, symbol->GetField( FIELD_T::VALUE ) );
354
355 if( m_otherFields->GetValue() )
356 {
357 for( SCH_FIELD& field : symbol->GetFields() )
358 {
359 if( field.GetId() == FIELD_T::REFERENCE || field.GetId() == FIELD_T::VALUE )
360 continue;
361
362 const wxString& fieldName = field.GetName();
363
364 if( !m_fieldnameFilterOpt->GetValue() || m_fieldnameFilter->GetValue().IsEmpty()
365 || WildCompareString( m_fieldnameFilter->GetValue(), fieldName, false ) )
366 {
367 processItem( aCommit, aSheetPath, &field );
368 }
369 }
370 }
371
372 break;
373 }
374
375 case SCH_SHEET_T:
376 {
377 SCH_SHEET* sheet = static_cast<SCH_SHEET*>( aItem );
378
379 if( m_sheetTitles->GetValue() )
380 processItem( aCommit, aSheetPath, sheet->GetField( FIELD_T::SHEET_NAME ) );
381
382 if( m_sheetFields->GetValue() )
383 {
384 for( SCH_FIELD& field : sheet->GetFields() )
385 {
386 if( field.GetId() == FIELD_T::SHEET_NAME )
387 continue;
388
389 const wxString& fieldName = field.GetName();
390
391 if( !m_fieldnameFilterOpt->GetValue() || m_fieldnameFilter->GetValue().IsEmpty()
392 || WildCompareString( m_fieldnameFilter->GetValue(), fieldName, false ) )
393 {
394 processItem( aCommit, aSheetPath, &field );
395 }
396 }
397 }
398
399 if( m_sheetBorders->GetValue() )
400 {
401 if( !m_selectedFilterOpt->GetValue() || sheet->IsSelected() )
402 {
403 aCommit->Modify( sheet, aSheetPath.LastScreen() );
404
405 if( !m_lineWidth.IsIndeterminate() )
406 sheet->SetBorderWidth( m_lineWidth.GetIntValue() );
407
408 if( m_setColor->GetValue() )
409 sheet->SetBorderColor( m_colorSwatch->GetSwatchColor() );
410
411 if( m_setFillColor->GetValue() )
412 sheet->SetBackgroundColor( m_fillColorSwatch->GetSwatchColor() );
413 }
414 }
415
416 if( m_sheetPins->GetValue() )
417 {
418 for( SCH_SHEET_PIN* pin : sheet->GetPins() )
419 processItem( aCommit, aSheetPath, pin );
420 }
421
422 break;
423 }
424
425 case SCH_LINE_T:
426 if( m_schTextAndGraphics->GetValue() && aItem->GetLayer() == LAYER_NOTES )
427 processItem( aCommit, aSheetPath, aItem );
428 else if( m_wires->GetValue() && aItem->GetLayer() == LAYER_WIRE )
429 processItem( aCommit, aSheetPath, aItem );
430 else if( m_buses->GetValue() && aItem->GetLayer() == LAYER_BUS )
431 processItem( aCommit, aSheetPath, aItem );
432
433 break;
434
435 case SCH_LABEL_T:
437 case SCH_HIER_LABEL_T:
439 if( m_wires->GetValue() && aItem->IsType( wireLabelTypes ) )
440 processItem( aCommit, aSheetPath, aItem );
441
442 if( m_buses->GetValue() && aItem->IsType( busLabelTypes ) )
443 processItem( aCommit, aSheetPath, aItem );
444
445 if( m_globalLabels->GetValue() && aItem->Type() == SCH_GLOBAL_LABEL_T )
446 processItem( aCommit, aSheetPath, aItem );
447
448 if( m_hierLabels->GetValue() && aItem->Type() == SCH_HIER_LABEL_T )
449 processItem( aCommit, aSheetPath, aItem );
450
451 if( m_labelFields->GetValue() )
452 {
453 for( SCH_FIELD& field : static_cast<SCH_LABEL_BASE*>( aItem )->GetFields() )
454 {
455 const wxString& fieldName = field.GetName();
456
457 if( !m_fieldnameFilterOpt->GetValue() || m_fieldnameFilter->GetValue().IsEmpty()
458 || WildCompareString( m_fieldnameFilter->GetValue(), fieldName, false ) )
459 {
460 processItem( aCommit, aSheetPath, &field );
461 }
462 }
463 }
464
465 break;
466
467 case SCH_JUNCTION_T:
468 {
469 SCH_JUNCTION* junction = static_cast<SCH_JUNCTION*>( aItem );
470
471 for( SCH_ITEM* item : junction->ConnectedItems( aSheetPath ) )
472 {
473 if( item->GetLayer() == LAYER_BUS && m_buses->GetValue() )
474 {
475 processItem( aCommit, aSheetPath, aItem );
476 break;
477 }
478 else if( item->GetLayer() == LAYER_WIRE && m_wires->GetValue() )
479 {
480 processItem( aCommit, aSheetPath, aItem );
481 break;
482 }
483 }
484
485 break;
486 }
487
488 case SCH_TEXT_T:
489 case SCH_TEXTBOX_T:
490 case SCH_SHAPE_T:
491 if( m_schTextAndGraphics->GetValue() )
492 processItem( aCommit, aSheetPath, aItem );
493
494 break;
495
496 default:
497 break;
498 }
499}
500
501
503{
504 if( !m_textSize.Validate( 1.0, 10000.0, EDA_UNITS::MILS ) ) // 1 mil .. 10 inches
505 return false;
506
507 SCH_SHEET_PATH currentSheet = m_parent->GetCurrentSheet();
508 SCH_COMMIT commit( m_parent );
509
510 // Each staged edit hides published nets on its screen; filter the rest by pre-edit nets
511 std::optional<SCH_CONNECTIVITY::PUBLICATION_HOLD> hold( std::in_place, m_parent->Schematic().Connectivity() );
512
513 // Go through sheets
514 for( const SCH_SHEET_PATH& sheetPath : m_parent->Schematic().Hierarchy() )
515 {
516 SCH_SCREEN* screen = sheetPath.LastScreen();
517
518 if( screen )
519 {
520 m_parent->SetCurrentSheet( sheetPath );
521
522 for( SCH_ITEM* item : screen->Items() )
523 visitItem( &commit, sheetPath, item );
524 }
525 }
526
527 hold.reset();
528
529 if( !commit.Empty() )
530 {
531 commit.Push( _( "Edit Text and Graphics" ) );
532 m_parent->HardRedraw();
533 }
534
535 // Reset the view to where we left the user
536 m_parent->SetCurrentSheet( currentSheet );
537 m_parent->Refresh();
538
539 return true;
540}
541
542
544{
546 dlg.ShowModal();
547 return 0;
548}
549
550
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
Definition color4d.h:400
bool Empty() const
Definition commit.h:145
COMMIT & Modify(EDA_ITEM *aItem, BASE_SCREEN *aScreen=nullptr, RECURSE_MODE aRecurse=RECURSE_MODE::NO_RECURSE)
Modify a given item in the model.
Definition commit.h:102
DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Edit Text and Graphic Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
void processItem(SCH_COMMIT *aCommit, const SCH_SHEET_PATH &aSheetPath, SCH_ITEM *aItem)
void visitItem(SCH_COMMIT *aCommit, const SCH_SHEET_PATH &aSheetPath, SCH_ITEM *aItem)
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
int ShowModal() override
KICAD_T Type() const
Returns the type of object.
Definition eda_item.h:110
bool IsSelected() const
Definition eda_item.h:134
EDA_ITEM * GetParent() const
Definition eda_item.h:112
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition eda_text.h:94
static GR_TEXT_H_ALIGN_T MapHorizJustify(int aHorizJustify)
Definition eda_text.cpp:70
static GR_TEXT_V_ALIGN_T MapVertJustify(int aVertJustify)
Definition eda_text.cpp:84
static FONT * GetFont(const wxString &aFontName=wxEmptyString, bool aBold=false, bool aItalic=false, const std::vector< wxString > *aEmbeddedFiles=nullptr, bool aForDrawingSheet=false)
Definition font.cpp:143
Commit for the schematic and symbol editors.
Definition sch_commit.h:54
void Push(const wxString &aMessage=wxEmptyString, int aCommitFlags=0) override
Execute the changes.
Schematic editor (Eeschema) main window.
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition sch_item.h:170
const std::vector< SCH_ITEM * > & ConnectedItems(const SCH_SHEET_PATH &aPath) const
Retrieve the set of items connected to this item on the given sheet.
Definition sch_item.cpp:766
SCH_LAYER_ID GetLayer() const
Return the layer this item is on.
Definition sch_item.h:353
virtual void SetStroke(const STROKE_PARAMS &aStroke)
Definition sch_item.h:693
std::optional< wxString > GetConnectionName(const SCH_SHEET_PATH *aSheet=nullptr, bool aLocal=false, bool aIgnoreSheet=false) const
Return the active connection name; absent for missing or stale published rows.
Definition sch_item.cpp:629
virtual STROKE_PARAMS GetStroke() const
Definition sch_item.h:691
virtual bool HasLineStroke() const
Check if this schematic item has line stoke properties.
Definition sch_item.h:689
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
Definition sch_item.h:185
EE_RTREE & Items()
Get the full RTree, usually for iterating.
Definition sch_screen.h:122
SCH_SELECTION & GetSelection()
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
SCH_SCREEN * LastScreen()
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition sch_sheet.h:48
void SetBorderColor(KIGFX::COLOR4D aColor)
Definition sch_sheet.h:154
std::vector< SCH_FIELD > & GetFields()
Return a reference to the vector holding the sheet's fields.
Definition sch_sheet.h:91
SCH_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this sheet.
void SetBackgroundColor(KIGFX::COLOR4D aColor)
Definition sch_sheet.h:157
void SetBorderWidth(int aWidth)
Definition sch_sheet.h:151
std::vector< SCH_SHEET_PIN * > & GetPins()
Definition sch_sheet.h:243
Schematic symbol object.
Definition sch_symbol.h:73
void GetFields(std::vector< SCH_FIELD * > &aVector, bool aVisibleOnly) const override
Populate a std::vector with SCH_FIELDs, sorted in ordinal order.
SCH_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this symbol.
Simple container to manage line stroke parameters.
void SetLineStyle(LINE_STYLE aLineStyle)
void SetWidth(int aWidth)
void SetColor(const KIGFX::COLOR4D &aColor)
const TRANSFORM & GetTransform() const
Definition symbol.h:247
Generic, UI-independent tool event.
Definition tool_event.h:167
#define _(s)
@ FILLED_WITH_COLOR
Definition eda_fill.h:33
@ NO_FILL
Definition eda_fill.h:30
@ LAYER_WIRE
Definition layer_ids.h:474
@ LAYER_NOTES
Definition layer_ids.h:489
@ LAYER_BUS
Definition layer_ids.h:475
KICOMMON_API wxFont GetSmallInfoFont(wxWindow *aWindow)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition ptree.cpp:194
bool WildCompareString(const wxString &pattern, const wxString &string_to_tst, bool case_sensitive)
Compare a string against wild card (* and ?) pattern using the usual rules.
wxString UnescapeString(const wxString &aSource)
LINE_STYLE
Dashed line types.
@ REFERENCE
Field Reference of part, i.e. "IC21".
@ VALUE
Field Value of part, i.e. "3.3K".
KIBIS_PIN * pin
GR_TEXT_H_ALIGN_T
This is API surface mapped to common.types.HorizontalAlignment.
@ GR_TEXT_H_ALIGN_RIGHT
@ GR_TEXT_H_ALIGN_LEFT
GR_TEXT_V_ALIGN_T
This is API surface mapped to common.types.VertialAlignment.
@ GR_TEXT_V_ALIGN_BOTTOM
@ GR_TEXT_V_ALIGN_TOP
@ SCH_LINE_T
Definition typeinfo.h:159
@ SCH_SYMBOL_T
Definition typeinfo.h:168
@ SCH_DIRECTIVE_LABEL_T
Definition typeinfo.h:167
@ SCH_LABEL_T
Definition typeinfo.h:163
@ SCH_SHEET_T
Definition typeinfo.h:171
@ SCH_SHAPE_T
Definition typeinfo.h:145
@ SCH_HIER_LABEL_T
Definition typeinfo.h:165
@ SCH_LABEL_LOCATE_WIRE_T
Definition typeinfo.h:188
@ SCH_TEXT_T
Definition typeinfo.h:147
@ SCH_LABEL_LOCATE_BUS_T
Definition typeinfo.h:189
@ SCH_TEXTBOX_T
Definition typeinfo.h:148
@ SCH_GLOBAL_LABEL_T
Definition typeinfo.h:164
@ SCH_JUNCTION_T
Definition typeinfo.h:155
#define INDETERMINATE_ACTION
Definition ui_common.h:47
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:708