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  part->GetPins( pinList );
210 
211  // Sort pins by pin num, so 2 duplicate pins
212  // (pins with the same number) will be consecutive in list
213  sort( pinList.begin(), pinList.end(), sort_by_pin_number );
214 
215  // Test for duplicates:
216  DIALOG_DISPLAY_HTML_TEXT_BASE error_display( m_frame, wxID_ANY, _( "Symbol Warnings" ),
217  wxDefaultPosition, wxSize( 750, 600 ) );
218 
219  const int min_grid_size = 25;
220  const int grid_size = KiROUND( getView()->GetGAL()->GetGridSize().x );
221  const int clamped_grid_size = ( grid_size < min_grid_size ) ? min_grid_size : grid_size;
222 
223  std::vector<wxString> messages;
224  wxString msg;
225 
226  for( unsigned ii = 1; ii < pinList.size(); ii++ )
227  {
228  LIB_PIN* pin = pinList[ii - 1];
229  LIB_PIN* next = pinList[ii];
230 
231  if( pin->GetNumber() != next->GetNumber() || pin->GetConvert() != next->GetConvert() )
232  continue;
233 
234  wxString pinName;
235  wxString nextName;
236 
237  if( pin->GetName() != "~" && !pin->GetName().IsEmpty() )
238  pinName = " '" + pin->GetName() + "'";
239 
240  if( next->GetName() != "~" && !next->GetName().IsEmpty() )
241  nextName = " '" + next->GetName() + "'";
242 
243  if( part->HasConversion() && next->GetConvert() )
244  {
245  if( part->GetUnitCount() <= 1 )
246  {
247  msg.Printf( _( "<b>Duplicate pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
248  " conflicts with pin %s%s at location <b>(%.3f, %.3f)</b>"
249  " of converted." ),
250  next->GetNumber(),
251  nextName,
252  next->GetPosition().x / 1000.0, -next->GetPosition().y / 1000.0,
253  pin->GetNumber(),
254  pin->GetName(),
255  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 );
256  }
257  else
258  {
259  msg.Printf( _( "<b>Duplicate pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
260  " conflicts with pin %s%s at location <b>(%.3f, %.3f)</b>"
261  " in units %c and %c of converted." ),
262  next->GetNumber(),
263  nextName,
264  next->GetPosition().x / 1000.0, -next->GetPosition().y / 1000.0,
265  pin->GetNumber(),
266  pinName,
267  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0,
268  'A' + next->GetUnit() - 1,
269  'A' + pin->GetUnit() - 1 );
270  }
271  }
272  else
273  {
274  if( part->GetUnitCount() <= 1 )
275  {
276  msg.Printf( _( "<b>Duplicate pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
277  " conflicts with pin %s%s at location <b>(%.3f, %.3f)</b>." ),
278  next->GetNumber(),
279  nextName,
280  next->GetPosition().x / 1000.0, -next->GetPosition().y / 1000.0,
281  pin->GetNumber(),
282  pinName,
283  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 );
284  }
285  else
286  {
287  msg.Printf( _( "<b>Duplicate pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
288  " conflicts with pin %s%s at location <b>(%.3f, %.3f)</b>"
289  " in units %c and %c." ),
290  next->GetNumber(),
291  nextName,
292  next->GetPosition().x / 1000.0, -next->GetPosition().y / 1000.0,
293  pin->GetNumber(),
294  pinName,
295  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0,
296  'A' + next->GetUnit() - 1,
297  'A' + pin->GetUnit() - 1 );
298  }
299  }
300 
301  msg += wxT( "<br><br>" );
302  messages.push_back( msg );
303  }
304 
305  for( LIB_PIN* pin : pinList )
306  {
307  wxString pinName = pin->GetName();
308 
309  if( pinName.IsEmpty() || pinName == "~" )
310  pinName = "";
311  else
312  pinName = "'" + pinName + "'";
313 
314  if( !part->IsPower()
315  && pin->GetType() == ELECTRICAL_PINTYPE::PT_POWER_IN
316  && !pin->IsVisible() )
317  {
318  // hidden power pin
319  if( part->HasConversion() && pin->GetConvert() )
320  {
321  if( part->GetUnitCount() <= 1 )
322  {
323  msg.Printf( _( "<b>Hidden power pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
324  " of converted." ),
325  pin->GetNumber(),
326  pinName,
327  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 );
328  }
329  else
330  {
331  msg.Printf( _( "<b>Hidden power pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
332  " in unit %c of converted." ),
333  pin->GetNumber(),
334  pinName,
335  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0,
336  'A' + pin->GetUnit() - 1 );
337  }
338  }
339  else
340  {
341  if( part->GetUnitCount() <= 1 )
342  {
343  msg.Printf( _( "<b>Hidden power pin %s</b> %s at location <b>(%.3f, %.3f)</b>." ),
344  pin->GetNumber(),
345  pinName,
346  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 );
347  }
348  else
349  {
350  msg.Printf( _( "<b>Hidden power pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
351  " in unit %c." ),
352  pin->GetNumber(),
353  pinName,
354  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0,
355  'A' + pin->GetUnit() - 1 );
356  }
357  }
358 
359  msg += wxT( "<br>" );
360  msg += _( "(Hidden power pins will drive their pin names on to any connected nets.)" );
361  msg += wxT( "<br><br>" );
362  messages.push_back( msg );
363  }
364 
365  if( ( (pin->GetPosition().x % clamped_grid_size) != 0 )
366  || ( (pin->GetPosition().y % clamped_grid_size) != 0 ) )
367  {
368  // pin is off grid
369  if( part->HasConversion() && pin->GetConvert() )
370  {
371  if( part->GetUnitCount() <= 1 )
372  {
373  msg.Printf( _( "<b>Off grid pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
374  " of converted." ),
375  pin->GetNumber(),
376  pinName,
377  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 );
378  }
379  else
380  {
381  msg.Printf( _( "<b>Off grid pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
382  " in unit %c of converted." ),
383  pin->GetNumber(),
384  pinName,
385  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0,
386  'A' + pin->GetUnit() - 1 );
387  }
388  }
389  else
390  {
391  if( part->GetUnitCount() <= 1 )
392  {
393  msg.Printf( _( "<b>Off grid pin %s</b> %s at location <b>(%.3f, %.3f)</b>." ),
394  pin->GetNumber(),
395  pinName,
396  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0 );
397  }
398  else
399  {
400  msg.Printf( _( "<b>Off grid pin %s</b> %s at location <b>(%.3f, %.3f)</b>"
401  " in unit %c." ),
402  pin->GetNumber(),
403  pinName,
404  pin->GetPosition().x / 1000.0, -pin->GetPosition().y / 1000.0,
405  'A' + pin->GetUnit() - 1 );
406  }
407  }
408 
409  msg += wxT( "<br><br>" );
410  messages.push_back( msg );
411  }
412  }
413 
414  if( messages.empty() )
415  {
416  DisplayInfoMessage( m_frame, _( "No symbol issues found." ) );
417  }
418  else
419  {
420  wxColour bgcolor = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW );
421  wxColour fgcolor = wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT );
422  wxString outmsg = wxString::Format( "<html><body bgcolor='%s' text='%s'>",
423  bgcolor.GetAsString( wxC2S_HTML_SYNTAX ),
424  fgcolor.GetAsString( wxC2S_HTML_SYNTAX ) );
425 
426  for( auto& msgPart : messages )
427  outmsg += msgPart;
428 
429  outmsg += "</body></html>";
430 
431  error_display.m_htmlWindow->SetPage( outmsg );
432  error_display.ShowModal();
433  }
434 
435  return 0;
436 }
437 
438 
440 {
441 #ifdef KICAD_SPICE
443 
444  if( !simFrame )
445  return -1;
446 
447  simFrame->Show( true );
448 
449  // On Windows, Raise() does not bring the window on screen, when iconized
450  if( simFrame->IsIconized() )
451  simFrame->Iconize( false );
452 
453  simFrame->Raise();
454 #endif /* KICAD_SPICE */
455  return 0;
456 }
457 
458 
460 {
461  wxString datasheet;
462 
464  {
465  LIB_PART* part = static_cast<SYMBOL_EDIT_FRAME*>( m_frame )->GetCurPart();
466 
467  if( !part )
468  return 0;
469 
470  datasheet = part->GetDatasheetField().GetText();
471  }
473  {
474  LIB_PART* entry = static_cast<SYMBOL_VIEWER_FRAME*>( m_frame )->GetSelectedSymbol();
475 
476  if( !entry )
477  return 0;
478 
479  datasheet = entry->GetDatasheetField().GetText();
480  }
481  else if( m_frame->IsType( FRAME_SCH ) )
482  {
484 
485  if( selection.Empty() )
486  return 0;
487 
488  SCH_COMPONENT* component = (SCH_COMPONENT*) selection.Front();
489 
490  datasheet = component->GetField( DATASHEET_FIELD )->GetText();
491  }
492 
493  if( datasheet.IsEmpty() || datasheet == wxT( "~" ) )
494  m_frame->ShowInfoBarError( _( "No datasheet defined." ) );
495  else
497 
498  return 0;
499 }
500 
501 
503 {
505  EE_SELECTION& selection = selTool->GetSelection();
506 
507  if( selection.GetSize() == 1 )
508  {
509  EDA_ITEM* item = (EDA_ITEM*) selection.Front();
510 
511  MSG_PANEL_ITEMS msgItems;
512  item->GetMsgPanelInfo( m_frame, msgItems );
513  m_frame->SetMsgPanel( msgItems );
514  }
515  else
516  {
518  }
519 
520  if( SCH_EDIT_FRAME* editFrame = dynamic_cast<SCH_EDIT_FRAME*>( m_frame ) )
521  editFrame->UpdateNetHighlightStatus();
522 
523  return 0;
524 }
525 
526 
528 {
533 
536 
538 
543 }
544 
545 
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:201
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.
SCH_FIELD * GetField(MANDATORY_FIELD_T aFieldType)
Return a mandatory field in this symbol.
Definition: sch_symbol.cpp:665
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:202
This file is part of the common library.
void ExcludeMarker()
Definition: dialog_erc.cpp:663
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:645
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:368
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:206
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:209
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:260
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...
void GetPins(LIB_PINS &aList, int aUnit=0, int aConvert=0) const
Return a list of pin object pointers from the draw item list.
Definition: lib_symbol.cpp:695
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:264
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:203
virtual void ClearMsgPanel()
Clear all messages from the message panel.
int GetConvert() const
Definition: lib_item.h:263
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
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
const wxString & GetNumber() const
Definition: lib_pin.h:117
bool IsPower() const
Definition: lib_symbol.cpp:411
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:78
void NextMarker()
Definition: dialog_erc.cpp:654
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:150
void ShowInfoBarError(const wxString &aErrorMsg, bool aShowCloseButton=false)
Show the WX_INFOBAR displayed on the top of the canvas with a message and an error icon on the left o...
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:280
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:1503
int CheckSymbol(const TOOL_EVENT &aEvent)