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-2022 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>
30#include <confirm.h>
31#include <kiplatform/ui.h>
33#include <widgets/wx_grid.h>
34#include <grid_tricks.h>
36#include <wx/hyperlink.h>
37
38class ALT_PIN_DATA_MODEL : public wxGridTableBase, public std::vector<LIB_PIN::ALT>
39{
40public:
42 {
43 }
44
45 int GetNumberRows() override { return (int) size(); }
46 int GetNumberCols() override { return COL_COUNT; }
47
48 wxString GetColLabelValue( int aCol ) override
49 {
50 switch( aCol )
51 {
52 case COL_NAME: return _( "Alternate Pin Name" );
53 case COL_TYPE: return _( "Electrical Type" );
54 case COL_SHAPE: return _( "Graphic Style" );
55 default: wxFAIL; return wxEmptyString;
56 }
57 }
58
59 bool IsEmptyCell( int row, int col ) override
60 {
61 return false; // don't allow adjacent cell overflow, even if we are actually empty
62 }
63
64 wxString GetValue( int aRow, int aCol ) override
65 {
66 switch( aCol )
67 {
68 case COL_NAME: return at( aRow ).m_Name;
69 case COL_TYPE: return PinTypeNames()[static_cast<int>( at( aRow ).m_Type )];
70 case COL_SHAPE: return PinShapeNames()[static_cast<int>( at( aRow ).m_Shape )];
71 default: wxFAIL; return wxEmptyString;
72 }
73 }
74
75 void SetValue( int aRow, int aCol, const wxString &aValue ) override
76 {
77 switch( aCol )
78 {
79 case COL_NAME:
80 at( aRow ).m_Name = aValue;
81 break;
82
83 case COL_TYPE:
84 if( PinTypeNames().Index( aValue ) != wxNOT_FOUND )
85 at( aRow ).m_Type = (ELECTRICAL_PINTYPE) PinTypeNames().Index( aValue );
86
87 break;
88
89 case COL_SHAPE:
90 if( PinShapeNames().Index( aValue ) != wxNOT_FOUND )
91 at( aRow ).m_Shape = (GRAPHIC_PINSHAPE) PinShapeNames().Index( aValue );
92
93 break;
94
95 default:
96 wxFAIL;
97 break;
98 }
99 }
100
101 void AppendRow( const LIB_PIN::ALT& aAlt )
102 {
103 push_back( aAlt );
104
105 if ( GetView() )
106 {
107 wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, 1 );
108 GetView()->ProcessTableMessage( msg );
109 }
110 }
111
112 void RemoveRow( int aRow )
113 {
114 erase( begin() + aRow );
115
116 if ( GetView() )
117 {
118 wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_DELETED, aRow, 1 );
119 GetView()->ProcessTableMessage( msg );
120 }
121 }
122};
123
124
127 m_frame( parent ),
128 m_pin( aPin ),
129 m_posX( parent, m_posXLabel, m_posXCtrl, m_posXUnits ),
130 m_posY( parent, m_posYLabel, m_posYCtrl, m_posYUnits ),
131 m_pinLength( parent, m_pinLengthLabel, m_pinLengthCtrl, m_pinLengthUnits ),
132 m_nameSize( parent, m_nameSizeLabel, m_nameSizeCtrl, m_nameSizeUnits ),
133 m_numberSize( parent, m_numberSizeLabel, m_numberSizeCtrl, m_numberSizeUnits ),
134 m_delayedFocusRow( -1 ),
135 m_delayedFocusColumn( -1 ),
136 m_initialized( false )
137{
138 // Creates a dummy pin to show on a panel, inside this dialog:
140 m_dummyPin = new LIB_PIN( *m_pin );
144
146 m_panelShowPin->SetBackgroundColour( bgColor.ToColour() );
147
148 const wxArrayString& orientationNames = PinOrientationNames();
149 const std::vector<BITMAPS>& orientationIcons = PinOrientationIcons();
150
151 for ( unsigned ii = 0; ii < orientationNames.GetCount(); ii++ )
152 m_choiceOrientation->Insert( orientationNames[ii], KiBitmap( orientationIcons[ii] ), ii );
153
154 // We can't set the tab order through wxWidgets due to shortcomings in their mnemonics
155 // implementation on MSW
156 m_tabOrder = {
172 };
173
174 // Default alternates turndown to whether or not alternates exist, or if we've had it open before
176
177 // wxwidgets doesn't call the OnCollapseChange even at init, so we update this value if
178 // the alternates pane defaults to open
179 if ( m_pin->GetAlternates().size() > 0 )
181
183
184 // Save original columns widths so we can do proportional sizing.
185 for( int i = 0; i < COL_COUNT; ++i )
186 m_originalColWidths[ i ] = m_alternatesGrid->GetColSize( i );
187
188 // Give a bit more room for combobox editors
189 m_alternatesGrid->SetDefaultRowSize( m_alternatesGrid->GetDefaultRowSize() + 4 );
190
192 m_alternatesGrid->PushEventHandler( new GRID_TRICKS( m_alternatesGrid,
193 [this]( wxCommandEvent& aEvent )
194 {
195 OnAddAlternate( aEvent );
196 } ) );
197
198 if( aPin->GetParent()->HasConversion() )
199 {
200 m_alternatesTurndown->Collapse();
201 m_alternatesTurndown->Disable();
202 m_alternatesTurndown->SetToolTip( _( "Alternate pin assignments are not available for "
203 "De Morgan symbols." ) );
204 }
205
206 // Set special attributes
207 wxGridCellAttr* attr;
208
209 attr = new wxGridCellAttr;
210 attr->SetRenderer( new GRID_CELL_ICON_TEXT_RENDERER( PinTypeIcons(), PinTypeNames() ) );
211 attr->SetEditor( new GRID_CELL_ICON_TEXT_POPUP( PinTypeIcons(), PinTypeNames() ) );
212 m_alternatesGrid->SetColAttr( COL_TYPE, attr );
213
214 attr = new wxGridCellAttr;
215 attr->SetRenderer( new GRID_CELL_ICON_TEXT_RENDERER( PinShapeIcons(), PinShapeNames() ) );
216 attr->SetEditor( new GRID_CELL_ICON_TEXT_POPUP( PinShapeIcons(), PinShapeNames() ) );
217 m_alternatesGrid->SetColAttr( COL_SHAPE, attr );
218
221 m_addAlternate->GetParent()->Layout();
222
225
226 // Now all widgets have the size fixed, call FinishDialogSettings
228
229 // On some window managers (Unity, XFCE) the dialog is not always raised, depending on
230 // how it is run.
231 Raise();
232
233 m_initialized = true;
234}
235
236
238{
239 delete m_dummyPin;
240 delete m_dummyParent;
241
242 // Prevents crash bug in wxGrid's d'tor
244
245 // Delete the GRID_TRICKS.
246 m_alternatesGrid->PopEventHandler( true );
247}
248
249
251{
252 if( !DIALOG_SHIM::TransferDataToWindow() )
253 return false;
254
256
260 m_textPinName->SetValue( m_pin->GetName() );
264 m_textPinNumber->SetValue( m_pin->GetNumber() );
268 m_checkApplyToAllParts->SetValue( m_pin->GetUnit() == 0 );
269 m_checkApplyToAllConversions->SetValue( m_pin->GetConvert() == 0 );
270 m_checkShow->SetValue( m_pin->IsVisible() );
271
273
274 wxString commonUnitsToolTip;
275
277 {
278 wxHyperlinkCtrl* button = new wxHyperlinkCtrl( m_infoBar, wxID_ANY,
279 _( "Exit sync pins mode" ),
280 wxEmptyString );
281
282 button->Bind( wxEVT_COMMAND_HYPERLINK,
283 std::function<void( wxHyperlinkEvent& aEvent )>(
284 [&]( wxHyperlinkEvent& aEvent )
285 {
286 m_frame->m_SyncPinEdit = false;
288 } ) );
289
291 m_infoBar->AddButton( button );
293
294 commonUnitsToolTip = _( "Synchronized pins mode is enabled.\n"
295 "Similar pins will be edited regardless of this option." );
296 }
297 else
298 {
299 commonUnitsToolTip = _( "If checked, this pin will exist in all units." );
300 }
301
302 if( !m_pin->GetParent()->IsMulti() )
303 commonUnitsToolTip = _( "This symbol only has one unit. This control has no effect." );
304
305 m_checkApplyToAllParts->SetToolTip( commonUnitsToolTip );
306
307 for( const std::pair<const wxString, LIB_PIN::ALT>& alt : m_pin->GetAlternates() )
308 m_alternatesDataModel->AppendRow( alt.second );
309
310 return true;
311}
312
313
315{
317 return false;
318
319 // Check for missing alternate names.
320 for( size_t i = 0; i < m_alternatesDataModel->size(); ++i )
321 {
322 if( m_alternatesDataModel->at( i ).m_Name.IsEmpty() )
323 {
324 DisplayErrorMessage( this, _( "Alternate pin definitions must have a name." ) );
325
328
329 return false;
330 }
331 }
332
333 if( !DIALOG_SHIM::TransferDataFromWindow() )
334 return false;
335
336 wxPoint newPos( m_posX.GetValue(), -m_posY.GetValue() );
337
338 const int standard_grid = 50;
339
340 // Only show the warning if the position has been changed
341 if( ( m_origPos != newPos )
342 && (( m_posX.GetValue() % standard_grid ) || ( m_posY.GetValue() % standard_grid ) ) )
343 {
344 wxString msg = wxString::Format( _( "This pin is not on a %d mils grid which will make it "
345 "difficult to connect to in the schematic.\n"
346 "Do you wish to continue?" ),
347 standard_grid );
348 if( !IsOK( this, msg ) )
349 return false;
350 }
351
352 m_pin->SetName( m_textPinName->GetValue() );
353 m_pin->SetNumber( m_textPinNumber->GetValue() );
357 m_pin->SetPosition( newPos );
362 m_pin->SetUnit( m_checkApplyToAllParts->GetValue() ? 0 : m_frame->GetUnit() );
363 m_pin->SetVisible( m_checkShow->GetValue() );
364
365 std::map<wxString, LIB_PIN::ALT>& alternates = m_pin->GetAlternates();
366 alternates.clear();
367
368 for( const LIB_PIN::ALT& alt : *m_alternatesDataModel )
369 alternates[ alt.m_Name ] = alt;
370
371 return true;
372}
373
374
375/*
376 * Draw (on m_panelShowPin) the pin according to current settings in dialog
377 */
379{
380 wxPaintDC dc( m_panelShowPin );
381 wxSize dc_size = dc.GetSize();
382 dc.SetDeviceOrigin( dc_size.x / 2, dc_size.y / 2 );
383
384 // Give a parent to m_dummyPin for draw purposes.
385 // In fact m_dummyPin should not have a parent, but draw functions need a parent
386 // to know some options, about pin texts
387 SYMBOL_EDIT_FRAME* symbolEditor = (SYMBOL_EDIT_FRAME*) GetParent();
388
389 // Calculate a suitable scale to fit the available draw area
390 BOX2I bBox = m_dummyPin->GetBoundingBox( true, true, false );
391 double xscale = (double) dc_size.x / bBox.GetWidth();
392 double yscale = (double) dc_size.y / bBox.GetHeight();
393 double scale = std::min( xscale, yscale );
394
395 // Give a 7% margin (each side) and limit to no more than 100% zoom
396 scale = std::min( scale * 0.85, 1.0 );
397 dc.SetUserScale( scale, scale );
398 GRResetPenAndBrush( &dc );
399
401 opts.force_draw_pin_text = true;
402 opts.draw_hidden_fields = true;
403 opts.show_connect_point = true;
404
405 RENDER_SETTINGS* renderSettings = symbolEditor->GetRenderSettings();
406 renderSettings->SetPrintDC( &dc );
407
408 m_dummyPin->Print( renderSettings, -bBox.Centre(), (void*) &opts, DefaultTransform, false );
409
410 event.Skip();
411}
412
413
414void DIALOG_PIN_PROPERTIES::OnPropertiesChange( wxCommandEvent& event )
415{
416 if( !IsShown() ) // do nothing at init time
417 return;
418
419 m_dummyPin->SetName( m_textPinName->GetValue() );
420 m_dummyPin->SetNumber( m_textPinNumber->GetValue() );
427 m_dummyPin->SetVisible( m_checkShow->GetValue() );
428
429 if( event.GetEventObject() == m_checkApplyToAllParts && m_frame->m_SyncPinEdit )
431
432 m_panelShowPin->Refresh();
433}
434
435void DIALOG_PIN_PROPERTIES::OnCollapsiblePaneChanged( wxCollapsiblePaneEvent& event )
436{
437 s_alternatesTurndownOpen = !event.GetCollapsed();
438}
439
440
442{
443 if( m_checkApplyToAllParts->GetValue() )
444 return _( "Synchronized Pins Mode." );
445 else if( m_pin->IsNew() )
446 return _( "Synchronized Pins Mode. New pin will be added to all units." );
447 else
448 return _( "Synchronized Pins Mode. Matching pins in other units will be updated." );
449}
450
451
452void DIALOG_PIN_PROPERTIES::OnAddAlternate( wxCommandEvent& event )
453{
455 return;
456
457 LIB_PIN::ALT newAlt;
458 newAlt.m_Name = wxEmptyString;
459 newAlt.m_Type = m_pin->GetType();
460 newAlt.m_Shape = m_pin->GetShape();
461
463
464 m_alternatesGrid->MakeCellVisible( m_alternatesGrid->GetNumberRows() - 1, 0 );
465 m_alternatesGrid->SetGridCursor( m_alternatesGrid->GetNumberRows() - 1, 0 );
466
467 m_alternatesGrid->EnableCellEditControl( true );
468 m_alternatesGrid->ShowCellEditControl();
469}
470
471
472void DIALOG_PIN_PROPERTIES::OnDeleteAlternate( wxCommandEvent& event )
473{
475 return;
476
477 if( m_alternatesDataModel->size() == 0 ) // empty table
478 return;
479
480 int curRow = m_alternatesGrid->GetGridCursorRow();
481
482 if( curRow < 0 )
483 return;
484
486
487 curRow = std::max( 0, curRow - 1 );
488 m_alternatesGrid->MakeCellVisible( curRow, m_alternatesGrid->GetGridCursorCol() );
489 m_alternatesGrid->SetGridCursor( curRow, m_alternatesGrid->GetGridCursorCol() );
490}
491
492
494{
495 // Account for scroll bars
497
498 wxGridUpdateLocker deferRepaintsTillLeavingScope;
499
502
505}
506
507
508void DIALOG_PIN_PROPERTIES::OnSize( wxSizeEvent& event )
509{
510 auto new_size = event.GetSize();
511
512 if( m_initialized && m_size != new_size )
513 {
514 m_size = new_size;
515
517 }
518
519 // Always propagate for a grid repaint (needed if the height changes, as well as width)
520 event.Skip();
521}
522
523
524void DIALOG_PIN_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event )
525{
526 // Handle a delayed focus
527 if( m_delayedFocusRow >= 0 )
528 {
529 m_alternatesTurndown->Collapse( false );
530
531 m_alternatesGrid->SetFocus();
534
535 m_alternatesGrid->EnableCellEditControl( true );
536 m_alternatesGrid->ShowCellEditControl();
537
540 }
541}
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
wxString GetColLabelValue(int aCol) override
void SetValue(int aRow, int aCol, const wxString &aValue) override
ALT_PIN_DATA_MODEL(EDA_UNITS aUserUnits)
wxString GetValue(int aRow, int aCol) override
void AppendRow(const LIB_PIN::ALT &aAlt)
bool IsEmptyCell(int row, int col) override
coord_type GetHeight() const
Definition: box2.h:188
coord_type GetWidth() const
Definition: box2.h:187
Vec Centre() const
Definition: box2.h:70
Class DIALOG_PIN_PROPERTIES_BASE.
SYMBOL_EDIT_FRAME * m_frame
void OnUpdateUI(wxUpdateUIEvent &event) override
DIALOG_PIN_PROPERTIES(SYMBOL_EDIT_FRAME *parent, LIB_PIN *aPin)
void OnPropertiesChange(wxCommandEvent &event) override
void OnPaintShowPanel(wxPaintEvent &event) override
bool TransferDataToWindow() override
void OnAddAlternate(wxCommandEvent &event) override
ALT_PIN_DATA_MODEL * m_alternatesDataModel
void OnSize(wxSizeEvent &event) override
bool TransferDataFromWindow() override
void OnDeleteAlternate(wxCommandEvent &event) override
int m_originalColWidths[COL_COUNT]
void OnCollapsiblePaneChanged(wxCollapsiblePaneEvent &event) override
std::vector< wxWindow * > m_tabOrder
Definition: dialog_shim.h:222
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
Definition: dialog_shim.h:97
void SetupStandardButtons(std::map< int, wxString > aLabels={})
void finishDialogSettings()
In all dialogs, we must call the same functions to fix minimal dlg size, the default position and per...
EDA_UNITS GetUserUnits() const
Definition: dialog_shim.h:121
virtual void SetParent(EDA_ITEM *aParent)
Definition: eda_item.h:100
bool IsNew() const
Definition: eda_item.h:103
Add mouse and command handling (such as cut, copy, and paste) to a WX_GRID instance.
Definition: grid_tricks.h:61
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:104
Container for all the knowledge about how graphical objects are drawn on any output surface/device.
const COLOR4D & GetLayerColor(int aLayer) const
Return the color used to draw a layer.
void SetPrintDC(wxDC *aDC)
int GetUnit() const
Definition: lib_item.h:273
virtual void Print(const RENDER_SETTINGS *aSettings, const VECTOR2I &aOffset, void *aData, const TRANSFORM &aTransform, bool aDimmed)
Draw an item.
Definition: lib_item.cpp:136
int GetConvert() const
Definition: lib_item.h:276
LIB_SYMBOL * GetParent() const
Definition: lib_item.h:168
void SetConvert(int aConvert)
Definition: lib_item.h:275
void SetUnit(int aUnit)
Definition: lib_item.h:272
void SetShape(GRAPHIC_PINSHAPE aShape)
Definition: lib_pin.h:78
int GetLength() const
Definition: lib_pin.h:80
ELECTRICAL_PINTYPE GetType() const
Definition: lib_pin.h:90
void SetPosition(const VECTOR2I &aPos) override
Definition: lib_pin.h:223
int GetOrientation() const
Definition: lib_pin.h:74
const BOX2I GetBoundingBox() const override
Definition: lib_pin.h:184
void SetName(const wxString &aName)
Definition: lib_pin.h:114
void SetNameTextSize(int aSize)
Definition: lib_pin.h:133
void SetType(ELECTRICAL_PINTYPE aType)
Definition: lib_pin.h:91
int GetNumberTextSize() const
Definition: lib_pin.h:135
void SetVisible(bool aVisible)
Definition: lib_pin.h:104
void ChangeLength(int aLength)
Change the length of a pin and adjust its position based on orientation.
Definition: lib_pin.cpp:1026
VECTOR2I GetPosition() const override
Definition: lib_pin.h:222
std::map< wxString, ALT > & GetAlternates()
Definition: lib_pin.h:138
const wxString & GetNumber() const
Definition: lib_pin.h:122
GRAPHIC_PINSHAPE GetShape() const
Definition: lib_pin.h:77
bool IsVisible() const
Definition: lib_pin.h:103
void SetNumber(const wxString &aNumber)
Definition: lib_pin.h:124
const wxString & GetName() const
Definition: lib_pin.h:112
void SetLength(int aLength)
Definition: lib_pin.h:81
int GetNameTextSize() const
Definition: lib_pin.h:132
void SetOrientation(int aOrientation)
Definition: lib_pin.h:75
void SetNumberTextSize(int aSize)
Definition: lib_pin.h:136
Define a library symbol object.
Definition: lib_symbol.h:98
void SetShowPinNames(bool aShow)
Set or clear the pin name visibility flag.
Definition: lib_symbol.h:635
bool IsMulti() const
Definition: lib_symbol.h:568
void SetShowPinNumbers(bool aShow)
Set or clear the pin number visibility flag.
Definition: lib_symbol.h:643
bool HasConversion() const
Test if symbol has more than one body conversion type (DeMorgan).
GRAPHIC_PINSHAPE GetPinShapeSelection()
void SetSelection(GRAPHIC_PINSHAPE aShape)
void SetSelection(ELECTRICAL_PINTYPE aType)
ELECTRICAL_PINTYPE GetPinTypeSelection()
KIGFX::SCH_RENDER_SETTINGS * GetRenderSettings()
The symbol library editor main window.
bool m_SyncPinEdit
Set to true to synchronize pins at the same position when editing symbols with multiple units or mult...
virtual long long int GetValue()
Return the current value in Internal Units.
virtual void SetValue(long long int aValue)
Set new value (in Internal Units) for the text field, taking care of units conversion.
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:95
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:193
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:280
void RemoveAllButtons()
Remove all the buttons that have been added by the user.
Definition: infobar.cpp:286
void AddButton(wxButton *aButton)
Add an already created button to the infobar.
Definition: infobar.cpp:245
void Dismiss() override
Dismisses the infobar and updates the containing layout and AUI manager (if one is provided).
Definition: infobar.cpp:175
void ShowMessage(const wxString &aMessage, int aFlags=wxICON_INFORMATION) override
Show the info bar with the provided message and icon.
Definition: infobar.cpp:142
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
Definition: confirm.cpp:342
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition: confirm.cpp:299
This file is part of the common library.
#define _(s)
EDA_UNITS
Definition: eda_units.h:43
TRANSFORM DefaultTransform
Definition: eeschema.cpp:68
void GRResetPenAndBrush(wxDC *DC)
Definition: gr_basic.cpp:72
@ LAYER_SCHEMATIC_BACKGROUND
Definition: layer_ids.h:376
wxSize GetUnobscuredSize(const wxWindow *aWindow)
Tries to determine the size of the viewport of a scrollable widget (wxDataViewCtrl,...
Definition: gtk/ui.cpp:126
const std::vector< BITMAPS > & PinTypeIcons()
Definition: pin_type.cpp:195
int PinOrientationIndex(int code)
Definition: pin_type.cpp:150
const wxArrayString & PinTypeNames()
Definition: pin_type.cpp:186
const wxArrayString & PinShapeNames()
Definition: pin_type.cpp:204
const std::vector< BITMAPS > & PinShapeIcons()
Definition: pin_type.cpp:213
const wxArrayString & PinOrientationNames()
Definition: pin_type.cpp:222
int PinOrientationCode(int index)
Definition: pin_type.cpp:141
const std::vector< BITMAPS > & PinOrientationIcons()
Definition: pin_type.cpp:231
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
Definition: pin_type.h:36
GRAPHIC_PINSHAPE
Definition: pin_type.h:56
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 int scale
GRAPHIC_PINSHAPE m_Shape
Definition: lib_pin.h:58
ELECTRICAL_PINTYPE m_Type
Definition: lib_pin.h:59
wxString m_Name
Definition: lib_pin.h:57
bool force_draw_pin_text
Definition: lib_symbol.h:64
Functions for manipulating tab traversal in forms and dialogs.