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