KiCad PCB EDA Suite
rc_item.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) 2020 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 
25 #include <wx/wupdlock.h>
26 #include <wx/dataview.h>
27 #include <wx/settings.h>
28 #include <widgets/ui_common.h>
29 #include <marker_base.h>
30 #include <eda_draw_frame.h>
31 #include <rc_item.h>
32 #include <base_units.h>
33 
34 #define WX_DATAVIEW_WINDOW_PADDING 6
35 
36 
37 wxString RC_ITEM::GetErrorMessage() const
38 {
39  if( m_errorMessage.IsEmpty() )
40  return GetErrorText();
41  else
42  return m_errorMessage;
43 }
44 
45 
46 wxString RC_ITEM::ShowCoord( EDA_UNITS aUnits, const wxPoint& aPos )
47 {
48  return wxString::Format( "@(%s, %s)",
49  MessageTextFromValue( aUnits, aPos.x ),
50  MessageTextFromValue( aUnits, aPos.y ) );
51 }
52 
53 
54 wxString RC_ITEM::ShowReport( EDA_UNITS aUnits, SEVERITY aSeverity,
55  const std::map<KIID, EDA_ITEM*>& aItemMap ) const
56 {
57  wxString severity;
58 
59  switch( aSeverity )
60  {
61  case RPT_SEVERITY_ERROR: severity = wxT( "Severity: error" ); break;
62  case RPT_SEVERITY_WARNING: severity = wxT( "Severity: warning" ); break;
63  case RPT_SEVERITY_ACTION: severity = wxT( "Severity: action" ); break;
64  case RPT_SEVERITY_INFO: severity = wxT( "Severity: info" ); break;
65  default: ;
66  };
67 
68  if( m_parent && m_parent->IsExcluded() )
69  severity += wxT( " (excluded)" );
70 
71  EDA_ITEM* mainItem = nullptr;
72  EDA_ITEM* auxItem = nullptr;
73 
74  auto ii = aItemMap.find( GetMainItemID() );
75 
76  if( ii != aItemMap.end() )
77  mainItem = ii->second;
78 
79  ii = aItemMap.find( GetAuxItemID() );
80 
81  if( ii != aItemMap.end() )
82  auxItem = ii->second;
83 
84  // Note: some customers machine-process these. So:
85  // 1) don't translate
86  // 2) try not to re-order or change syntax
87  // 3) report numeric error code (which should be more stable) in addition to message
88 
89  if( mainItem && auxItem )
90  {
91  return wxString::Format( wxT( "[%s]: %s %s\n %s: %s\n %s: %s\n" ),
94  severity,
95  ShowCoord( aUnits, mainItem->GetPosition() ),
96  mainItem->GetSelectMenuText( aUnits ),
97  ShowCoord( aUnits, auxItem->GetPosition() ),
98  auxItem->GetSelectMenuText( aUnits ) );
99  }
100  else if( mainItem )
101  {
102  return wxString::Format( wxT( "[%s]: %s %s\n %s: %s\n" ),
103  GetSettingsKey(),
104  GetErrorMessage(),
105  severity,
106  ShowCoord( aUnits, mainItem->GetPosition() ),
107  mainItem->GetSelectMenuText( aUnits ) );
108  }
109  else
110  {
111  return wxString::Format( wxT( "[%s]: %s %s\n" ),
112  GetSettingsKey(),
113  GetErrorMessage(),
114  severity );
115  }
116 }
117 
118 
119 KIID RC_TREE_MODEL::ToUUID( wxDataViewItem aItem )
120 {
121  const RC_TREE_NODE* node = RC_TREE_MODEL::ToNode( aItem );
122 
123  if( node && node->m_RcItem )
124  {
125  const std::shared_ptr<RC_ITEM> rc_item = node->m_RcItem;
126 
127  switch( node->m_Type )
128  {
130  // rc_item->GetParent() can be null, if the parent is not existing
131  // when a RC item has no corresponding ERC/DRC marker
132  if( rc_item->GetParent() )
133  return rc_item->GetParent()->GetUUID();
134 
135  break;
136 
137  case RC_TREE_NODE::MAIN_ITEM: return rc_item->GetMainItemID();
138  case RC_TREE_NODE::AUX_ITEM: return rc_item->GetAuxItemID();
139  case RC_TREE_NODE::AUX_ITEM2: return rc_item->GetAuxItem2ID();
140  case RC_TREE_NODE::AUX_ITEM3: return rc_item->GetAuxItem3ID();
141  }
142  }
143 
144  return niluuid;
145 }
146 
147 
148 RC_TREE_MODEL::RC_TREE_MODEL( EDA_DRAW_FRAME* aParentFrame, wxDataViewCtrl* aView ) :
149  m_editFrame( aParentFrame ),
150  m_view( aView ),
151  m_severities( 0 ),
152  m_rcItemsProvider( nullptr )
153 {
154  m_view->GetMainWindow()->Connect( wxEVT_SIZE,
155  wxSizeEventHandler( RC_TREE_MODEL::onSizeView ),
156  NULL, this );
157 }
158 
159 
161 {
162  delete m_rcItemsProvider;
163 
164  for( RC_TREE_NODE* topLevelNode : m_tree )
165  delete topLevelNode;
166 }
167 
168 
169 void RC_TREE_MODEL::rebuildModel( RC_ITEMS_PROVIDER* aProvider, int aSeverities )
170 {
171  wxWindowUpdateLocker updateLock( m_view );
172 
173  std::shared_ptr<RC_ITEM> selectedRcItem = nullptr;
174 
175  if( m_view )
176  {
177  RC_TREE_NODE* selectedNode = ToNode( m_view->GetSelection() );
178  selectedRcItem = selectedNode ? selectedNode->m_RcItem : nullptr;
179 
180  // Even with the updateLock, wxWidgets sometimes ties its knickers in a knot trying
181  // to run a wxdataview_selection_changed_callback() on a row that has been deleted.
182  m_view->UnselectAll();
183  }
184 
185  if( aProvider != m_rcItemsProvider )
186  {
187  delete m_rcItemsProvider;
188  m_rcItemsProvider = aProvider;
189  }
190 
191  if( aSeverities != m_severities )
192  m_severities = aSeverities;
193 
194  if( m_rcItemsProvider )
196 
197  for( RC_TREE_NODE* topLevelNode : m_tree )
198  delete topLevelNode;
199 
200  m_tree.clear();
201 
202  // wxDataView::ExpandAll() pukes with large lists
203  int count = 0;
204 
205  if( m_rcItemsProvider )
206  count = std::min( 1000, m_rcItemsProvider->GetCount() );
207 
208  for( int i = 0; i < count; ++i )
209  {
210  std::shared_ptr<RC_ITEM> rcItem = m_rcItemsProvider->GetItem( i );
211 
212  m_tree.push_back( new RC_TREE_NODE( nullptr, rcItem, RC_TREE_NODE::MARKER ) );
213  RC_TREE_NODE* n = m_tree.back();
214 
215  if( rcItem->GetMainItemID() != niluuid )
216  n->m_Children.push_back( new RC_TREE_NODE( n, rcItem, RC_TREE_NODE::MAIN_ITEM ) );
217 
218  if( rcItem->GetAuxItemID() != niluuid )
219  n->m_Children.push_back( new RC_TREE_NODE( n, rcItem, RC_TREE_NODE::AUX_ITEM ) );
220 
221  if( rcItem->GetAuxItem2ID() != niluuid )
222  n->m_Children.push_back( new RC_TREE_NODE( n, rcItem, RC_TREE_NODE::AUX_ITEM2 ) );
223 
224  if( rcItem->GetAuxItem3ID() != niluuid )
225  n->m_Children.push_back( new RC_TREE_NODE( n, rcItem, RC_TREE_NODE::AUX_ITEM3 ) );
226  }
227 
228  // Must be called after a significant change of items to force the
229  // wxDataViewModel to reread all of them, repopulating itself entirely.
230  Cleared();
231 
232 #ifdef __WXGTK__
233  // The fastest method to update wxDataViewCtrl is to rebuild from
234  // scratch by calling Cleared(). Linux requires to reassociate model to
235  // display data, but Windows will create multiple associations.
236  // On MacOS, this crashes kicad. See https://gitlab.com/kicad/code/kicad/issues/3666
237  // and https://gitlab.com/kicad/code/kicad/issues/3653
238  m_view->AssociateModel( this );
239 #endif
240 
241  m_view->ClearColumns();
242  int width = m_view->GetMainWindow()->GetRect().GetWidth() - WX_DATAVIEW_WINDOW_PADDING;
243  m_view->AppendTextColumn( wxEmptyString, 0, wxDATAVIEW_CELL_INERT, width );
244 
245  ExpandAll();
246 
247  // Most annoyingly wxWidgets won't tell us the scroll position (and no, all the usual
248  // routines don't work), so we can only restore the scroll position based on a selection.
249  if( selectedRcItem )
250  {
251  for( RC_TREE_NODE* candidate : m_tree )
252  {
253  if( candidate->m_RcItem == selectedRcItem )
254  {
255  m_view->Select( ToItem( candidate ) );
256  m_view->EnsureVisible( ToItem( candidate ) );
257  break;
258  }
259  }
260  }
261 }
262 
263 
265 {
266  rebuildModel( aProvider, m_severities );
267 }
268 
269 
270 void RC_TREE_MODEL::SetSeverities( int aSeverities )
271 {
272  rebuildModel( m_rcItemsProvider, aSeverities );
273 }
274 
275 
277 {
278  for( RC_TREE_NODE* topLevelNode : m_tree )
279  m_view->Expand( ToItem( topLevelNode ) );
280 }
281 
282 
283 bool RC_TREE_MODEL::IsContainer( wxDataViewItem const& aItem ) const
284 {
285  if( ToNode( aItem ) == nullptr ) // must be tree root...
286  return true;
287  else
288  return ToNode( aItem )->m_Type == RC_TREE_NODE::MARKER;
289 }
290 
291 
292 wxDataViewItem RC_TREE_MODEL::GetParent( wxDataViewItem const& aItem ) const
293 {
294  return ToItem( ToNode( aItem)->m_Parent );
295 }
296 
297 
298 unsigned int RC_TREE_MODEL::GetChildren( wxDataViewItem const& aItem,
299  wxDataViewItemArray& aChildren ) const
300 {
301  const RC_TREE_NODE* node = ToNode( aItem );
302  const std::vector<RC_TREE_NODE*>& children = node ? node->m_Children : m_tree;
303 
304  for( const RC_TREE_NODE* child: children )
305  aChildren.push_back( ToItem( child ) );
306 
307  return children.size();
308 }
309 
310 
314 void RC_TREE_MODEL::GetValue( wxVariant& aVariant,
315  wxDataViewItem const& aItem,
316  unsigned int aCol ) const
317 {
318  const RC_TREE_NODE* node = ToNode( aItem );
319  const std::shared_ptr<RC_ITEM> rcItem = node->m_RcItem;
320 
321  switch( node->m_Type )
322  {
324  {
325  wxString prefix;
326 
327  if( rcItem->GetParent() && rcItem->GetParent()->IsExcluded() )
328  prefix = _( "Excluded " );
329 
330  switch( m_editFrame->GetSeverity( rcItem->GetErrorCode() ) )
331  {
332  case RPT_SEVERITY_ERROR: prefix += _( "Error: " ); break;
333  case RPT_SEVERITY_WARNING: prefix += _( "Warning: " ); break;
334 
337  case RPT_SEVERITY_INFO:
338  case RPT_SEVERITY_ACTION:
339  case RPT_SEVERITY_IGNORE:
340  break;
341  }
342 
343  aVariant = prefix + rcItem->GetErrorMessage();
344  }
345  break;
346 
348  {
349  EDA_ITEM* item = m_editFrame->GetItem( rcItem->GetMainItemID() );
350  aVariant = item->GetSelectMenuText( m_editFrame->GetUserUnits() );
351  }
352  break;
353 
355  {
356  EDA_ITEM* item = m_editFrame->GetItem( rcItem->GetAuxItemID() );
357  aVariant = item->GetSelectMenuText( m_editFrame->GetUserUnits() );
358  }
359  break;
360 
362  {
363  EDA_ITEM* item = m_editFrame->GetItem( rcItem->GetAuxItem2ID() );
364  aVariant = item->GetSelectMenuText( m_editFrame->GetUserUnits() );
365  }
366  break;
367 
369  {
370  EDA_ITEM* item = m_editFrame->GetItem( rcItem->GetAuxItem3ID() );
371  aVariant = item->GetSelectMenuText( m_editFrame->GetUserUnits() );
372  }
373  break;
374  }
375 }
376 
377 
382 bool RC_TREE_MODEL::GetAttr( wxDataViewItem const& aItem,
383  unsigned int aCol,
384  wxDataViewItemAttr& aAttr ) const
385 {
386  const RC_TREE_NODE* node = ToNode( aItem );
387  wxASSERT( node );
388 
389  bool ret = false;
390  bool heading = node->m_Type == RC_TREE_NODE::MARKER;
391 
392  if( heading )
393  {
394  aAttr.SetBold( true );
395  ret = true;
396  }
397 
398  if( node->m_RcItem->GetParent() && node->m_RcItem->GetParent()->IsExcluded() )
399  {
400  wxColour textColour = wxSystemSettings::GetColour( wxSYS_COLOUR_LISTBOXTEXT );
401 
402  if( KIGFX::COLOR4D( textColour ).GetBrightness() > 0.5 )
403  aAttr.SetColour( textColour.ChangeLightness( heading ? 30 : 35 ) );
404  else
405  aAttr.SetColour( textColour.ChangeLightness( heading ? 170 : 165 ) );
406 
407  aAttr.SetItalic( true ); // Strikethrough would be better, if wxWidgets supported it
408  ret = true;
409  }
410 
411  return ret;
412 }
413 
414 
416 {
417  if( aNode->m_Type == RC_TREE_NODE::MAIN_ITEM || aNode->m_Type == RC_TREE_NODE::AUX_ITEM )
418  {
419  ValueChanged( aNode->m_Parent );
420  }
421 
422  if( aNode->m_Type == RC_TREE_NODE::MARKER )
423  {
424  wxDataViewModel::ValueChanged( ToItem( aNode ), 0 );
425 
426  for( RC_TREE_NODE* child : aNode->m_Children )
427  wxDataViewModel::ValueChanged( ToItem( child ), 0 );
428  }
429 }
430 
431 
433 {
434  DeleteItems( true, true, aDeep );
435 }
436 
437 
438 void RC_TREE_MODEL::DeleteItems( bool aCurrentOnly, bool aIncludeExclusions, bool aDeep )
439 {
440  RC_TREE_NODE* current_node = ToNode( m_view->GetCurrentItem() );
441  const std::shared_ptr<RC_ITEM> current_item = current_node ? current_node->m_RcItem : nullptr;
442 
444  std::vector<RC_TREE_NODE*> to_delete;
445 
446  if( aCurrentOnly && !current_item )
447  {
448  wxBell();
449  return;
450  }
451 
452  if( !m_rcItemsProvider )
453  return;
454 
455  int lastGood = -1;
456  bool itemDeleted = false;
457 
458  if( m_view )
459  {
460  m_view->UnselectAll();
461  wxYield();
462  m_view->Freeze();
463  }
464 
465  for( int i = m_rcItemsProvider->GetCount() - 1; i >= 0; --i )
466  {
467  std::shared_ptr<RC_ITEM> rcItem = m_rcItemsProvider->GetItem( i );
468  MARKER_BASE* marker = rcItem->GetParent();
469  bool excluded = marker ? marker->IsExcluded() : false;
470 
471  if( aCurrentOnly && itemDeleted && lastGood >= 0 )
472  break;
473 
474  if( aCurrentOnly && rcItem != current_item )
475  {
476  lastGood = i;
477  continue;
478  }
479 
480  if( excluded && !aIncludeExclusions )
481  continue;
482 
483  if( i < (int) m_tree.size() ) // Careful; tree is truncated for large datasets
484  {
485  wxDataViewItem markerItem = ToItem( m_tree[i] );
486  wxDataViewItemArray childItems;
487  wxDataViewItem parentItem = ToItem( m_tree[i]->m_Parent );
488 
489  for( RC_TREE_NODE* child : m_tree[i]->m_Children )
490  {
491  childItems.push_back( ToItem( child ) );
492  to_delete.push_back( child );
493  }
494 
495  m_tree[i]->m_Children.clear();
496  ItemsDeleted( markerItem, childItems );
497 
498  to_delete.push_back( m_tree[i] );
499  m_tree.erase( m_tree.begin() + i );
500  ItemDeleted( parentItem, markerItem );
501  }
502 
503  // Only deep delete the current item here; others will be done through the
504  // DeleteAllItems() call below, which is more efficient.
505  m_rcItemsProvider->DeleteItem( i, aDeep && aCurrentOnly );
506 
507  if( lastGood > i )
508  lastGood--;
509 
510  itemDeleted = true;
511  }
512 
513  if( m_view && aCurrentOnly && lastGood >= 0 )
514  m_view->Select( ToItem( m_tree[ lastGood ] ) );
515 
516  for( RC_TREE_NODE* item : to_delete )
517  delete( item );
518 
519  if( !aCurrentOnly )
520  m_rcItemsProvider->DeleteAllItems( aIncludeExclusions, aDeep );
521 
522  if( m_view )
523  m_view->Thaw();
524 }
525 
526 
528 {
529  RC_TREE_NODE* currentNode = ToNode( m_view->GetCurrentItem() );
530  RC_TREE_NODE* prevMarker = nullptr;
531 
532  while( currentNode && currentNode->m_Type != RC_TREE_NODE::MARKER )
533  currentNode = currentNode->m_Parent;
534 
535  for( RC_TREE_NODE* candidate : m_tree )
536  {
537  if( candidate == currentNode )
538  break;
539  else
540  prevMarker = candidate;
541  }
542 
543  if( prevMarker )
544  m_view->Select( ToItem( prevMarker ) );
545 }
546 
547 
549 {
550  RC_TREE_NODE* currentNode = ToNode( m_view->GetCurrentItem() );
551 
552  while( currentNode && currentNode->m_Type != RC_TREE_NODE::MARKER )
553  currentNode = currentNode->m_Parent;
554 
555  RC_TREE_NODE* nextMarker = nullptr;
556  bool trigger = currentNode == nullptr;
557 
558  for( RC_TREE_NODE* candidate : m_tree )
559  {
560  if( candidate == currentNode )
561  {
562  trigger = true;
563  }
564  else if( trigger )
565  {
566  nextMarker = candidate;
567  break;
568  }
569  }
570 
571  if( nextMarker )
572  m_view->Select( ToItem( nextMarker ) );
573 }
574 
575 
576 void RC_TREE_MODEL::onSizeView( wxSizeEvent& aEvent )
577 {
578  int width = m_view->GetMainWindow()->GetRect().GetWidth() - WX_DATAVIEW_WINDOW_PADDING;
579 
580  if( m_view->GetColumnCount() > 0 )
581  m_view->GetColumn( 0 )->SetWidth( width );
582 
583  // Pass size event to other widgets
584  aEvent.Skip();
585 }
void DeleteItems(bool aCurrentOnly, bool aIncludeExclusions, bool aDeep)
Deletes the current item or all items.
Definition: rc_item.cpp:438
virtual EDA_ITEM * GetItem(const KIID &aId)
Fetch an item by KIID.
wxString MessageTextFromValue(EDA_UNITS aUnits, int aValue, bool aAddUnitLabel, EDA_DATA_TYPE aType)
Convert a value to a string using double notation.
Definition: base_units.cpp:125
void NextMarker()
Definition: rc_item.cpp:548
virtual void DeleteAllItems(bool aIncludeExclusions, bool aDeep)=0
KIID niluuid(0)
static wxDataViewItem ToItem(RC_TREE_NODE const *aNode)
Definition: rc_item.h:215
void SetProvider(RC_ITEMS_PROVIDER *aProvider)
Definition: rc_item.cpp:264
Implementation of conversion functions that require both schematic and board internal units.
SEVERITY
Definition: ui_common.h:83
bool GetAttr(wxDataViewItem const &aItem, unsigned int aCol, wxDataViewItemAttr &aAttr) const override
Called by the wxDataView to fetch an item's formatting.
Definition: rc_item.cpp:382
RC_TREE_NODE * m_Parent
Definition: rc_item.h:207
virtual int GetCount(int aSeverity=-1)=0
static KIID ToUUID(wxDataViewItem aItem)
Definition: rc_item.cpp:119
wxDataViewCtrl * m_view
Definition: rc_item.h:294
virtual SEVERITY GetSeverity(int aErrorCode) const
#define WX_DATAVIEW_WINDOW_PADDING
Definition: rc_item.cpp:34
virtual wxPoint GetPosition() const
Definition: eda_item.h:301
The base class for create windows for drawing purpose.
virtual std::shared_ptr< RC_ITEM > GetItem(int aIndex)=0
Retrieve a RC_ITEM by index.
void DeleteCurrentItem(bool aDeep)
Definition: rc_item.cpp:432
void SetSeverities(int aSeverities)
Definition: rc_item.cpp:270
Provide an abstract interface of a RC_ITEM* list manager.
Definition: rc_item.h:43
void GetValue(wxVariant &aVariant, wxDataViewItem const &aItem, unsigned int aCol) const override
Called by the wxDataView to fetch an item's value.
Definition: rc_item.cpp:314
wxString GetErrorText() const
Definition: rc_item.h:160
std::vector< RC_TREE_NODE * > m_Children
Definition: rc_item.h:208
RC_ITEMS_PROVIDER * m_rcItemsProvider
Definition: rc_item.h:296
Definition: kiid.h:44
std::shared_ptr< RC_ITEM > m_RcItem
Definition: rc_item.h:205
#define NULL
void ExpandAll()
Definition: rc_item.cpp:276
void rebuildModel(RC_ITEMS_PROVIDER *aProvider, int aSeverities)
Definition: rc_item.cpp:169
static RC_TREE_NODE * ToNode(wxDataViewItem aItem)
Definition: rc_item.h:220
static wxString ShowCoord(EDA_UNITS aUnits, const wxPoint &aPos)
Format a coordinate or position to text.
Definition: rc_item.cpp:46
KIID GetAuxItemID() const
Definition: rc_item.h:136
RC_TREE_MODEL(EDA_DRAW_FRAME *aParentFrame, wxDataViewCtrl *aView)
Definition: rc_item.cpp:148
Functions to provide common constants and other functions to assist in making a consistent UI.
EDA_DRAW_FRAME * m_editFrame
Definition: rc_item.h:293
wxString m_errorMessage
A message describing the details of this specific error.
Definition: rc_item.h:177
bool IsExcluded() const
Definition: marker_base.h:94
void onSizeView(wxSizeEvent &aEvent)
Definition: rc_item.cpp:576
void PrevMarker()
Definition: rc_item.cpp:527
virtual void SetSeverities(int aSeverities)=0
unsigned int GetChildren(wxDataViewItem const &aItem, wxDataViewItemArray &aChildren) const override
Definition: rc_item.cpp:298
NODE_TYPE m_Type
Definition: rc_item.h:204
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
EDA_UNITS
Definition: eda_units.h:38
std::vector< RC_TREE_NODE * > m_tree
Definition: rc_item.h:298
virtual wxString ShowReport(EDA_UNITS aUnits, SEVERITY aSeverity, const std::map< KIID, EDA_ITEM * > &aItemMap) const
Translate this object into a text string suitable for saving to disk in a report.
Definition: rc_item.cpp:54
MARKER_BASE * m_parent
The marker this item belongs to, if any.
Definition: rc_item.h:180
int m_severities
Definition: rc_item.h:295
#define _(s)
Definition: 3d_actions.cpp:33
virtual wxString GetSelectMenuText(EDA_UNITS aUnits) const
Return the text to display to be used in the selection clarification context menu when multiple items...
Definition: eda_item.cpp:123
A base class for most all the KiCad significant classes used in schematics and boards.
Definition: eda_item.h:149
wxString GetSettingsKey() const
Definition: rc_item.h:165
KIID GetMainItemID() const
Definition: rc_item.h:135
bool IsContainer(wxDataViewItem const &aItem) const override
Definition: rc_item.cpp:283
wxDataViewItem GetParent(wxDataViewItem const &aItem) const override
Definition: rc_item.cpp:292
virtual wxString GetErrorMessage() const
Return the error message of a RC_ITEM.
Definition: rc_item.cpp:37
virtual void DeleteItem(int aIndex, bool aDeep)=0
Remove (and optionally deletes) the indexed item from the list.
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
void ValueChanged(RC_TREE_NODE *aNode)
Definition: rc_item.cpp:415
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:98