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, you may find one here:
18 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
19 * or you may search the http://www.gnu.org website for the version 2 license,
20 * or you may write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 */
23
25#include <string_utils.h>
26#include <sch_symbol.h>
27#include <sch_connection.h>
28#include <sch_edit_frame.h>
29#include <sch_shape.h>
30#include <sch_line.h>
31#include <sch_junction.h>
32#include <sch_sheet.h>
33#include <sch_sheet_pin.h>
34#include <schematic.h>
35#include <sch_commit.h>
36#include <tool/tool_manager.h>
38#include <tools/sch_edit_tool.h>
39#include <widgets/unit_binder.h>
40#include <widgets/font_choice.h>
41
42static wxString g_fieldnameFilter;
43static wxString g_referenceFilter;
44static wxString g_symbolFilter;
45static wxString g_netFilter;
46
47
49{
50public:
53
54protected:
55 void OnReferenceFilterText( wxCommandEvent& event ) override
56 {
57 m_referenceFilterOpt->SetValue( true );
58 }
59 void OnSymbolFilterText( wxCommandEvent& event ) override
60 {
61 m_symbolFilterOpt->SetValue( true );
62 }
63 void OnFieldNameFilterText( wxCommandEvent& event ) override
64 {
65 m_fieldnameFilterOpt->SetValue( true );
66 }
67 void OnNetFilterText( wxCommandEvent& event ) override
68 {
69 m_netFilterOpt->SetValue( true );
70 }
71
72 bool TransferDataToWindow() override;
73 bool TransferDataFromWindow() override;
74
75 void visitItem( SCH_COMMIT* aCommit, const SCH_SHEET_PATH& aSheetPath, SCH_ITEM* aItem );
76 void processItem( SCH_COMMIT* aCommit, const SCH_SHEET_PATH& aSheetPath, SCH_ITEM* aItem );
77
78private:
81
85};
86
87
93{
94 m_parent = parent;
95
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
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 SCH_CONNECTION* connection = aItem->Connection( &aSheetPath );
302
303 if( !connection )
304 return;
305
306 if( !WildCompareString( m_netFilter->GetValue(), connection->Name(), false ) )
307 return;
308 }
309
310 if( m_referenceFilterOpt->GetValue() && !m_referenceFilter->GetValue().IsEmpty() )
311 {
312 if( aItem->Type() == SCH_SYMBOL_T )
313 {
314 wxString ref = static_cast<SCH_SYMBOL*>( aItem )->GetRef( &aSheetPath );
315
316 if( !WildCompareString( m_referenceFilter->GetValue(), ref, false ) )
317 return;
318 }
319 }
320
321 if( m_symbolFilterOpt->GetValue() && !m_symbolFilter->GetValue().IsEmpty() )
322 {
323 if( aItem->Type() == SCH_SYMBOL_T )
324 {
325 wxString id = UnescapeString( static_cast<SCH_SYMBOL*>( aItem )->GetLibId().Format() );
326
327 if( !WildCompareString( m_symbolFilter->GetValue(), id, false ) )
328 return;
329 }
330 }
331
332 if( m_typeFilterOpt->GetValue() )
333 {
334 if( aItem->Type() == SCH_SYMBOL_T )
335 {
336 bool isPower = static_cast<SCH_SYMBOL*>( aItem )->GetLibSymbolRef()->IsPower();
337
338 if( isPower != ( m_typeFilter->GetSelection() == 1 ) )
339 return;
340 }
341 }
342
343 static const std::vector<KICAD_T> wireLabelTypes = { SCH_LABEL_LOCATE_WIRE_T };
344 static const std::vector<KICAD_T> busLabelTypes = { SCH_LABEL_LOCATE_BUS_T };
345
346 switch( aItem->Type() )
347 {
348 case SCH_SYMBOL_T:
349 {
350 SCH_SYMBOL* symbol = (SCH_SYMBOL*) aItem;
351
352 if( m_references->GetValue() )
353 processItem( aCommit, aSheetPath, symbol->GetField( FIELD_T::REFERENCE ) );
354
355 if( m_values->GetValue() )
356 processItem( aCommit, aSheetPath, symbol->GetField( FIELD_T::VALUE ) );
357
358 if( m_otherFields->GetValue() )
359 {
360 for( SCH_FIELD& field : symbol->GetFields() )
361 {
362 if( field.GetId() == FIELD_T::REFERENCE || field.GetId() == FIELD_T::VALUE )
363 continue;
364
365 const wxString& fieldName = field.GetName();
366
367 if( !m_fieldnameFilterOpt->GetValue() || m_fieldnameFilter->GetValue().IsEmpty()
368 || WildCompareString( m_fieldnameFilter->GetValue(), fieldName, false ) )
369 {
370 processItem( aCommit, aSheetPath, &field );
371 }
372 }
373 }
374
375 break;
376 }
377
378 case SCH_SHEET_T:
379 {
380 SCH_SHEET* sheet = static_cast<SCH_SHEET*>( aItem );
381
382 if( m_sheetTitles->GetValue() )
383 processItem( aCommit, aSheetPath, sheet->GetField( FIELD_T::SHEET_NAME ) );
384
385 if( m_sheetFields->GetValue() )
386 {
387 for( SCH_FIELD& field : sheet->GetFields() )
388 {
389 if( field.GetId() == FIELD_T::SHEET_NAME )
390 continue;
391
392 const wxString& fieldName = field.GetName();
393
394 if( !m_fieldnameFilterOpt->GetValue() || m_fieldnameFilter->GetValue().IsEmpty()
395 || WildCompareString( m_fieldnameFilter->GetValue(), fieldName, false ) )
396 {
397 processItem( aCommit, aSheetPath, &field );
398 }
399 }
400 }
401
402 if( m_sheetBorders->GetValue() )
403 {
404 if( !m_lineWidth.IsIndeterminate() )
405 sheet->SetBorderWidth( m_lineWidth.GetIntValue() );
406
407 if( m_setColor->GetValue() )
408 sheet->SetBorderColor( m_colorSwatch->GetSwatchColor() );
409
410 if( m_setFillColor->GetValue() )
411 sheet->SetBackgroundColor( m_fillColorSwatch->GetSwatchColor() );
412 }
413
414 if( m_sheetPins->GetValue() )
415 {
416 for( SCH_SHEET_PIN* pin : sheet->GetPins() )
417 processItem( aCommit, aSheetPath, pin );
418 }
419
420 break;
421 }
422
423 case SCH_LINE_T:
424 if( m_schTextAndGraphics->GetValue() && aItem->GetLayer() == LAYER_NOTES )
425 processItem( aCommit, aSheetPath, aItem );
426 else if( m_wires->GetValue() && aItem->GetLayer() == LAYER_WIRE )
427 processItem( aCommit, aSheetPath, aItem );
428 else if( m_buses->GetValue() && aItem->GetLayer() == LAYER_BUS )
429 processItem( aCommit, aSheetPath, aItem );
430
431 break;
432
433 case SCH_LABEL_T:
435 case SCH_HIER_LABEL_T:
437 if( m_wires->GetValue() && aItem->IsType( wireLabelTypes ) )
438 processItem( aCommit, aSheetPath, aItem );
439
440 if( m_buses->GetValue() && aItem->IsType( busLabelTypes ) )
441 processItem( aCommit, aSheetPath, aItem );
442
443 if( m_globalLabels->GetValue() && aItem->Type() == SCH_GLOBAL_LABEL_T )
444 processItem( aCommit, aSheetPath, aItem );
445
446 if( m_hierLabels->GetValue() && aItem->Type() == SCH_HIER_LABEL_T )
447 processItem( aCommit, aSheetPath, aItem );
448
449 if( m_labelFields->GetValue() )
450 {
451 for( SCH_FIELD& field : static_cast<SCH_LABEL_BASE*>( aItem )->GetFields() )
452 {
453 const wxString& fieldName = field.GetName();
454
455 if( !m_fieldnameFilterOpt->GetValue() || m_fieldnameFilter->GetValue().IsEmpty()
456 || WildCompareString( m_fieldnameFilter->GetValue(), fieldName, false ) )
457 {
458 processItem( aCommit, aSheetPath, &field );
459 }
460 }
461 }
462
463 break;
464
465 case SCH_JUNCTION_T:
466 {
467 SCH_JUNCTION* junction = static_cast<SCH_JUNCTION*>( aItem );
468
469 for( SCH_ITEM* item : junction->ConnectedItems( aSheetPath ) )
470 {
471 if( item->GetLayer() == LAYER_BUS && m_buses->GetValue() )
472 {
473 processItem( aCommit, aSheetPath, aItem );
474 break;
475 }
476 else if( item->GetLayer() == LAYER_WIRE && m_wires->GetValue() )
477 {
478 processItem( aCommit, aSheetPath, aItem );
479 break;
480 }
481 }
482
483 break;
484 }
485
486 case SCH_TEXT_T:
487 case SCH_TEXTBOX_T:
488 case SCH_SHAPE_T:
489 if( m_schTextAndGraphics->GetValue() )
490 processItem( aCommit, aSheetPath, aItem );
491
492 break;
493
494 default:
495 break;
496 }
497}
498
499
501{
502 if( !m_textSize.Validate( 1.0, 10000.0, EDA_UNITS::MILS ) ) // 1 mil .. 10 inches
503 return false;
504
505 SCH_SHEET_PATH currentSheet = m_parent->GetCurrentSheet();
506 SCH_COMMIT commit( m_parent );
507
508 // Go through sheets
509 for( const SCH_SHEET_PATH& sheetPath : m_parent->Schematic().Hierarchy() )
510 {
511 SCH_SCREEN* screen = sheetPath.LastScreen();
512
513 if( screen )
514 {
515 m_parent->SetCurrentSheet( sheetPath );
516
517 for( SCH_ITEM* item : screen->Items() )
518 visitItem( &commit, sheetPath, item );
519 }
520 }
521
522 if( !commit.Empty() )
523 {
524 commit.Push( _( "Edit Text and Graphics" ) );
525 m_parent->HardRedraw();
526 }
527
528 // Reset the view to where we left the user
529 m_parent->SetCurrentSheet( currentSheet );
530 m_parent->Refresh();
531
532 return true;
533}
534
535
537{
539 dlg.ShowModal();
540 return 0;
541}
542
543
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:137
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:106
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:127
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:79
static GR_TEXT_H_ALIGN_T MapHorizJustify(int aHorizJustify)
Definition eda_text.cpp:68
static GR_TEXT_V_ALIGN_T MapVertJustify(int aVertJustify)
Definition eda_text.cpp:82
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:147
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)
Delete the selected items, or the item under the cursor.
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition sch_item.h:167
const SCH_ITEM_VEC & ConnectedItems(const SCH_SHEET_PATH &aPath)
Retrieve the set of items connected to this item on the given sheet.
Definition sch_item.cpp:382
SCH_LAYER_ID GetLayer() const
Return the layer this item is on.
Definition sch_item.h:309
virtual void SetStroke(const STROKE_PARAMS &aStroke)
Definition sch_item.h:612
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:323
virtual STROKE_PARAMS GetStroke() const
Definition sch_item.h:610
virtual bool HasLineStroke() const
Check if this schematic item has line stoke properties.
Definition sch_item.h:608
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
Definition sch_item.h:182
EE_RTREE & Items()
Get the full RTree, usually for iterating.
Definition sch_screen.h:117
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:47
void SetBorderColor(KIGFX::COLOR4D aColor)
Definition sch_sheet.h:125
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:128
void SetBorderWidth(int aWidth)
Definition sch_sheet.h:122
std::vector< SCH_SHEET_PIN * > & GetPins()
Definition sch_sheet.h:187
Schematic symbol object.
Definition sch_symbol.h:75
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:202
Generic, UI-independent tool event.
Definition tool_event.h:171
#define _(s)
@ FILLED_WITH_COLOR
Definition eda_shape.h:60
@ NO_FILL
Definition eda_shape.h:57
@ LAYER_WIRE
Definition layer_ids.h:451
@ LAYER_NOTES
Definition layer_ids.h:466
@ LAYER_BUS
Definition layer_ids.h:452
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:198
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".
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:165
@ SCH_SYMBOL_T
Definition typeinfo.h:174
@ SCH_DIRECTIVE_LABEL_T
Definition typeinfo.h:173
@ SCH_LABEL_T
Definition typeinfo.h:169
@ SCH_SHEET_T
Definition typeinfo.h:177
@ SCH_SHAPE_T
Definition typeinfo.h:151
@ SCH_HIER_LABEL_T
Definition typeinfo.h:171
@ SCH_LABEL_LOCATE_WIRE_T
Definition typeinfo.h:194
@ SCH_TEXT_T
Definition typeinfo.h:153
@ SCH_LABEL_LOCATE_BUS_T
Definition typeinfo.h:195
@ SCH_TEXTBOX_T
Definition typeinfo.h:154
@ SCH_GLOBAL_LABEL_T
Definition typeinfo.h:170
@ SCH_JUNCTION_T
Definition typeinfo.h:161
#define INDETERMINATE_ACTION
Definition ui_common.h:47
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:695