KiCad PCB EDA Suite
ee_inspection_tool.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 CERN
5  * Copyright (C) 2019-2021 KiCad Developers, see AUTHORS.txt for contributors.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, you may find one here:
19  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20  * or you may search the http://www.gnu.org website for the version 2 license,
21  * or you may write to the Free Software Foundation, Inc.,
22  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23  */
24 
25 #include <sch_symbol.h>
26 #include <id.h>
27 #include <kiway.h>
28 #include <confirm.h>
29 #include <tool/conditional_menu.h>
31 #include <tools/ee_actions.h>
34 #include <tools/ee_selection.h>
35 #include <sim/sim_plot_frame.h>
36 #include <sch_edit_frame.h>
37 #include <symbol_edit_frame.h>
38 #include <symbol_viewer_frame.h>
39 #include <eda_doc.h>
40 #include <sch_marker.h>
41 #include <project.h>
43 #include <dialogs/dialog_erc.h>
44 #include <math/util.h> // for KiROUND
45 
46 
48  EE_TOOL_BASE<SCH_BASE_FRAME>( "eeschema.InspectionTool" ),
49  m_ercDialog( nullptr )
50 {
51 }
52 
53 
55 {
57 
58  auto singleMarkerCondition = SELECTION_CONDITIONS::OnlyType( SCH_MARKER_T )
60 
61  // Add inspection actions to the selection tool menu
62  //
64 
65  selToolMenu.AddItem( EE_ACTIONS::excludeMarker, singleMarkerCondition, 100 );
66 
68 
69  return true;
70 }
71 
72 
74 {
75  EE_TOOL_BASE::Reset( aReason );
76 
77  if( aReason == MODEL_RELOAD )
78  {
80  }
81 }
82 
83 
85 {
86  ShowERCDialog();
87  return 0;
88 }
89 
90 
92 {
93  if( m_frame->IsType( FRAME_SCH ) )
94  {
95  if( m_ercDialog )
96  {
97  // Needed at least on Windows. Raise() is not enough
98  m_ercDialog->Show( true );
99  // Bring it to the top if already open. Dual monitor users need this.
100  m_ercDialog->Raise();
101  }
102  else
103  {
104  // This is a modeless dialog, so new it rather than instantiating on stack.
105  m_ercDialog = new DIALOG_ERC( static_cast<SCH_EDIT_FRAME*>( m_frame ) );
106 
107  m_ercDialog->Show( true );
108  }
109  }
110 }
111 
112 
114 {
115  if( m_ercDialog )
116  m_ercDialog->Destroy();
117 
118  m_ercDialog = nullptr;
119 }
120 
121 
123 {
124  if( m_ercDialog )
125  {
126  m_ercDialog->Show( true );
127  m_ercDialog->Raise();
129  }
130  else
131  {
132  ShowERCDialog();
133  }
134 
135  return 0;
136 }
137 
138 
140 {
141  if( m_ercDialog )
142  {
143  m_ercDialog->Show( true );
144  m_ercDialog->Raise();
146  }
147  else
148  {
149  ShowERCDialog();
150  }
151 
152  return 0;
153 }
154 
155 
157 {
158  if( m_ercDialog )
159  {
160  // Let the ERC dialog handle it since it has more update hassles to worry about
162  }
163  else
164  {
166  EE_SELECTION& selection = selTool->GetSelection();
167 
168  if( selection.GetSize() == 1 && selection.Front()->Type() == SCH_MARKER_T )
169  {
170  SCH_MARKER* marker = static_cast<SCH_MARKER*>( selection.Front() );
171 
172  marker->SetExcluded( true );
173  m_frame->GetCanvas()->GetView()->Update( marker );
174  m_frame->GetCanvas()->Refresh();
175  m_frame->OnModify();
176  }
177  }
178 
179  return 0;
180 }
181 
182 
183 // helper function to sort pins by pin num
184 bool sort_by_pin_number( const LIB_PIN* ref, const LIB_PIN* tst )
185 {
186  // Use number as primary key
187  int test = ref->GetNumber().Cmp( tst->GetNumber() );
188 
189  // Use DeMorgan variant as secondary key
190  if( test == 0 )
191  test = ref->GetConvert() - tst->GetConvert();
192 
193  // Use unit as tertiary key
194  if( test == 0 )
195  test = ref->GetUnit() - tst->GetUnit();
196 
197  return test < 0;
198 }
199 
200 
202 {
203  LIB_PART* part = static_cast<SYMBOL_EDIT_FRAME*>( m_frame )->GetCurPart();
204 
205  if( !part )
206  return 0;
207 
208  LIB_PINS pinList;
209  std::unique_ptr<LIB_PART> flattenedPart = part->Flatten();
210 
211  flattenedPart->GetPins( pinList );
212 
213  // Sort pins by pin num, so 2 duplicate pins
214  // (pins with the same number) will be consecutive in list
215  sort( pinList.begin(), pinList.end(), sort_by_pin_number );
216 
217  // Test for duplicates:
218  DIALOG_DISPLAY_HTML_TEXT_BASE error_display( m_frame, wxID_ANY, _( "Symbol Warnings" ),
219  wxDefaultPosition, wxSize( 750, 600 ) );
220 
221  const int min_grid_size = 25;
222  const int grid_size = KiROUND( getView()->GetGAL()->GetGridSize().x );
223  const int clamped_grid_size = ( grid_size < min_grid_size ) ? min_grid_size : grid_size;
224 
225  std::vector<wxString> messages;
226  wxString msg;
227 
228  for( unsigned ii = 1; ii < pinList.size(); ii++ )
229  {
230  LIB_PIN* pin = pinList[ii - 1];
231  LIB_PIN* next = pinList[ii];
232 
233  if( pin->GetNumber() != next->GetNumber() || pin->GetConvert() != next->GetConvert() )
234  continue;
235 
236  wxString pinName;
237  wxString nextName;
238 
239  if( pin->GetName() != "~" && !pin->GetName().IsEmpty() )
240  pinName = " '" + pin->GetName() + "'";
241 
242  if( next->GetName() != "~" && !next->GetName().IsEmpty() )
243  nextName = " '" + next->GetName() + "'";
244 
245  if( part->HasConversion() && next->GetConvert() )
246  {
247  if( part->GetUnitCount() <= 1 )
248  {
249  msg.Printf( _( "<b>Duplicate pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
250  " conflicts with pin %s%s at location <b>(%.3f, %.3f)</b>"
251  " of converted." ),
252  next->GetNumber(),
253  nextName,
254  next->GetPosition().x / 1000.0, -next->GetPosition().y / 1000.0,
255  pin->GetNumber(),
256  pin->GetName(),
257  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 );
258  }
259  else
260  {
261  msg.Printf( _( "<b>Duplicate pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
262  " conflicts with pin %s%s at location <b>(%.3f, %.3f)</b>"
263  " in units %c and %c of converted." ),
264  next->GetNumber(),
265  nextName,
266  next->GetPosition().x / 1000.0, -next->GetPosition().y / 1000.0,
267  pin->GetNumber(),
268  pinName,
269  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0,
270  'A' + next->GetUnit() - 1,
271  'A' + pin->GetUnit() - 1 );
272  }
273  }
274  else
275  {
276  if( part->GetUnitCount() <= 1 )
277  {
278  msg.Printf( _( "<b>Duplicate pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
279  " conflicts with pin %s%s at location <b>(%.3f, %.3f)</b>." ),
280  next->GetNumber(),
281  nextName,
282  next->GetPosition().x / 1000.0, -next->GetPosition().y / 1000.0,
283  pin->GetNumber(),
284  pinName,
285  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 );
286  }
287  else
288  {
289  msg.Printf( _( "<b>Duplicate pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
290  " conflicts with pin %s%s at location <b>(%.3f, %.3f)</b>"
291  " in units %c and %c." ),
292  next->GetNumber(),
293  nextName,
294  next->GetPosition().x / 1000.0, -next->GetPosition().y / 1000.0,
295  pin->GetNumber(),
296  pinName,
297  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0,
298  'A' + next->GetUnit() - 1,
299  'A' + pin->GetUnit() - 1 );
300  }
301  }
302 
303  msg += wxT( "<br><br>" );
304  messages.push_back( msg );
305  }
306 
307  for( LIB_PIN* pin : pinList )
308  {
309  wxString pinName = pin->GetName();
310 
311  if( pinName.IsEmpty() || pinName == "~" )
312  pinName = "";
313  else
314  pinName = "'" + pinName + "'";
315 
316  if( !part->IsPower()
317  && pin->GetType() == ELECTRICAL_PINTYPE::PT_POWER_IN
318  && !pin->IsVisible() )
319  {
320  // hidden power pin
321  if( part->HasConversion() && pin->GetConvert() )
322  {
323  if( part->GetUnitCount() <= 1 )
324  {
325  msg.Printf( _( "<b>Hidden power pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
326  " of converted." ),
327  pin->GetNumber(),
328  pinName,
329  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 );
330  }
331  else
332  {
333  msg.Printf( _( "<b>Hidden power pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
334  " in unit %c of converted." ),
335  pin->GetNumber(),
336  pinName,
337  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0,
338  'A' + pin->GetUnit() - 1 );
339  }
340  }
341  else
342  {
343  if( part->GetUnitCount() <= 1 )
344  {
345  msg.Printf( _( "<b>Hidden power pin %s</b> %s at location <b>(%.3f, %.3f)</b>." ),
346  pin->GetNumber(),
347  pinName,
348  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 );
349  }
350  else
351  {
352  msg.Printf( _( "<b>Hidden power pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
353  " in unit %c." ),
354  pin->GetNumber(),
355  pinName,
356  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0,
357  'A' + pin->GetUnit() - 1 );
358  }
359  }
360 
361  msg += wxT( "<br>" );
362  msg += _( "(Hidden power pins will drive their pin names on to any connected nets.)" );
363  msg += wxT( "<br><br>" );
364  messages.push_back( msg );
365  }
366 
367  if( ( (pin->GetPosition().x % clamped_grid_size) != 0 )
368  || ( (pin->GetPosition().y % clamped_grid_size) != 0 ) )
369  {
370  // pin is off grid
371  if( part->HasConversion() && pin->GetConvert() )
372  {
373  if( part->GetUnitCount() <= 1 )
374  {
375  msg.Printf( _( "<b>Off grid pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
376  " of converted." ),
377  pin->GetNumber(),
378  pinName,
379  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 );
380  }
381  else
382  {
383  msg.Printf( _( "<b>Off grid pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
384  " in unit %c of converted." ),
385  pin->GetNumber(),
386  pinName,
387  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0,
388  'A' + pin->GetUnit() - 1 );
389  }
390  }
391  else
392  {
393  if( part->GetUnitCount() <= 1 )
394  {
395  msg.Printf( _( "<b>Off grid pin %s</b> %s at location <b>(%.3f, %.3f)</b>." ),
396  pin->GetNumber(),
397  pinName,
398  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 );
399  }
400  else
401  {
402  msg.Printf( _( "<b>Off grid pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
403  " in unit %c." ),
404  pin->GetNumber(),
405  pinName,
406  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0,
407  'A' + pin->GetUnit() - 1 );
408  }
409  }
410 
411  msg += wxT( "<br><br>" );
412  messages.push_back( msg );
413  }
414  }
415 
416  if( messages.empty() )
417  {
418  DisplayInfoMessage( m_frame, _( "No symbol issues found." ) );
419  }
420  else
421  {
422  wxColour bgcolor = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW );
423  wxColour fgcolor = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
424  wxString outmsg = wxString::Format( "<html><body bgcolor='%s' text='%s'>",
425  bgcolor.GetAsString( wxC2S_HTML_SYNTAX ),
426  fgcolor.GetAsString( wxC2S_HTML_SYNTAX ) );
427 
428  for( auto& msgPart : messages )
429  outmsg += msgPart;
430 
431  outmsg += "</body></html>";
432 
433  error_display.m_htmlWindow->SetPage( outmsg );
434  error_display.ShowModal();
435  }
436 
437  return 0;
438 }
439 
440 
442 {
443 #ifdef KICAD_SPICE
445  simFrame->Show( true );
446 
447  // On Windows, Raise() does not bring the window on screen, when iconized
448  if( simFrame->IsIconized() )
449  simFrame->Iconize( false );
450 
451  simFrame->Raise();
452 #endif /* KICAD_SPICE */
453  return 0;
454 }
455 
456 
458 {
459  wxString datasheet;
460 
462  {
463  LIB_PART* part = static_cast<SYMBOL_EDIT_FRAME*>( m_frame )->GetCurPart();
464 
465  if( !part )
466  return 0;
467 
468  datasheet = part->GetDatasheetField().GetText();
469  }
471  {
472  LIB_PART* entry = static_cast<SYMBOL_VIEWER_FRAME*>( m_frame )->GetSelectedSymbol();
473 
474  if( !entry )
475  return 0;
476 
477  datasheet = entry->GetDatasheetField().GetText();
478  }
479  else if( m_frame->IsType( FRAME_SCH ) )
480  {
482 
483  if( selection.Empty() )
484  return 0;
485 
486  SCH_COMPONENT* component = (SCH_COMPONENT*) selection.Front();
487 
488  datasheet = component->GetField( DATASHEET_FIELD )->GetText();
489  }
490 
491  if( !datasheet.IsEmpty() && datasheet != wxT( "~" ) )
492  GetAssociatedDocument( m_frame, datasheet, &m_frame->Prj() );
493 
494  return 0;
495 }
496 
497 
499 {
501  EE_SELECTION& selection = selTool->GetSelection();
502 
503  if( selection.GetSize() == 1 )
504  {
505  EDA_ITEM* item = (EDA_ITEM*) selection.Front();
506 
507  MSG_PANEL_ITEMS msgItems;
508  item->GetMsgPanelInfo( m_frame, msgItems );
509  m_frame->SetMsgPanel( msgItems );
510  }
511  else
512  {
514  }
515 
516  if( SCH_EDIT_FRAME* editFrame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame ) )
517  editFrame->UpdateNetHighlightStatus();
518 
519  return 0;
520 }
521 
522 
524 {
529 
532 
534 
539 }
540 
541 
CITER next(CITER it)
Definition: ptree.cpp:126
power input (GND, VCC for ICs). Must be connected to a power output.
KIGFX::SCH_VIEW * GetView() const override
Return a pointer to the #VIEW instance used in the panel.
static TOOL_ACTION showDatasheet
Inspection and Editing.
Definition: ee_actions.h:137
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
Definition: ee_tool_base.h:85
bool GetAssociatedDocument(wxWindow *aParent, const wxString &aDocName, PROJECT *aProject)
Open a document (file) with the suitable browser.
Definition: eda_doc.cpp:79
static const TOOL_EVENT SelectedEvent
Definition: actions.h:209
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
Definition: kiway_holder.h:56
DIALOG_ERC * m_ercDialog
int RunSimulation(const TOOL_EVENT &aEvent)
LIB_FIELD & GetDatasheetField()
Return reference to the datasheet field.
Definition: lib_symbol.cpp:990
static SELECTION_CONDITION SingleSymbol
Model changes (required full reload)
Definition: tool_base.h:81
static TOOL_ACTION runERC
Definition: ee_actions.h:138
static const TOOL_EVENT UnselectedEvent
Definition: actions.h:210
This file is part of the common library.
void ExcludeMarker()
Definition: dialog_erc.cpp:667
bool HasConversion() const
Test if part has more than one body conversion type (DeMorgan).
void setTransitions() override
<
std::vector< LIB_PIN * > LIB_PINS
Helper for defining a list of pin object pointers.
Definition: lib_item.h:56
This file is part of the common library.
static bool Idle(const SELECTION &aSelection)
Test if there no items selected or being edited.
CONDITIONAL_MENU & GetMenu()
Definition: tool_menu.cpp:46
void PrevMarker()
Definition: dialog_erc.cpp:649
TOOL_MANAGER * m_toolMgr
Definition: tool_base.h:215
static TOOL_ACTION nextMarker
Definition: actions.h:89
TOOL_MENU & GetToolMenu()
virtual KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
Return the KIWAY_PLAYER* given a FRAME_T.
Definition: kiway.cpp:345
Schematic editor (Eeschema) main window.
bool sort_by_pin_number(const LIB_PIN *ref, const LIB_PIN *tst)
static const KICAD_T ComponentsOnly[]
Definition: ee_collectors.h:48
static TOOL_ACTION excludeMarker
Definition: actions.h:90
static SELECTION_CONDITION Count(int aNumber)
Create a functor that tests if the number of selected items is equal to the value given as parameter.
static TOOL_ACTION checkSymbol
Definition: ee_actions.h:153
void Go(int(T::*aStateFunc)(const TOOL_EVENT &), const TOOL_EVENT_LIST &aConditions=TOOL_EVENT(TC_ANY, TA_ANY))
Define which state (aStateFunc) to go when a certain event arrives (aConditions).
int UpdateMessagePanel(const TOOL_EVENT &aEvent)
static const TOOL_EVENT SelectedItemsModified
Selected items were moved, this can be very high frequency on the canvas, use with care.
Definition: actions.h:214
name of datasheet
bool Init() override
Init() is called once upon a registration of the tool.
Definition: ee_tool_base.h:65
static TOOL_ACTION runSimulation
Definition: ee_actions.h:208
EE_SELECTION & GetSelection()
Return the set of currently selected items.
EE_SELECTION & RequestSelection(const KICAD_T *aFilterList=EE_COLLECTOR::AllItems)
Return either an existing selection (filtered), or the selection at the current cursor if the existin...
int GetUnit() const
Definition: lib_item.h:262
Class DIALOG_DISPLAY_HTML_TEXT_BASE.
void SetExcluded(bool aExcluded)
Definition: marker_base.h:95
int GetUnitCount() const override
For items with units, return the number of units.
void SetMsgPanel(const std::vector< MSG_PANEL_ITEM > &aList)
Clear the message panel and populates it with the contents of aList.
virtual void OnModify()
Must be called after a model change in order to set the "modify" flag and do other frame-specific pro...
const wxString & GetName() const
Definition: lib_pin.h:156
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
virtual void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList)
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
Definition: eda_item.h:263
SCH_DRAW_PANEL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
Generic, UI-independent tool event.
Definition: tool_event.h:173
int ExcludeMarker(const TOOL_EVENT &aEvent)
Define a library symbol object.
Definition: lib_symbol.h:93
Subclass of SIM_PLOT_FRAME_BASE, which is generated by wxFormBuilder.
EE_SELECTION_TOOL * m_selectionTool
Definition: ee_tool_base.h:176
static const TOOL_EVENT ClearedEvent
Selected item had a property changed (except movement)
Definition: actions.h:211
std::unique_ptr< LIB_PART > Flatten() const
Return a flattened symbol inheritance to the caller.
Definition: lib_symbol.cpp:327
virtual void ClearMsgPanel()
Clear all messages from the message panel.
int GetConvert() const
Definition: lib_item.h:265
KIGFX::VIEW * getView() const
Returns the instance of #VIEW object used in the application.
Definition: tool_base.cpp:36
void Reset(RESET_REASON aReason) override
Bring the tool to a known, initial state.
bool Show(bool show) override
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=NULL) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
bool Empty() const
Checks if there is anything selected.
Definition: selection.h:122
Implementing SIM_PLOT_FRAME_BASE.
static TOOL_ACTION prevMarker
Definition: actions.h:88
wxPoint GetPosition() const override
Definition: lib_pin.h:258
int RunERC(const TOOL_EVENT &aEvent)
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
SCH_FIELD * GetField(int aFieldNdx)
Returns a field in this symbol.
Definition: sch_symbol.cpp:687
const wxString & GetNumber() const
Definition: lib_pin.h:165
bool IsPower() const
Definition: lib_symbol.cpp:404
bool IsType(FRAME_T aType) const
#define _(s)
Definition: 3d_actions.cpp:33
static SELECTION_CONDITION OnlyType(KICAD_T aType)
Create a functor that tests if the selected items are only of given type.
Schematic symbol object.
Definition: sch_symbol.h:79
void NextMarker()
Definition: dialog_erc.cpp:658
constexpr ret_type KiROUND(fp_type v)
Round a floating point number to an integer using "round halfway cases away from zero".
Definition: util.h:68
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:149
std::vector< MSG_PANEL_ITEM > MSG_PANEL_ITEMS
Definition: msgpanel.h:97
RESET_REASON
Determine the reason of reset for a tool.
Definition: tool_base.h:78
A foundation class for a tool operating on a schematic or symbol.
Definition: ee_tool_base.h:48
int NextMarker(const TOOL_EVENT &aEvent)
bool Init() override
Init() is called once upon a registration of the tool.
int ShowDatasheet(const TOOL_EVENT &aEvent)
void DisplayInfoMessage(wxWindow *aParent, const wxString &aMessage, const wxString &aExtraInfo)
Display an informational message box with aMessage.
Definition: confirm.cpp:281
int PrevMarker(const TOOL_EVENT &aEvent)
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
void AddItem(const TOOL_ACTION &aAction, const SELECTION_CONDITION &aCondition, int aOrder=ANY_ORDER)
Add a menu entry to run a TOOL_ACTION on selected items.
virtual const wxString & GetText() const
Return the string associated with the text object.
Definition: eda_text.h:133
EDA_ITEM * Front() const
Definition: selection.h:203
virtual void Update(const VIEW_ITEM *aItem, int aUpdateFlags) const
For dynamic VIEWs, inform the associated VIEW that the graphical representation of this item has chan...
Definition: view.cpp:1508
int CheckSymbol(const TOOL_EVENT &aEvent)