KiCad PCB EDA Suite
fields_grid_table.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) 2018-2019 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 <kiway.h>
25 #include <kiway_player.h>
26 #include <dialog_shim.h>
27 #include <fields_grid_table.h>
28 #include <sch_base_frame.h>
29 #include <sch_field.h>
30 #include <sch_validators.h>
31 #include <validators.h>
32 #include <class_library.h>
33 #include <template_fieldnames.h>
36 
37 #include "eda_doc.h"
38 
39 
40 enum
41 {
42  MYID_SELECT_FOOTPRINT = 991, // must be within GRID_TRICKS' enum range
44 };
45 
46 
47 template <class T>
49  LIB_PART* aPart ) :
50  m_frame( aFrame ),
51  m_userUnits( aDialog->GetUserUnits() ),
52  m_part( aPart ),
53  m_fieldNameValidator( aFrame->IsType( FRAME_SCH_LIB_EDITOR ), FIELD_NAME ),
54  m_referenceValidator( aFrame->IsType( FRAME_SCH_LIB_EDITOR ), REFERENCE ),
55  m_valueValidator( aFrame->IsType( FRAME_SCH_LIB_EDITOR ), VALUE ),
56  m_libIdValidator( LIB_ID::ID_PCB ),
57  m_urlValidator( aFrame->IsType( FRAME_SCH_LIB_EDITOR ), FIELD_VALUE ),
58  m_nonUrlValidator( aFrame->IsType( FRAME_SCH_LIB_EDITOR ), FIELD_VALUE )
59 {
60  // Build the various grid cell attributes.
61  // NOTE: validators and cellAttrs are member variables to get the destruction order
62  // right. wxGrid is VERY cranky about this.
63 
64  m_readOnlyAttr = new wxGridCellAttr;
65  m_readOnlyAttr->SetReadOnly( true );
66 
67  m_fieldNameAttr = new wxGridCellAttr;
68  GRID_CELL_TEXT_EDITOR* nameEditor = new GRID_CELL_TEXT_EDITOR();
69  nameEditor->SetValidator( m_fieldNameValidator );
70  m_fieldNameAttr->SetEditor( nameEditor );
71 
72  m_referenceAttr = new wxGridCellAttr;
73  GRID_CELL_TEXT_EDITOR* referenceEditor = new GRID_CELL_TEXT_EDITOR();
74  referenceEditor->SetValidator( m_referenceValidator );
75  m_referenceAttr->SetEditor( referenceEditor );
76 
77  m_valueAttr = new wxGridCellAttr;
78  GRID_CELL_TEXT_EDITOR* valueEditor = new GRID_CELL_TEXT_EDITOR();
79  valueEditor->SetValidator( m_valueValidator );
80  m_valueAttr->SetEditor( valueEditor );
81 
82  m_footprintAttr = new wxGridCellAttr;
84  fpIdEditor->SetValidator( m_libIdValidator );
85  m_footprintAttr->SetEditor( fpIdEditor );
86 
87  m_urlAttr = new wxGridCellAttr;
88  GRID_CELL_URL_EDITOR* urlEditor = new GRID_CELL_URL_EDITOR( aDialog );
89  urlEditor->SetValidator( m_urlValidator );
90  m_urlAttr->SetEditor( urlEditor );
91 
92  m_nonUrlAttr = new wxGridCellAttr;
93  GRID_CELL_TEXT_EDITOR* nonUrlEditor = new GRID_CELL_TEXT_EDITOR();
94  nonUrlEditor->SetValidator( m_nonUrlValidator );
95  m_nonUrlAttr->SetEditor( nonUrlEditor );
96 
97  m_boolAttr = new wxGridCellAttr;
98  m_boolAttr->SetRenderer( new wxGridCellBoolRenderer() );
99  m_boolAttr->SetEditor( new wxGridCellBoolEditor() );
100  m_boolAttr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
101 
102  wxArrayString vAlignNames;
103  vAlignNames.Add( _( "Top" ) );
104  vAlignNames.Add( _( "Center" ) );
105  vAlignNames.Add( _( "Bottom" ) );
106  m_vAlignAttr = new wxGridCellAttr;
107  m_vAlignAttr->SetEditor( new wxGridCellChoiceEditor( vAlignNames ) );
108  m_vAlignAttr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
109 
110  wxArrayString hAlignNames;
111  hAlignNames.Add( _( "Left" ) );
112  hAlignNames.Add(_( "Center" ) );
113  hAlignNames.Add(_( "Right" ) );
114  m_hAlignAttr = new wxGridCellAttr;
115  m_hAlignAttr->SetEditor( new wxGridCellChoiceEditor( hAlignNames ) );
116  m_hAlignAttr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
117 
118  wxArrayString orientationNames;
119  orientationNames.Add( _( "Horizontal" ) );
120  orientationNames.Add(_( "Vertical" ) );
121  m_orientationAttr = new wxGridCellAttr;
122  m_orientationAttr->SetEditor( new wxGridCellChoiceEditor( orientationNames ) );
123  m_orientationAttr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
124 }
125 
126 
127 template <class T>
129 {
130  m_readOnlyAttr->DecRef();
131  m_fieldNameAttr->DecRef();
132  m_boolAttr->DecRef();
133  m_referenceAttr->DecRef();
134  m_valueAttr->DecRef();
135  m_footprintAttr->DecRef();
136  m_urlAttr->DecRef();
137  m_nonUrlAttr->DecRef();
138  m_vAlignAttr->DecRef();
139  m_hAlignAttr->DecRef();
140  m_orientationAttr->DecRef();
141 }
142 
143 
144 template <class T>
146 {
147  switch( aCol )
148  {
149  case FDC_NAME: return _( "Name" );
150  case FDC_VALUE: return _( "Value" );
151  case FDC_SHOWN: return _( "Show" );
152  case FDC_H_ALIGN: return _( "H Align" );
153  case FDC_V_ALIGN: return _( "V Align" );
154  case FDC_ITALIC: return _( "Italic" );
155  case FDC_BOLD: return _( "Bold" );
156  case FDC_TEXT_SIZE: return _( "Text Size" );
157  case FDC_ORIENTATION: return _( "Orientation" );
158  case FDC_POSX: return _( "X Position" );
159  case FDC_POSY: return _( "Y Position" );
160  default: wxFAIL; return wxEmptyString;
161  }
162 }
163 
164 
165 template <class T>
166 bool FIELDS_GRID_TABLE<T>::CanGetValueAs( int aRow, int aCol, const wxString& aTypeName )
167 {
168  switch( aCol )
169  {
170  case FDC_NAME:
171  case FDC_VALUE:
172  case FDC_H_ALIGN:
173  case FDC_V_ALIGN:
174  case FDC_TEXT_SIZE:
175  case FDC_ORIENTATION:
176  case FDC_POSX:
177  case FDC_POSY:
178  return aTypeName == wxGRID_VALUE_STRING;
179 
180  case FDC_SHOWN:
181  case FDC_ITALIC:
182  case FDC_BOLD:
183  return aTypeName == wxGRID_VALUE_BOOL;
184 
185  default:
186  wxFAIL;
187  return false;
188  }
189 }
190 
191 
192 template <class T>
193 bool FIELDS_GRID_TABLE<T>::CanSetValueAs( int aRow, int aCol, const wxString& aTypeName )
194 {
195  return CanGetValueAs( aRow, aCol, aTypeName );
196 }
197 
198 
199 template <class T>
200 wxGridCellAttr* FIELDS_GRID_TABLE<T>::GetAttr( int aRow, int aCol, wxGridCellAttr::wxAttrKind )
201 {
202  switch( aCol )
203  {
204  case FDC_NAME:
205  if( aRow < MANDATORY_FIELDS )
206  {
207  m_readOnlyAttr->IncRef();
208  return m_readOnlyAttr;
209  }
210  else
211  {
212  m_fieldNameAttr->IncRef();
213  return m_fieldNameAttr;
214  }
215 
216  case FDC_VALUE:
217  if( aRow == REFERENCE )
218  {
219  m_referenceAttr->IncRef();
220  return m_referenceAttr;
221  }
222  else if( aRow == VALUE )
223  {
224  // For power symbols, the value is not editable, because value and pin name must
225  // be the same and can be edited only in library editor.
226  if( m_part && m_part->IsPower() && ! m_frame->IsType( FRAME_SCH_LIB_EDITOR ) )
227  {
228  m_readOnlyAttr->IncRef();
229  return m_readOnlyAttr;
230  }
231  else
232  {
233  m_valueAttr->IncRef();
234  return m_valueAttr;
235  }
236  }
237  else if( aRow == FOOTPRINT )
238  {
239  m_footprintAttr->IncRef();
240  return m_footprintAttr;
241  }
242  else if( aRow == DATASHEET )
243  {
244  m_urlAttr->IncRef();
245  return m_urlAttr;
246  }
247  else
248  {
249  wxString fieldname = GetValue( aRow, FDC_NAME );
250  const TEMPLATE_FIELDNAME* templateFn = m_frame->GetTemplateFieldName( fieldname );
251 
252  if( templateFn && templateFn->m_URL )
253  {
254  m_urlAttr->IncRef();
255  return m_urlAttr;
256  }
257  else
258  {
259  m_nonUrlAttr->IncRef();
260  return m_nonUrlAttr;
261  }
262  }
263  return nullptr;
264 
265  case FDC_TEXT_SIZE:
266  case FDC_POSX:
267  case FDC_POSY:
268  return nullptr;
269 
270  case FDC_H_ALIGN:
271  m_hAlignAttr->IncRef();
272  return m_hAlignAttr;
273 
274  case FDC_V_ALIGN:
275  m_vAlignAttr->IncRef();
276  return m_vAlignAttr;
277 
278  case FDC_ORIENTATION:
279  m_orientationAttr->IncRef();
280  return m_orientationAttr;
281 
282  case FDC_SHOWN:
283  case FDC_ITALIC:
284  case FDC_BOLD:
285  m_boolAttr->IncRef();
286  return m_boolAttr;
287 
288  default:
289  wxFAIL;
290  return nullptr;
291  }
292 }
293 
294 
295 template <class T>
296 wxString FIELDS_GRID_TABLE<T>::GetValue( int aRow, int aCol )
297 {
298  wxCHECK( aRow < GetNumberRows(), wxEmptyString );
299  const T& field = this->at( (size_t) aRow );
300 
301  switch( aCol )
302  {
303  case FDC_NAME:
304  // Use default field name for mandatory fields, because they are translated
305  // according to the current locale
306  if( aRow < MANDATORY_FIELDS )
308  else
309  return field.GetName( false );
310 
311  case FDC_VALUE:
312  return field.GetText();
313 
314  case FDC_SHOWN:
315  return StringFromBool( field.IsVisible() );
316 
317  case FDC_H_ALIGN:
318  switch ( field.GetHorizJustify() )
319  {
320  case GR_TEXT_HJUSTIFY_LEFT: return _( "Left" );
321  case GR_TEXT_HJUSTIFY_CENTER: return _( "Center" );
322  case GR_TEXT_HJUSTIFY_RIGHT: return _( "Right" );
323  }
324 
325  break;
326 
327  case FDC_V_ALIGN:
328  switch ( field.GetVertJustify() )
329  {
330  case GR_TEXT_VJUSTIFY_TOP: return _( "Top" );
331  case GR_TEXT_VJUSTIFY_CENTER: return _( "Center" );
332  case GR_TEXT_VJUSTIFY_BOTTOM: return _( "Bottom" );
333  }
334 
335  break;
336 
337  case FDC_ITALIC:
338  return StringFromBool( field.IsItalic() );
339 
340  case FDC_BOLD:
341  return StringFromBool( field.IsBold() );
342 
343  case FDC_TEXT_SIZE:
344  return StringFromValue( m_userUnits, field.GetTextSize().GetHeight(), true, true );
345 
346  case FDC_ORIENTATION:
347  switch ( (int) field.GetTextAngle() )
348  {
349  case TEXT_ANGLE_HORIZ: return _( "Horizontal" );
350  case TEXT_ANGLE_VERT: return _( "Vertical" );
351  }
352 
353  break;
354 
355  case FDC_POSX:
356  return StringFromValue( m_userUnits, field.GetTextPos().x, true );
357 
358  case FDC_POSY:
359  return StringFromValue( m_userUnits, field.GetTextPos().y, true );
360 
361  default:
362  // we can't assert here because wxWidgets sometimes calls this without checking
363  // the column type when trying to see if there's an overflow
364  break;
365  }
366 
367  return wxT( "bad wxWidgets!" );
368 }
369 
370 
371 template <class T>
372 bool FIELDS_GRID_TABLE<T>::GetValueAsBool( int aRow, int aCol )
373 {
374  wxCHECK( aRow < GetNumberRows(), false );
375  const T& field = this->at( (size_t) aRow );
376 
377  switch( aCol )
378  {
379  case FDC_SHOWN: return field.IsVisible();
380  case FDC_ITALIC: return field.IsItalic();
381  case FDC_BOLD: return field.IsBold();
382  default:
383  wxFAIL_MSG( wxString::Format( wxT( "column %d doesn't hold a bool value" ), aCol ) );
384  return false;
385  }
386 }
387 
388 
389 template <class T>
390 void FIELDS_GRID_TABLE<T>::SetValue( int aRow, int aCol, const wxString &aValue )
391 {
392  wxCHECK( aRow < GetNumberRows(), /*void*/ );
393  T& field = this->at( (size_t) aRow );
394  wxPoint pos;
395 
396  switch( aCol )
397  {
398  case FDC_NAME:
399  field.SetName( aValue );
400  break;
401 
402  case FDC_VALUE:
403  field.SetText( aValue );
404  break;
405 
406  case FDC_SHOWN:
407  field.SetVisible( BoolFromString( aValue ) );
408  break;
409 
410  case FDC_H_ALIGN:
411  if( aValue == _( "Left" ) )
412  field.SetHorizJustify( GR_TEXT_HJUSTIFY_LEFT );
413  else if( aValue == _( "Center" ) )
414  field.SetHorizJustify( GR_TEXT_HJUSTIFY_CENTER );
415  else if( aValue == _( "Right" ) )
416  field.SetHorizJustify( GR_TEXT_HJUSTIFY_RIGHT );
417  else
418  wxFAIL_MSG( wxT( "unknown horizontal alignment: " ) + aValue );
419  break;
420 
421  case FDC_V_ALIGN:
422  if( aValue == _( "Top" ) )
423  field.SetVertJustify( GR_TEXT_VJUSTIFY_TOP );
424  else if( aValue == _( "Center" ) )
425  field.SetVertJustify( GR_TEXT_VJUSTIFY_CENTER );
426  else if( aValue == _( "Bottom" ) )
427  field.SetVertJustify( GR_TEXT_VJUSTIFY_BOTTOM );
428  else
429  wxFAIL_MSG( wxT( "unknown vertical alignment: " ) + aValue);
430  break;
431 
432  case FDC_ITALIC:
433  field.SetItalic( BoolFromString( aValue ) );
434  break;
435 
436  case FDC_BOLD:
437  field.SetBold( BoolFromString( aValue ) );
438  break;
439 
440  case FDC_TEXT_SIZE:
441  field.SetTextSize( wxSize( ValueFromString( m_userUnits, aValue ),
442  ValueFromString( m_userUnits, aValue ) ) );
443  break;
444 
445  case FDC_ORIENTATION:
446  if( aValue == _( "Horizontal" ) )
447  field.SetTextAngle( TEXT_ANGLE_HORIZ );
448  else if( aValue == _( "Vertical" ) )
449  field.SetTextAngle( TEXT_ANGLE_VERT );
450  else
451  wxFAIL_MSG( wxT( "unknown orientation: " ) + aValue );
452  break;
453 
454  case FDC_POSX:
455  case FDC_POSY:
456  pos = field.GetTextPos();
457  if( aCol == FDC_POSX )
458  pos.x = ValueFromString( m_userUnits, aValue );
459  else
460  pos.y = ValueFromString( m_userUnits, aValue );
461  field.SetTextPos( pos );
462  break;
463 
464  default:
465  wxFAIL_MSG( wxString::Format( wxT( "column %d doesn't hold a string value" ), aCol ) );
466  break;
467  }
468 
469  GetView()->Refresh();
470 }
471 
472 
473 template <class T>
474 void FIELDS_GRID_TABLE<T>::SetValueAsBool( int aRow, int aCol, bool aValue )
475 {
476  wxCHECK( aRow < GetNumberRows(), /*void*/ );
477  T& field = this->at( (size_t) aRow );
478 
479  switch( aCol )
480  {
481  case FDC_SHOWN:
482  field.SetVisible( aValue );
483  break;
484  case FDC_ITALIC:
485  field.SetItalic( aValue );
486  break;
487  case FDC_BOLD:
488  field.SetBold( aValue );
489  break;
490  default:
491  wxFAIL_MSG( wxString::Format( wxT( "column %d doesn't hold a bool value" ), aCol ) );
492  break;
493  }
494 }
495 
496 
497 // Explicit Instantiations
498 
499 template class FIELDS_GRID_TABLE<SCH_FIELD>;
500 template class FIELDS_GRID_TABLE<LIB_FIELD>;
501 
502 
504 {
505  if( m_grid->GetGridCursorRow() == FOOTPRINT && m_grid->GetGridCursorCol() == FDC_VALUE )
506  {
507  menu.Append( MYID_SELECT_FOOTPRINT, _( "Select Footprint..." ),
508  _( "Browse for footprint" ) );
509  menu.AppendSeparator();
510  }
511  else if( m_grid->GetGridCursorRow() == DATASHEET && m_grid->GetGridCursorCol() == FDC_VALUE )
512  {
513  menu.Append( MYID_SHOW_DATASHEET, _( "Show Datasheet" ),
514  _( "Show datasheet in browser" ) );
515  menu.AppendSeparator();
516  }
517 
519 }
520 
521 
522 void FIELDS_GRID_TRICKS::doPopupSelection( wxCommandEvent& event )
523 {
524  if( event.GetId() == MYID_SELECT_FOOTPRINT )
525  {
526  // pick a footprint using the footprint picker.
527  wxString fpid = m_grid->GetCellValue( FOOTPRINT, FDC_VALUE );
529 
530  if( frame->ShowModal( &fpid, m_dlg ) )
531  m_grid->SetCellValue( FOOTPRINT, FDC_VALUE, fpid );
532 
533  frame->Destroy();
534  }
535  else if (event.GetId() == MYID_SHOW_DATASHEET )
536  {
537  wxString datasheet_uri = m_grid->GetCellValue( DATASHEET, FDC_VALUE );
538  GetAssociatedDocument( m_dlg, datasheet_uri );
539  }
540  else
541  {
543  }
544 }
545 
546 
547 template <class T>
549 {
550  if( aValue )
551  return wxT( "1" );
552  else
553  return wxT( "0" );
554 }
555 
556 
557 template <class T>
559 {
560  if( aValue == "1" )
561  {
562  return true;
563  }
564  else if( aValue == "0" )
565  {
566  return false;
567  }
568  else
569  {
570  wxFAIL_MSG( wxString::Format( "string \"%s\" can't be converted to boolean "
571  "correctly, it will have been perceived as FALSE", aValue ) );
572  return false;
573  }
574 }
#define TEXT_ANGLE_HORIZ
virtual void showPopupMenu(wxMenu &menu) override
Class KIWAY_PLAYER is a wxFrame capable of the OpenProjectFiles function, meaning it can load a porti...
Definition: kiway_player.h:59
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_holder.h:56
name of datasheet
#define TEXT_ANGLE_VERT
int GetUserUnits()
Returns the currently selected user unit value for the interface.
bool CanSetValueAs(int aRow, int aCol, const wxString &aTypeName) override
This file is part of the common library.
The first 4 are mandatory, and must be instantiated in SCH_COMPONENT and LIB_PART constructors.
#define FIELD_VALUE
wxGridCellAttr * m_referenceAttr
bool m_URL
If field should have a browse button.
bool GetAssociatedDocument(wxWindow *aParent, const wxString &aDocName, const wxPathList *aPaths)
Function GetAssociatedDocument open a document (file) with the suitable browser.
Definition: eda_doc.cpp:87
static const wxString GetDefaultFieldName(int aFieldNdx)
Function GetDefaultFieldName returns a default symbol field name for field aFieldNdx for all componen...
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:83
int ValueFromString(EDA_UNITS_T aUnits, const wxString &aTextValue, bool aUseMils)
Function ValueFromString converts aTextValue in aUnits to internal units used by the application.
Definition: base_units.cpp:414
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:51
wxString GetColLabelValue(int aCol) override
Field Name Module PCB, i.e. "16DIP300".
Field Reference of part, i.e. "IC21".
This class works around a bug in wxGrid where the first keystroke doesn't get sent through the valida...
Definition: validators.h:44
wxGridCellAttr * m_readOnlyAttr
WX_GRID * m_grid
I don't own the grid, but he owns me.
Definition: grid_tricks.h:58
#define VALUE
wxGridCellAttr * m_hAlignAttr
VTBL_ENTRY KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=NULL)
Function Player returns the KIWAY_PLAYER* given a FRAME_T.
Definition: kiway.cpp:321
SCH_FIELD_VALIDATOR m_referenceValidator
Definitions of control validators for schematic dialogs.
wxString GetValue(int aRow, int aCol) override
SCH_FIELD_VALIDATOR m_fieldNameValidator
bool CanGetValueAs(int aRow, int aCol, const wxString &aTypeName) override
wxGridCellAttr * m_boolAttr
Define a library symbol object.
#define FIELD_NAME
bool BoolFromString(wxString aValue)
wxGridCellAttr * GetAttr(int row, int col, wxGridCellAttr::wxAttrKind kind) override
#define _(s)
virtual void SetValidator(const wxValidator &validator) override
Definition: validators.cpp:46
wxGridCellAttr * m_fieldNameAttr
wxGridCellAttr * m_urlAttr
virtual void doPopupSelection(wxCommandEvent &event)
SCH_FIELD_VALIDATOR m_valueValidator
bool GetValueAsBool(int aRow, int aCol) override
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
wxGridCellAttr * m_vAlignAttr
virtual void showPopupMenu(wxMenu &menu)
void SetValue(int aRow, int aCol, const wxString &aValue) override
wxGridCellAttr * m_orientationAttr
wxGridCellAttr * m_valueAttr
Struct TEMPLATE_FIELDNAME holds a name of a component's field, field value, and default visibility.
bool Destroy() override
Our version of Destroy() which is virtual from wxWidgets.
LIB_ID_VALIDATOR m_libIdValidator
wxString StringFromValue(EDA_UNITS_T aUnits, int aValue, bool aAddUnitSymbol, bool aUseMils)
Function StringFromValue returns the string from aValue according to units (inch, mm ....
Definition: base_units.cpp:210
SCH_FIELD_VALIDATOR m_urlValidator
wxGridCellAttr * m_nonUrlAttr
Definition for part library class.
FIELDS_GRID_TABLE(DIALOG_SHIM *aDialog, SCH_BASE_FRAME *aFrame, LIB_PART *aPart)
void SetValueAsBool(int aRow, int aCol, bool aValue) override
A shim class between EDA_DRAW_FRAME and several derived classes: LIB_EDIT_FRAME, LIB_VIEW_FRAME,...
wxGridCellAttr * m_footprintAttr
virtual void doPopupSelection(wxCommandEvent &event) override
virtual bool ShowModal(wxString *aResult=NULL, wxWindow *aResultantFocusWindow=NULL)
Function ShowModal puts up this wxFrame as if it were a modal dialog, with all other instantiated wxF...
Custom text control validator definitions.
wxString StringFromBool(bool aValue)
SCH_FIELD_VALIDATOR m_nonUrlValidator