KiCad PCB EDA Suite
Loading...
Searching...
No Matches
toolbars_pcb_editor.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) 2012 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <[email protected]>
6 * Copyright (C) 2012 Wayne Stambaugh <[email protected]>
7 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <https://www.gnu.org/licenses/>.
21 */
22
23#include <memory>
24#include <string>
25
26#include <advanced_config.h>
28#include <bitmaps.h>
29#include <board.h>
31#include <eda_text.h>
32#include <footprint.h>
33#include <pcb_field.h>
34#include <kiface_base.h>
35#include <kiplatform/ui.h>
36#include <macros.h>
37#include <pcb_edit_frame.h>
38#include <pcb_field.h>
40#include <pcbnew_id.h>
41#include <pcbnew_settings.h>
42#include <eda_text.h>
43#include <pcb_field.h>
44#include <pgm_base.h>
47#include <router/router_tool.h>
49#include <tool/action_menu.h>
50#include <tool/action_toolbar.h>
51#include <tool/actions.h>
52#include <tool/common_tools.h>
53#include <tool/tool_manager.h>
55#include <tools/pcb_actions.h>
65#include <wx/wupdlock.h>
66#include <wx/combobox.h>
67#include <toolbars_pcb_editor.h>
69#include <eda_text.h>
70#include <tools/pcb_control.h>
71#include <pcb_draw_panel_gal.h>
73
74/* Data to build the layer pair indicator button */
75static wxBitmapBundle LayerPairBitmap;
76
77
78void PCB_EDIT_FRAME::PrepareLayerIndicator( bool aForceRebuild )
79{
80 COLOR4D top_color, bottom_color, background_color;
81 bool change = aForceRebuild;
82
84
85 if( m_prevIconVal.previous_icon_size != icon_size )
86 {
87 m_prevIconVal.previous_icon_size = icon_size;
88 change = true;
89 }
90
91 top_color = GetColorSettings()->GetColor( GetScreen()->m_Route_Layer_TOP );
92
93 if( m_prevIconVal.previous_Route_Layer_TOP_color != top_color )
94 {
95 m_prevIconVal.previous_Route_Layer_TOP_color = top_color;
96 change = true;
97 }
98
99 bottom_color = GetColorSettings()->GetColor( GetScreen()->m_Route_Layer_BOTTOM );
100
101 if( m_prevIconVal.previous_Route_Layer_BOTTOM_color != bottom_color )
102 {
103 m_prevIconVal.previous_Route_Layer_BOTTOM_color = bottom_color;
104 change = true;
105 }
106
107 if( change || !LayerPairBitmap.IsOk() )
108 {
109 LayerPairBitmap = LAYER_PRESENTATION::CreateLayerPairIcon( top_color, bottom_color, icon_size );
110
111 if( m_tbTopAux )
112 {
114 m_tbTopAux->Refresh();
115 }
116 }
117}
118
119
121 _( "Track width selector" ),
122 _( "Control to select the track width" ),
123 { FRAME_PCB_EDITOR } );
125 _( "Via diameter selector" ),
126 _( "Control to select the via diameter" ),
127 { FRAME_PCB_EDITOR } );
128ACTION_TOOLBAR_CONTROL PCB_ACTION_TOOLBAR_CONTROLS::viaStack( "control.PCBViaStack", _( "Microvia stack selector" ),
129 _( "Control to select the microvia stack preset" ),
130 { FRAME_PCB_EDITOR } );
132 _( "Current variant" ),
133 _( "Control to select the current variant" ),
134 { FRAME_PCB_EDITOR } );
135
136
137std::optional<TOOLBAR_CONFIGURATION> PCB_EDIT_TOOLBAR_SETTINGS::DefaultToolbarConfig( TOOLBAR_LOC aToolbar )
138{
140
141 // clang-format off
142 switch( aToolbar )
143 {
145 config.AppendAction( ACTIONS::toggleGrid )
146 .WithContextMenu(
147 []( TOOL_MANAGER* aMgr ) -> std::unique_ptr<ACTION_MENU>
148 {
150 std::unique_ptr<ACTION_MENU> menu =
151 std::make_unique<ACTION_MENU>( false, selTool );
152
153 menu->Add( ACTIONS::gridProperties );
154 menu->Add( ACTIONS::gridOrigin );
155
156 return menu;
157 } )
158 .AppendAction( ACTIONS::toggleGridOverrides )
159 .AppendAction( PCB_ACTIONS::togglePolarCoords )
160 .AppendGroup( TOOLBAR_GROUP_CONFIG( _( "Units" ) )
161 .AddAction( ACTIONS::millimetersUnits )
162 .AddAction( ACTIONS::inchesUnits )
163 .AddAction( ACTIONS::milsUnits ) )
164 .AppendGroup( TOOLBAR_GROUP_CONFIG( _( "Crosshair modes" ) )
167 .AddAction( ACTIONS::cursor45Crosshairs ) );
168
169 config.AppendSeparator()
170 .AppendGroup( TOOLBAR_GROUP_CONFIG( _( "Line modes" ) )
171 .AddAction( PCB_ACTIONS::lineModeFree )
172 .AddAction( PCB_ACTIONS::lineMode90 )
173 .AddAction( PCB_ACTIONS::lineMode45 ) )
174 .AppendAction( PCB_ACTIONS::toggleAutoConstraints );
175
176 config.AppendSeparator()
177 .AppendAction( PCB_ACTIONS::showRatsnest )
178 .AppendAction( PCB_ACTIONS::ratsnestLineMode );
179
180 config.AppendSeparator()
181 .AppendAction( ACTIONS::highContrastMode )
182 .AppendAction( PCB_ACTIONS::toggleNetHighlight );
183
184 config.AppendSeparator()
185 .AppendAction( PCB_ACTIONS::zoneDisplayFilled )
186 .AppendAction( PCB_ACTIONS::zoneDisplayOutline );
187
188 if( ADVANCED_CFG::GetCfg().m_ExtraZoneDisplayModes )
189 {
192 }
193
194 config.AppendSeparator()
195 .AppendAction( PCB_ACTIONS::padDisplayMode )
196 .AppendAction( PCB_ACTIONS::viaDisplayMode )
197 .AppendAction( PCB_ACTIONS::trackDisplayMode );
198
199 if( ADVANCED_CFG::GetCfg().m_DrawBoundingBoxes )
200 config.AppendAction( ACTIONS::toggleBoundingBoxes );
201
202 // Tools to show/hide toolbars:
203 config.AppendSeparator()
204 .AppendAction( PCB_ACTIONS::showLayersManager )
205 .AppendAction( ACTIONS::showProperties );
206
207 break;
208
210 config.AppendGroup( TOOLBAR_GROUP_CONFIG( _( "Selection modes" ) )
211 .AddAction( ACTIONS::selectSetRect )
212 .AddAction( ACTIONS::selectSetLasso ) )
213 .AppendAction( PCB_ACTIONS::localRatsnestTool );
214
215 config.AppendSeparator()
216 .AppendAction( PCB_ACTIONS::placeFootprint )
217 .AppendGroup( TOOLBAR_GROUP_CONFIG( _( "Track routing tools" ) )
219 .AddAction( PCB_ACTIONS::routeDiffPair )
220 .AddContextMenu(
221 []( TOOL_MANAGER* aMgr ) -> std::unique_ptr<ACTION_MENU>
222 {
224 std::unique_ptr<ACTION_MENU> menu =
225 std::make_unique<ACTION_MENU>( false, selTool );
226
230 menu->AppendSeparator();
232
233 return menu;
234 } ) )
235 .AppendGroup( TOOLBAR_GROUP_CONFIG( _( "Track tuning tools" ) )
236 .AddAction( PCB_ACTIONS::tuneSingleTrack )
237 .AddAction( PCB_ACTIONS::tuneDiffPair )
238 .AddAction( PCB_ACTIONS::tuneSkew ) )
239 .AppendAction( PCB_ACTIONS::showDiffPhaseSkew )
240 .AppendGroup( TOOLBAR_GROUP_CONFIG( _( "Via tools" ) )
241 .AddAction( PCB_ACTIONS::drawVia )
242 .AddAction( PCB_ACTIONS::placeViaStack )
243 .AddAction( PCB_ACTIONS::drawViaStitchArea ) )
244 .AppendAction( PCB_ACTIONS::drawZone )
245 .WithContextMenu(
246 []( TOOL_MANAGER* aMgr ) -> std::unique_ptr<ACTION_MENU>
247 {
249 std::unique_ptr<ACTION_MENU> menu =
250 std::make_unique<ACTION_MENU>( false, selTool );
251
252 menu->Add( PCB_ACTIONS::zoneFillAll );
253 menu->Add( PCB_ACTIONS::zoneUnfillAll );
254 menu->AppendSeparator();
255 menu->Add( PCB_ACTIONS::zonesManager );
256
257 return menu;
258 } )
259 .AppendAction( PCB_ACTIONS::drawRuleArea );
260
261 config.AppendSeparator()
262 .AppendAction( PCB_ACTIONS::drawLine )
263 .AppendGroup( TOOLBAR_GROUP_CONFIG( _( "Arc" ) )
264 .AddAction( PCB_ACTIONS::drawArcCenter )
267 .AddAction( PCB_ACTIONS::drawArcTangent )
269 .AddAction( PCB_ACTIONS::drawEllipseArc )
270 .AddContextMenu(
271 []( TOOL_MANAGER* aMgr ) -> std::unique_ptr<ACTION_MENU>
272 {
274 std::unique_ptr<ACTION_MENU> menu =
275 std::make_unique<ACTION_MENU>( false, selTool );
276
280
281 return menu;
282 } ) )
283 .AppendAction( PCB_ACTIONS::drawRectangle )
284 .AppendGroup( TOOLBAR_GROUP_CONFIG( _( "Circle" ) )
285 .AddAction( PCB_ACTIONS::drawCircle )
286 .AddAction( PCB_ACTIONS::drawEllipse ) )
287 .AppendGroup( TOOLBAR_GROUP_CONFIG( _( "Constraints" ) )
306 .AppendAction( PCB_ACTIONS::drawPolygon )
307 .AppendAction( PCB_ACTIONS::drawBezier )
308 .AppendAction( PCB_ACTIONS::placeReferenceImage )
309 .AppendGroup( TOOLBAR_GROUP_CONFIG( _( "Text objects" ) )
310 .AddAction( PCB_ACTIONS::placeText )
311 .AddAction( PCB_ACTIONS::drawTextBox ) )
312 .AppendAction( PCB_ACTIONS::drawTable )
313 .AppendGroup( TOOLBAR_GROUP_CONFIG( _( "Dimension objects" ) )
318 .AddAction( PCB_ACTIONS::drawLeader ) )
319 .AppendAction( PCB_ACTIONS::placeBarcode )
320 .AppendAction( ACTIONS::deleteTool );
321
322 config.AppendSeparator()
323 .AppendGroup( TOOLBAR_GROUP_CONFIG( _( "PCB origins and points" ) )
324 .AddAction( ACTIONS::gridSetOrigin )
325 .AddAction( PCB_ACTIONS::drillOrigin ) )
326 .AppendAction( PCB_ACTIONS::placePoint )
327 .AppendAction( PCB_ACTIONS::placeSubGrid )
328 .AppendAction( ACTIONS::measureTool );
329
330 break;
331
333 if( Kiface().IsSingle() )
334 {
335 config.AppendAction( ACTIONS::doNew );
336 config.AppendAction( ACTIONS::open );
337 }
338
339 config.AppendAction( ACTIONS::save );
340
341 config.AppendSeparator()
342 .AppendAction( PCB_ACTIONS::boardSetup );
343
344 config.AppendSeparator()
345 .AppendAction( ACTIONS::pageSettings )
346 .AppendAction( ACTIONS::print )
347 .AppendAction( ACTIONS::plot );
348
349 config.AppendSeparator()
350 .AppendAction( ACTIONS::undo )
351 .AppendAction( ACTIONS::redo );
352
353 config.AppendSeparator()
354 .AppendAction( ACTIONS::find );
355
356 config.AppendSeparator()
357 .AppendAction( ACTIONS::zoomRedraw )
358 .AppendAction( ACTIONS::zoomInCenter )
359 .AppendAction( ACTIONS::zoomOutCenter )
360 .AppendAction( ACTIONS::zoomFitScreen )
361 .AppendAction( ACTIONS::zoomFitObjects )
362 .AppendAction( ACTIONS::zoomTool );
363
364 config.AppendSeparator()
365 .AppendAction( PCB_ACTIONS::rotateCcw )
366 .AppendAction( PCB_ACTIONS::rotateCw )
367 .AppendAction( PCB_ACTIONS::mirrorV )
368 .AppendAction( PCB_ACTIONS::mirrorH )
369 .AppendAction( ACTIONS::group )
370 .AppendAction( ACTIONS::ungroup )
371 .AppendAction( PCB_ACTIONS::lock )
372 .AppendAction( PCB_ACTIONS::unlock );
373
374 config.AppendSeparator()
375 .AppendAction( ACTIONS::showFootprintEditor )
376 .AppendAction( ACTIONS::showFootprintBrowser )
377 .AppendAction( ACTIONS::show3DViewer );
378
379 config.AppendSeparator();
380
381 if( !Kiface().IsSingle() )
383 else
384 config.AppendAction( PCB_ACTIONS::importNetlist );
385
386 config.AppendAction( PCB_ACTIONS::runDRC )
387 .AppendAction( PCB_ACTIONS::editFootprintFields );
388
389 config.AppendSeparator();
390 config.AppendAction( PCB_ACTIONS::showEeschema );
393
394 break;
395
398 .AppendAction( PCB_ACTIONS::autoTrackWidth );
399
400 config.AppendSeparator()
402
403 config.AppendSeparator()
405
406 config.AppendSeparator()
408 .AppendAction( PCB_ACTIONS::selectLayerPair );
409
410 config.AppendSeparator()
411 .AppendControl( ACTION_TOOLBAR_CONTROLS::gridSelect );
412
413 config.AppendSeparator()
414 .AppendControl( ACTION_TOOLBAR_CONTROLS::zoomSelect );
415
416 config.AppendSeparator()
418
419 break;
420 }
421
422 // clang-format on
423 return config;
424}
425
426
428{
430
431 // Box to display and choose track widths
432 auto trackWidthSelectorFactory =
433 [this]( ACTION_TOOLBAR* aToolbar )
434 {
435 if( !m_SelTrackWidthBox )
436 {
437 m_SelTrackWidthBox = new wxChoice( aToolbar, ID_AUX_TOOLBAR_PCB_TRACK_WIDTH,
438 wxDefaultPosition, wxDefaultSize, 0, nullptr );
439 }
440
441 m_SelTrackWidthBox->SetToolTip( _( "Select the default width for new tracks. Note that this "
442 "width can be overridden by the board minimum width, or by "
443 "the width of an existing track if the 'Use Existing Track "
444 "Width' feature is enabled." ) );
445
447
448 aToolbar->Add( m_SelTrackWidthBox );
449 };
450
452
453
454 // Box to display and choose vias diameters
455 auto viaDiaSelectorFactory =
456 [this]( ACTION_TOOLBAR* aToolbar )
457 {
458 if( !m_SelViaSizeBox )
459 {
460 m_SelViaSizeBox = new wxChoice( aToolbar, ID_AUX_TOOLBAR_PCB_VIA_SIZE,
461 wxDefaultPosition, wxDefaultSize, 0, nullptr );
462 }
463
465 aToolbar->Add( m_SelViaSizeBox );
466 };
467
469
470 // Box to display and choose via stack presets
471 auto viaStackSelectorFactory = [this]( ACTION_TOOLBAR* aToolbar )
472 {
473 if( !m_SelViaStackBox )
474 {
475 m_SelViaStackBox = new wxChoice( aToolbar, ID_AUX_TOOLBAR_PCB_VIA_STACK, wxDefaultPosition, wxDefaultSize,
476 0, nullptr );
477 }
478
479 m_SelViaStackBox->SetToolTip( _( "Select the microvia stack preset placed by the "
480 "microvia stack tool." ) );
481
483 aToolbar->Add( m_SelViaStackBox );
484 };
485
487
488 // Variant selection drop down control on main tool bar
489 auto variantSelectionCtrlFactory =
490 [this]( ACTION_TOOLBAR* aToolbar )
491 {
493 {
495 wxDefaultPosition, wxDefaultSize, 0, nullptr );
496 }
497
498 m_CurrentVariantCtrl->SetToolTip( _( "Select the current variant to display and edit." ) );
499
501
502 aToolbar->Add( m_CurrentVariantCtrl );
503 };
504
506
507 // IPC/Scripting plugin control
508 // TODO (ISM): Clean this up to make IPC actions just normal tool actions to get rid of this entire
509 // control
510 auto pluginControlFactory =
511 [this]( ACTION_TOOLBAR* aToolbar )
512 {
513 bool haveApiPlugins = Pgm().GetCommonSettings()->m_Api.enable_server
515
516 if( haveApiPlugins )
517 {
518 aToolbar->AddScaledSeparator( aToolbar->GetParent() );
519 AddApiPluginTools( aToolbar );
520 }
521 };
522
524}
525
526
528{
530
531 switch( aId )
532 {
534 case ID_AUX_TOOLBAR_PCB_VIA_SIZE: m_SelViaSizeBox = nullptr; break;
535 case ID_AUX_TOOLBAR_PCB_VIA_STACK: m_SelViaStackBox = nullptr; break;
537 }
538}
539
540
542{
544 return;
545
546 if( !GetBoard() )
547 return;
548
549 wxArrayString variantNames = GetBoard()->GetVariantNamesForUI();
550
551 m_CurrentVariantCtrl->Set( variantNames );
552
553 int selectionIndex = 0;
554 wxString currentVariant = GetBoard()->GetCurrentVariant();
555
556 if( !currentVariant.IsEmpty() )
557 {
558 int foundIndex = m_CurrentVariantCtrl->FindString( currentVariant );
559
560 if( foundIndex != wxNOT_FOUND )
561 selectionIndex = foundIndex;
562 }
563
564 if( m_CurrentVariantCtrl->GetCount() > 0 )
565 m_CurrentVariantCtrl->SetSelection( selectionIndex );
566}
567
568
569void PCB_EDIT_FRAME::SetCurrentVariant( const wxString& aVariantName )
570{
571 GetBoard()->SetCurrentVariant( aVariantName );
573
574 if( PCB_DRAW_PANEL_GAL* canvas = dynamic_cast<PCB_DRAW_PANEL_GAL*>( GetCanvas() ) )
575 {
576 DS_PROXY_VIEW_ITEM* ds = canvas->GetDrawingSheet();
577
578 if( ds )
579 {
580 wxString currentVariant = GetBoard()->GetCurrentVariant();
581 wxString variantDesc = GetBoard()->GetVariantDescription( currentVariant );
582
583 ds->SetVariantName( currentVariant.ToStdString() );
584 ds->SetVariantDesc( variantDesc.ToStdString() );
585 }
586 }
587}
588
589
590void PCB_EDIT_FRAME::onVariantSelected( wxCommandEvent& aEvent )
591{
593 return;
594
595 int selection = m_CurrentVariantCtrl->GetSelection();
596
597 if( selection == wxNOT_FOUND || selection == 0 )
598 {
599 // "<Default>" selected - clear the current variant
600 SetCurrentVariant( wxEmptyString );
601 }
602 else
603 {
604 wxString selectedVariant = m_CurrentVariantCtrl->GetString( selection );
605 SetCurrentVariant( selectedVariant );
606 }
607
608 // Refresh the view and properties panel to show the new variant state
610
612 [&]( KIGFX::VIEW_ITEM* aItem ) -> int
613 {
614 if( EDA_TEXT* text = dynamic_cast<EDA_TEXT*>( aItem ) )
615 {
616 if( text->HasTextVars() )
617 {
618 text->ClearRenderCache();
619 text->ClearBoundingBoxCache();
621 }
622 }
623
624 if( PCB_FIELD* field = dynamic_cast<PCB_FIELD*>( aItem ) )
625 {
626 if( FOOTPRINT* fp = field->GetParentFootprint() )
627 {
628 if( !fp->GetVariants().empty() )
629 {
630 field->ClearRenderCache();
631 field->ClearBoundingBoxCache();
633 }
634 }
635 }
636
637 return 0;
638 } );
639
640 GetCanvas()->Refresh();
641
642 Update3DView( true, GetPcbNewSettings()->m_Display.m_Live3DRefresh );
644}
645
646
647static wxString ComboBoxUnits( EDA_UNITS aUnits, double aValue, bool aIncludeLabel = true )
648{
649 wxString text;
650 const wxChar* format;
651
652 switch( aUnits )
653 {
654 default:
655 wxASSERT_MSG( false, wxT( "Invalid unit" ) );
657 case EDA_UNITS::UNSCALED: format = wxT( "%.0f" ); break;
658 case EDA_UNITS::MM: format = wxT( "%.3f" ); break;
659 case EDA_UNITS::MILS: format = wxT( "%.2f" ); break;
660 case EDA_UNITS::INCH: format = wxT( "%.5f" ); break;
661 }
662
663 text.Printf( format, EDA_UNIT_UTILS::UI::ToUserUnit( pcbIUScale, aUnits, aValue ) );
664
665 if( aIncludeLabel )
667
668 return text;
669}
670
671
672void PCB_EDIT_FRAME::UpdateTrackWidthSelectBox( wxChoice* aTrackWidthSelectBox, bool aShowNetclass,
673 bool aShowEdit )
674{
675 if( aTrackWidthSelectBox == nullptr )
676 return;
677
678 EDA_UNITS primaryUnit;
679 EDA_UNITS secondaryUnit;
680
681 GetUnitPair( primaryUnit, secondaryUnit );
682
683 wxString msg;
684
685 aTrackWidthSelectBox->Clear();
686
687 if( aShowNetclass )
688 aTrackWidthSelectBox->Append( _( "Track: use netclass width" ) );
689
690 for( unsigned ii = 1; ii < GetDesignSettings().m_TrackWidthList.size(); ii++ )
691 {
692 int size = GetDesignSettings().m_TrackWidthList[ii];
693
694 msg.Printf( _( "Track: %s (%s)" ), ComboBoxUnits( primaryUnit, size ),
695 ComboBoxUnits( secondaryUnit, size ) );
696
697 aTrackWidthSelectBox->Append( msg );
698 }
699
700 if( aShowEdit )
701 {
702 aTrackWidthSelectBox->Append( wxT( "---" ) );
703 aTrackWidthSelectBox->Append( _( "Edit Pre-defined Sizes..." ) );
704 }
705
706 if( GetDesignSettings().GetTrackWidthIndex() >= (int) GetDesignSettings().m_TrackWidthList.size() )
708
709 // GetDesignSettings().GetTrackWidthIndex() can be < 0 if no board loaded
710 // So in this case select the first select box item available (use netclass)
711 aTrackWidthSelectBox->SetSelection( std::max( 0, GetDesignSettings().GetTrackWidthIndex() ) );
712}
713
714
715void PCB_EDIT_FRAME::UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool aShowNetclass,
716 bool aShowEdit )
717{
718 if( aViaSizeSelectBox == nullptr )
719 return;
720
721 aViaSizeSelectBox->Clear();
722
723 COMMON_TOOLS* cmnTool = m_toolManager->GetTool<COMMON_TOOLS>();
724 EDA_UNITS primaryUnit = GetUserUnits();
725 EDA_UNITS secondaryUnit = EDA_UNITS::MILS;
726
727 if( EDA_UNIT_UTILS::IsImperialUnit( primaryUnit ) )
728 secondaryUnit = cmnTool ? cmnTool->GetLastMetricUnits() : EDA_UNITS::MM;
729 else
730 secondaryUnit = cmnTool ? cmnTool->GetLastImperialUnits() : EDA_UNITS::MILS;
731
732 if( aShowNetclass )
733 aViaSizeSelectBox->Append( _( "Via: use netclass sizes" ) );
734
735 for( unsigned ii = 1; ii < GetDesignSettings().m_ViasDimensionsList.size(); ii++ )
736 {
738 wxString msg, priStr, secStr;
739
740 double diam = viaDimension.m_Diameter;
741 double hole = viaDimension.m_Drill;
742
743 if( hole > 0 )
744 {
745 priStr = ComboBoxUnits( primaryUnit, diam, false ) + wxT( " / " )
746 + ComboBoxUnits( primaryUnit, hole, true );
747 secStr = ComboBoxUnits( secondaryUnit, diam, false ) + wxT( " / " )
748 + ComboBoxUnits( secondaryUnit, hole, true );
749 }
750 else
751 {
752 priStr = ComboBoxUnits( primaryUnit, diam, true );
753 secStr = ComboBoxUnits( secondaryUnit, diam, true );
754 }
755
756 msg.Printf( _( "Via: %s (%s)" ), priStr, secStr );
757
758 aViaSizeSelectBox->Append( msg );
759 }
760
761 if( aShowEdit )
762 {
763 aViaSizeSelectBox->Append( wxT( "---" ) );
764 aViaSizeSelectBox->Append( _( "Edit Pre-defined Sizes..." ) );
765 }
766
767 if( GetDesignSettings().GetViaSizeIndex() >= (int) GetDesignSettings().m_ViasDimensionsList.size() )
769
770 // GetDesignSettings().GetViaSizeIndex() can be < 0 if no board loaded
771 // So in this case select the first select box item available (use netclass)
772 aViaSizeSelectBox->SetSelection( std::max( 0, GetDesignSettings().GetViaSizeIndex() ) );
773}
774
775
776void PCB_EDIT_FRAME::UpdateViaStackSelectBox( wxChoice* aViaStackSelectBox )
777{
778 if( aViaStackSelectBox == nullptr )
779 return;
780
781 aViaStackSelectBox->Clear();
782
783 const std::vector<VIA_STACK_PRESET>& presets = GetDesignSettings().m_ViaStackPresets;
784
785 if( presets.empty() )
786 aViaStackSelectBox->Append( _( "Microvia stack: none defined" ) );
787
788 for( const VIA_STACK_PRESET& preset : presets )
789 aViaStackSelectBox->Append( wxString::Format( _( "Microvia stack: %s" ), preset.m_Name ) );
790
791 aViaStackSelectBox->Append( wxT( "---" ) );
792 aViaStackSelectBox->Append( _( "Edit Pre-defined Microvia Stacks..." ) );
793
795
796 if( idx < 0 || idx >= (int) presets.size() )
797 {
798 idx = 0;
800 }
801
802 aViaStackSelectBox->SetSelection( presets.empty() ? 0 : idx );
803}
804
805
806void PCB_EDIT_FRAME::ReCreateLayerBox( bool aForceResizeToolbar )
807{
808 if( m_SelLayerBox == nullptr || m_tbTopAux == nullptr )
809 return;
810
811 m_SelLayerBox->SetToolTip( _( "+/- to switch" ) );
812 m_SelLayerBox->Resync();
813
814 if( aForceResizeToolbar )
816}
817
818
820{
822 wxAuiPaneInfo& layersManager = m_auimgr.GetPane( AppearancePanelName() );
823 wxAuiPaneInfo& selectionFilter = m_auimgr.GetPane( "SelectionFilter" );
824
825 // show auxiliary Vertical layers and visibility manager toolbar
826 m_ShowLayerManagerTools = layersManager.IsShown();
827
829
830 layersManager.Show( m_ShowLayerManagerTools );
831 selectionFilter.Show( m_ShowLayerManagerTools );
832
834 {
835 SetAuiPaneSize( m_auimgr, layersManager, settings->m_AuiPanels.right_panel_width, -1 );
836 }
837 else
838 {
839 settings->m_AuiPanels.right_panel_width = m_appearancePanel->GetSize().x;
840 m_auimgr.Update();
841 }
842}
843
844
846{
848 wxAuiPaneInfo& netInspectorPanel = m_auimgr.GetPane( NetInspectorPanelName() );
849
850 m_ShowNetInspector = netInspectorPanel.IsShown();
851
853
854 netInspectorPanel.Show( m_ShowNetInspector );
855
857 {
858 SetAuiPaneSize( m_auimgr, netInspectorPanel, settings->m_AuiPanels.net_inspector_width, -1 );
859 m_netInspectorPanel->OnShowPanel();
860 }
861 else
862 {
863 m_netInspectorPanel->SaveSettings();
864 settings->m_AuiPanels.net_inspector_width = m_netInspectorPanel->GetSize().x;
865 m_auimgr.Update();
866 }
867}
868
869
871{
873
874 // Ensure m_ShowSearch is up to date (the pane can be closed outside the menu)
875 m_ShowSearch = m_auimgr.GetPane( SearchPaneName() ).IsShown();
876
878
879 wxAuiPaneInfo& searchPaneInfo = m_auimgr.GetPane( SearchPaneName() );
880 searchPaneInfo.Show( m_ShowSearch );
881
882 if( m_ShowSearch )
883 {
884 searchPaneInfo.Direction( settings->m_AuiPanels.search_panel_dock_direction );
885
886 if( settings->m_AuiPanels.search_panel_dock_direction == wxAUI_DOCK_TOP
887 || settings->m_AuiPanels.search_panel_dock_direction == wxAUI_DOCK_BOTTOM )
888 {
889 SetAuiPaneSize( m_auimgr, searchPaneInfo,
890 -1, settings->m_AuiPanels.search_panel_height );
891 }
892 else if( settings->m_AuiPanels.search_panel_dock_direction == wxAUI_DOCK_LEFT
893 || settings->m_AuiPanels.search_panel_dock_direction == wxAUI_DOCK_RIGHT )
894 {
895 SetAuiPaneSize( m_auimgr, searchPaneInfo,
896 settings->m_AuiPanels.search_panel_width, -1 );
897 }
898 m_searchPane->FocusSearch();
899 m_searchPane->RefreshSearch();
900 }
901 else
902 {
903 settings->m_AuiPanels.search_panel_height = m_searchPane->GetSize().y;
904 settings->m_AuiPanels.search_panel_width = m_searchPane->GetSize().x;
905 settings->m_AuiPanels.search_panel_dock_direction = searchPaneInfo.dock_direction;
906 m_auimgr.Update();
907 GetCanvas()->SetFocus();
908 }
909}
910
911
918
919
920void PCB_EDIT_FRAME::OnUpdateSelectTrackWidth( wxUpdateUIEvent& aEvent )
921{
922 if( aEvent.GetId() == ID_AUX_TOOLBAR_PCB_TRACK_WIDTH )
923 {
925 int sel;
926
927 if( bds.UseCustomTrackViaSize() )
928 sel = wxNOT_FOUND;
929 else
930 // if GetTrackWidthIndex() < 0, display the "use netclass" option
931 sel = std::max( 0, bds.GetTrackWidthIndex() );
932
933 if( m_SelTrackWidthBox->GetSelection() != sel )
934 m_SelTrackWidthBox->SetSelection( sel );
935 }
936}
937
938
939void PCB_EDIT_FRAME::OnUpdateSelectViaSize( wxUpdateUIEvent& aEvent )
940{
941 if( aEvent.GetId() == ID_AUX_TOOLBAR_PCB_VIA_SIZE )
942 {
944 int sel = 0;
945
946 if( bds.UseCustomTrackViaSize() )
947 sel = wxNOT_FOUND;
948 else
949 // if GetViaSizeIndex() < 0, display the "use netclass" option
950 sel = std::max( 0, bds.GetViaSizeIndex() );
951
952 if( m_SelViaSizeBox->GetSelection() != sel )
953 m_SelViaSizeBox->SetSelection( sel );
954 }
955}
956
957
959{
961
962 wxCHECK( cfg, /* void */ );
963
964 wxAuiPaneInfo& db_library_pane = m_auimgr.GetPane( DesignBlocksPaneName() );
965
966 db_library_pane.Show( !db_library_pane.IsShown() );
967
968 if( db_library_pane.IsShown() )
969 {
970 if( db_library_pane.IsFloating() )
971 {
972 db_library_pane.FloatingSize( cfg->m_AuiPanels.design_blocks_panel_float_width,
974 m_auimgr.Update();
975 }
976 else
977 {
978 // SetAuiPaneSize also updates m_auimgr
980 }
981 }
982 else
983 {
984 if( db_library_pane.IsFloating() )
985 {
986 cfg->m_AuiPanels.design_blocks_panel_float_width = db_library_pane.floating_size.x;
987 cfg->m_AuiPanels.design_blocks_panel_float_height = db_library_pane.floating_size.y;
988 }
989 else
990 {
992 }
993
994 m_auimgr.Update();
995 }
996}
constexpr EDA_IU_SCALE pcbIUScale
Definition base_units.h:128
KIFACE_BASE & Kiface()
Global KIFACE_BASE "get" accessor.
static TOOL_ACTION gridProperties
Definition actions.h:196
static TOOL_ACTION updatePcbFromSchematic
Definition actions.h:260
static TOOL_ACTION toggleGrid
Definition actions.h:194
static TOOL_ACTION zoomRedraw
Definition actions.h:128
static TOOL_ACTION millimetersUnits
Definition actions.h:202
static TOOL_ACTION show3DViewer
Definition actions.h:254
static TOOL_ACTION cursorSmallCrosshairs
Definition actions.h:148
static TOOL_ACTION zoomOutCenter
Definition actions.h:132
static TOOL_ACTION togglePolarCoords
Definition actions.h:205
static TOOL_ACTION selectSetLasso
Definition actions.h:217
static TOOL_ACTION selectSetRect
Set lasso selection mode.
Definition actions.h:216
static TOOL_ACTION group
Definition actions.h:235
static TOOL_ACTION pointEditorArcKeepCenter
Definition actions.h:272
static TOOL_ACTION milsUnits
Definition actions.h:201
static TOOL_ACTION ungroup
Definition actions.h:236
static TOOL_ACTION toggleBoundingBoxes
Definition actions.h:153
static TOOL_ACTION plot
Definition actions.h:61
static TOOL_ACTION pointEditorArcKeepRadius
Definition actions.h:274
static TOOL_ACTION open
Definition actions.h:53
static TOOL_ACTION pageSettings
Definition actions.h:59
static TOOL_ACTION undo
Definition actions.h:71
static TOOL_ACTION inchesUnits
Definition actions.h:200
static TOOL_ACTION highContrastMode
Definition actions.h:151
static TOOL_ACTION gridOrigin
Definition actions.h:197
static TOOL_ACTION measureTool
Definition actions.h:248
static TOOL_ACTION save
Definition actions.h:54
static TOOL_ACTION zoomFitScreen
Definition actions.h:138
static TOOL_ACTION redo
Definition actions.h:72
static TOOL_ACTION deleteTool
Definition actions.h:82
static TOOL_ACTION zoomTool
Definition actions.h:142
static TOOL_ACTION cursor45Crosshairs
Definition actions.h:150
static TOOL_ACTION showFootprintEditor
Definition actions.h:258
static TOOL_ACTION print
Definition actions.h:60
static TOOL_ACTION showProperties
Definition actions.h:262
static TOOL_ACTION doNew
Definition actions.h:50
static TOOL_ACTION zoomFitObjects
Definition actions.h:139
static TOOL_ACTION zoomInCenter
Definition actions.h:131
static TOOL_ACTION gridSetOrigin
Definition actions.h:191
static TOOL_ACTION showFootprintBrowser
Definition actions.h:257
static TOOL_ACTION toggleGridOverrides
Definition actions.h:195
static TOOL_ACTION pointEditorArcKeepEndpoint
Definition actions.h:273
static TOOL_ACTION cursorFullCrosshairs
Definition actions.h:149
static TOOL_ACTION find
Definition actions.h:113
static constexpr bool CHECK
static ACTION_TOOLBAR_CONTROL gridSelect
static ACTION_TOOLBAR_CONTROL overrideLocks
static ACTION_TOOLBAR_CONTROL layerSelector
static ACTION_TOOLBAR_CONTROL zoomSelect
static ACTION_TOOLBAR_CONTROL ipcScripting
Class to hold basic information about controls that can be added to the toolbars.
Define the structure of a toolbar with buttons that invoke ACTIONs.
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
std::vector< const PLUGIN_ACTION * > GetActionsForScope(PLUGIN_ACTION_SCOPE aScope)
Container for design settings for a BOARD object.
void UseCustomTrackViaSize(bool aEnabled)
Enables/disables custom track/via size settings.
void SetViaSizeIndex(int aIndex)
Set the current via size list index to aIndex.
void SetViaStackIndex(int aIndex)
Set the current via stack preset index to aIndex.
void SetTrackWidthIndex(int aIndex)
Set the current track width list index to aIndex.
std::vector< int > m_TrackWidthList
std::vector< VIA_STACK_PRESET > m_ViaStackPresets
std::vector< VIA_DIMENSION > m_ViasDimensionsList
FOOTPRINT * GetParentFootprint() const
void SetCurrentVariant(const wxString &aVariant)
Definition board.cpp:3173
wxArrayString GetVariantNamesForUI() const
Return the variant names for UI display.
Definition board.cpp:3363
wxString GetVariantDescription(const wxString &aVariantName) const
Definition board.cpp:3327
wxString GetCurrentVariant() const
Definition board.h:529
COLOR4D GetColor(int aLayer) const
APPEARANCE m_Appearance
Handles action that are shared between different applications.
EDA_UNITS GetLastImperialUnits()
EDA_UNITS GetLastMetricUnits()
void SetVariantName(const std::string &aVariant)
Set the current variant name and description to be shown on the drawing sheet.
void SetVariantDesc(const std::string &aVariantDesc)
virtual void UpdateToolbarControlSizes()
Update the sizes of any controls in the toolbars of the frame.
void RegisterCustomToolbarControlFactory(const ACTION_TOOLBAR_CONTROL &aControlDesc, const ACTION_TOOLBAR_CONTROL_FACTORY &aControlFactory)
Register a creation factory for toolbar controls that are present in this frame.
wxAuiManager m_auimgr
ACTION_TOOLBAR * m_tbTopAux
static const wxString AppearancePanelName()
NET_INSPECTOR_PANEL * m_netInspectorPanel
virtual void AddApiPluginTools(ACTION_TOOLBAR *aToolbar)
Append actions from API plugins to the given toolbar.
static const wxString NetInspectorPanelName()
void GetUnitPair(EDA_UNITS &aPrimaryUnit, EDA_UNITS &aSecondaryUnits) override
Get the pair or units in current use.
SEARCH_PANE * m_searchPane
static const wxString DesignBlocksPaneName()
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=nullptr) override
void SetFocus() override
A mix-in class (via multiple inheritance) that handles texts such as labels, parts,...
Definition eda_text.h:94
static const TOOL_EVENT SelectedItemsModified
Selected item had a property changed (except movement)
Definition actions.h:352
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:101
An abstract base class for deriving all objects that can be added to a VIEW.
Definition view_item.h:82
void UpdateAllItemsConditionally(int aUpdateFlags, std::function< bool(VIEW_ITEM *)> aCondition)
Update items in the view according to the given flags and condition.
Definition view.cpp:1759
static wxBitmapBundle CreateLayerPairIcon(const COLOR4D &aTopColor, const COLOR4D &aBottomColor, int aDefSize=24)
Create a layer pair "side-by-side swatch" icon.
AUI_PANELS m_AuiPanels
static TOOL_ACTION lineModeFree
Unconstrained angle mode (icon lines_any)
static TOOL_ACTION drawRuleArea
static TOOL_ACTION drawBezier
static TOOL_ACTION placeText
static TOOL_ACTION zonesManager
static TOOL_ACTION drawOrthogonalDimension
static TOOL_ACTION drawRectangle
static TOOL_ACTION padDisplayMode
static TOOL_ACTION placeReferenceImage
static TOOL_ACTION routerSettingsDialog
Activation of the Push and Shove settings dialogs.
static TOOL_ACTION showRatsnest
static TOOL_ACTION zoneFillAll
static TOOL_ACTION showLayersManager
static TOOL_ACTION drawArcStartEndCenter
static TOOL_ACTION toggleNetHighlight
static TOOL_ACTION addConstraintVertical
static TOOL_ACTION drawCircle
static TOOL_ACTION mirrorH
Mirroring of selected items.
static TOOL_ACTION routeDiffPair
Activation of the Push and Shove router (differential pair mode)
static TOOL_ACTION tuneDiffPair
static TOOL_ACTION drawEllipseArc
static TOOL_ACTION autoTrackWidth
static TOOL_ACTION drawTable
static TOOL_ACTION drawTextBox
static TOOL_ACTION addConstraintPerpendicular
static TOOL_ACTION routerHighlightMode
Actions to enable switching modes via hotkey assignments.
static TOOL_ACTION routerWalkaroundMode
static TOOL_ACTION routerShoveMode
static TOOL_ACTION drawPolygon
static TOOL_ACTION drawViaStitchArea
static TOOL_ACTION zoneDisplayFilled
static TOOL_ACTION drawArcStartDirEnd
static TOOL_ACTION drawRadialDimension
static TOOL_ACTION tuneSingleTrack
static TOOL_ACTION viaDisplayMode
static TOOL_ACTION drawLeader
static TOOL_ACTION addConstraintAngular
static TOOL_ACTION lineMode45
45-degree-or-orthogonal mode (icon hv45mode)
static TOOL_ACTION addConstraintArcAngle
static TOOL_ACTION drillOrigin
static TOOL_ACTION tuneSkew
static TOOL_ACTION addConstraintHorizontal
static TOOL_ACTION trackDisplayMode
static TOOL_ACTION selectLayerPair
static TOOL_ACTION drawEllipse
static TOOL_ACTION placeSubGrid
Grid Item.
static TOOL_ACTION zoneDisplayTriangulated
static TOOL_ACTION zoneDisplayFractured
static TOOL_ACTION addConstraintCollinear
static TOOL_ACTION drawVia
static TOOL_ACTION runDRC
static TOOL_ACTION importNetlist
static TOOL_ACTION addConstraintEqualRadius
static TOOL_ACTION addConstraintTangent
static TOOL_ACTION boardSetup
static TOOL_ACTION showEeschema
static TOOL_ACTION drawCenterDimension
static TOOL_ACTION drawArcCenter
static TOOL_ACTION zoneUnfillAll
static TOOL_ACTION drawArcTangent
static TOOL_ACTION editFootprintFields
static TOOL_ACTION addConstraintFixedLength
static TOOL_ACTION lineMode90
90-degree-only mode (icon lines90)
static TOOL_ACTION zoneDisplayOutline
static TOOL_ACTION ratsnestLineMode
static TOOL_ACTION toggleAutoConstraints
Toggle authoring constraints automatically while drawing.
static TOOL_ACTION placeBarcode
static TOOL_ACTION placePoint
static TOOL_ACTION addConstraintSymmetric
static TOOL_ACTION addConstraintFixedPosition
Ground a point, and the cluster holding it.
static TOOL_ACTION mirrorV
static TOOL_ACTION unlock
static TOOL_ACTION addConstraintPointOnLine
static TOOL_ACTION placeFootprint
static TOOL_ACTION routeSingleTrack
Activation of the Push and Shove router.
static TOOL_ACTION showDiffPhaseSkew
Display of phase skew between differential pair tracks.
static TOOL_ACTION addConstraintCoincident
static TOOL_ACTION drawLine
static TOOL_ACTION localRatsnestTool
static TOOL_ACTION placeViaStack
static TOOL_ACTION rotateCw
Rotation of selected objects.
static TOOL_ACTION rotateCcw
static TOOL_ACTION addConstraintParallel
static TOOL_ACTION drawAlignedDimension
static TOOL_ACTION addConstraintFixedRadius
static TOOL_ACTION addConstraintEqualLength
static TOOL_ACTION drawArcStartEndMid
static TOOL_ACTION drawZone
static TOOL_ACTION addConstraintMidpoint
static TOOL_ACTION lock
static TOOL_ACTION addConstraintConcentric
static ACTION_TOOLBAR_CONTROL trackWidth
static ACTION_TOOLBAR_CONTROL viaDiameter
static ACTION_TOOLBAR_CONTROL viaStack
static ACTION_TOOLBAR_CONTROL currentVariant
COLOR_SETTINGS * GetColorSettings(bool aForceRefresh=false) const override
Helper to retrieve the current color settings.
PCB_LAYER_BOX_SELECTOR * m_SelLayerBox
void configureToolbars() override
void ClearToolbarControl(int aId) override
APPEARANCE_CONTROLS * m_appearancePanel
PCBNEW_SETTINGS * GetPcbNewSettings() const
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
BOARD * GetBoard() const
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Return the BOARD_DESIGN_SETTINGS for the open project.
virtual void Update3DView(bool aMarkDirty, bool aRefresh, const wxString *aTitle=nullptr)
Update the 3D view, if the viewer is opened by this frame.
virtual KIGFX::PCB_VIEW * GetView() const override
Return a pointer to the KIGFX::VIEW instance used in the panel.
void OnUpdateSelectTrackWidth(wxUpdateUIEvent &aEvent)
void UpdateVariantSelectionCtrl()
Update the variant selection dropdown with the current board's variant names.
void UpdateTrackWidthSelectBox(wxChoice *aTrackWidthSelectBox, bool aShowNetclass, bool aShowEdit)
void UpdateViaSizeSelectBox(wxChoice *aViaSizeSelectBox, bool aShowNetclass, bool aShowEdit)
void SetCurrentVariant(const wxString &aVariantName)
Set the current variant on the board and update the drawing sheet's cached variant name and descripti...
LAYER_TOOLBAR_ICON_VALUES m_prevIconVal
void ClearToolbarControl(int aId) override
void ReCreateLayerBox(bool aForceResizeToolbar=true)
Recreate the layer box by clearing the old list and building a new one from the new layer names and c...
void PrepareLayerIndicator(bool aForceRebuild=false)
wxChoice * m_CurrentVariantCtrl
void UpdateProperties() override
PLUGIN_ACTION_SCOPE PluginActionScope() const override
void ReCreateAuxiliaryToolbar() override
void ToggleLibraryTree() override
void OnUpdateSelectViaSize(wxUpdateUIEvent &aEvent)
wxChoice * m_SelViaSizeBox
void onVariantSelected(wxCommandEvent &aEvent)
Event handler for variant selection changes in the toolbar.
void configureToolbars() override
void UpdateViaStackSelectBox(wxChoice *aViaStackSelectBox)
Fill the via stack preset selector with the board's defined presets plus an edit entry.
PCB_DESIGN_BLOCK_PANE * m_designBlocksPane
wxChoice * m_SelViaStackBox
static const wxString SearchPaneName()
wxChoice * m_SelTrackWidthBox
std::optional< TOOLBAR_CONFIGURATION > DefaultToolbarConfig(TOOLBAR_LOC aToolbar) override
Get the default tools to show on the specified canvas toolbar.
The selection tool: currently supports:
virtual COMMON_SETTINGS * GetCommonSettings() const
Definition pgm_base.cpp:546
virtual API_PLUGIN_MANAGER & GetPluginManager() const
Definition pgm_base.h:139
TOOL_MANAGER * m_toolManager
Master controller class:
T * GetTool()
Return the tool of given type or nullptr if there is no such tool registered.
EDA_UNITS GetUserUnits() const
#define _(s)
EDA_UNITS
Definition eda_units.h:44
@ FRAME_PCB_EDITOR
Definition frame_type.h:38
This file contains miscellaneous commonly used macros and functions.
#define KI_FALLTHROUGH
The KI_FALLTHROUGH macro is to be used when switch statement cases should purposely fallthrough from ...
Definition macros.h:79
KICOMMON_API double ToUserUnit(const EDA_IU_SCALE &aIuScale, EDA_UNITS aUnit, double aValue)
Convert aValue in internal units to the appropriate user units defined by aUnit.
KICOMMON_API wxString GetText(EDA_UNITS aUnits, EDA_DATA_TYPE aType=EDA_DATA_TYPE::DISTANCE)
Get the units string for a given units type.
KICOMMON_API bool IsImperialUnit(EDA_UNITS aUnit)
Definition eda_units.cpp:43
@ REPAINT
Item needs to be redrawn.
Definition view_item.h:54
@ GEOMETRY
Position or shape has changed.
Definition view_item.h:51
@ ID_AUX_TOOLBAR_PCB_VARIANT_SELECT
Definition pcbnew_id.h:20
@ ID_AUX_TOOLBAR_PCB_VIA_SIZE
Definition pcbnew_id.h:17
@ ID_AUX_TOOLBAR_PCB_VIA_STACK
Definition pcbnew_id.h:19
@ ID_AUX_TOOLBAR_PCB_TRACK_WIDTH
Definition pcbnew_id.h:18
PGM_BASE & Pgm()
The global program "get" accessor.
see class PGM_BASE
Container to handle a stock of specific vias each with unique diameter and drill sizes in the BOARD c...
A named microvia stack definition, chosen while routing instead of entering the values each time.
@ RIGHT
Toolbar on the right side of the canvas.
@ LEFT
Toolbar on the left side of the canvas.
@ TOP_AUX
Toolbar on the top of the canvas.
@ TOP_MAIN
Toolbar on the top of the canvas.
static wxBitmapBundle LayerPairBitmap
static wxString ComboBoxUnits(EDA_UNITS aUnits, double aValue, bool aIncludeLabel=true)
void SetAuiPaneSize(wxAuiManager &aManager, wxAuiPaneInfo &aPane, int aWidth, int aHeight)
Sets the size of an AUI pane, working around http://trac.wxwidgets.org/ticket/13180.