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 <sch_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<SCH_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 SCH_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 SCH_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
226
227 SetInitialFocus( aFocusPinNumber ? m_textPinNumber : m_textPinName );
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}
238
239
241{
242 delete m_dummyPin;
243 delete m_dummyParent;
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() );
267 m_textPinNumber->SetValue( m_pin->GetNumber() );
271 m_checkApplyToAllParts->SetValue( m_pin->GetParentSymbol()->IsMulti() && m_pin->GetUnit() == 0 );
273 m_checkShow->SetValue( m_pin->IsVisible() );
274
276
277 wxString commonUnitsToolTip;
278
280 {
281 wxHyperlinkCtrl* button = new wxHyperlinkCtrl( m_infoBar, wxID_ANY,
282 _( "Exit sync pins mode" ),
283 wxEmptyString );
284
285 button->Bind( wxEVT_COMMAND_HYPERLINK,
286 std::function<void( wxHyperlinkEvent& aEvent )>(
287 [&]( wxHyperlinkEvent& aEvent )
288 {
289 m_frame->m_SyncPinEdit = false;
291 } ) );
292
294 m_infoBar->AddButton( button );
296
297 commonUnitsToolTip = _( "Synchronized pins mode is enabled.\n"
298 "Similar pins will be edited regardless of this option." );
299 }
300 else
301 {
302 commonUnitsToolTip = _( "If checked, this pin will exist in all units." );
303 }
304
305 if( !m_pin->GetParentSymbol()->IsMulti() )
306 commonUnitsToolTip = _( "This symbol only has one unit. This control has no effect." );
307
308 m_checkApplyToAllParts->SetToolTip( commonUnitsToolTip );
309
310 for( const std::pair<const wxString, SCH_PIN::ALT>& alt : m_pin->GetAlternates() )
311 m_alternatesDataModel->AppendRow( alt.second );
312
313 return true;
314}
315
316
318{
320 return false;
321
322 // Check for missing alternate names.
323 for( size_t i = 0; i < m_alternatesDataModel->size(); ++i )
324 {
325 if( m_alternatesDataModel->at( i ).m_Name.IsEmpty() )
326 {
327 DisplayErrorMessage( this, _( "Alternate pin definitions must have a name." ) );
328
331
332 return false;
333 }
334 }
335
336 if( !DIALOG_SHIM::TransferDataFromWindow() )
337 return false;
338
340
341 const int standard_grid = 50;
342
343 // Only show the warning if the position has been changed
344 if( ( m_origPos != newPos )
345 && (( m_posX.GetValue() % standard_grid ) || ( m_posY.GetValue() % standard_grid ) ) )
346 {
347 wxString msg = wxString::Format( _( "This pin is not on a %d mils grid which will make it "
348 "difficult to connect to in the schematic.\n"
349 "Do you wish to continue?" ),
350 standard_grid );
351 if( !IsOK( this, msg ) )
352 return false;
353 }
354
355 m_pin->SetName( m_textPinName->GetValue() );
356 m_pin->SetNumber( m_textPinNumber->GetValue() );
360 m_pin->SetPosition( newPos );
365 m_pin->SetUnit( m_checkApplyToAllParts->GetValue() ? 0 : m_frame->GetUnit() );
366 m_pin->SetVisible( m_checkShow->GetValue() );
367
368 std::map<wxString, SCH_PIN::ALT>& alternates = m_pin->GetAlternates();
369 alternates.clear();
370
371 for( const SCH_PIN::ALT& alt : *m_alternatesDataModel )
372 alternates[ alt.m_Name ] = alt;
373
374 return true;
375}
376
377
378/*
379 * Draw (on m_panelShowPin) the pin according to current settings in dialog
380 */
382{
383 wxPaintDC dc( m_panelShowPin );
384 wxSize dc_size = dc.GetSize();
385 dc.SetDeviceOrigin( dc_size.x / 2, dc_size.y / 2 );
386
387 // Give a parent to m_dummyPin for draw purposes.
388 // In fact m_dummyPin should not have a parent, but draw functions need a parent
389 // to know some options, about pin texts
390 SYMBOL_EDIT_FRAME* symbolEditor = (SYMBOL_EDIT_FRAME*) GetParent();
391
392 // Calculate a suitable scale to fit the available draw area
393 BOX2I bBox = m_dummyPin->GetBoundingBox( true, true, false );
395
396 double xscale = (double) dc_size.x / bBox.GetWidth();
397 double yscale = (double) dc_size.y / bBox.GetHeight();
398 double scale = std::min( xscale, yscale );
399
400 // Give a 7% margin (each side) and limit to no more than 100% zoom
401 scale = std::min( scale * 0.85, 1.0 );
402 dc.SetUserScale( scale, scale );
403 GRResetPenAndBrush( &dc );
404
405 SCH_RENDER_SETTINGS renderSettings( *symbolEditor->GetRenderSettings() );
406 renderSettings.m_ShowPinNumbers = true;
407 renderSettings.m_ShowPinNames = true;
408 renderSettings.m_ShowHiddenFields = true;
409 renderSettings.m_ShowConnectionPoints = true;
410 renderSettings.m_Transform = TRANSFORM();
411 renderSettings.SetPrintDC( &dc );
412
413 m_dummyPin->Print( &renderSettings, 0, 0, -bBox.Centre(), false, false );
414
415 event.Skip();
416}
417
418
419void DIALOG_PIN_PROPERTIES::OnPropertiesChange( wxCommandEvent& event )
420{
421 if( !IsShownOnScreen() ) // do nothing at init time
422 return;
423
424 m_dummyPin->SetName( m_textPinName->GetValue() );
425 m_dummyPin->SetNumber( m_textPinNumber->GetValue() );
432 m_dummyPin->SetVisible( m_checkShow->GetValue() );
433
434 if( event.GetEventObject() == m_checkApplyToAllParts && m_frame->m_SyncPinEdit )
436
437 m_panelShowPin->Refresh();
438}
439
441{
442 if( m_checkApplyToAllParts->GetValue() )
443 return _( "Synchronized Pins Mode." );
444 else if( m_pin->IsNew() )
445 return _( "Synchronized Pins Mode. New pin will be added to all units." );
446 else
447 return _( "Synchronized Pins Mode. Matching pins in other units will be updated." );
448}
449
450
451void DIALOG_PIN_PROPERTIES::OnAddAlternate( wxCommandEvent& event )
452{
454 return;
455
456 SCH_PIN::ALT newAlt;
457 newAlt.m_Name = wxEmptyString;
458 newAlt.m_Type = m_pin->GetType();
459 newAlt.m_Shape = m_pin->GetShape();
460
462
463 m_alternatesGrid->MakeCellVisible( m_alternatesGrid->GetNumberRows() - 1, 0 );
464 m_alternatesGrid->SetGridCursor( m_alternatesGrid->GetNumberRows() - 1, 0 );
465
466 m_alternatesGrid->EnableCellEditControl( true );
467 m_alternatesGrid->ShowCellEditControl();
468}
469
470
471void DIALOG_PIN_PROPERTIES::OnDeleteAlternate( wxCommandEvent& event )
472{
474 return;
475
476 if( m_alternatesDataModel->size() == 0 ) // empty table
477 return;
478
479 int curRow = m_alternatesGrid->GetGridCursorRow();
480
481 if( curRow < 0 )
482 return;
483
485
486 curRow = std::max( 0, curRow - 1 );
487 m_alternatesGrid->MakeCellVisible( curRow, m_alternatesGrid->GetGridCursorCol() );
488 m_alternatesGrid->SetGridCursor( curRow, m_alternatesGrid->GetGridCursorCol() );
489}
490
491
493{
494 // Account for scroll bars
496
497 wxGridUpdateLocker deferRepaintsTillLeavingScope;
498
501
504}
505
506
507void DIALOG_PIN_PROPERTIES::OnSize( wxSizeEvent& event )
508{
509 auto new_size = event.GetSize();
510
511 if( m_initialized && m_size != new_size )
512 {
513 m_size = new_size;
514
516 }
517
518 // Always propagate for a grid repaint (needed if the height changes, as well as width)
519 event.Skip();
520}
521
522
523void DIALOG_PIN_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event )
524{
525 // Handle a delayed focus
526 if( m_delayedFocusRow >= 0 )
527 {
528 m_alternatesTurndown->Collapse( false );
529
530 m_alternatesGrid->SetFocus();
533
534 m_alternatesGrid->EnableCellEditControl( true );
535 m_alternatesGrid->ShowCellEditControl();
536
539 }
540}
541void DIALOG_PIN_PROPERTIES::OnCollapsiblePaneChange( wxCollapsiblePaneEvent& event )
542{
543 if( !event.GetCollapsed() )
544 {
545 wxTopLevelWindow* tlw = dynamic_cast<wxTopLevelWindow*>( wxGetTopLevelParent( this ) );
546
547 if( tlw )
548 {
549 tlw->InvalidateBestSize();
550 wxSize bestSize = tlw->GetBestSize();
551 wxSize currentSize = tlw->GetSize();
552 tlw->SetSize( wxMax( bestSize.GetWidth(), currentSize.GetWidth() ),
553 wxMax( bestSize.GetHeight(), currentSize.GetHeight() ) );
554 }
555 }
556}
constexpr EDA_IU_SCALE schIUScale
Definition: base_units.h:110
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 SCH_PIN::ALT &aAlt)
bool IsEmptyCell(int row, int col) override
constexpr BOX2< Vec > & Inflate(coord_type dx, coord_type dy)
Inflates the rectangle horizontally by dx and vertically by dy.
Definition: box2.h:558
constexpr size_type GetWidth() const
Definition: box2.h:214
constexpr Vec Centre() const
Definition: box2.h:97
constexpr size_type GetHeight() const
Definition: box2.h:215
Class DIALOG_PIN_PROPERTIES_BASE.
SYMBOL_EDIT_FRAME * m_frame
void OnUpdateUI(wxUpdateUIEvent &event) override
std::map< int, int > m_originalColWidths
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
DIALOG_PIN_PROPERTIES(SYMBOL_EDIT_FRAME *parent, SCH_PIN *aPin, bool aFocusPinNumber)
bool TransferDataFromWindow() override
void OnDeleteAlternate(wxCommandEvent &event) override
std::vector< wxWindow * > m_tabOrder
Definition: dialog_shim.h:242
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
Definition: dialog_shim.h:102
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:130
virtual void SetParent(EDA_ITEM *aParent)
Definition: eda_item.h:104
bool IsNew() const
Definition: eda_item.h:107
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)
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:231
const SYMBOL * GetParentSymbol() const
Definition: sch_item.cpp:166
int GetBodyStyle() const
Definition: sch_item.h:232
int GetUnit() const
Definition: sch_item.h:229
virtual void SetUnit(int aUnit)
Definition: sch_item.h:228
int GetNumberTextSize() const
Definition: sch_pin.cpp:557
int GetLength() const
Definition: sch_pin.cpp:295
const std::map< wxString, ALT > & GetAlternates() const
Definition: sch_pin.h:127
void SetNumber(const wxString &aNumber)
Definition: sch_pin.cpp:520
void SetVisible(bool aVisible)
Definition: sch_pin.h:107
void ChangeLength(int aLength)
Change the length of a pin and adjust its position based on orientation.
Definition: sch_pin.cpp:1411
void SetOrientation(PIN_ORIENTATION aOrientation)
Definition: sch_pin.h:86
void SetName(const wxString &aName)
Definition: sch_pin.cpp:399
bool IsVisible() const
Definition: sch_pin.cpp:367
void SetPosition(const VECTOR2I &aPos) override
Definition: sch_pin.h:203
const wxString & GetName() const
Definition: sch_pin.cpp:381
void SetLength(int aLength)
Definition: sch_pin.h:92
PIN_ORIENTATION GetOrientation() const
Definition: sch_pin.cpp:260
void SetNumberTextSize(int aSize)
Definition: sch_pin.cpp:571
void SetShape(GRAPHIC_PINSHAPE aShape)
Definition: sch_pin.h:89
VECTOR2I GetPosition() const override
Definition: sch_pin.cpp:252
int GetNameTextSize() const
Definition: sch_pin.cpp:533
void SetType(ELECTRICAL_PINTYPE aType)
Definition: sch_pin.cpp:329
const wxString & GetNumber() const
Definition: sch_pin.h:117
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Definition: sch_pin.h:175
void Print(const SCH_RENDER_SETTINGS *aSettings, int aUnit, int aBodyStyle, const VECTOR2I &aOffset, bool aForceNoFill, bool aDimmed) override
Print an item.
Definition: sch_pin.cpp:604
GRAPHIC_PINSHAPE GetShape() const
Definition: sch_pin.cpp:274
ELECTRICAL_PINTYPE GetType() const
Definition: sch_pin.cpp:309
void SetNameTextSize(int aSize)
Definition: sch_pin.cpp:547
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
virtual void SetShowPinNumbers(bool aShow)
Set or clear the pin number visibility flag.
Definition: symbol.h:129
virtual void SetShowPinNames(bool aShow)
Set or clear the pin name visibility flag.
Definition: symbol.h:123
virtual bool HasAlternateBodyStyle() const =0
Test if symbol has more than one body conversion type (DeMorgan).
for transforming drawing coordinates for a wxDC device context.
Definition: transform.h:46
int GetIntValue()
Definition: unit_binder.h:129
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:270
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:443
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:637
void RemoveAllButtons()
Remove all the buttons that have been added by the user.
Definition: wx_infobar.cpp:304
void AddButton(wxButton *aButton)
Add an already created button to the infobar.
Definition: wx_infobar.cpp:263
void Dismiss() override
Dismisses the infobar and updates the containing layout and AUI manager (if one is provided).
Definition: wx_infobar.cpp:190
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:250
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition: confirm.cpp:195
This file is part of the common library.
#define DANGLING_SYMBOL_SIZE
< The size of the rectangle indicating an unconnected wire or label
#define _(s)
EDA_UNITS
Definition: eda_units.h:46
void GRResetPenAndBrush(wxDC *DC)
Definition: gr_basic.cpp:73
@ LAYER_SCHEMATIC_BACKGROUND
Definition: layer_ids.h:391
wxSize GetUnobscuredSize(const wxWindow *aWindow)
Tries to determine the size of the viewport of a scrollable widget (wxDataViewCtrl,...
Definition: wxgtk/ui.cpp:195
const std::vector< BITMAPS > & PinTypeIcons()
Definition: pin_type.cpp:162
const wxArrayString & PinTypeNames()
Definition: pin_type.cpp:153
int PinOrientationIndex(PIN_ORIENTATION code)
Definition: pin_type.cpp:70
const wxArrayString & PinShapeNames()
Definition: pin_type.cpp:171
const std::vector< BITMAPS > & PinShapeIcons()
Definition: pin_type.cpp:180
const wxArrayString & PinOrientationNames()
Definition: pin_type.cpp:189
PIN_ORIENTATION PinOrientationCode(size_t index)
Definition: pin_type.cpp:63
const std::vector< BITMAPS > & PinOrientationIcons()
Definition: pin_type.cpp:198
ELECTRICAL_PINTYPE
The symbol library pin object electrical types used in ERC tests.
Definition: pin_type.h:36
GRAPHIC_PINSHAPE
Definition: pin_type.h:57
const int scale
constexpr int MilsToIU(int mils) const
Definition: base_units.h:93
wxString m_Name
Definition: sch_pin.h:45
GRAPHIC_PINSHAPE m_Shape
Definition: sch_pin.h:46
ELECTRICAL_PINTYPE m_Type
Definition: sch_pin.h:47
Functions for manipulating tab traversal in forms and dialogs.