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 The 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
127 bool aFocusPinNumber ) :
129 m_frame( parent ),
130 m_pin( aPin ),
131 m_posX( parent, m_posXLabel, m_posXCtrl, m_posXUnits ),
132 m_posY( parent, m_posYLabel, m_posYCtrl, m_posYUnits ),
133 m_pinLength( parent, m_pinLengthLabel, m_pinLengthCtrl, m_pinLengthUnits ),
134 m_nameSize( parent, m_nameSizeLabel, m_nameSizeCtrl, m_nameSizeUnits ),
135 m_numberSize( parent, m_numberSizeLabel, m_numberSizeCtrl, m_numberSizeUnits ),
136 m_delayedFocusRow( -1 ),
137 m_delayedFocusColumn( -1 ),
138 m_initialized( false )
139{
140 // Creates a dummy pin to show on a panel, inside this dialog:
141 m_dummyParent = new LIB_SYMBOL( *static_cast<LIB_SYMBOL*>( m_pin->GetParentSymbol() ) );
142 m_dummyPin = new SCH_PIN( *m_pin );
146
148 m_panelShowPin->SetBackgroundColour( bgColor.ToColour() );
149
150 const wxArrayString& orientationNames = PinOrientationNames();
151 const std::vector<BITMAPS>& orientationIcons = PinOrientationIcons();
152
153 for ( unsigned ii = 0; ii < orientationNames.GetCount(); ii++ )
154 m_choiceOrientation->Insert( orientationNames[ii], KiBitmapBundle( orientationIcons[ii] ),
155 ii );
156
157 // We can't set the tab order through wxWidgets due to shortcomings in their mnemonics
158 // implementation on MSW
159 m_tabOrder = {
175 };
176
177 // Default alternates turndown to whether or not alternates exist, or if we've had it open
178 // before
179 m_alternatesTurndown->Collapse( m_pin->GetAlternates().size() == 0
181
182 // wxwidgets doesn't call the OnCollapseChange even at init, so we update this value if
183 // the alternates pane defaults to open
184 if ( m_pin->GetAlternates().size() > 0 )
186
188
189 // Save original columns widths so we can do proportional sizing.
190 for( int i = 0; i < COL_COUNT; ++i )
191 m_originalColWidths[ i ] = m_alternatesGrid->GetColSize( i );
192
193 // Give a bit more room for combobox editors
194 m_alternatesGrid->SetDefaultRowSize( m_alternatesGrid->GetDefaultRowSize() + 4 );
195
197 m_alternatesGrid->PushEventHandler( new GRID_TRICKS( m_alternatesGrid,
198 [this]( wxCommandEvent& aEvent )
199 {
200 OnAddAlternate( aEvent );
201 } ) );
202
204 {
205 m_alternatesTurndown->Collapse();
206 m_alternatesTurndown->Disable();
207 m_alternatesTurndown->SetToolTip( _( "Alternate pin assignments are not available for "
208 "De Morgan symbols." ) );
209 }
210
211 // Set special attributes
212 wxGridCellAttr* attr;
213
214 attr = new wxGridCellAttr;
215 attr->SetRenderer( new GRID_CELL_ICON_TEXT_RENDERER( PinTypeIcons(), PinTypeNames() ) );
216 attr->SetEditor( new GRID_CELL_ICON_TEXT_POPUP( PinTypeIcons(), PinTypeNames() ) );
217 m_alternatesGrid->SetColAttr( COL_TYPE, attr );
218
219 attr = new wxGridCellAttr;
220 attr->SetRenderer( new GRID_CELL_ICON_TEXT_RENDERER( PinShapeIcons(), PinShapeNames() ) );
221 attr->SetEditor( new GRID_CELL_ICON_TEXT_POPUP( PinShapeIcons(), PinShapeNames() ) );
222 m_alternatesGrid->SetColAttr( COL_SHAPE, attr );
223
224 m_addAlternate->SetBitmap( KiBitmapBundle( BITMAPS::small_plus ) );
225 m_deleteAlternate->SetBitmap( KiBitmapBundle( BITMAPS::small_trash ) );
226 m_addAlternate->GetParent()->Layout();
227
229
230 SetInitialFocus( aFocusPinNumber ? m_textPinNumber : m_textPinName );
231
232 // Now all widgets have the size fixed, call FinishDialogSettings
234
235 // On some window managers (Unity, XFCE) the dialog is not always raised, depending on
236 // how it is run.
237 Raise();
238
239 m_initialized = true;
240}
241
242
244{
245 delete m_dummyPin;
246 delete m_dummyParent;
247
248 // Prevents crash bug in wxGrid's d'tor
250
251 // Delete the GRID_TRICKS.
252 m_alternatesGrid->PopEventHandler( true );
253}
254
255
257{
258 if( !DIALOG_SHIM::TransferDataToWindow() )
259 return false;
260
262
266 m_textPinName->SetValue( m_pin->GetName() );
270 m_textPinNumber->SetValue( m_pin->GetNumber() );
275 && m_pin->GetUnit() == 0 );
277 m_checkShow->SetValue( m_pin->IsVisible() );
278
280
281 wxString commonUnitsToolTip;
282
284 {
285 wxHyperlinkCtrl* button = new wxHyperlinkCtrl( m_infoBar, wxID_ANY,
286 _( "Exit sync pins mode" ),
287 wxEmptyString );
288
289 button->Bind( wxEVT_COMMAND_HYPERLINK,
290 std::function<void( wxHyperlinkEvent& aEvent )>(
291 [&]( wxHyperlinkEvent& aEvent )
292 {
293 m_frame->m_SyncPinEdit = false;
295 } ) );
296
298 m_infoBar->AddButton( button );
300
301 commonUnitsToolTip = _( "Synchronized pins mode is enabled.\n"
302 "Similar pins will be edited regardless of this option." );
303 }
304 else
305 {
306 commonUnitsToolTip = _( "If checked, this pin will exist in all units." );
307 }
308
309 if( !m_pin->GetParentSymbol()->IsMulti() )
310 commonUnitsToolTip = _( "This symbol only has one unit. This control has no effect." );
311
312 m_checkApplyToAllParts->SetToolTip( commonUnitsToolTip );
313
314 for( const std::pair<const wxString, SCH_PIN::ALT>& alt : m_pin->GetAlternates() )
315 m_alternatesDataModel->AppendRow( alt.second );
316
317 return true;
318}
319
320
322{
324 return false;
325
326 // Check for missing alternate names.
327 for( size_t i = 0; i < m_alternatesDataModel->size(); ++i )
328 {
329 if( m_alternatesDataModel->at( i ).m_Name.IsEmpty() )
330 {
331 DisplayErrorMessage( this, _( "Alternate pin definitions must have a name." ) );
332
335
336 return false;
337 }
338 }
339
340 if( !DIALOG_SHIM::TransferDataFromWindow() )
341 return false;
342
344
345 const int standard_grid = 50;
346
347 // Only show the warning if the position has been changed
348 if( ( m_origPos != newPos )
349 && ( ( m_posX.GetValue() % standard_grid ) || ( m_posY.GetValue() % standard_grid ) ) )
350 {
351 wxString msg = wxString::Format( _( "This pin is not on a %d mils grid which will make it "
352 "difficult to connect to in the schematic.\n"
353 "Do you wish to continue?" ),
354 standard_grid );
355 if( !IsOK( this, msg ) )
356 return false;
357 }
358
359 m_pin->SetName( m_textPinName->GetValue() );
360 m_pin->SetNumber( m_textPinNumber->GetValue() );
364 m_pin->SetPosition( newPos );
369 m_pin->SetUnit( m_checkApplyToAllParts->GetValue() ? 0 : m_frame->GetUnit() );
370 m_pin->SetVisible( m_checkShow->GetValue() );
371
372 std::map<wxString, SCH_PIN::ALT>& alternates = m_pin->GetAlternates();
373 alternates.clear();
374
375 for( const SCH_PIN::ALT& alt : *m_alternatesDataModel )
376 alternates[ alt.m_Name ] = alt;
377
378 return true;
379}
380
381
383{
384 wxPaintDC dc( m_panelShowPin );
385 wxSize dc_size = dc.GetSize();
386 dc.SetDeviceOrigin( dc_size.x / 2, dc_size.y / 2 );
387
388 // Give a parent to m_dummyPin for draw purposes.
389 // In fact m_dummyPin should not have a parent, but draw functions need a parent
390 // to know some options, about pin texts
391 SYMBOL_EDIT_FRAME* symbolEditor = (SYMBOL_EDIT_FRAME*) GetParent();
392
393 // Calculate a suitable scale to fit the available draw area
394 BOX2I bBox = m_dummyPin->GetBoundingBox( true, true, false );
396
397 double xscale = (double) dc_size.x / bBox.GetWidth();
398 double yscale = (double) dc_size.y / bBox.GetHeight();
399 double scale = std::min( xscale, yscale );
400
401 // Give a 7% margin (each side) and limit to no more than 100% zoom
402 scale = std::min( scale * 0.85, 1.0 );
403 dc.SetUserScale( scale, scale );
404 GRResetPenAndBrush( &dc );
405
406 SCH_RENDER_SETTINGS renderSettings( *symbolEditor->GetRenderSettings() );
407 renderSettings.m_ShowPinNumbers = true;
408 renderSettings.m_ShowPinNames = true;
409 renderSettings.m_ShowHiddenFields = true;
410 renderSettings.m_ShowConnectionPoints = true;
411 renderSettings.m_Transform = TRANSFORM();
412 renderSettings.SetPrintDC( &dc );
413
414 m_dummyPin->Print( &renderSettings, 0, 0, -bBox.Centre(), false, false );
415
416 event.Skip();
417}
418
419
420void DIALOG_PIN_PROPERTIES::OnPropertiesChange( wxCommandEvent& event )
421{
422 if( !IsShownOnScreen() ) // do nothing at init time
423 return;
424
425 m_dummyPin->SetName( m_textPinName->GetValue() );
426 m_dummyPin->SetNumber( m_textPinNumber->GetValue() );
433 m_dummyPin->SetVisible( m_checkShow->GetValue() );
434
435 if( event.GetEventObject() == m_checkApplyToAllParts && m_frame->m_SyncPinEdit )
437
438 m_panelShowPin->Refresh();
439}
440
441
443{
444 if( m_checkApplyToAllParts->GetValue() )
445 return _( "Synchronized Pins Mode." );
446 else if( m_pin->IsNew() )
447 return _( "Synchronized Pins Mode. New pin will be added to all units." );
448 else
449 return _( "Synchronized Pins Mode. Matching pins in other units will be updated." );
450}
451
452
453void DIALOG_PIN_PROPERTIES::OnAddAlternate( wxCommandEvent& event )
454{
456 return;
457
458 SCH_PIN::ALT newAlt;
459 newAlt.m_Name = wxEmptyString;
460 newAlt.m_Type = m_pin->GetType();
461 newAlt.m_Shape = m_pin->GetShape();
462
464
465 m_alternatesGrid->MakeCellVisible( m_alternatesGrid->GetNumberRows() - 1, 0 );
466 m_alternatesGrid->SetGridCursor( m_alternatesGrid->GetNumberRows() - 1, 0 );
467
468 m_alternatesGrid->EnableCellEditControl( true );
469 m_alternatesGrid->ShowCellEditControl();
470}
471
472
473void DIALOG_PIN_PROPERTIES::OnDeleteAlternate( wxCommandEvent& event )
474{
476 return;
477
478 if( m_alternatesDataModel->size() == 0 ) // empty table
479 return;
480
481 int curRow = m_alternatesGrid->GetGridCursorRow();
482
483 if( curRow < 0 )
484 return;
485
487
488 curRow = std::max( 0, curRow - 1 );
489 m_alternatesGrid->MakeCellVisible( curRow, m_alternatesGrid->GetGridCursorCol() );
490 m_alternatesGrid->SetGridCursor( curRow, m_alternatesGrid->GetGridCursorCol() );
491}
492
493
495{
496 // Account for scroll bars
498
499 wxGridUpdateLocker deferRepaintsTillLeavingScope;
500
503
506}
507
508
509void DIALOG_PIN_PROPERTIES::OnSize( wxSizeEvent& event )
510{
511 auto new_size = event.GetSize();
512
513 if( m_initialized && m_size != new_size )
514 {
515 m_size = new_size;
516
518 }
519
520 // Always propagate for a grid repaint (needed if the height changes, as well as width)
521 event.Skip();
522}
523
524
525void DIALOG_PIN_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event )
526{
527 // Handle a delayed focus
528 if( m_delayedFocusRow >= 0 )
529 {
530 m_alternatesTurndown->Collapse( false );
531
532 m_alternatesGrid->SetFocus();
535
536 m_alternatesGrid->EnableCellEditControl( true );
537 m_alternatesGrid->ShowCellEditControl();
538
541 }
542}
543
544
545void DIALOG_PIN_PROPERTIES::OnCollapsiblePaneChange( wxCollapsiblePaneEvent& event )
546{
547 if( !event.GetCollapsed() )
548 {
549 wxTopLevelWindow* tlw = dynamic_cast<wxTopLevelWindow*>( wxGetTopLevelParent( this ) );
550
551 if( tlw )
552 {
553 tlw->InvalidateBestSize();
554 wxSize bestSize = tlw->GetBestSize();
555 wxSize currentSize = tlw->GetSize();
556 tlw->SetSize( wxMax( bestSize.GetWidth(), currentSize.GetWidth() ),
557 wxMax( bestSize.GetHeight(), currentSize.GetHeight() ) );
558 }
559 }
560}
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
Draw (on m_panelShowPin) the pin according to current settings in dialog.
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:250
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:138
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:84
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:232
const SYMBOL * GetParentSymbol() const
Definition: sch_item.cpp:166
int GetBodyStyle() const
Definition: sch_item.h:233
int GetUnit() const
Definition: sch_item.h:230
virtual void SetUnit(int aUnit)
Definition: sch_item.h:229
int GetNumberTextSize() const
Definition: sch_pin.cpp:564
int GetLength() const
Definition: sch_pin.cpp:295
const std::map< wxString, ALT > & GetAlternates() const
Definition: sch_pin.h:126
void SetNumber(const wxString &aNumber)
Definition: sch_pin.cpp:527
void SetVisible(bool aVisible)
Definition: sch_pin.h:106
void ChangeLength(int aLength)
Change the length of a pin and adjust its position based on orientation.
Definition: sch_pin.cpp:1418
void SetOrientation(PIN_ORIENTATION aOrientation)
Definition: sch_pin.h:85
void SetName(const wxString &aName)
Definition: sch_pin.cpp:406
bool IsVisible() const
Definition: sch_pin.cpp:374
void SetPosition(const VECTOR2I &aPos) override
Definition: sch_pin.h:198
const wxString & GetName() const
Definition: sch_pin.cpp:388
void SetLength(int aLength)
Definition: sch_pin.h:91
PIN_ORIENTATION GetOrientation() const
Definition: sch_pin.cpp:260
void SetNumberTextSize(int aSize)
Definition: sch_pin.cpp:578
void SetShape(GRAPHIC_PINSHAPE aShape)
Definition: sch_pin.h:88
VECTOR2I GetPosition() const override
Definition: sch_pin.cpp:252
int GetNameTextSize() const
Definition: sch_pin.cpp:540
void SetType(ELECTRICAL_PINTYPE aType)
Definition: sch_pin.cpp:329
const wxString & GetNumber() const
Definition: sch_pin.h:116
const BOX2I GetBoundingBox() const override
Return the orthogonal bounding box of this object for display purposes.
Definition: sch_pin.h:174
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:611
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:554
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:162
virtual void SetShowPinNames(bool aShow)
Set or clear the pin name visibility flag.
Definition: symbol.h:156
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:277
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:451
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
Definition: wx_grid.cpp:646
void RemoveAllButtons()
Remove all the buttons that have been added by the user.
Definition: wx_infobar.cpp:320
void AddButton(wxButton *aButton)
Add an already created button to the infobar.
Definition: wx_infobar.cpp:278
void Dismiss() override
Dismisses the infobar and updates the containing layout and AUI manager (if one is provided).
Definition: wx_infobar.cpp:189
void ShowMessage(const wxString &aMessage, int aFlags=wxICON_INFORMATION) override
Show the info bar with the provided message and icon.
Definition: wx_infobar.cpp:153
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:440
wxSize GetUnobscuredSize(const wxWindow *aWindow)
Tries to determine the size of the viewport of a scrollable widget (wxDataViewCtrl,...
Definition: wxgtk/ui.cpp:252
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:44
GRAPHIC_PINSHAPE m_Shape
Definition: sch_pin.h:45
ELECTRICAL_PINTYPE m_Type
Definition: sch_pin.h:46
Functions for manipulating tab traversal in forms and dialogs.