KiCad PCB EDA Suite
dialog_pin_properties.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) 2010 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2016 - 2020 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 <bitmaps.h>
26 #include <sch_painter.h>
27 #include <symbol_edit_frame.h>
28 #include <lib_pin.h>
29 #include <dialog_pin_properties.h>
30 #include <confirm.h>
31 #include <widgets/tab_traversal.h>
32 #include <widgets/wx_grid.h>
33 #include <grid_tricks.h>
35 
36 class ALT_PIN_DATA_MODEL : public wxGridTableBase, public std::vector<LIB_PIN::ALT>
37 {
38 public:
40  {
41  }
42 
43  int GetNumberRows() override { return (int) size(); }
44  int GetNumberCols() override { return COL_COUNT; }
45 
46  wxString GetColLabelValue( int aCol ) override
47  {
48  switch( aCol )
49  {
50  case COL_NAME: return _( "Alternate Pin Name" );
51  case COL_TYPE: return _( "Electrical Type" );
52  case COL_SHAPE: return _( "Graphic Style" );
53  default: wxFAIL; return wxEmptyString;
54  }
55  }
56 
57  bool IsEmptyCell( int row, int col ) override
58  {
59  return false; // don't allow adjacent cell overflow, even if we are actually empty
60  }
61 
62  wxString GetValue( int aRow, int aCol ) override
63  {
64  switch( aCol )
65  {
66  case COL_NAME: return at( aRow ).m_Name;
67  case COL_TYPE: return PinTypeNames()[static_cast<int>( at( aRow ).m_Type )];
68  case COL_SHAPE: return PinShapeNames()[static_cast<int>( at( aRow ).m_Shape )];
69  default: wxFAIL; return wxEmptyString;
70  }
71  }
72 
73  void SetValue( int aRow, int aCol, const wxString &aValue ) override
74  {
75  switch( aCol )
76  {
77  case COL_NAME:
78  at( aRow ).m_Name = aValue;
79  break;
80 
81  case COL_TYPE:
82  if( PinTypeNames().Index( aValue ) != wxNOT_FOUND )
83  at( aRow ).m_Type = (ELECTRICAL_PINTYPE) PinTypeNames().Index( aValue );
84 
85  break;
86 
87  case COL_SHAPE:
88  if( PinShapeNames().Index( aValue ) != wxNOT_FOUND )
89  at( aRow ).m_Shape = (GRAPHIC_PINSHAPE) PinShapeNames().Index( aValue );
90 
91  break;
92 
93  default:
94  wxFAIL;
95  break;
96  }
97  }
98 
99  void AppendRow( const LIB_PIN::ALT& aAlt )
100  {
101  push_back( aAlt );
102 
103  if ( GetView() )
104  {
105  wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, 1 );
106  GetView()->ProcessTableMessage( msg );
107  }
108  }
109 
110  void RemoveRow( int aRow )
111  {
112  erase( begin() + aRow );
113 
114  if ( GetView() )
115  {
116  wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_DELETED, aRow, 1 );
117  GetView()->ProcessTableMessage( msg );
118  }
119  }
120 };
121 
122 
124  DIALOG_PIN_PROPERTIES_BASE( parent ),
125  m_frame( parent ),
126  m_pin( aPin ),
127  m_posX( parent, m_posXLabel, m_posXCtrl, m_posXUnits ),
128  m_posY( parent, m_posYLabel, m_posYCtrl, m_posYUnits ),
129  m_pinLength( parent, m_pinLengthLabel, m_pinLengthCtrl, m_pinLengthUnits ),
130  m_nameSize( parent, m_nameSizeLabel, m_nameSizeCtrl, m_nameSizeUnits ),
131  m_numberSize( parent, m_numberSizeLabel, m_numberSizeCtrl, m_numberSizeUnits ),
132  m_delayedFocusRow( -1 ),
133  m_delayedFocusColumn( -1 ),
134  m_initialized( false )
135 {
136  // Creates a dummy pin to show on a panel, inside this dialog:
137  m_dummyPin = new LIB_PIN( *m_pin );
138 
140 
141  if( m_frame->m_SyncPinEdit )
142  {
143  if( aPin->IsNew() )
144  {
145  m_textInfoUpper->SetLabel( _( "Synchronized pins edit mode, and this pin is new" ) );
146  m_textInfoLower->SetLabel( _( "Similar pins will be automatically added to other units, "
147  "if this pin is not common to all units" ) );
148  }
149  else
150  {
151  m_textInfoUpper->SetLabel( _( "Synchronized pins edit mode" ) );
152  m_textInfoLower->SetLabel( _( "Similar pins at the same location will be edited. "
153  "Pin number of other pins will be not modified" ) );
154  }
155  }
156 
158  m_panelShowPin->SetBackgroundColour( bgColor.ToColour() );
159 
160  const wxArrayString& orientationNames = PinOrientationNames();
161  const std::vector<BITMAPS>& orientationIcons = PinOrientationIcons();
162 
163  for ( unsigned ii = 0; ii < orientationNames.GetCount(); ii++ )
164  m_choiceOrientation->Insert( orientationNames[ii], KiBitmap( orientationIcons[ii] ), ii );
165 
166  // We can't set the tab order through wxWidgets due to shortcomings in their mnemonics
167  // implementation on MSW
168  m_tabOrder = {
173  m_posXCtrl,
174  m_posYCtrl,
181  m_checkShow,
184  };
185 
186  // Default alternates turndow to whether or not alternates exist
187  m_alternatesTurndown->Collapse( m_pin->GetAlternates().size() == 0 );
188 
190 
191  // Save original columns widths so we can do proportional sizing.
192  for( int i = 0; i < COL_COUNT; ++i )
193  m_originalColWidths[ i ] = m_alternatesGrid->GetColSize( i );
194 
195  // Give a bit more room for combobox editors
196  m_alternatesGrid->SetDefaultRowSize( m_alternatesGrid->GetDefaultRowSize() + 4 );
197 
199  m_alternatesGrid->PushEventHandler( new GRID_TRICKS( m_alternatesGrid ) );
200 
201  if( aPin->GetParent()->HasConversion() )
202  {
203  m_alternatesTurndown->Collapse();
204  m_alternatesTurndown->Disable();
205  m_alternatesTurndown->SetToolTip(
206  _( "Alternate pin assignments are not available for De Morgan symbols." ) );
207  }
208 
209  // Set special attributes
210  wxGridCellAttr* attr;
211 
212  attr = new wxGridCellAttr;
213  attr->SetRenderer( new GRID_CELL_ICON_TEXT_RENDERER( PinTypeIcons(), PinTypeNames() ) );
214  attr->SetEditor( new GRID_CELL_ICON_TEXT_POPUP( PinTypeIcons(), PinTypeNames() ) );
215  m_alternatesGrid->SetColAttr( COL_TYPE, attr );
216 
217  attr = new wxGridCellAttr;
218  attr->SetRenderer( new GRID_CELL_ICON_TEXT_RENDERER( PinShapeIcons(), PinShapeNames() ) );
219  attr->SetEditor( new GRID_CELL_ICON_TEXT_POPUP( PinShapeIcons(), PinShapeNames() ) );
220  m_alternatesGrid->SetColAttr( COL_SHAPE, attr );
221 
224  m_addAlternate->GetParent()->Layout();
225 
226  m_sdbSizerButtonsOK->SetDefault();
228 
229  // Now all widgets have the size fixed, call FinishDialogSettings
231 
232  // On some window managers (Unity, XFCE) the dialog is not always raised, depending on
233  // how it is run.
234  Raise();
235 
236  m_initialized = true;
237  m_width = 0;
238 }
239 
240 
242 {
243  delete m_dummyPin;
244 
245  // Prevents crash bug in wxGrid's d'tor
247 
248  // Delete the GRID_TRICKS.
249  m_alternatesGrid->PopEventHandler( true );
250 }
251 
252 
254 {
255  if( !DIALOG_SHIM::TransferDataToWindow() )
256  return false;
257 
259 
263  m_textPinName->SetValue( m_pin->GetName() );
266  m_posY.SetValue( -m_origPos.y );
267  m_textPinNumber->SetValue( m_pin->GetNumber() );
270  m_checkApplyToAllParts->SetValue( m_pin->GetUnit() == 0 );
271  m_checkApplyToAllConversions->SetValue( m_pin->GetConvert() == 0 );
272  m_checkShow->SetValue( m_pin->IsVisible() );
273 
275 
276  bool hasMultiUnit = m_pin->GetParent()->GetUnitCount() > 1;
277 
278  m_checkApplyToAllParts->Enable( hasMultiUnit );
279 
280  wxString toolTip;
281 
282  if( !hasMultiUnit )
283  toolTip = _( "This symbol only has one unit. This control has no effect." );
284  else if( m_frame->m_SyncPinEdit )
285  toolTip = _( "Synchronized pin edit mode is enabled.\n"
286  "Similar pins will be edited, regardless this option." );
287  else
288  toolTip = _( "If checked, this pin will exist in all units." );
289 
290  m_checkApplyToAllParts->SetToolTip( toolTip );
291 
292  for( const std::pair<const wxString, LIB_PIN::ALT>& alt : m_pin->GetAlternates() )
293  m_alternatesDataModel->AppendRow( alt.second );
294 
295  return true;
296 }
297 
298 
300 {
302  return false;
303 
304  // Check for missing alternate names.
305  for( size_t i = 0; i < m_alternatesDataModel->size(); ++i )
306  {
307  if( m_alternatesDataModel->at( i ).m_Name.IsEmpty() )
308  {
309  DisplayErrorMessage( this, _( "Alternate pin definitions must have a name." ) );
310 
312  m_delayedFocusRow = i;
313 
314  return false;
315  }
316  }
317 
318  if( !DIALOG_SHIM::TransferDataFromWindow() )
319  return false;
320 
321  wxPoint newPos( m_posX.GetValue(), -m_posY.GetValue() );
322 
323  const int acceptable_mingrid = 50;
324 
325  // Only show the warning if the position has been changed
326  if( ( m_origPos != newPos )
327  && ( ( m_posX.GetValue() % acceptable_mingrid ) || ( m_posY.GetValue() % acceptable_mingrid ) ) )
328  {
329  auto msg = wxString::Format( _( "This pin is not on a %d mils grid which will make it\n"
330  "difficult to connect to in the schematic.\n"
331  "Do you want to continue?" ),
332  acceptable_mingrid );
333  if( !IsOK( this, msg ) )
334  return false;
335  }
336 
337  m_pin->SetName( m_textPinName->GetValue() );
338  m_pin->SetNumber( m_textPinNumber->GetValue() );
343  m_pin->SetPosition( newPos );
347  m_pin->SetUnit( m_checkApplyToAllParts->GetValue() ? 0 : m_frame->GetUnit() );
348  m_pin->SetVisible( m_checkShow->GetValue() );
349 
350  std::map<wxString, LIB_PIN::ALT>& alternates = m_pin->GetAlternates();
351  alternates.clear();
352 
353  for( const LIB_PIN::ALT& alt : *m_alternatesDataModel )
354  alternates[ alt.m_Name ] = alt;
355 
356  return true;
357 }
358 
359 
360 /*
361  * Draw (on m_panelShowPin) the pin according to current settings in dialog
362  */
363 void DIALOG_PIN_PROPERTIES::OnPaintShowPanel( wxPaintEvent& event )
364 {
365  wxPaintDC dc( m_panelShowPin );
366  wxSize dc_size = dc.GetSize();
367  dc.SetDeviceOrigin( dc_size.x / 2, dc_size.y / 2 );
368 
369  // Give a parent to m_dummyPin only from draw purpose.
370  // In fact m_dummyPin should not have a parent, but draw functions need a parent
371  // to know some options, about pin texts
372  SYMBOL_EDIT_FRAME* symbolEditor = (SYMBOL_EDIT_FRAME*) GetParent();
373 
374  // Calculate a suitable scale to fit the available draw area
375  EDA_RECT bBox = m_dummyPin->GetBoundingBox( true );
376  double xscale = (double) dc_size.x / bBox.GetWidth();
377  double yscale = (double) dc_size.y / bBox.GetHeight();
378  double scale = std::min( xscale, yscale );
379 
380  // Give a 7% margin (each side) and limit to no more than 100% zoom
381  scale = std::min( scale * 0.85, 1.0 );
382  dc.SetUserScale( scale, scale );
383  GRResetPenAndBrush( &dc );
384 
385  LIB_SYMBOL_OPTIONS opts;
386  opts.draw_hidden_fields = true;
387  opts.show_connect_point = true;
388 
389  RENDER_SETTINGS* renderSettings = symbolEditor->GetRenderSettings();
390  renderSettings->SetPrintDC( &dc );
391 
392  m_dummyPin->Print( renderSettings, -bBox.Centre(), (void*) &opts, DefaultTransform );
393 
394  event.Skip();
395 }
396 
397 
398 void DIALOG_PIN_PROPERTIES::OnPropertiesChange( wxCommandEvent& event )
399 {
400  if( !IsShown() ) // do nothing at init time
401  return;
402 
403  m_dummyPin->SetName( m_textPinName->GetValue() );
404  m_dummyPin->SetNumber( m_textPinNumber->GetValue() );
411  m_dummyPin->SetVisible( m_checkShow->GetValue() );
412 
413  m_panelShowPin->Refresh();
414 }
415 
416 
417 void DIALOG_PIN_PROPERTIES::OnAddAlternate( wxCommandEvent& event )
418 {
420  return;
421 
422  LIB_PIN::ALT newAlt;
423  newAlt.m_Name = wxEmptyString;
424  newAlt.m_Type = m_pin->GetType();
425  newAlt.m_Shape = m_pin->GetShape();
426 
427  m_alternatesDataModel->AppendRow( newAlt );
428 
429  m_alternatesGrid->MakeCellVisible( m_alternatesGrid->GetNumberRows() - 1, 0 );
430  m_alternatesGrid->SetGridCursor( m_alternatesGrid->GetNumberRows() - 1, 0 );
431 
432  m_alternatesGrid->EnableCellEditControl( true );
433  m_alternatesGrid->ShowCellEditControl();
434 }
435 
436 
437 void DIALOG_PIN_PROPERTIES::OnDeleteAlternate( wxCommandEvent& event )
438 {
440  return;
441 
442  if( m_alternatesDataModel->size() == 0 ) // empty table
443  return;
444 
445  int curRow = m_alternatesGrid->GetGridCursorRow();
446 
447  if( curRow < 0 )
448  return;
449 
450  m_alternatesDataModel->RemoveRow( curRow );
451 
452  curRow = std::max( 0, curRow - 1 );
453  m_alternatesGrid->MakeCellVisible( curRow, m_alternatesGrid->GetGridCursorCol() );
454  m_alternatesGrid->SetGridCursor( curRow, m_alternatesGrid->GetGridCursorCol() );
455 }
456 
457 
459 {
460  m_width = aWidth;
461 
462  // Account for margins
463  aWidth -= 30;
464 
465  wxGridUpdateLocker deferRepaintsTillLeavingScope;
466 
469 
470  m_alternatesGrid->SetColSize( COL_NAME, aWidth - m_originalColWidths[ COL_TYPE ]
472 }
473 
474 
475 void DIALOG_PIN_PROPERTIES::OnSize( wxSizeEvent& event )
476 {
477  auto new_size = event.GetSize().GetX();
478 
479  if( m_initialized && m_width != new_size )
480  adjustGridColumns( new_size );
481 
482  // Always propagate for a grid repaint (needed if the height changes, as well as width)
483  event.Skip();
484 }
485 
486 
487 void DIALOG_PIN_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event )
488 {
489  // Handle a delayed focus
490  if( m_delayedFocusRow >= 0 )
491  {
492  m_alternatesTurndown->Collapse( false );
493 
494  m_alternatesGrid->SetFocus();
497 
498  m_alternatesGrid->EnableCellEditControl( true );
499  m_alternatesGrid->ShowCellEditControl();
500 
501  m_delayedFocusRow = -1;
503  }
504 }
505 
506 
507 void DIALOG_PIN_PROPERTIES::onUpdateUIInfo( wxUpdateUIEvent& event )
508 {
509  // Disable Info texts for pins common to all units
510  event.Enable( m_checkApplyToAllParts->GetValue() == 0 );
511 }
void SetNumberTextSize(int aSize)
Definition: lib_pin.h:130
void GRResetPenAndBrush(wxDC *DC)
Definition: gr_basic.cpp:107
Functions for manipulating tab traversal in forms and dialogs.
void OnUpdateUI(wxUpdateUIEvent &event) override
const std::vector< BITMAPS > & PinOrientationIcons()
Definition: pin_type.cpp:228
wxString GetColLabelValue(int aCol) override
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition: confirm.cpp:292
void SetOrientation(int aOrientation)
Definition: lib_pin.h:76
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
const std::vector< BITMAPS > & PinShapeIcons()
Definition: pin_type.cpp:210
This file is part of the common library.
int GetOrientation() const
Definition: lib_pin.h:75
void OnPropertiesChange(wxCommandEvent &event) override
std::vector< wxWindow * > m_tabOrder
Definition: dialog_shim.h:220
void SetShape(GRAPHIC_PINSHAPE aShape)
Definition: lib_pin.h:79
GRAPHIC_PINSHAPE GetShape() const
Definition: lib_pin.h:78
ALT_PIN_DATA_MODEL(EDA_UNITS aUserUnits)
void AppendRow(const LIB_PIN::ALT &aAlt)
void adjustGridColumns(int aWidth)
void SetSelection(GRAPHIC_PINSHAPE aShape)
bool m_SyncPinEdit
Set to true to synchronize pins at the same position when editing symbols with multiple units or mult...
Add mouse and command handling (such as cut, copy, and paste) to a WX_GRID instance.
Definition: grid_tricks.h:55
int GetWidth() const
Definition: eda_rect.h:109
int m_originalColWidths[COL_COUNT]
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
void onUpdateUIInfo(wxUpdateUIEvent &event) override
int PinOrientationIndex(int code)
Definition: pin_type.cpp:147
void SetLength(int aLength)
Definition: lib_pin.h:82
KIGFX::SCH_RENDER_SETTINGS * GetRenderSettings()
bool TransferDataToWindow() override
int PinOrientationCode(int index)
Definition: pin_type.cpp:138
void SetTable(wxGridTableBase *table, bool aTakeOwnership=false)
Hide wxGrid's SetTable() method with one which doesn't mess up the grid column widths when setting th...
Definition: wx_grid.cpp:72
const EDA_RECT GetBoundingBox() const override
Definition: lib_pin.h:174
GRAPHIC_PINSHAPE
Definition: pin_type.h:55
void OnPaintShowPanel(wxPaintEvent &event) override
void SetPosition(const wxPoint &aPos) override
Definition: lib_pin.h:211
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
Definition: dialog_shim.h:97
ELECTRICAL_PINTYPE m_Type
Definition: lib_pin.h:60
bool IsNew() const
Definition: eda_item.h:118
EDA_UNITS GetUserUnits() const
Definition: dialog_shim.h:121
void OnAddAlternate(wxCommandEvent &event) override
void SetNumber(const wxString &aNumber)
Definition: lib_pin.h:118
void DestroyTable(wxGridTableBase *aTable)
Work-around for a bug in wxGrid which crashes when deleting the table if the cell edit control was no...
Definition: wx_grid.cpp:104
ALT_PIN_DATA_MODEL * m_alternatesDataModel
bool HasConversion() const
Test if symbol has more than one body conversion type (DeMorgan).
int GetUnit() const
Definition: lib_item.h:258
SYMBOL_EDIT_FRAME * m_frame
const wxArrayString & PinShapeNames()
Definition: pin_type.cpp:201
void SetType(ELECTRICAL_PINTYPE aType)
Definition: lib_pin.h:85
ELECTRICAL_PINTYPE GetPinTypeSelection()
const wxString & GetName() const
Definition: lib_pin.h:106
wxString GetValue(int aRow, int aCol) override
int GetUnitCount() const override
For items with units, return the number of units.
wxString m_Name
Definition: lib_pin.h:58
void SetVisible(bool aVisible)
Definition: lib_pin.h:98
const wxArrayString & PinTypeNames()
Definition: pin_type.cpp:183
void SetSelection(ELECTRICAL_PINTYPE aType)
#define _(s)
bool IsVisible() const
Definition: lib_pin.h:97
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:190
int GetNameTextSize() const
Definition: lib_pin.h:126
wxBitmap KiBitmap(BITMAPS aBitmap, int aHeightTag)
Construct a wxBitmap from an image identifier Returns the image from the active theme if the image ha...
Definition: bitmap.cpp:105
bool TransferDataFromWindow() override
int GetConvert() const
Definition: lib_item.h:261
void OnDeleteAlternate(wxCommandEvent &event) override
int GetHeight() const
Definition: eda_rect.h:110
void SetConvert(int aConvert)
Definition: lib_item.h:260
wxPoint GetPosition() const override
Definition: lib_pin.h:210
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 wxArrayString & PinOrientationNames()
Definition: pin_type.cpp:219
EDA_UNITS
Definition: eda_units.h:38
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
const wxString & GetNumber() const
Definition: lib_pin.h:116
ELECTRICAL_PINTYPE GetType() const
Definition: lib_pin.h:84
LIB_SYMBOL * GetParent() const
Definition: lib_item.h:156
void SetUnit(int aUnit)
Definition: lib_item.h:257
std::map< wxString, ALT > & GetAlternates()
Definition: lib_pin.h:132
DIALOG_PIN_PROPERTIES(SYMBOL_EDIT_FRAME *parent, LIB_PIN *aPin)
int GetNumberTextSize() const
Definition: lib_pin.h:129
const int scale
TRANSFORM DefaultTransform
Definition: eeschema.cpp:56
void SetName(const wxString &aName)
Definition: lib_pin.h:108
void SetNameTextSize(int aSize)
Definition: lib_pin.h:127
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
Definition: pin_type.h:35
int GetLength() const
Definition: lib_pin.h:81
virtual void Print(const RENDER_SETTINGS *aSettings, const wxPoint &aOffset, void *aData, const TRANSFORM &aTransform)
Draw an item.
Definition: lib_item.cpp:118
void OnSize(wxSizeEvent &event) override
virtual void SetValue(int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
Class DIALOG_PIN_PROPERTIES_BASE.
Handle the component boundary box.
Definition: eda_rect.h:42
wxPoint Centre() const
Definition: eda_rect.h:55
virtual long long int GetValue()
Return the current value in Internal Units.
void SetValue(int aRow, int aCol, const wxString &aValue) override
bool IsEmptyCell(int row, int col) override
GRAPHIC_PINSHAPE GetPinShapeSelection()
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
Definition: confirm.cpp:323
void SetPrintDC(wxDC *aDC)
GRAPHIC_PINSHAPE m_Shape
Definition: lib_pin.h:59
const std::vector< BITMAPS > & PinTypeIcons()
Definition: pin_type.cpp:192
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:103
The symbol library editor main window.