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 // Allow indeterminate state in font control and rebuild list
99 m_fontCtrl->SetHasIndeterminateChoice();
100 m_fontCtrl->RefreshFonts();
101
102 m_textColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
103 m_textColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
104 m_colorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
105 m_colorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
106 m_fillColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
107 m_fillColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
108 m_dotColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
109 m_dotColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
110
111 m_staticText12->SetFont( KIUI::GetSmallInfoFont( this ).Italic() );
112 m_staticText13->SetFont( KIUI::GetSmallInfoFont( this ).Italic() );
113 m_staticText14->SetFont( KIUI::GetSmallInfoFont( this ).Italic() );
114 m_staticText15->SetFont( KIUI::GetSmallInfoFont( this ).Italic() );
115 m_staticText16->SetFont( KIUI::GetSmallInfoFont( this ).Italic() );
116
118
120}
121
122
130
131
133{
134 SCH_SELECTION_TOOL* selectionTool = m_parent->GetToolManager()->GetTool<SCH_SELECTION_TOOL>();
135 m_selection = selectionTool->GetSelection();
136
137 // SetValue() generates events, ChangeValue() does not
138 m_fieldnameFilter->ChangeValue( g_fieldnameFilter );
139 m_referenceFilter->ChangeValue( g_referenceFilter );
140 m_symbolFilter->ChangeValue( g_symbolFilter );
141 m_netFilter->ChangeValue( g_netFilter );
142
143 if( g_netFilter.IsEmpty() && !m_parent->GetHighlightedConnection().IsEmpty() )
144 m_netFilter->SetValue( m_parent->GetHighlightedConnection() );
145
146 m_fontCtrl->SetStringSelection( INDETERMINATE_ACTION );
147
149 m_orientation->SetStringSelection( INDETERMINATE_ACTION );
150 m_hAlign->SetStringSelection( INDETERMINATE_ACTION );
151 m_vAlign->SetStringSelection( INDETERMINATE_ACTION );
152 m_italic->Set3StateValue( wxCHK_UNDETERMINED );
153 m_bold->Set3StateValue( wxCHK_UNDETERMINED );
154 m_visible->Set3StateValue( wxCHK_UNDETERMINED );
155 m_showFieldNames->Set3StateValue( wxCHK_UNDETERMINED );
157 m_lineStyle->SetStringSelection( INDETERMINATE_ACTION );
159 m_setColor->SetValue( false );
160 m_setFillColor->SetValue( false );
161 m_setDotColor->SetValue( false );
162
163 return true;
164}
165
166
168 const SCH_SHEET_PATH& aSheetPath,
169 SCH_ITEM* aItem )
170{
171 if( m_selectedFilterOpt->GetValue() )
172 {
173 if( !aItem->IsSelected() && ( !aItem->GetParent() || !aItem->GetParent()->IsSelected() ) )
174 return;
175 }
176
177 aCommit->Modify( aItem, aSheetPath.LastScreen() );
178
179 if( EDA_TEXT* eda_text = dynamic_cast<EDA_TEXT*>( aItem ) )
180 {
181 if( !m_textSize.IsIndeterminate() )
182 eda_text->SetTextSize( VECTOR2I( m_textSize.GetIntValue(), m_textSize.GetIntValue() ) );
183
184 if( m_setTextColor->GetValue() )
185 eda_text->SetTextColor( m_textColorSwatch->GetSwatchColor() );
186
187 if( m_hAlign->GetStringSelection() != INDETERMINATE_ACTION )
188 {
189 GR_TEXT_H_ALIGN_T hAlign = EDA_TEXT::MapHorizJustify( m_hAlign->GetSelection() - 1 );
190 SCH_SYMBOL* parentSymbol = dynamic_cast<SCH_SYMBOL*>( aItem->GetParent() );
191
192 if( parentSymbol && parentSymbol->GetTransform().x1 < 0 )
193 {
194 if( hAlign == GR_TEXT_H_ALIGN_LEFT )
195 hAlign = GR_TEXT_H_ALIGN_RIGHT;
196 else if( hAlign == GR_TEXT_H_ALIGN_RIGHT )
197 hAlign = GR_TEXT_H_ALIGN_LEFT;
198 }
199
200 eda_text->SetHorizJustify( hAlign );
201 }
202
203 if( m_vAlign->GetStringSelection() != INDETERMINATE_ACTION )
204 {
205 GR_TEXT_V_ALIGN_T vAlign = EDA_TEXT::MapVertJustify( m_vAlign->GetSelection() - 1 );
206 SCH_SYMBOL* parentSymbol = dynamic_cast<SCH_SYMBOL*>( aItem->GetParent() );
207
208 if( parentSymbol && parentSymbol->GetTransform().y1 < 0 )
209 {
210 if( vAlign == GR_TEXT_V_ALIGN_TOP )
211 vAlign = GR_TEXT_V_ALIGN_BOTTOM;
212 else if( vAlign == GR_TEXT_V_ALIGN_BOTTOM )
213 vAlign = GR_TEXT_V_ALIGN_TOP;
214 }
215
216 eda_text->SetVertJustify( vAlign );
217 }
218
219 if( m_italic->Get3StateValue() != wxCHK_UNDETERMINED )
220 eda_text->SetItalic( m_italic->GetValue() );
221
222 // Must come after SetTextSize()
223 if( m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
224 eda_text->SetBold( m_bold->GetValue() );
225
226 // Must come after SetBold() & SetItalic()
227 if( m_fontCtrl->GetStringSelection() != INDETERMINATE_ACTION )
228 {
229 eda_text->SetFont( m_fontCtrl->GetFontSelection( eda_text->IsBold(),
230 eda_text->IsItalic() ) );
231 }
232 else if( m_italic->Get3StateValue() != wxCHK_UNDETERMINED
233 || m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
234 {
235 if( !eda_text->GetFontName().IsEmpty() )
236 {
237 eda_text->SetFont( KIFONT::FONT::GetFont( eda_text->GetFontName(),
238 eda_text->IsBold(),
239 eda_text->IsItalic() ) );
240 }
241 }
242 }
243
244 if( SCH_LABEL_BASE* sch_label = dynamic_cast<SCH_LABEL_BASE*>( aItem ) )
245 {
246 if( m_orientation->GetStringSelection() != INDETERMINATE_ACTION )
247 sch_label->SetSpinStyle( (SPIN_STYLE::SPIN) m_orientation->GetSelection() );
248 }
249
250 if( SCH_FIELD* sch_field = dynamic_cast<SCH_FIELD*>( aItem ) )
251 {
252 if( m_visible->Get3StateValue() != wxCHK_UNDETERMINED )
253 sch_field->SetVisible( m_visible->GetValue() );
254
255 if( m_showFieldNames->Get3StateValue() != wxCHK_UNDETERMINED )
256 sch_field->SetNameShown( m_showFieldNames->GetValue() );
257 }
258
259 if( aItem->HasLineStroke() )
260 {
261 STROKE_PARAMS stroke = aItem->GetStroke();
262
263 if( !m_lineWidth.IsIndeterminate() )
264 stroke.SetWidth( m_lineWidth.GetIntValue() );
265
266 if( m_lineStyle->GetStringSelection() != INDETERMINATE_ACTION )
267 stroke.SetLineStyle( (LINE_STYLE) m_lineStyle->GetSelection() );
268
269 if( m_setColor->GetValue() )
270 stroke.SetColor( m_colorSwatch->GetSwatchColor() );
271
272 aItem->SetStroke( stroke );
273 }
274
275 if( SCH_SHAPE* shape = dynamic_cast<SCH_SHAPE*>( aItem ) )
276 {
277 if( m_setFillColor->GetValue() )
278 {
279 shape->SetFillColor( m_fillColorSwatch->GetSwatchColor() );
280
281 if( m_fillColorSwatch->GetSwatchColor() == COLOR4D::UNSPECIFIED )
282 shape->SetFillMode( FILL_T::NO_FILL );
283 else
284 shape->SetFillMode( FILL_T::FILLED_WITH_COLOR );
285 }
286 }
287
288 if( SCH_JUNCTION* junction = dynamic_cast<SCH_JUNCTION*>( aItem ) )
289 {
290 if( !m_junctionSize.IsIndeterminate() )
291 junction->SetDiameter( m_junctionSize.GetIntValue() );
292
293 if( m_setDotColor->GetValue() )
294 junction->SetColor( m_dotColorSwatch->GetSwatchColor() );
295 }
296}
297
299 const SCH_SHEET_PATH& aSheetPath,
300 SCH_ITEM* aItem )
301{
302 if( m_netFilterOpt->GetValue() && !m_netFilter->GetValue().IsEmpty() )
303 {
304 SCH_CONNECTION* connection = aItem->Connection( &aSheetPath );
305
306 if( !connection )
307 return;
308
309 if( !WildCompareString( m_netFilter->GetValue(), connection->Name(), false ) )
310 return;
311 }
312
313 if( m_referenceFilterOpt->GetValue() && !m_referenceFilter->GetValue().IsEmpty() )
314 {
315 if( aItem->Type() == SCH_SYMBOL_T )
316 {
317 wxString ref = static_cast<SCH_SYMBOL*>( aItem )->GetRef( &aSheetPath );
318
319 if( !WildCompareString( m_referenceFilter->GetValue(), ref, false ) )
320 return;
321 }
322 }
323
324 if( m_symbolFilterOpt->GetValue() && !m_symbolFilter->GetValue().IsEmpty() )
325 {
326 if( aItem->Type() == SCH_SYMBOL_T )
327 {
328 wxString id = UnescapeString( static_cast<SCH_SYMBOL*>( aItem )->GetLibId().Format() );
329
330 if( !WildCompareString( m_symbolFilter->GetValue(), id, false ) )
331 return;
332 }
333 }
334
335 if( m_typeFilterOpt->GetValue() )
336 {
337 if( aItem->Type() == SCH_SYMBOL_T )
338 {
339 bool isPower = static_cast<SCH_SYMBOL*>( aItem )->GetLibSymbolRef()->IsPower();
340
341 if( isPower != ( m_typeFilter->GetSelection() == 1 ) )
342 return;
343 }
344 }
345
346 static const std::vector<KICAD_T> wireLabelTypes = { SCH_LABEL_LOCATE_WIRE_T };
347 static const std::vector<KICAD_T> busLabelTypes = { SCH_LABEL_LOCATE_BUS_T };
348
349 switch( aItem->Type() )
350 {
351 case SCH_SYMBOL_T:
352 {
353 SCH_SYMBOL* symbol = (SCH_SYMBOL*) aItem;
354
355 if( m_references->GetValue() )
356 processItem( aCommit, aSheetPath, symbol->GetField( FIELD_T::REFERENCE ) );
357
358 if( m_values->GetValue() )
359 processItem( aCommit, aSheetPath, symbol->GetField( FIELD_T::VALUE ) );
360
361 if( m_otherFields->GetValue() )
362 {
363 for( SCH_FIELD& field : symbol->GetFields() )
364 {
365 if( field.GetId() == FIELD_T::REFERENCE || field.GetId() == FIELD_T::VALUE )
366 continue;
367
368 const wxString& fieldName = field.GetName();
369
370 if( !m_fieldnameFilterOpt->GetValue() || m_fieldnameFilter->GetValue().IsEmpty()
371 || WildCompareString( m_fieldnameFilter->GetValue(), fieldName, false ) )
372 {
373 processItem( aCommit, aSheetPath, &field );
374 }
375 }
376 }
377
378 break;
379 }
380
381 case SCH_SHEET_T:
382 {
383 SCH_SHEET* sheet = static_cast<SCH_SHEET*>( aItem );
384
385 if( m_sheetTitles->GetValue() )
386 processItem( aCommit, aSheetPath, sheet->GetField( FIELD_T::SHEET_NAME ) );
387
388 if( m_sheetFields->GetValue() )
389 {
390 for( SCH_FIELD& field : sheet->GetFields() )
391 {
392 if( field.GetId() == FIELD_T::SHEET_NAME )
393 continue;
394
395 const wxString& fieldName = field.GetName();
396
397 if( !m_fieldnameFilterOpt->GetValue() || m_fieldnameFilter->GetValue().IsEmpty()
398 || WildCompareString( m_fieldnameFilter->GetValue(), fieldName, false ) )
399 {
400 processItem( aCommit, aSheetPath, &field );
401 }
402 }
403 }
404
405 if( m_sheetBorders->GetValue() )
406 {
407 if( !m_lineWidth.IsIndeterminate() )
408 sheet->SetBorderWidth( m_lineWidth.GetIntValue() );
409
410 if( m_setColor->GetValue() )
411 sheet->SetBorderColor( m_colorSwatch->GetSwatchColor() );
412
413 if( m_setFillColor->GetValue() )
414 sheet->SetBackgroundColor( m_fillColorSwatch->GetSwatchColor() );
415 }
416
417 if( m_sheetPins->GetValue() )
418 {
419 for( SCH_SHEET_PIN* pin : sheet->GetPins() )
420 processItem( aCommit, aSheetPath, pin );
421 }
422
423 break;
424 }
425
426 case SCH_LINE_T:
427 if( m_schTextAndGraphics->GetValue() && aItem->GetLayer() == LAYER_NOTES )
428 processItem( aCommit, aSheetPath, aItem );
429 else if( m_wires->GetValue() && aItem->GetLayer() == LAYER_WIRE )
430 processItem( aCommit, aSheetPath, aItem );
431 else if( m_buses->GetValue() && aItem->GetLayer() == LAYER_BUS )
432 processItem( aCommit, aSheetPath, aItem );
433
434 break;
435
436 case SCH_LABEL_T:
438 case SCH_HIER_LABEL_T:
440 if( m_wires->GetValue() && aItem->IsType( wireLabelTypes ) )
441 processItem( aCommit, aSheetPath, aItem );
442
443 if( m_buses->GetValue() && aItem->IsType( busLabelTypes ) )
444 processItem( aCommit, aSheetPath, aItem );
445
446 if( m_globalLabels->GetValue() && aItem->Type() == SCH_GLOBAL_LABEL_T )
447 processItem( aCommit, aSheetPath, aItem );
448
449 if( m_hierLabels->GetValue() && aItem->Type() == SCH_HIER_LABEL_T )
450 processItem( aCommit, aSheetPath, aItem );
451
452 if( m_labelFields->GetValue() )
453 {
454 for( SCH_FIELD& field : static_cast<SCH_LABEL_BASE*>( aItem )->GetFields() )
455 {
456 const wxString& fieldName = field.GetName();
457
458 if( !m_fieldnameFilterOpt->GetValue() || m_fieldnameFilter->GetValue().IsEmpty()
459 || WildCompareString( m_fieldnameFilter->GetValue(), fieldName, false ) )
460 {
461 processItem( aCommit, aSheetPath, &field );
462 }
463 }
464 }
465
466 break;
467
468 case SCH_JUNCTION_T:
469 {
470 SCH_JUNCTION* junction = static_cast<SCH_JUNCTION*>( aItem );
471
472 for( SCH_ITEM* item : junction->ConnectedItems( aSheetPath ) )
473 {
474 if( item->GetLayer() == LAYER_BUS && m_buses->GetValue() )
475 {
476 processItem( aCommit, aSheetPath, aItem );
477 break;
478 }
479 else if( item->GetLayer() == LAYER_WIRE && m_wires->GetValue() )
480 {
481 processItem( aCommit, aSheetPath, aItem );
482 break;
483 }
484 }
485
486 break;
487 }
488
489 case SCH_TEXT_T:
490 case SCH_TEXTBOX_T:
491 case SCH_SHAPE_T:
492 if( m_schTextAndGraphics->GetValue() )
493 processItem( aCommit, aSheetPath, aItem );
494
495 break;
496
497 default:
498 break;
499 }
500}
501
502
504{
505 if( !m_textSize.Validate( 1.0, 10000.0, EDA_UNITS::MILS ) ) // 1 mil .. 10 inches
506 return false;
507
508 SCH_SHEET_PATH currentSheet = m_parent->GetCurrentSheet();
509 SCH_COMMIT commit( m_parent );
510
511 // Go through sheets
512 for( const SCH_SHEET_PATH& sheetPath : m_parent->Schematic().Hierarchy() )
513 {
514 SCH_SCREEN* screen = sheetPath.LastScreen();
515
516 if( screen )
517 {
518 m_parent->SetCurrentSheet( sheetPath );
519
520 for( SCH_ITEM* item : screen->Items() )
521 visitItem( &commit, sheetPath, item );
522 }
523 }
524
525 if( !commit.Empty() )
526 {
527 commit.Push( _( "Edit Text and Graphics" ) );
528 m_parent->HardRedraw();
529 }
530
531 // Reset the view to where we left the user
532 m_parent->SetCurrentSheet( currentSheet );
533 m_parent->Refresh();
534
535 return true;
536}
537
538
540{
542 dlg.ShowModal();
543 return 0;
544}
545
546
static const COLOR4D UNSPECIFIED
For legacy support; used as a value to indicate color hasn't been set yet.
Definition color4d.h:402
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:111
bool IsSelected() const
Definition eda_item.h:128
EDA_ITEM * GetParent() const
Definition eda_item.h:113
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition eda_text.h:80
static GR_TEXT_H_ALIGN_T MapHorizJustify(int aHorizJustify)
Definition eda_text.cpp:72
static GR_TEXT_V_ALIGN_T MapVertJustify(int aVertJustify)
Definition eda_text.cpp:86
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:168
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:544
SCH_LAYER_ID GetLayer() const
Return the layer this item is on.
Definition sch_item.h:341
virtual void SetStroke(const STROKE_PARAMS &aStroke)
Definition sch_item.h:646
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:473
virtual STROKE_PARAMS GetStroke() const
Definition sch_item.h:644
virtual bool HasLineStroke() const
Check if this schematic item has line stoke properties.
Definition sch_item.h:642
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
EE_RTREE & Items()
Get the full RTree, usually for iterating.
Definition sch_screen.h:119
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:149
std::vector< SCH_FIELD > & GetFields()
Return a reference to the vector holding the sheet's fields.
Definition sch_sheet.h:88
SCH_FIELD * GetField(FIELD_T aFieldType)
Return a mandatory field in this sheet.
void SetBackgroundColor(KIGFX::COLOR4D aColor)
Definition sch_sheet.h:152
void SetBorderWidth(int aWidth)
Definition sch_sheet.h:146
std::vector< SCH_SHEET_PIN * > & GetPins()
Definition sch_sheet.h:228
Schematic symbol object.
Definition sch_symbol.h:76
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:247
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:452
@ LAYER_NOTES
Definition layer_ids.h:467
@ LAYER_BUS
Definition layer_ids.h:453
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".
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:167
@ SCH_SYMBOL_T
Definition typeinfo.h:176
@ SCH_DIRECTIVE_LABEL_T
Definition typeinfo.h:175
@ SCH_LABEL_T
Definition typeinfo.h:171
@ SCH_SHEET_T
Definition typeinfo.h:179
@ SCH_SHAPE_T
Definition typeinfo.h:153
@ SCH_HIER_LABEL_T
Definition typeinfo.h:173
@ SCH_LABEL_LOCATE_WIRE_T
Definition typeinfo.h:196
@ SCH_TEXT_T
Definition typeinfo.h:155
@ SCH_LABEL_LOCATE_BUS_T
Definition typeinfo.h:197
@ SCH_TEXTBOX_T
Definition typeinfo.h:156
@ SCH_GLOBAL_LABEL_T
Definition typeinfo.h:172
@ SCH_JUNCTION_T
Definition typeinfo.h:163
#define INDETERMINATE_ACTION
Definition ui_common.h:47
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:695