KiCad PCB EDA Suite
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 (C) 2019-2022 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
24#include <connection_graph.h>
26#include <string_utils.h>
27#include <sch_symbol.h>
28#include <sch_connection.h>
29#include <sch_edit_frame.h>
30#include <sch_shape.h>
31#include <sch_line.h>
32#include <sch_junction.h>
33#include <sch_sheet.h>
34#include <sch_sheet_pin.h>
35#include <schematic.h>
36#include <advanced_config.h>
37#include <tool/tool_manager.h>
39#include <tools/sch_edit_tool.h>
40#include <widgets/unit_binder.h>
41#include <widgets/font_choice.h>
42
44static bool g_modifyValues;
46static bool g_modifyWires;
47static bool g_modifyBuses;
55
57static wxString g_fieldnameFilter;
59static wxString g_referenceFilter;
60static bool g_filterBySymbol;
61static wxString g_symbolFilter;
62static bool g_filterByType;
64static bool g_filterByNet;
65static wxString g_netFilter;
66static bool g_filterSelected;
67
68
69#define DEFAULT_STYLE _( "Default" )
70
72{
75
79
81
82public:
85
86protected:
87 void OnReferenceFilterText( wxCommandEvent& event ) override
88 {
89 m_referenceFilterOpt->SetValue( true );
90 }
91 void OnSymbolFilterText( wxCommandEvent& event ) override
92 {
93 m_symbolFilterOpt->SetValue( true );
94 }
95 void OnFieldNameFilterText( wxCommandEvent& event ) override
96 {
97 m_fieldnameFilterOpt->SetValue( true );
98 }
99 void OnNetFilterText( wxCommandEvent& event ) override
100 {
101 m_netFilterOpt->SetValue( true );
102 }
103
104 bool TransferDataToWindow() override;
105 bool TransferDataFromWindow() override;
106
107 void visitItem( const SCH_SHEET_PATH& aSheetPath, SCH_ITEM* aItem );
108 void processItem( const SCH_SHEET_PATH& aSheetPath, SCH_ITEM* aItem );
109};
110
111
114 m_textSize( parent, m_textSizeLabel, m_textSizeCtrl, m_textSizeUnits, true ),
115 m_lineWidth( parent, m_lineWidthLabel, m_LineWidthCtrl, m_lineWidthUnits, true ),
116 m_junctionSize( parent, m_dotSizeLabel, m_dotSizeCtrl, m_dotSizeUnits, true )
117{
118 m_parent = parent;
119 m_appendUndo = false;
120
121 // TODO(JE) remove once real-time connectivity is a given
122 if( !ADVANCED_CFG::GetCfg().m_RealTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
124
125 m_lineStyle->Append( DEFAULT_STYLE );
127
128 m_textColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
129 m_textColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
130 m_colorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
131 m_colorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
132 m_fillColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
133 m_fillColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
134 m_dotColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
135 m_dotColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
136
138
140}
141
142
144{
145 g_modifyReferences = m_references->GetValue();
146 g_modifyValues = m_values->GetValue();
148 g_modifyWires = m_wires->GetValue();
149 g_modifyBuses = m_buses->GetValue();
151 g_modifyHierLabels = m_hierLabels->GetValue();
154 g_modifySheetPins = m_sheetPins->GetValue();
157
163 g_symbolFilter = m_symbolFilter->GetValue();
164 g_filterByType = m_typeFilterOpt->GetValue();
165 g_typeFilterIsPower = m_typeFilter->GetSelection() == 1;
166 g_filterByNet = m_netFilterOpt->GetValue();
167 g_netFilter = m_netFilter->GetValue();
169}
170
171
173{
175 m_selection = selectionTool->GetSelection();
176
177 m_references->SetValue( g_modifyReferences );
178 m_values->SetValue( g_modifyValues );
180 m_wires->SetValue( g_modifyWires );
181 m_buses->SetValue( g_modifyBuses );
183 m_hierLabels->SetValue( g_modifyHierLabels );
186 m_sheetPins->SetValue( g_modifySheetPins );
189
190 // SetValue() generates events, ChangeValue() does not
191 m_fieldnameFilter->ChangeValue( g_fieldnameFilter );
193 m_referenceFilter->ChangeValue( g_referenceFilter );
195 m_symbolFilter->ChangeValue( g_symbolFilter );
197 m_typeFilter->SetSelection( g_typeFilterIsPower ? 1 : 0 );
198 m_typeFilterOpt->SetValue( g_filterByType );
200
201 if( g_filterByNet && !g_netFilter.IsEmpty() )
202 {
203 m_netFilter->SetValue( g_netFilter );
204 m_netFilterOpt->SetValue( true );
205 }
207 {
209 }
210 else if( m_selection.GetSize() )
211 {
212 SCH_ITEM* sch_item = (SCH_ITEM*) m_selection.Front();
213 SCH_CONNECTION* connection = sch_item->Connection();
214
215 if( connection )
216 m_netFilter->SetValue( connection->Name() );
217 }
218
219 m_netFilterOpt->SetValue( g_filterByNet );
220
222 m_fontCtrl->SetStringSelection( INDETERMINATE_ACTION );
223
225 m_orientation->SetStringSelection( INDETERMINATE_ACTION );
226 m_hAlign->SetStringSelection( INDETERMINATE_ACTION );
227 m_vAlign->SetStringSelection( INDETERMINATE_ACTION );
228 m_italic->Set3StateValue( wxCHK_UNDETERMINED );
229 m_bold->Set3StateValue( wxCHK_UNDETERMINED );
230 m_visible->Set3StateValue( wxCHK_UNDETERMINED );
232 m_lineStyle->SetStringSelection( INDETERMINATE_ACTION );
234 m_setColor->SetValue( false );
235 m_setFillColor->SetValue( false );
236 m_setDotColor->SetValue( false );
237
238 return true;
239}
240
241
243 SCH_ITEM* aItem )
244{
245 if( m_selectedFilterOpt->GetValue() )
246 {
247 if( !aItem->IsSelected() && ( !aItem->GetParent() || !aItem->GetParent()->IsSelected() ) )
248 return;
249 }
250
251 SCH_SYMBOL* symbol = dynamic_cast<SCH_SYMBOL*>( aItem->GetParent() );
252 EDA_TEXT* eda_text = dynamic_cast<EDA_TEXT*>( aItem );
253 SCH_TEXT* sch_text = dynamic_cast<SCH_TEXT*>( aItem );
254 SCH_JUNCTION* junction = dynamic_cast<SCH_JUNCTION*>( aItem );
255
257 false );
258 m_appendUndo = true;
259
260 if( eda_text )
261 {
263 eda_text->SetTextSize( wxSize( m_textSize.GetValue(), m_textSize.GetValue() ) );
264
265 if( m_setTextColor->GetValue() )
267
268 if( m_hAlign->GetStringSelection() != INDETERMINATE_ACTION )
269 {
270 GR_TEXT_H_ALIGN_T hAlign = EDA_TEXT::MapHorizJustify( m_hAlign->GetSelection() - 1 );
271
272 if( symbol && symbol->GetTransform().x1 < 0 )
273 {
274 if( hAlign == GR_TEXT_H_ALIGN_LEFT )
275 hAlign = GR_TEXT_H_ALIGN_RIGHT;
276 else if( hAlign == GR_TEXT_H_ALIGN_RIGHT )
277 hAlign = GR_TEXT_H_ALIGN_LEFT;
278 }
279
280 eda_text->SetHorizJustify( hAlign );
281 }
282
283 if( m_vAlign->GetStringSelection() != INDETERMINATE_ACTION )
284 {
285 GR_TEXT_V_ALIGN_T vAlign = EDA_TEXT::MapVertJustify( m_vAlign->GetSelection() - 1 );
286
287 if( symbol && symbol->GetTransform().y1 < 0 )
288 {
289 if( vAlign == GR_TEXT_V_ALIGN_TOP )
290 vAlign = GR_TEXT_V_ALIGN_BOTTOM;
291 else if( vAlign == GR_TEXT_V_ALIGN_BOTTOM )
292 vAlign = GR_TEXT_V_ALIGN_TOP;
293 }
294
295 eda_text->SetVertJustify( vAlign );
296 }
297
298 if( m_visible->Get3StateValue() != wxCHK_UNDETERMINED )
299 eda_text->SetVisible( m_visible->GetValue() );
300
301 if( m_italic->Get3StateValue() != wxCHK_UNDETERMINED )
302 eda_text->SetItalic( m_italic->GetValue() );
303
304 if( m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
305 eda_text->SetBold( m_bold->GetValue() );
306
307 // Must come after bold & italic
308 if( m_fontCtrl->GetStringSelection() != INDETERMINATE_ACTION )
309 {
310 eda_text->SetFont( m_fontCtrl->GetFontSelection( eda_text->IsBold(),
311 eda_text->IsItalic() ) );
312 }
313 else if( m_italic->Get3StateValue() != wxCHK_UNDETERMINED
314 || m_bold->Get3StateValue() != wxCHK_UNDETERMINED )
315 {
316 if( !eda_text->GetFontName().IsEmpty() )
317 {
318 eda_text->SetFont( KIFONT::FONT::GetFont( eda_text->GetFontName(),
319 eda_text->IsBold(),
320 eda_text->IsItalic() ) );
321 }
322 }
323 }
324
325 // No else! Labels are both.
326 if( sch_text )
327 {
328 if( m_orientation->GetStringSelection() != INDETERMINATE_ACTION )
329 sch_text->SetTextSpinStyle( (TEXT_SPIN_STYLE::SPIN) m_orientation->GetSelection() );
330 }
331
332 if( aItem->HasLineStroke() )
333 {
334 STROKE_PARAMS stroke = aItem->GetStroke();
335
337 stroke.SetWidth( m_lineWidth.GetValue() );
338
339 if( m_lineStyle->GetStringSelection() != INDETERMINATE_ACTION )
340 {
341 if( m_lineStyle->GetStringSelection() == DEFAULT_STYLE )
343 else
344 stroke.SetPlotStyle( (PLOT_DASH_TYPE) m_lineStyle->GetSelection() );
345 }
346
347 if( m_setColor->GetValue() )
349
350 aItem->SetStroke( stroke );
351 }
352
353 if( aItem->Type() == SCH_SHAPE_T )
354 {
355 SCH_SHAPE* shape = static_cast<SCH_SHAPE*>( aItem );
356
357 if( m_setFillColor->GetValue() )
358 {
360
361 if( m_fillColorSwatch->GetSwatchColor() == COLOR4D::UNSPECIFIED )
363 else
365 }
366 }
367
368 if( junction )
369 {
371 junction->SetDiameter( m_junctionSize.GetValue() );
372
373 if( m_setDotColor->GetValue() )
375 }
376}
377
379 SCH_ITEM* aItem )
380{
381 if( m_netFilterOpt->GetValue() && !m_netFilter->GetValue().IsEmpty() )
382 {
383 SCH_CONNECTION* connection = aItem->Connection( &aSheetPath );
384
385 if( !connection )
386 return;
387
388 if( !WildCompareString( m_netFilter->GetValue(), connection->Name(), false ) )
389 return;
390 }
391
392 if( m_referenceFilterOpt->GetValue() && !m_referenceFilter->GetValue().IsEmpty() )
393 {
394 if( aItem->Type() == SCH_SYMBOL_T )
395 {
396 wxString ref = static_cast<SCH_SYMBOL*>( aItem )->GetRef( &aSheetPath );
397
398 if( !WildCompareString( m_referenceFilter->GetValue(), ref, false ) )
399 return;
400 }
401 }
402
403 if( m_symbolFilterOpt->GetValue() && !m_symbolFilter->GetValue().IsEmpty() )
404 {
405 if( aItem->Type() == SCH_SYMBOL_T )
406 {
407 wxString id = UnescapeString( static_cast<SCH_SYMBOL*>( aItem )->GetLibId().Format() );
408
409 if( !WildCompareString( m_symbolFilter->GetValue(), id, false ) )
410 return;
411 }
412 }
413
414 if( m_typeFilterOpt->GetValue() )
415 {
416 if( aItem->Type() == SCH_SYMBOL_T )
417 {
418 bool isPower = static_cast<SCH_SYMBOL*>( aItem )->GetLibSymbolRef()->IsPower();
419
420 if( isPower != ( m_typeFilter->GetSelection() == 1 ) )
421 return;
422 }
423 }
424
425 if( aItem->Type() == SCH_SYMBOL_T )
426 {
427 SCH_SYMBOL* symbol = (SCH_SYMBOL*) aItem;
428
429 if( m_references->GetValue() )
430 processItem( aSheetPath, symbol->GetField( REFERENCE_FIELD ) );
431
432 if( m_values->GetValue() )
433 processItem( aSheetPath, symbol->GetField( VALUE_FIELD ) );
434
435 if( m_otherFields->GetValue() )
436 {
437 for( int i = 2; i < symbol->GetFieldCount(); ++i )
438 {
439 SCH_FIELD& field = symbol->GetFields()[i];
440 const wxString& fieldName = field.GetName();
441
442 if( !m_fieldnameFilterOpt->GetValue() || m_fieldnameFilter->GetValue().IsEmpty()
443 || WildCompareString( m_fieldnameFilter->GetValue(), fieldName, false ) )
444 {
445 processItem( aSheetPath, &field );
446 }
447 }
448 }
449 }
450 else if( aItem->Type() == SCH_SHEET_T )
451 {
452 SCH_SHEET* sheet = static_cast<SCH_SHEET*>( aItem );
453
454 if( m_sheetTitles->GetValue() )
455 processItem( aSheetPath, &sheet->GetFields()[SHEETNAME] );
456
457 if( m_sheetFields->GetValue() )
458 {
459 for( SCH_FIELD& field : sheet->GetFields() )
460 {
461 if( field.GetId() == SHEETNAME )
462 continue;
463
464 const wxString& fieldName = field.GetName();
465
466 if( !m_fieldnameFilterOpt->GetValue() || m_fieldnameFilter->GetValue().IsEmpty()
467 || WildCompareString( m_fieldnameFilter->GetValue(), fieldName, false ) )
468 {
469 processItem( aSheetPath, &field );
470 }
471 }
472 }
473
474 if( m_sheetBorders->GetValue() )
475 {
478
479 if( m_setColor->GetValue() )
481
482 if( m_setFillColor->GetValue() )
484 }
485
486 if( m_sheetPins->GetValue() )
487 {
488 for( SCH_SHEET_PIN* pin : sheet->GetPins() )
489 processItem( aSheetPath, pin );
490 }
491 }
492 else if( aItem->Type() == SCH_JUNCTION_T )
493 {
494 SCH_JUNCTION* junction = static_cast<SCH_JUNCTION*>( aItem );
495
496 for( SCH_ITEM* item : junction->ConnectedItems( aSheetPath ) )
497 {
498 if( item->GetLayer() == LAYER_BUS && m_buses->GetValue() )
499 {
500 processItem( aSheetPath, aItem );
501 break;
502 }
503 else if( item->GetLayer() == LAYER_WIRE && m_wires->GetValue() )
504 {
505 processItem( aSheetPath, aItem );
506 break;
507 }
508 }
509 }
510 else if( m_wires->GetValue() && aItem->IsType( { SCH_ITEM_LOCATE_WIRE_T,
511 SCH_LABEL_LOCATE_WIRE_T } ) )
512 {
513 processItem( aSheetPath, aItem );
514 }
515 else if( m_buses->GetValue() && aItem->IsType( { SCH_ITEM_LOCATE_BUS_T,
516 SCH_LABEL_LOCATE_BUS_T } ) )
517 {
518 processItem( aSheetPath, aItem );
519 }
520 else if( m_globalLabels->GetValue() && aItem->Type() == SCH_GLOBAL_LABEL_T )
521 {
522 processItem( aSheetPath, aItem );
523 }
524 else if( m_hierLabels->GetValue() && aItem->Type() == SCH_HIER_LABEL_T )
525 {
526 processItem( aSheetPath, aItem );
527 }
528 else if( m_schTextAndGraphics->GetValue() && aItem->IsType( { SCH_TEXT_T, SCH_TEXTBOX_T,
529 SCH_ITEM_LOCATE_GRAPHIC_LINE_T,
530 SCH_SHAPE_T } ) )
531 {
532 processItem( aSheetPath, aItem );
533 }
534}
535
536
538{
539 if( !m_textSize.Validate( 1.0, 10000.0, EDA_UNITS::MILS ) ) // 1 mil .. 10 inches
540 return false;
541
542 SCH_SHEET_PATH currentSheet = m_parent->GetCurrentSheet();
543 m_appendUndo = false;
544
545 // Go through sheets
546 for( const SCH_SHEET_PATH& sheetPath : m_parent->Schematic().GetSheets() )
547 {
548 SCH_SCREEN* screen = sheetPath.LastScreen();
549
550 if( screen )
551 {
552 m_parent->SetCurrentSheet( sheetPath );
553
554 for( SCH_ITEM* item : screen->Items() )
555 visitItem( sheetPath, item );
556 }
557 }
558
559 if( m_appendUndo )
560 {
563 }
564
565 // Reset the view to where we left the user
566 m_parent->SetCurrentSheet( currentSheet );
567
568 return true;
569}
570
571
573{
575 dlg.ShowModal();
576 return 0;
577}
578
579
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
void SetSwatchColor(const KIGFX::COLOR4D &aColor, bool aSendEvent)
Set the current swatch color directly.
KIGFX::COLOR4D GetSwatchColor() const
void SetDefaultColor(const KIGFX::COLOR4D &aColor)
Sets the color that will be chosen with the "Reset to Default" button in the chooser.
static bool m_allowRealTime
void visitItem(const SCH_SHEET_PATH &aSheetPath, SCH_ITEM *aItem)
void processItem(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...
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:97
bool IsSelected() const
Definition: eda_item.h:107
EDA_ITEM * GetParent() const
Definition: eda_item.h:99
void SetFillColor(const COLOR4D &aColor)
Definition: eda_shape.h:104
void SetFillMode(FILL_T aFill)
Definition: eda_shape.h:100
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition: eda_text.h:72
void SetTextColor(const COLOR4D &aColor)
Definition: eda_text.h:194
wxString GetFontName() const
Definition: eda_text.cpp:751
bool IsItalic() const
Definition: eda_text.h:120
void SetVertJustify(GR_TEXT_V_ALIGN_T aType)
Definition: eda_text.cpp:248
virtual void SetVisible(bool aVisible)
Definition: eda_text.cpp:217
static GR_TEXT_H_ALIGN_T MapHorizJustify(int aHorizJustify)
Definition: eda_text.cpp:62
void SetBold(bool aBold)
Definition: eda_text.cpp:209
bool IsBold() const
Definition: eda_text.h:123
static GR_TEXT_V_ALIGN_T MapVertJustify(int aVertJustify)
Definition: eda_text.cpp:76
void SetTextSize(const VECTOR2I &aNewSize)
Definition: eda_text.cpp:347
void SetItalic(bool aItalic)
Definition: eda_text.cpp:201
void SetFont(KIFONT::FONT *aFont)
Definition: eda_text.cpp:331
void SetHorizJustify(GR_TEXT_H_ALIGN_T aType)
Definition: eda_text.cpp:240
EE_SELECTION & GetSelection()
KIFONT::FONT * GetFontSelection(bool aBold, bool aItalic) const
static FONT * GetFont(const wxString &aFontName=wxEmptyString, bool aBold=false, bool aItalic=false)
Definition: font.cpp:65
SCH_SHEET_LIST GetSheets() const override
Builds and returns an updated schematic hierarchy TODO: can this be cached?
Definition: schematic.h:85
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.
const SCH_CONNECTION * GetHighlightedConnection() const
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag of the current screen and u...
void SaveCopyInUndoList(SCH_SCREEN *aScreen, SCH_ITEM *aItemToCopy, UNDO_REDO aTypeCommand, bool aAppend, bool aDirtyConnectivity=true)
Create a copy of the current schematic item, and put it in the undo list.
void HardRedraw() override
Rebuild the GAL and redraw the screen.
SCH_SHEET_PATH & GetCurrentSheet() const
SCHEMATIC & Schematic() const
void RecalculateConnections(SCH_CLEANUP_FLAGS aCleanupFlags)
Generate the connection data for the entire schematic hierarchy.
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
int GlobalEdit(const TOOL_EVENT &aEvent)
Delete the selected items, or the item under the cursor.
Instances are attached to a symbol or sheet and provide a place for the symbol's value,...
Definition: sch_field.h:50
wxString GetName(bool aUseDefaultName=true) const
Return the field name (not translated).
Definition: sch_field.cpp:811
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:147
SCH_ITEM_SET & ConnectedItems(const SCH_SHEET_PATH &aPath)
Retrieve the set of items connected to this item on the given sheet.
Definition: sch_item.cpp:187
virtual void SetStroke(const STROKE_PARAMS &aStroke)
Definition: sch_item.h:450
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:146
virtual STROKE_PARAMS GetStroke() const
Definition: sch_item.h:448
virtual bool HasLineStroke() const
Check if this schematic item has line stoke properties.
Definition: sch_item.h:446
bool IsType(const std::vector< KICAD_T > &aScanTypes) const override
Check whether the item is one of the listed types.
Definition: sch_item.h:162
void SetDiameter(int aDiameter)
void SetColor(const COLOR4D &aColor)
EE_RTREE & Items()
Gets the full RTree, usually for iterating.
Definition: sch_screen.h:108
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.
Definition: sch_sheet_pin.h:66
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:55
void SetBorderColor(KIGFX::COLOR4D aColor)
Definition: sch_sheet.h:112
std::vector< SCH_FIELD > & GetFields()
Definition: sch_sheet.h:91
void SetBackgroundColor(KIGFX::COLOR4D aColor)
Definition: sch_sheet.h:115
void SetBorderWidth(int aWidth)
Definition: sch_sheet.h:109
std::vector< SCH_SHEET_PIN * > & GetPins()
Definition: sch_sheet.h:172
Schematic symbol object.
Definition: sch_symbol.h:79
int GetFieldCount() const
Return the number of fields in this symbol.
Definition: sch_symbol.h:470
SCH_FIELD * GetField(MANDATORY_FIELD_T aFieldType)
Return a mandatory field in this symbol.
Definition: sch_symbol.cpp:776
TRANSFORM & GetTransform()
Definition: sch_symbol.h:275
void GetFields(std::vector< SCH_FIELD * > &aVector, bool aVisibleOnly)
Populate a std::vector with SCH_FIELDs.
Definition: sch_symbol.cpp:812
virtual void SetTextSpinStyle(TEXT_SPIN_STYLE aSpinStyle)
Set a spin or rotation angle, along with specific horizontal and vertical justification styles with e...
Definition: sch_text.cpp:188
virtual unsigned int GetSize() const override
Return the number of stored items.
Definition: selection.h:97
EDA_ITEM * Front() const
Definition: selection.h:200
Simple container to manage line stroke parameters.
Definition: stroke_params.h:88
void SetWidth(int aWidth)
Definition: stroke_params.h:99
void SetColor(const KIGFX::COLOR4D &aColor)
void SetPlotStyle(PLOT_DASH_TYPE aPlotStyle)
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54
Generic, UI-independent tool event.
Definition: tool_event.h:156
int y1
Definition: transform.h:50
int x1
Definition: transform.h:49
virtual long long int GetValue()
Return the current value in Internal Units.
bool IsIndeterminate() const
Return true if the control holds the indeterminate value (for instance, if it represents a multiple s...
virtual bool Validate(double aMin, double aMax, EDA_UNITS aUnits=EDA_UNITS::UNSCALED)
Validate the control against the given range, informing the user of any errors found.
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
@ FILLED_WITH_COLOR
@ LAYER_WIRE
Definition: layer_ids.h:344
@ LAYER_BUS
Definition: layer_ids.h:345
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:200
@ NO_CLEANUP
@ SHEETNAME
Definition: sch_sheet.h:43
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)
PLOT_DASH_TYPE
Dashed line types.
Definition: stroke_params.h:48
@ VALUE_FIELD
Field Value of part, i.e. "3.3K".
@ REFERENCE_FIELD
Field Reference of part, i.e. "IC21".
GR_TEXT_H_ALIGN_T
@ GR_TEXT_H_ALIGN_RIGHT
@ GR_TEXT_H_ALIGN_LEFT
GR_TEXT_V_ALIGN_T
@ GR_TEXT_V_ALIGN_BOTTOM
@ GR_TEXT_V_ALIGN_TOP
@ SCH_SYMBOL_T
Definition: typeinfo.h:155
@ SCH_SHEET_T
Definition: typeinfo.h:157
@ SCH_SHAPE_T
Definition: typeinfo.h:146
@ SCH_HIER_LABEL_T
Definition: typeinfo.h:152
@ SCH_GLOBAL_LABEL_T
Definition: typeinfo.h:151
@ SCH_JUNCTION_T
Definition: typeinfo.h:141
#define INDETERMINATE_ACTION
Definition: ui_common.h:43