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-2021 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_line.h>
31 #include <sch_junction.h>
32 #include <sch_sheet.h>
33 #include <sch_sheet_pin.h>
34 #include <schematic.h>
35 #include <advanced_config.h>
36 #include <tool/tool_manager.h>
38 #include <tools/sch_edit_tool.h>
39 #include <widgets/unit_binder.h>
40 
41 static bool g_modifyReferences;
42 static bool g_modifyValues;
43 static bool g_modifyOtherFields;
44 static bool g_modifyWires;
45 static bool g_modifyBuses;
47 static bool g_modifyHierLabels;
48 static bool g_modifySheetTitles;
50 static bool g_modifySheetPins;
53 
54 static bool g_filterByFieldname;
55 static wxString g_fieldnameFilter;
56 static bool g_filterByReference;
57 static wxString g_referenceFilter;
58 static bool g_filterBySymbol;
59 static wxString g_symbolFilter;
60 static bool g_filterByType;
61 static bool g_typeFilterIsPower;
62 static bool g_filterByNet;
63 static wxString g_netFilter;
64 static bool g_filterSelected;
65 
66 
67 #define DEFAULT_STYLE _( "Default" )
68 
70 {
73 
77 
79 
80 public:
83 
84 protected:
85  void OnUpdateUI( wxUpdateUIEvent& event ) override;
86  void OnReferenceFilterText( wxCommandEvent& event ) override
87  {
88  m_referenceFilterOpt->SetValue( true );
89  }
90  void OnSymbolFilterText( wxCommandEvent& event ) override
91  {
92  m_symbolFilterOpt->SetValue( true );
93  }
94 
95  bool TransferDataToWindow() override;
96  bool TransferDataFromWindow() override;
97 
98  void visitItem( const SCH_SHEET_PATH& aSheetPath, SCH_ITEM* aItem );
99  void processItem( const SCH_SHEET_PATH& aSheetPath, SCH_ITEM* aItem );
100 };
101 
102 
105  m_textSize( parent, m_textSizeLabel, m_textSizeCtrl, m_textSizeUnits, true ),
106  m_lineWidth( parent, m_lineWidthLabel, m_LineWidthCtrl, m_lineWidthUnits, true ),
107  m_junctionSize( parent, m_dotSizeLabel, m_dotSizeCtrl, m_dotSizeUnits, true )
108 {
109  m_parent = parent;
110  m_appendUndo = false;
111 
112  // TODO(JE) remove once real-time connectivity is a given
113  if( !ADVANCED_CFG::GetCfg().m_RealTimeConnectivity || !CONNECTION_GRAPH::m_allowRealTime )
115 
116  m_lineStyle->Append( DEFAULT_STYLE );
118 
119  m_colorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
120  m_colorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
121  m_bgColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
122  m_bgColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
123  m_dotColorSwatch->SetSwatchColor( COLOR4D::UNSPECIFIED, false );
124  m_dotColorSwatch->SetDefaultColor( COLOR4D::UNSPECIFIED );
125 
126  m_sdbSizerButtonsOK->SetDefault();
127 
129 }
130 
131 
133 {
134  g_modifyReferences = m_references->GetValue();
135  g_modifyValues = m_values->GetValue();
136  g_modifyOtherFields = m_otherFields->GetValue();
137  g_modifyWires = m_wires->GetValue();
138  g_modifyBuses = m_buses->GetValue();
139  g_modifyGlobalLabels = m_globalLabels->GetValue();
140  g_modifyHierLabels = m_hierLabels->GetValue();
141  g_modifySheetTitles = m_sheetTitles->GetValue();
143  g_modifySheetPins = m_sheetPins->GetValue();
144  g_modifySheetBorders = m_sheetBorders->GetValue();
146 
148  g_fieldnameFilter = m_fieldnameFilter->GetValue();
150  g_referenceFilter = m_referenceFilter->GetValue();
151  g_filterBySymbol = m_symbolFilterOpt->GetValue();
152  g_symbolFilter = m_symbolFilter->GetValue();
153  g_filterByType = m_typeFilterOpt->GetValue();
154  g_typeFilterIsPower = m_typeFilter->GetSelection() == 1;
155  g_filterByNet = m_netFilterOpt->GetValue();
156  g_netFilter = m_netFilter->GetValue();
158 }
159 
160 
162 {
164  m_selection = selectionTool->GetSelection();
165 
166  m_references->SetValue( g_modifyReferences );
167  m_values->SetValue( g_modifyValues );
168  m_otherFields->SetValue( g_modifyOtherFields );
169  m_wires->SetValue( g_modifyWires );
170  m_buses->SetValue( g_modifyBuses );
172  m_hierLabels->SetValue( g_modifyHierLabels );
173  m_sheetTitles->SetValue( g_modifySheetTitles );
175  m_sheetPins->SetValue( g_modifySheetPins );
178 
179  // SetValue() generates events, ChangeValue() does not
180  m_fieldnameFilter->ChangeValue( g_fieldnameFilter );
182  m_referenceFilter->ChangeValue( g_referenceFilter );
184  m_symbolFilter->ChangeValue( g_symbolFilter );
185  m_symbolFilterOpt->SetValue( g_filterBySymbol );
186  m_typeFilter->SetSelection( g_typeFilterIsPower ? 1 : 0 );
187  m_typeFilterOpt->SetValue( g_filterByType );
189 
190  if( g_filterByNet && !g_netFilter.IsEmpty() )
191  {
192  m_netFilter->SetValue( g_netFilter );
193  m_netFilterOpt->SetValue( true );
194  }
195  else if( m_parent->GetHighlightedConnection() )
196  {
198  }
199  else if( m_selection.GetSize() )
200  {
201  SCH_ITEM* sch_item = (SCH_ITEM*) m_selection.Front();
202  SCH_CONNECTION* connection = sch_item->Connection();
203 
204  if( connection )
205  m_netFilter->SetValue( connection->Name() );
206  }
207 
208  m_netFilterOpt->SetValue( g_filterByNet );
209 
211  m_orientation->SetStringSelection( INDETERMINATE_ACTION );
212  m_hAlign->SetStringSelection( INDETERMINATE_ACTION );
213  m_vAlign->SetStringSelection( INDETERMINATE_ACTION );
214  m_Italic->Set3StateValue( wxCHK_UNDETERMINED );
215  m_Bold->Set3StateValue( wxCHK_UNDETERMINED );
216  m_Visible->Set3StateValue( wxCHK_UNDETERMINED );
218  m_lineStyle->SetStringSelection( INDETERMINATE_ACTION );
220  m_setColor->SetValue( false );
221  m_setBgColor->SetValue( false );
222  m_setDotColor->SetValue( false );
223 
224  return true;
225 }
226 
227 
229 {
230 }
231 
232 
234  SCH_ITEM* aItem )
235 {
236  if( m_selectedFilterOpt->GetValue() )
237  {
238  if( !aItem->IsSelected() && ( !aItem->GetParent() || !aItem->GetParent()->IsSelected() ) )
239  return;
240  }
241 
242  EDA_TEXT* eda_text = dynamic_cast<EDA_TEXT*>( aItem );
243  SCH_TEXT* sch_text = dynamic_cast<SCH_TEXT*>( aItem );
244  SCH_LINE* lineItem = dynamic_cast<SCH_LINE*>( aItem );
245  SCH_JUNCTION* junction = dynamic_cast<SCH_JUNCTION*>( aItem );
246 
248  m_appendUndo = true;
249 
250  if( eda_text )
251  {
252  if( !m_textSize.IsIndeterminate() )
253  eda_text->SetTextSize( wxSize( m_textSize.GetValue(), m_textSize.GetValue() ) );
254 
255  if( m_hAlign->GetStringSelection() != INDETERMINATE_ACTION )
256  eda_text->SetHorizJustify( EDA_TEXT::MapHorizJustify( m_hAlign->GetSelection() - 1 ) );
257 
258  if( m_vAlign->GetStringSelection() != INDETERMINATE_ACTION )
259  eda_text->SetVertJustify( EDA_TEXT::MapVertJustify( m_vAlign->GetSelection() - 1 ) );
260 
261  if( m_Visible->Get3StateValue() != wxCHK_UNDETERMINED )
262  eda_text->SetVisible( m_Visible->GetValue() );
263 
264  if( m_Italic->Get3StateValue() != wxCHK_UNDETERMINED )
265  eda_text->SetItalic( m_Italic->GetValue() );
266 
267  if( m_Bold->Get3StateValue() != wxCHK_UNDETERMINED )
268  eda_text->SetBold( m_Bold->GetValue() );
269  }
270 
271  // No else! Labels are both.
272  if( sch_text )
273  {
274  if( m_orientation->GetStringSelection() != INDETERMINATE_ACTION )
275  sch_text->SetLabelSpinStyle( (LABEL_SPIN_STYLE::SPIN) m_orientation->GetSelection() );
276  }
277 
278  if( lineItem )
279  {
281  lineItem->SetLineWidth( m_lineWidth.GetValue() );
282 
283  if( m_lineStyle->GetStringSelection() != INDETERMINATE_ACTION )
284  {
285  if( m_lineStyle->GetStringSelection() == DEFAULT_STYLE )
287  else
288  lineItem->SetLineStyle( m_lineStyle->GetSelection() );
289  }
290 
291  if( m_setColor->GetValue() )
292  lineItem->SetLineColor( m_colorSwatch->GetSwatchColor() );
293  }
294 
295  if( junction )
296  {
298  junction->SetDiameter( m_junctionSize.GetValue() );
299 
300  if( m_setDotColor->GetValue() )
301  junction->SetColor( m_dotColorSwatch->GetSwatchColor() );
302  }
303 }
304 
306  SCH_ITEM* aItem )
307 {
308  if( m_netFilterOpt->GetValue() && !m_netFilter->GetValue().IsEmpty() )
309  {
310  SCH_CONNECTION* connection = aItem->Connection( &aSheetPath );
311 
312  if( !connection )
313  return;
314 
315  if( !WildCompareString( m_netFilter->GetValue(), connection->Name(), false ) )
316  return;
317  }
318 
319  if( m_referenceFilterOpt->GetValue() && !m_referenceFilter->GetValue().IsEmpty() )
320  {
321  if( aItem->Type() == SCH_SYMBOL_T )
322  {
323  wxString ref = static_cast<SCH_SYMBOL*>( aItem )->GetRef( &aSheetPath );
324 
325  if( !WildCompareString( m_referenceFilter->GetValue(), ref, false ) )
326  return;
327  }
328  }
329 
330  if( m_symbolFilterOpt->GetValue() && !m_symbolFilter->GetValue().IsEmpty() )
331  {
332  if( aItem->Type() == SCH_SYMBOL_T )
333  {
334  wxString id = UnescapeString( static_cast<SCH_SYMBOL*>( aItem )->GetLibId().Format() );
335 
336  if( !WildCompareString( m_symbolFilter->GetValue(), id, false ) )
337  return;
338  }
339  }
340 
341  if( m_typeFilterOpt->GetValue() )
342  {
343  if( aItem->Type() == SCH_SYMBOL_T )
344  {
345  bool isPower = static_cast<SCH_SYMBOL*>( aItem )->GetLibSymbolRef()->IsPower();
346 
347  if( isPower != ( m_typeFilter->GetSelection() == 1 ) )
348  return;
349  }
350  }
351 
352  static KICAD_T wireTypes[] = { SCH_LINE_LOCATE_WIRE_T, SCH_LABEL_LOCATE_WIRE_T, EOT };
353  static KICAD_T busTypes[] = { SCH_LINE_LOCATE_BUS_T, SCH_LABEL_LOCATE_BUS_T, EOT };
354  static KICAD_T schTextAndGraphics[] = { SCH_TEXT_T, SCH_LINE_LOCATE_GRAPHIC_LINE_T, EOT };
355 
356  if( aItem->Type() == SCH_SYMBOL_T )
357  {
358  SCH_SYMBOL* symbol = (SCH_SYMBOL*) aItem;
359 
360  if( m_references->GetValue() )
361  processItem( aSheetPath, symbol->GetField( REFERENCE_FIELD ) );
362 
363  if( m_values->GetValue() )
364  processItem( aSheetPath, symbol->GetField( VALUE_FIELD ) );
365 
366  if( m_otherFields->GetValue() )
367  {
368  for( int i = 2; i < symbol->GetFieldCount(); ++i )
369  {
370  SCH_FIELD& field = symbol->GetFields()[i];
371  const wxString& fieldName = field.GetName();
372 
373  if( !m_fieldnameFilterOpt->GetValue() || m_fieldnameFilter->GetValue().IsEmpty()
374  || WildCompareString( m_fieldnameFilter->GetValue(), fieldName, false ) )
375  {
376  processItem( aSheetPath, &field );
377  }
378  }
379  }
380  }
381  else if( aItem->Type() == SCH_SHEET_T )
382  {
383  SCH_SHEET* sheet = static_cast<SCH_SHEET*>( aItem );
384 
385  if( m_sheetTitles->GetValue() )
386  processItem( aSheetPath, &sheet->GetFields()[SHEETNAME] );
387 
388  if( m_sheetFields->GetValue() )
389  {
390  for( SCH_FIELD& field : sheet->GetFields() )
391  {
392  if( field.GetId() == SHEETNAME )
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( aSheetPath, &field );
401  }
402  }
403  }
404 
405  if( m_sheetBorders->GetValue() )
406  {
408  sheet->SetBorderWidth( m_lineWidth.GetValue() );
409 
410  if( m_setColor->GetValue() )
412 
413  if( m_setBgColor->GetValue() )
415  }
416 
417  if( m_sheetPins->GetValue() )
418  {
419  for( SCH_SHEET_PIN* pin : sheet->GetPins() )
420  processItem( aSheetPath, pin );
421  }
422  }
423  else if( aItem->Type() == SCH_JUNCTION_T )
424  {
425  SCH_JUNCTION* junction = static_cast<SCH_JUNCTION*>( aItem );
426 
427  for( SCH_ITEM* item : junction->ConnectedItems( aSheetPath ) )
428  {
429  if( item->GetLayer() == LAYER_BUS && m_buses->GetValue() )
430  {
431  processItem( aSheetPath, aItem );
432  break;
433  }
434  else if( item->GetLayer() == LAYER_WIRE && m_wires->GetValue() )
435  {
436  processItem( aSheetPath, aItem );
437  break;
438  }
439  }
440  }
441  else if( m_wires->GetValue() && aItem->IsType( wireTypes ) )
442  processItem( aSheetPath, aItem );
443  else if( m_buses->GetValue() && aItem->IsType( busTypes ) )
444  processItem( aSheetPath, aItem );
445  else if( m_globalLabels->GetValue() && aItem->Type() == SCH_GLOBAL_LABEL_T )
446  processItem( aSheetPath, aItem );
447  else if( m_hierLabels->GetValue() && aItem->Type() == SCH_HIER_LABEL_T )
448  processItem( aSheetPath, aItem );
449  else if( m_schTextAndGraphics->GetValue() && aItem->IsType( schTextAndGraphics ) )
450  processItem( aSheetPath, aItem );
451 }
452 
453 
455 {
456  if( !m_textSize.Validate( 1.0, 10000.0, EDA_UNITS::MILS ) ) // 1 mil .. 10 inches
457  return false;
458 
459  SCH_SHEET_PATH currentSheet = m_parent->GetCurrentSheet();
460  m_appendUndo = false;
461 
462  // Go through sheets
463  for( const SCH_SHEET_PATH& sheetPath : m_parent->Schematic().GetSheets() )
464  {
465  SCH_SCREEN* screen = sheetPath.LastScreen();
466 
467  if( screen )
468  {
469  m_parent->SetCurrentSheet( sheetPath );
470 
471  for( SCH_ITEM* item : screen->Items() )
472  visitItem( sheetPath, item );
473  }
474  }
475 
476  if( m_appendUndo )
477  {
478  m_parent->OnModify();
479  m_parent->HardRedraw();
480  }
481 
482  // Reset the view to where we left the user
483  m_parent->SetCurrentSheet( currentSheet );
484 
485  return true;
486 }
487 
488 
490 {
492  dlg.ShowModal();
493  return 0;
494 }
495 
496 
void SetSwatchColor(const KIGFX::COLOR4D &aColor, bool aSendEvent)
Set the current swatch color directly.
Field Reference of part, i.e. "IC21".
void SetCurrentSheet(const SCH_SHEET_PATH &aSheet)
Instances are attached to a symbol or sheet and provide a place for the symbol's value,...
Definition: sch_field.h:49
KIGFX::COLOR4D GetSwatchColor() const
void RecalculateConnections(SCH_CLEANUP_FLAGS aCleanupFlags)
Generate the connection data for the entire schematic hierarchy.
bool IsSelected() const
Definition: eda_item.h:122
SCH_FIELD * GetField(MANDATORY_FIELD_T aFieldType)
Return a mandatory field in this symbol.
Definition: sch_symbol.cpp:705
const SCH_CONNECTION * GetHighlightedConnection() const
void visitItem(const SCH_SHEET_PATH &aSheetPath, SCH_ITEM *aItem)
void SetLineWidth(const int aSize)
Definition: sch_line.cpp:305
void SetDiameter(int aDiameter)
Definition: sch_junction.h:111
void SetItalic(bool isItalic)
Definition: eda_text.h:200
void SetColor(const COLOR4D &aColor)
Definition: sch_junction.h:116
void GetFields(std::vector< SCH_FIELD * > &aVector, bool aVisibleOnly)
Populate a std::vector with SCH_FIELDs.
Definition: sch_symbol.cpp:741
Schematic editor (Eeschema) main window.
void SetTextSize(const wxSize &aNewSize)
Definition: eda_text.h:258
bool IsIndeterminate() const
Return true if the control holds the indeterminate value (for instance, if it represents a multiple s...
search types array terminator (End Of Types)
Definition: typeinfo.h:81
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.
Definition: typeinfo.h:77
void SetBorderWidth(int aWidth)
Definition: sch_sheet.h:108
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:138
EE_SELECTION & GetSelection()
Return the set of currently selected items.
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition: eda_text.h:140
std::vector< SCH_FIELD > & GetFields()
Definition: sch_sheet.h:90
virtual void SetVisible(bool aVisible)
Definition: eda_text.h:206
int GlobalEdit(const TOOL_EVENT &aEvent)
Delete the selected items, or the item under the cursor.
void SetLineStyle(const PLOT_DASH_TYPE aStyle)
Definition: sch_line.cpp:269
void SetBackgroundColor(KIGFX::COLOR4D aColor)
Definition: sch_sheet.h:114
wxString Name(bool aIgnoreSheet=false) const
Field Value of part, i.e. "3.3K".
static EDA_TEXT_HJUSTIFY_T MapHorizJustify(int aHorizJustify)
Definition: eda_text.cpp:73
void HardRedraw() override
Rebuild the GAL and redraw the screen.
void SetVertJustify(EDA_TEXT_VJUSTIFY_T aType)
Definition: eda_text.h:223
int GetFieldCount() const
Return the number of fields in this symbol.
Definition: sch_symbol.h:425
Generic, UI-independent tool event.
Definition: tool_event.h:152
SCHEMATIC & Schematic() const
void SetBorderColor(KIGFX::COLOR4D aColor)
Definition: sch_sheet.h:111
EDA_ITEM * GetParent() const
Definition: eda_item.h:114
void SetDefaultColor(const KIGFX::COLOR4D &aColor)
Sets the color that will be chosen with the "Reset to Default" button in the chooser.
virtual bool IsType(const KICAD_T aScanTypes[]) const
Check whether the item is one of the listed types.
Definition: eda_item.h:182
void SetLineColor(const COLOR4D &aColor)
Definition: sch_line.cpp:213
Define a sheet pin (label) used in sheets to create hierarchical schematics.
Definition: sch_sheet_pin.h:65
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
static EDA_TEXT_VJUSTIFY_T MapVertJustify(int aVertJustify)
Definition: eda_text.cpp:87
wxString UnescapeString(const wxString &aSource)
Sheet symbol placed in a schematic, and is the entry point for a sub schematic.
Definition: sch_sheet.h:54
virtual unsigned int GetSize() const override
Return the number of stored items.
Definition: selection.h:88
std::vector< SCH_SHEET_PIN * > & GetPins()
Definition: sch_sheet.h:183
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
static bool m_allowRealTime
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
SCH_SHEET_LIST GetSheets() const override
Builds and returns an updated schematic hierarchy TODO: can this be cached?
Definition: schematic.h:87
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.
Schematic symbol object.
Definition: sch_symbol.h:78
SCH_SCREEN * LastScreen()
Segment description base class to describe items which have 2 end points (track, wire,...
Definition: sch_line.h:37
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:177
void SetHorizJustify(EDA_TEXT_HJUSTIFY_T aType)
Definition: eda_text.h:222
Each graphical item can have a SCH_CONNECTION describing its logical connection (to a bus or net).
void SaveCopyInUndoList(SCH_SCREEN *aScreen, SCH_ITEM *aItemToCopy, UNDO_REDO aTypeCommand, bool aAppend)
Create a copy of the current schematic item, and put it in the undo list.
virtual void SetValue(int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
wxString GetName(bool aUseDefaultName=true) const
Return the field name.
Definition: sch_field.cpp:678
EE_RTREE & Items()
Gets the full RTree, usually for iterating.
Definition: sch_screen.h:110
void processItem(const SCH_SHEET_PATH &aSheetPath, SCH_ITEM *aItem)
virtual long long int GetValue()
Return the current value in Internal Units.
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.
SCH_SHEET_PATH & GetCurrentSheet() const
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
Definition: tools_holder.h:54
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag of the current screen and u...
virtual void SetLabelSpinStyle(LABEL_SPIN_STYLE aSpinStyle)
Set a spin or rotation angle, along with specific horizontal and vertical justification styles with e...
Definition: sch_text.cpp:330
#define INDETERMINATE_ACTION
Definition: base_units.h:48
void SetBold(bool aBold)
Definition: eda_text.h:203
Base class for any item which can be embedded within the SCHEMATIC container class,...
Definition: sch_item.h:182
EDA_ITEM * Front() const
Definition: selection.h:145
KICAD_T Type() const
Returns the type of object.
Definition: eda_item.h:112