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
21#include <string_utils.h>
22#include <sch_symbol.h>
23#include <sch_connection.h>
24#include <sch_edit_frame.h>
25#include <sch_shape.h>
26#include <sch_line.h>
27#include <sch_junction.h>
28#include <sch_sheet.h>
29#include <sch_sheet_pin.h>
30#include <schematic.h>
31#include <sch_commit.h>
32#include <tool/tool_manager.h>
34#include <tools/sch_edit_tool.h>
35#include <widgets/unit_binder.h>
36#include <widgets/font_choice.h>
37
38static wxString g_fieldnameFilter;
39static wxString g_referenceFilter;
40static wxString g_symbolFilter;
41static wxString g_netFilter;
42
43
45{
46public:
49
50protected:
51 void OnReferenceFilterText( wxCommandEvent& event ) override
52 {
53 m_referenceFilterOpt->SetValue( true );
54 }
55 void OnSymbolFilterText( wxCommandEvent& event ) override
56 {
57 m_symbolFilterOpt->SetValue( true );
58 }
59 void OnFieldNameFilterText( wxCommandEvent& event ) override
60 {
61 m_fieldnameFilterOpt->SetValue( true );
62 }
63 void OnNetFilterText( wxCommandEvent& event ) override
64 {
65 m_netFilterOpt->SetValue( true );
66 }
67
68 bool TransferDataToWindow() override;
69 bool TransferDataFromWindow() override;
70
71 void visitItem( SCH_COMMIT* aCommit, const SCH_SHEET_PATH& aSheetPath, SCH_ITEM* aItem );
72 void processItem( SCH_COMMIT* aCommit, const SCH_SHEET_PATH& aSheetPath, SCH_ITEM* aItem );
73
74private:
77
81};
82
83
89{
90 m_parent = parent;
91
93
94 // Allow indeterminate state in font control and rebuild list
95 m_fontCtrl->SetHasIndeterminateChoice();
96 m_fontCtrl->RefreshFonts();
97
98 m_textColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
99 m_textColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
100 m_colorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
101 m_colorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
102 m_fillColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
103 m_fillColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
104 m_dotColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
105 m_dotColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
106
107 m_staticText12->SetFont( KIUI::GetSmallInfoFont( this ).Italic() );
108 m_staticText13->SetFont( KIUI::GetSmallInfoFont( this ).Italic() );
109 m_staticText14->SetFont( KIUI::GetSmallInfoFont( this ).Italic() );
110 m_staticText15->SetFont( KIUI::GetSmallInfoFont( this ).Italic() );
111 m_staticText16->SetFont( KIUI::GetSmallInfoFont( this ).Italic() );
112
114
116}
117
118
126
127
129{
130 SCH_SELECTION_TOOL* selectionTool = m_parent->GetToolManager()->GetTool<SCH_SELECTION_TOOL>();
131 m_selection = selectionTool->GetSelection();
132
133 // SetValue() generates events, ChangeValue() does not
134 m_fieldnameFilter->ChangeValue( g_fieldnameFilter );
135 m_referenceFilter->ChangeValue( g_referenceFilter );
136 m_symbolFilter->ChangeValue( g_symbolFilter );
137 m_netFilter->ChangeValue( g_netFilter );
138
139 if( g_netFilter.IsEmpty() && !m_parent->GetHighlightedConnection().IsEmpty() )
140 m_netFilter->SetValue( m_parent->GetHighlightedConnection() );
141
142 m_fontCtrl->SetStringSelection( INDETERMINATE_ACTION );
143
145 m_orientation->SetStringSelection( INDETERMINATE_ACTION );
146 m_hAlign->SetStringSelection( INDETERMINATE_ACTION );
147 m_vAlign->SetStringSelection( INDETERMINATE_ACTION );
148 m_italic->Set3StateValue( wxCHK_UNDETERMINED );
149 m_bold->Set3StateValue( wxCHK_UNDETERMINED );
150 m_visible->Set3StateValue( wxCHK_UNDETERMINED );
151 m_showFieldNames->Set3StateValue( wxCHK_UNDETERMINED );
153 m_lineStyle->SetStringSelection( INDETERMINATE_ACTION );
155 m_setColor->SetValue( false );
156 m_setFillColor->SetValue( false );
157 m_setDotColor->SetValue( false );
158
159 return true;
160}
161
162
164 const SCH_SHEET_PATH& aSheetPath,
165 SCH_ITEM* aItem )
166{
167 if( m_selectedFilterOpt->GetValue() )
168 {
169 if( !aItem->IsSelected() && ( !aItem->GetParent() || !aItem->GetParent()->IsSelected() ) )
170 return;
171 }
172
173 aCommit->Modify( aItem, aSheetPath.LastScreen() );
174
175 if( EDA_TEXT* eda_text = dynamic_cast<EDA_TEXT*>( aItem ) )
176 {
177 if( !m_textSize.IsIndeterminate() )
178 eda_text->SetTextSize( VECTOR2I( m_textSize.GetIntValue(), m_textSize.GetIntValue() ) );
179
180 if( m_setTextColor->GetValue() )
181 eda_text->SetTextColor( m_textColorSwatch->GetSwatchColor() );
182
183 if( m_hAlign->GetStringSelection() != INDETERMINATE_ACTION )
184 {
185 GR_TEXT_H_ALIGN_T hAlign = EDA_TEXT::MapHorizJustify( m_hAlign->GetSelection() - 1 );
186 SCH_SYMBOL* parentSymbol = dynamic_cast<SCH_SYMBOL*>( aItem->GetParent() );
187
188 if( parentSymbol && parentSymbol->GetTransform().x1 < 0 )
189 {
190 if( hAlign == GR_TEXT_H_ALIGN_LEFT )
191 hAlign = GR_TEXT_H_ALIGN_RIGHT;
192 else if( hAlign == GR_TEXT_H_ALIGN_RIGHT )
193 hAlign = GR_TEXT_H_ALIGN_LEFT;
194 }
195
196 eda_text->SetHorizJustify( hAlign );
197 }
198
199 if( m_vAlign->GetStringSelection() != INDETERMINATE_ACTION )
200 {
201 GR_TEXT_V_ALIGN_T vAlign = EDA_TEXT::MapVertJustify( m_vAlign->GetSelection() - 1 );
202 SCH_SYMBOL* parentSymbol = dynamic_cast<SCH_SYMBOL*>( aItem->GetParent() );
203
204 if( parentSymbol && parentSymbol->GetTransform().y1 < 0 )
205 {
206 if( vAlign == GR_TEXT_V_ALIGN_TOP )
207 vAlign = GR_TEXT_V_ALIGN_BOTTOM;
208 else if( vAlign == GR_TEXT_V_ALIGN_BOTTOM )
209 vAlign = GR_TEXT_V_ALIGN_TOP;
210 }
211
212 eda_text->SetVertJustify( vAlign );
213 }
214
215 if( m_italic->Get3StateValue() != wxCHK_UNDETERMINED )
216 eda_text->SetItalic( m_italic->GetValue() );
217
218 // Must come after SetTextSize()
219 if( m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
220 eda_text->SetBold( m_bold->GetValue() );
221
222 // Must come after SetBold() & SetItalic()
223 if( m_fontCtrl->GetStringSelection() != INDETERMINATE_ACTION )
224 {
225 eda_text->SetFont( m_fontCtrl->GetFontSelection( eda_text->IsBold(),
226 eda_text->IsItalic() ) );
227 }
228 else if( m_italic->Get3StateValue() != wxCHK_UNDETERMINED
229 || m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
230 {
231 if( !eda_text->GetFontName().IsEmpty() )
232 {
233 eda_text->SetFont( KIFONT::FONT::GetFont( eda_text->GetFontName(),
234 eda_text->IsBold(),
235 eda_text->IsItalic() ) );
236 }
237 }
238 }
239
240 if( SCH_LABEL_BASE* sch_label = dynamic_cast<SCH_LABEL_BASE*>( aItem ) )
241 {
242 if( m_orientation->GetStringSelection() != INDETERMINATE_ACTION )
243 sch_label->SetSpinStyle( (SPIN_STYLE::SPIN) m_orientation->GetSelection() );
244 }
245
246 if( SCH_FIELD* sch_field = dynamic_cast<SCH_FIELD*>( aItem ) )
247 {
248 if( m_visible->Get3StateValue() != wxCHK_UNDETERMINED )
249 sch_field->SetVisible( m_visible->GetValue() );
250
251 if( m_showFieldNames->Get3StateValue() != wxCHK_UNDETERMINED )
252 sch_field->SetNameShown( m_showFieldNames->GetValue() );
253 }
254
255 if( aItem->HasLineStroke() )
256 {
257 STROKE_PARAMS stroke = aItem->GetStroke();
258
259 if( !m_lineWidth.IsIndeterminate() )
260 stroke.SetWidth( m_lineWidth.GetIntValue() );
261
262 if( m_lineStyle->GetStringSelection() != INDETERMINATE_ACTION )
263 stroke.SetLineStyle( (LINE_STYLE) m_lineStyle->GetSelection() );
264
265 if( m_setColor->GetValue() )
266 stroke.SetColor( m_colorSwatch->GetSwatchColor() );
267
268 aItem->SetStroke( stroke );
269 }
270
271 if( SCH_SHAPE* shape = dynamic_cast<SCH_SHAPE*>( aItem ) )
272 {
273 if( m_setFillColor->GetValue() )
274 {
275 shape->SetFillColor( m_fillColorSwatch->GetSwatchColor() );
276
277 if( m_fillColorSwatch->GetSwatchColor() == COLOR4D::UNSPECIFIED )
278 shape->SetFillMode( FILL_T::NO_FILL );
279 else
280 shape->SetFillMode( FILL_T::FILLED_WITH_COLOR );
281 }
282 }
283
284 if( SCH_JUNCTION* junction = dynamic_cast<SCH_JUNCTION*>( aItem ) )
285 {
286 if( !m_junctionSize.IsIndeterminate() )
287 junction->SetDiameter( m_junctionSize.GetIntValue() );
288
289 if( m_setDotColor->GetValue() )
290 junction->SetColor( m_dotColorSwatch->GetSwatchColor() );
291 }
292}
293
295 const SCH_SHEET_PATH& aSheetPath,
296 SCH_ITEM* aItem )
297{
298 if( m_netFilterOpt->GetValue() && !m_netFilter->GetValue().IsEmpty() )
299 {
300 SCH_CONNECTION* connection = aItem->Connection( &aSheetPath );
301
302 if( !connection )
303 return;
304
305 if( !WildCompareString( m_netFilter->GetValue(), connection->Name(), false ) )
306 return;
307 }
308
309 if( m_referenceFilterOpt->GetValue() && !m_referenceFilter->GetValue().IsEmpty() )
310 {
311 if( aItem->Type() == SCH_SYMBOL_T )
312 {
313 wxString ref = static_cast<SCH_SYMBOL*>( aItem )->GetRef( &aSheetPath );
314
315 if( !WildCompareString( m_referenceFilter->GetValue(), ref, false ) )
316 return;
317 }
318 }
319
320 if( m_symbolFilterOpt->GetValue() && !m_symbolFilter->GetValue().IsEmpty() )
321 {
322 if( aItem->Type() == SCH_SYMBOL_T )
323 {
324 wxString id = UnescapeString( static_cast<SCH_SYMBOL*>( aItem )->GetLibId().Format() );
325
326 if( !WildCompareString( m_symbolFilter->GetValue(), id, false ) )
327 return;
328 }
329 }
330
331 if( m_typeFilterOpt->GetValue() )
332 {
333 if( aItem->Type() == SCH_SYMBOL_T )
334 {
335 bool isPower = static_cast<SCH_SYMBOL*>( aItem )->GetLibSymbolRef()->IsPower();
336
337 if( isPower != ( m_typeFilter->GetSelection() == 1 ) )
338 return;
339 }
340 }
341
342 static const std::vector<KICAD_T> wireLabelTypes = { SCH_LABEL_LOCATE_WIRE_T };
343 static const std::vector<KICAD_T> busLabelTypes = { SCH_LABEL_LOCATE_BUS_T };
344
345 switch( aItem->Type() )
346 {
347 case SCH_SYMBOL_T:
348 {
349 SCH_SYMBOL* symbol = (SCH_SYMBOL*) aItem;
350
351 if( m_references->GetValue() )
352 processItem( aCommit, aSheetPath, symbol->GetField( FIELD_T::REFERENCE ) );
353
354 if( m_values->GetValue() )
355 processItem( aCommit, aSheetPath, symbol->GetField( FIELD_T::VALUE ) );
356
357 if( m_otherFields->GetValue() )
358 {
359 for( SCH_FIELD& field : symbol->GetFields() )
360 {
361 if( field.GetId() == FIELD_T::REFERENCE || field.GetId() == FIELD_T::VALUE )
362 continue;
363
364 const wxString& fieldName = field.GetName();
365
366 if( !m_fieldnameFilterOpt->GetValue() || m_fieldnameFilter->GetValue().IsEmpty()
367 || WildCompareString( m_fieldnameFilter->GetValue(), fieldName, false ) )
368 {
369 processItem( aCommit, aSheetPath, &field );
370 }
371 }
372 }
373
374 break;
375 }
376
377 case SCH_SHEET_T:
378 {
379 SCH_SHEET* sheet = static_cast<SCH_SHEET*>( aItem );
380
381 if( m_sheetTitles->GetValue() )
382 processItem( aCommit, aSheetPath, sheet->GetField( FIELD_T::SHEET_NAME ) );
383
384 if( m_sheetFields->GetValue() )
385 {
386 for( SCH_FIELD& field : sheet->GetFields() )
387 {
388 if( field.GetId() == FIELD_T::SHEET_NAME )
389 continue;
390
391 const wxString& fieldName = field.GetName();
392
393 if( !m_fieldnameFilterOpt->GetValue() || m_fieldnameFilter->GetValue().IsEmpty()
394 || WildCompareString( m_fieldnameFilter->GetValue(), fieldName, false ) )
395 {
396 processItem( aCommit, aSheetPath, &field );
397 }
398 }
399 }
400
401 if( m_sheetBorders->GetValue() )
402 {
403 if( !m_lineWidth.IsIndeterminate() )
404 sheet->SetBorderWidth( m_lineWidth.GetIntValue() );
405
406 if( m_setColor->GetValue() )
407 sheet->SetBorderColor( m_colorSwatch->GetSwatchColor() );
408
409 if( m_setFillColor->GetValue() )
410 sheet->SetBackgroundColor( m_fillColorSwatch->GetSwatchColor() );
411 }
412
413 if( m_sheetPins->GetValue() )
414 {
415 for( SCH_SHEET_PIN* pin : sheet->GetPins() )
416 processItem( aCommit, aSheetPath, pin );
417 }
418
419 break;
420 }
421
422 case SCH_LINE_T:
423 if( m_schTextAndGraphics->GetValue() && aItem->GetLayer() == LAYER_NOTES )
424 processItem( aCommit, aSheetPath, aItem );
425 else if( m_wires->GetValue() && aItem->GetLayer() == LAYER_WIRE )
426 processItem( aCommit, aSheetPath, aItem );
427 else if( m_buses->GetValue() && aItem->GetLayer() == LAYER_BUS )
428 processItem( aCommit, aSheetPath, aItem );
429
430 break;
431
432 case SCH_LABEL_T:
434 case SCH_HIER_LABEL_T:
436 if( m_wires->GetValue() && aItem->IsType( wireLabelTypes ) )
437 processItem( aCommit, aSheetPath, aItem );
438
439 if( m_buses->GetValue() && aItem->IsType( busLabelTypes ) )
440 processItem( aCommit, aSheetPath, aItem );
441
442 if( m_globalLabels->GetValue() && aItem->Type() == SCH_GLOBAL_LABEL_T )
443 processItem( aCommit, aSheetPath, aItem );
444
445 if( m_hierLabels->GetValue() && aItem->Type() == SCH_HIER_LABEL_T )
446 processItem( aCommit, aSheetPath, aItem );
447
448 if( m_labelFields->GetValue() )
449 {
450 for( SCH_FIELD& field : static_cast<SCH_LABEL_BASE*>( aItem )->GetFields() )
451 {
452 const wxString& fieldName = field.GetName();
453
454 if( !m_fieldnameFilterOpt->GetValue() || m_fieldnameFilter->GetValue().IsEmpty()
455 || WildCompareString( m_fieldnameFilter->GetValue(), fieldName, false ) )
456 {
457 processItem( aCommit, aSheetPath, &field );
458 }
459 }
460 }
461
462 break;
463
464 case SCH_JUNCTION_T:
465 {
466 SCH_JUNCTION* junction = static_cast<SCH_JUNCTION*>( aItem );
467
468 for( SCH_ITEM* item : junction->ConnectedItems( aSheetPath ) )
469 {
470 if( item->GetLayer() == LAYER_BUS && m_buses->GetValue() )
471 {
472 processItem( aCommit, aSheetPath, aItem );
473 break;
474 }
475 else if( item->GetLayer() == LAYER_WIRE && m_wires->GetValue() )
476 {
477 processItem( aCommit, aSheetPath, aItem );
478 break;
479 }
480 }
481
482 break;
483 }
484
485 case SCH_TEXT_T:
486 case SCH_TEXTBOX_T:
487 case SCH_SHAPE_T:
488 if( m_schTextAndGraphics->GetValue() )
489 processItem( aCommit, aSheetPath, aItem );
490
491 break;
492
493 default:
494 break;
495 }
496}
497
498
500{
501 if( !m_textSize.Validate( 1.0, 10000.0, EDA_UNITS::MILS ) ) // 1 mil .. 10 inches
502 return false;
503
504 SCH_SHEET_PATH currentSheet = m_parent->GetCurrentSheet();
505 SCH_COMMIT commit( m_parent );
506
507 // Go through sheets
508 for( const SCH_SHEET_PATH& sheetPath : m_parent->Schematic().Hierarchy() )
509 {
510 SCH_SCREEN* screen = sheetPath.LastScreen();
511
512 if( screen )
513 {
514 m_parent->SetCurrentSheet( sheetPath );
515
516 for( SCH_ITEM* item : screen->Items() )
517 visitItem( &commit, sheetPath, item );
518 }
519 }
520
521 if( !commit.Empty() )
522 {
523 commit.Push( _( "Edit Text and Graphics" ) );
524 m_parent->HardRedraw();
525 }
526
527 // Reset the view to where we left the user
528 m_parent->SetCurrentSheet( currentSheet );
529 m_parent->Refresh();
530
531 return true;
532}
533
534
536{
538 dlg.ShowModal();
539 return 0;
540}
541
542
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
Definition color4d.h:398
bool Empty() const
Definition commit.h:134
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:108
bool IsSelected() const
Definition eda_item.h:132
EDA_ITEM * GetParent() const
Definition eda_item.h:110
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition eda_text.h:89
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
virtual void Push(const wxString &aMessage=wxT("A commit"), int aCommitFlags=0) override
Execute the changes.
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
wxString Name(bool aIgnoreSheet=false) const
Schematic editor (Eeschema) main window.
int GlobalEdit(const TOOL_EVENT &aEvent)
Lock/unlock selected items.
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition sch_item.h:162
const std::vector< SCH_ITEM * > & ConnectedItems(const SCH_SHEET_PATH &aPath)
Retrieve the set of items connected to this item on the given sheet.
Definition sch_item.cpp:558
SCH_LAYER_ID GetLayer() const
Return the layer this item is on.
Definition sch_item.h:338
virtual void SetStroke(const STROKE_PARAMS &aStroke)
Definition sch_item.h:643
SCH_CONNECTION * Connection(const SCH_SHEET_PATH *aSheet=nullptr) const
Retrieve the connection associated with this object in the given sheet.
Definition sch_item.cpp:487
virtual STROKE_PARAMS GetStroke() const
Definition sch_item.h:641
virtual bool HasLineStroke() const
Check if this schematic item has line stoke properties.
Definition sch_item.h:639
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
Definition sch_item.h:177
EE_RTREE & Items()
Get the full RTree, usually for iterating.
Definition sch_screen.h:115
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:44
void SetBorderColor(KIGFX::COLOR4D aColor)
Definition sch_sheet.h:148
std::vector< SCH_FIELD > & GetFields()
Return a reference to the vector holding the sheet's fields.
Definition sch_sheet.h:87
SCH_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this sheet.
void SetBackgroundColor(KIGFX::COLOR4D aColor)
Definition sch_sheet.h:151
void SetBorderWidth(int aWidth)
Definition sch_sheet.h:145
std::vector< SCH_SHEET_PIN * > & GetPins()
Definition sch_sheet.h:227
Schematic symbol object.
Definition sch_symbol.h:69
void GetFields(std::vector< SCH_FIELD * > &aVector, bool aVisibleOnly) const override
Populate a std::vector with SCH_FIELDs, sorted in ordinal order.
bool IsPower() const override
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:243
Generic, UI-independent tool event.
Definition tool_event.h:167
#define _(s)
@ FILLED_WITH_COLOR
Definition eda_shape.h:63
@ NO_FILL
Definition eda_shape.h:60
@ LAYER_WIRE
Definition layer_ids.h:450
@ LAYER_NOTES
Definition layer_ids.h:465
@ LAYER_BUS
Definition layer_ids.h:451
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:160
@ SCH_SYMBOL_T
Definition typeinfo.h:169
@ SCH_DIRECTIVE_LABEL_T
Definition typeinfo.h:168
@ SCH_LABEL_T
Definition typeinfo.h:164
@ SCH_SHEET_T
Definition typeinfo.h:172
@ SCH_SHAPE_T
Definition typeinfo.h:146
@ SCH_HIER_LABEL_T
Definition typeinfo.h:166
@ SCH_LABEL_LOCATE_WIRE_T
Definition typeinfo.h:189
@ SCH_TEXT_T
Definition typeinfo.h:148
@ SCH_LABEL_LOCATE_BUS_T
Definition typeinfo.h:190
@ SCH_TEXTBOX_T
Definition typeinfo.h:149
@ SCH_GLOBAL_LABEL_T
Definition typeinfo.h:165
@ SCH_JUNCTION_T
Definition typeinfo.h:156
#define INDETERMINATE_ACTION
Definition ui_common.h:47
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:683