KiCad PCB EDA Suite
pcb_base_frame.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) 2018 Jean-Pierre Charras, jean-pierre.charras@ujf-grenoble.fr
5  * Copyright (C) 2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
6  * Copyright (C) 2011 Wayne Stambaugh <stambaughw@verizon.net>
7  * Copyright (C) 1992-2020 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, you may find one here:
21  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22  * or you may search the http://www.gnu.org website for the version 2 license,
23  * or you may write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25  */
26 
27 #include <fctsys.h>
28 #include <kiface_i.h>
29 #include <eda_base_frame.h>
30 #include <confirm.h>
31 #include <kiface_i.h>
32 #include <dialog_helpers.h>
33 #include <pcb_base_frame.h>
34 #include <base_units.h>
35 #include <msgpanel.h>
36 #include <pgm_base.h>
37 #include <3d_viewer/eda_3d_viewer.h> // To include VIEWER3D_FRAMENAME
38 #include <pcbnew.h>
39 #include <fp_lib_table.h>
40 #include <pcbnew_id.h>
41 #include <class_board.h>
42 #include <class_track.h>
43 #include <class_module.h>
44 #include <class_drawsegment.h>
45 #include <collectors.h>
46 #include <pcb_draw_panel_gal.h>
47 #include <pcb_view.h>
48 #include <math/vector2d.h>
49 #include <trigo.h>
50 #include <pcb_painter.h>
52 #include <pcbnew_settings.h>
53 #include <tool/tool_manager.h>
54 #include <tool/tool_dispatcher.h>
55 #include <tools/pcb_actions.h>
56 
57 
58 BEGIN_EVENT_TABLE( PCB_BASE_FRAME, EDA_DRAW_FRAME )
63 
66 END_EVENT_TABLE()
67 
68 
69 PCB_BASE_FRAME::PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType,
70  const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize,
71  long aStyle, const wxString & aFrameName ) :
72  EDA_DRAW_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ),
73  m_Pcb( nullptr )
74 {
75  m_UserGridSize = wxPoint( (int) 10 * IU_PER_MILS, (int) 10 * IU_PER_MILS );
76 
77  m_FastGrid1 = 0;
78  m_FastGrid2 = 0;
79 
80  m_zoomLevelCoeff = 11.0 * IU_PER_MILS; // Adjusted to roughly displays zoom level = 1
81  // when the screen shows a 1:1 image
82  // obviously depends on the monitor,
83  // but this is an acceptable value
84 
85  m_Settings = static_cast<PCBNEW_SETTINGS*>( Kiface().KifaceSettings() );
86 }
87 
88 
90 {
91  // Ensure m_canvasType is up to date, to save it in config
93 
94  delete m_Pcb;
95 }
96 
97 
99 {
100  return dynamic_cast<EDA_3D_VIEWER*>( FindWindowByName( QUALIFIED_VIEWER3D_FRAMENAME( this ) ) );
101 }
102 
103 
104 void PCB_BASE_FRAME::Update3DView( bool aForceReload, const wxString* aTitle )
105 {
106  EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame();
107 
108  if( draw3DFrame )
109  {
110  if( aTitle )
111  draw3DFrame->SetTitle( *aTitle );
112 
113  draw3DFrame->NewDisplay( aForceReload );
114  }
115 }
116 
117 
119 {
120  // This is a lazy loading function, it loads the project specific table when
121  // that table is asked for, not before.
122 
124 
125  // its gotta be NULL or a FP_LIB_TABLE, or a bug.
126  wxASSERT( !tbl || tbl->Type() == FP_LIB_TABLE_T );
127 
128  if( !tbl )
129  {
130  // Stack the project specific FP_LIB_TABLE overlay on top of the global table.
131  // ~FP_LIB_TABLE() will not touch the fallback table, so multiple projects may
132  // stack this way, all using the same global fallback table.
133  tbl = new FP_LIB_TABLE( &GFootprintTable );
134 
135  SetElem( ELEM_FPTBL, tbl );
136 
137  wxString projectFpLibTableFileName = FootprintLibTblName();
138 
139  try
140  {
141  tbl->Load( projectFpLibTableFileName );
142  }
143  catch( const IO_ERROR& ioe )
144  {
145  DisplayErrorMessage( nullptr, _( "Error loading project footprint libraries" ),
146  ioe.What() );
147  }
148  }
149 
150  return tbl;
151 }
152 
153 
155 {
156  if( m_Pcb != aBoard )
157  {
158  delete m_Pcb;
159  m_Pcb = aBoard;
161  }
162 }
163 
164 
166 {
167  if( module )
168  {
169  GetBoard()->Add( module, ADD_MODE::APPEND );
170 
171  module->SetFlags( IS_NEW );
172  module->SetPosition( wxPoint( 0, 0 ) ); // cursor in GAL may not be initialized yet
173 
174  // Put it on FRONT layer (note that it might be stored flipped if the lib is an archive
175  // built from a board)
176  if( module->IsFlipped() )
177  module->Flip( module->GetPosition(), m_Settings->m_FlipLeftRight );
178 
179  // Place it in orientation 0 even if it is not saved with orientation 0 in lib (note that
180  // it might be stored in another orientation if the lib is an archive built from a board)
181  module->SetOrientation( 0 );
182  }
183 }
184 
185 
187 {
188  static KIID lastBrightenedItemID( niluuid );
189 
190  BOARD_ITEM* lastItem = GetBoard()->GetItem( lastBrightenedItemID );
191 
192  if( lastItem && lastItem != aItem )
193  {
194  lastItem->ClearBrightened();
195 
196  if( lastItem->Type() == PCB_MODULE_T )
197  {
198  static_cast<MODULE*>( lastItem )->RunOnChildren( [&] ( BOARD_ITEM* child )
199  {
200  child->ClearBrightened();
201  });
202  }
203 
204  GetCanvas()->GetView()->Update( lastItem );
205  lastBrightenedItemID = niluuid;
206  GetCanvas()->Refresh();
207  }
208 
209  if( aItem )
210  {
211  aItem->SetBrightened();
212 
213  if( aItem->Type() == PCB_MODULE_T )
214  {
215  static_cast<MODULE*>( aItem )->RunOnChildren( [&] ( BOARD_ITEM* child )
216  {
217  child->SetBrightened();
218  });
219  }
220 
221  GetCanvas()->GetView()->Update( aItem );
222  lastBrightenedItemID = aItem->m_Uuid;
223  FocusOnLocation( aItem->GetPosition() );
224  GetCanvas()->Refresh();
225  }
226 }
227 
228 
229 void PCB_BASE_FRAME::SetPageSettings( const PAGE_INFO& aPageSettings )
230 {
231  wxASSERT( m_Pcb );
232  m_Pcb->SetPageSettings( aPageSettings );
233 
234  if( GetScreen() )
235  GetScreen()->InitDataPoints( aPageSettings.GetSizeIU() );
236 }
237 
238 
240 {
241  wxASSERT( m_Pcb );
242  return m_Pcb->GetPageSettings();
243 }
244 
245 
246 const wxSize PCB_BASE_FRAME::GetPageSizeIU() const
247 {
248  wxASSERT( m_Pcb );
249 
250  // this function is only needed because EDA_DRAW_FRAME is not compiled
251  // with either -DPCBNEW or -DEESCHEMA, so the virtual is used to route
252  // into an application specific source file.
253  return m_Pcb->GetPageSettings().GetSizeIU();
254 }
255 
256 
258 {
259  wxASSERT( m_Pcb );
260  return m_Pcb->GetAuxOrigin();
261 }
262 
263 
265 {
266  wxASSERT( m_Pcb );
267  m_Pcb->SetAuxOrigin( aPoint );
268 }
269 
270 
272 {
273  wxASSERT( m_Pcb );
274  return m_Pcb->GetGridOrigin();
275 }
276 
277 
279 {
280  wxASSERT( m_Pcb );
281  m_Pcb->SetGridOrigin( aPoint );
282 }
283 
284 
286 {
287  wxASSERT( m_Pcb );
288  return m_Pcb->GetTitleBlock();
289 }
290 
291 
292 void PCB_BASE_FRAME::SetTitleBlock( const TITLE_BLOCK& aTitleBlock )
293 {
294  wxASSERT( m_Pcb );
295  m_Pcb->SetTitleBlock( aTitleBlock );
296 }
297 
298 
300 {
301  wxASSERT( m_Pcb );
302  return m_Pcb->GetDesignSettings();
303 }
304 
305 
307 {
308  wxASSERT( m_Pcb );
309  m_Pcb->SetDesignSettings( aSettings );
310 }
311 
312 
314 {
315  return Pgm().GetSettingsManager().GetColorSettings();
316 }
317 
318 
320 {
321  m_drawBgColor= aColor;
322  m_auimgr.Update();
323 }
324 
325 
327 {
328  wxASSERT( m_Pcb );
329  return m_Pcb->GetZoneSettings();
330 }
331 
332 
334 {
335  wxASSERT( m_Pcb );
336  m_Pcb->SetZoneSettings( aSettings );
337 }
338 
339 
341 {
342  wxASSERT( m_Pcb );
343  return m_Pcb->GetPlotOptions();
344 }
345 
346 
348 {
349  wxASSERT( m_Pcb );
350  m_Pcb->SetPlotOptions( aSettings );
351 }
352 
353 
354 EDA_RECT PCB_BASE_FRAME::GetBoardBoundingBox( bool aBoardEdgesOnly ) const
355 {
356  wxASSERT( m_Pcb );
357 
358  EDA_RECT area = aBoardEdgesOnly ? m_Pcb->GetBoardEdgesBoundingBox() : m_Pcb->GetBoundingBox();
359 
360  if( area.GetWidth() == 0 && area.GetHeight() == 0 )
361  {
362  wxSize pageSize = GetPageSizeIU();
363 
365  {
366  area.SetOrigin( 0, 0 );
367  area.SetEnd( pageSize.x, pageSize.y );
368  }
369  else
370  {
371  area.SetOrigin( -pageSize.x / 2, -pageSize.y / 2 );
372  area.SetEnd( pageSize.x / 2, pageSize.y / 2 );
373  }
374  }
375 
376  return area;
377 }
378 
379 
380 // Virtual function
382 {
383 }
384 
385 
387 {
388  // call my base class
390 
391  // tooltips in toolbars
393 
394  // status bar
395  UpdateMsgPanel();
396 }
397 
398 
400 {
401  EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame();
402 
403  if( !draw3DFrame )
404  draw3DFrame = new EDA_3D_VIEWER( &Kiway(), this, _( "3D Viewer" ) );
405 
406  // Raising the window does not show the window on Windows if iconized. This should work
407  // on any platform.
408  if( draw3DFrame->IsIconized() )
409  draw3DFrame->Iconize( false );
410 
411  draw3DFrame->Raise();
412  draw3DFrame->Show( true );
413 
414  // Raising the window does not set the focus on Linux. This should work on any platform.
415  if( wxWindow::FindFocus() != draw3DFrame )
416  draw3DFrame->SetFocus();
417 
418  return draw3DFrame;
419 }
420 
421 
422 // Note: virtual, overridden in PCB_EDIT_FRAME;
424 {
425  PCB_LAYER_ID preslayer = GetActiveLayer();
426  auto& displ_opts = GetDisplayOptions();
427 
428  // Check if the specified layer matches the present layer
429  if( layer == preslayer )
430  return;
431 
432  // Copper layers cannot be selected unconditionally; how many of those layers are
433  // currently enabled needs to be checked.
434  if( IsCopperLayer( layer ) )
435  {
436  // If only one copper layer is enabled, the only such layer that can be selected to
437  // is the "Copper" layer (so the selection of any other copper layer is disregarded).
438  if( m_Pcb->GetCopperLayerCount() < 2 )
439  {
440  if( layer != B_Cu )
441  return;
442  }
443 
444  // If more than one copper layer is enabled, the "Copper" and "Component" layers
445  // can be selected, but the total number of copper layers determines which internal
446  // layers are also capable of being selected.
447  else
448  {
449  if( layer != B_Cu && layer != F_Cu && layer >= ( m_Pcb->GetCopperLayerCount() - 1 ) )
450  return;
451  }
452  }
453 
454  // Is yet more checking required? E.g. when the layer to be selected is a non-copper
455  // layer, or when switching between a copper layer and a non-copper layer, or vice-versa?
456  // ...
457 
458  SetActiveLayer( layer );
459 
460  if( displ_opts.m_ContrastModeDisplay )
461  GetCanvas()->Refresh();
462 }
463 
464 
465 void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent )
466 {
467  auto displ_opts = GetDisplayOptions();
468 
469  displ_opts.m_DisplayPadFill = !displ_opts.m_DisplayPadFill;
470 
471  if( GetCanvas() )
472  {
473  // Apply new display options to the GAL canvas
474  auto view = static_cast<KIGFX::PCB_VIEW*>( GetCanvas()->GetView() );
475  view->UpdateDisplayOptions( displ_opts );
476 
477  // Update pads
478  BOARD* board = GetBoard();
479  for( auto module : board->Modules() )
480  {
481  for( auto pad : module->Pads() )
482  view->Update( pad, KIGFX::GEOMETRY );
483  }
484  }
485 
486  SetDisplayOptions( displ_opts );
487  GetCanvas()->Refresh();
488 }
489 
490 
491 void PCB_BASE_FRAME::OnToggleGraphicDrawMode( wxCommandEvent& aEvent )
492 {
493  auto displ_opts = GetDisplayOptions();
494  displ_opts.m_DisplayDrawItemsFill = !displ_opts.m_DisplayDrawItemsFill;
495  SetDisplayOptions( displ_opts );
496  GetCanvas()->Refresh();
497 }
498 
499 
500 void PCB_BASE_FRAME::OnToggleEdgeDrawMode( wxCommandEvent& aEvent )
501 {
502  auto displ_opts = GetDisplayOptions();
503  displ_opts.m_DisplayModEdgeFill = !displ_opts.m_DisplayModEdgeFill;
504 
505  if( GetCanvas() )
506  {
507  // Apply new display options to the GAL canvas
508  auto view = static_cast<KIGFX::PCB_VIEW*>( GetCanvas()->GetView() );
509  view->UpdateDisplayOptions( displ_opts );
510  view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
511  }
512 
513  SetDisplayOptions( displ_opts );
514  GetCanvas()->Refresh();
515 }
516 
517 
518 void PCB_BASE_FRAME::OnToggleTextDrawMode( wxCommandEvent& aEvent )
519 {
520  auto displ_opts = GetDisplayOptions();
521  displ_opts.m_DisplayModTextFill = !displ_opts.m_DisplayModTextFill;
522 
523  if( GetCanvas() )
524  {
525  // Apply new display options to the canvas
526  auto view = static_cast<KIGFX::PCB_VIEW*>( GetCanvas()->GetView() );
527  view->UpdateDisplayOptions( displ_opts );
528  view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
529  }
530 
531  SetDisplayOptions( displ_opts );
532  GetCanvas()->Refresh();
533 }
534 
535 
536 void PCB_BASE_FRAME::OnUpdateSelectZoom( wxUpdateUIEvent& aEvent )
537 {
538  if( m_zoomSelectBox == NULL || m_zoomSelectBox->GetParent() == NULL )
539  return;
540 
541  int current = 0; // display Auto if no match found
542 
543  // check for a match within 1%
544  double zoom = GetCanvas()->GetLegacyZoom();
545 
546  for( unsigned i = 0; i < GetScreen()->m_ZoomList.size(); i++ )
547  {
548  if( std::fabs( zoom - GetScreen()->m_ZoomList[i] ) < ( zoom / 100.0 ) )
549  {
550  current = i + 1;
551  break;
552  }
553  }
554 
555  if( current != m_zoomSelectBox->GetSelection() )
556  m_zoomSelectBox->SetSelection( current );
557 }
558 
559 
561 {
563  GetCanvas()->GetView() );
564 
565  // account for the globals
567  guide.SetIgnoreMTextsOnBack( ! m_Pcb->IsElementVisible( LAYER_MOD_TEXT_BK ) );
568  guide.SetIgnoreMTextsOnFront( ! m_Pcb->IsElementVisible( LAYER_MOD_TEXT_FR ) );
569  guide.SetIgnoreModulesOnBack( ! m_Pcb->IsElementVisible( LAYER_MOD_BK ) );
570  guide.SetIgnoreModulesOnFront( ! m_Pcb->IsElementVisible( LAYER_MOD_FR ) );
571  guide.SetIgnorePadsOnBack( ! m_Pcb->IsElementVisible( LAYER_PAD_BK ) );
572  guide.SetIgnorePadsOnFront( ! m_Pcb->IsElementVisible( LAYER_PAD_FR ) );
573  guide.SetIgnoreThroughHolePads( ! m_Pcb->IsElementVisible( LAYER_PADS_TH ) );
574  guide.SetIgnoreModulesVals( ! m_Pcb->IsElementVisible( LAYER_MOD_VALUES ) );
575  guide.SetIgnoreModulesRefs( ! m_Pcb->IsElementVisible( LAYER_MOD_REFERENCES ) );
576  guide.SetIgnoreThroughVias( ! m_Pcb->IsElementVisible( LAYER_VIA_THROUGH ) );
577  guide.SetIgnoreBlindBuriedVias( ! m_Pcb->IsElementVisible( LAYER_VIA_BBLIND ) );
578  guide.SetIgnoreMicroVias( ! m_Pcb->IsElementVisible( LAYER_VIA_MICROVIA ) );
579  guide.SetIgnoreTracks( ! m_Pcb->IsElementVisible( LAYER_TRACKS ) );
580 
581  return guide;
582 }
583 
584 
585 /*
586  * Display the grid status.
587  */
589 {
590  wxString line;
591  wxString gridformatter;
592 
593  switch( m_userUnits )
594  {
595  case EDA_UNITS::INCHES:
596  gridformatter = "grid X %.6f Y %.6f";
597  break;
598 
600  gridformatter = "grid X %.6f Y %.6f";
601  break;
602 
603  default:
604  gridformatter = "grid X %f Y %f";
605  break;
606  }
607 
608  BASE_SCREEN* screen = GetScreen();
609  wxArrayString gridsList;
610 
611  int icurr = screen->BuildGridsChoiceList( gridsList, m_userUnits != EDA_UNITS::INCHES );
612  GRID_TYPE& grid = screen->GetGrid( icurr );
613  double grid_x = To_User_Unit( m_userUnits, grid.m_Size.x );
614  double grid_y = To_User_Unit( m_userUnits, grid.m_Size.y );
615  line.Printf( gridformatter, grid_x, grid_y );
616 
617  SetStatusText( line, 4 );
618 }
619 
620 
621 /*
622  * Update the status bar information.
623  */
625 {
627 
628  BASE_SCREEN* screen = GetScreen();
629 
630  if( !screen )
631  return;
632 
633  wxString line;
635 
636  if( GetShowPolarCoords() ) // display polar coordinates
637  {
638  double dx = cursorPos.x - screen->m_LocalOrigin.x;
639  double dy = cursorPos.y - screen->m_LocalOrigin.y;
640  double theta = RAD2DEG( atan2( -dy, dx ) );
641  double ro = hypot( dx, dy );
642  wxString formatter;
643 
644  switch( GetUserUnits() )
645  {
646  case EDA_UNITS::INCHES:
647  formatter = wxT( "r %.6f theta %.1f" );
648  break;
650  formatter = wxT( "r %.6f theta %.1f" );
651  break;
652  case EDA_UNITS::UNSCALED:
653  formatter = wxT( "r %f theta %f" );
654  break;
655  default: wxASSERT( false ); break;
656  }
657 
658  line.Printf( formatter, To_User_Unit( GetUserUnits(), ro ), theta );
659 
660  SetStatusText( line, 3 );
661  }
662 
663  // Display absolute coordinates:
664  double dXpos = To_User_Unit( GetUserUnits(), cursorPos.x );
665  double dYpos = To_User_Unit( GetUserUnits(), cursorPos.y );
666 
667  // The following sadly is an if Eeschema/if Pcbnew
668  wxString absformatter;
669  wxString locformatter;
670 
671  switch( GetUserUnits() )
672  {
673  case EDA_UNITS::INCHES:
674  absformatter = "X %.6f Y %.6f";
675  locformatter = "dx %.6f dy %.6f dist %.4f";
676  break;
677 
679  absformatter = "X %.6f Y %.6f";
680  locformatter = "dx %.6f dy %.6f dist %.3f";
681  break;
682 
683  case EDA_UNITS::UNSCALED:
684  absformatter = "X %f Y %f";
685  locformatter = "dx %f dy %f dist %f";
686  break;
687 
688  default:
689  wxASSERT( false );
690  break;
691  }
692 
693  line.Printf( absformatter, dXpos, dYpos );
694  SetStatusText( line, 2 );
695 
696  if( !GetShowPolarCoords() ) // display relative cartesian coordinates
697  {
698  // Display relative coordinates:
699  dXpos = To_User_Unit( GetUserUnits(), cursorPos.x - screen->m_LocalOrigin.x );
700  dYpos = To_User_Unit( GetUserUnits(), cursorPos.y - screen->m_LocalOrigin.y );
701 
702  // We already decided the formatter above
703  line.Printf( locformatter, dXpos, dYpos, hypot( dXpos, dYpos ) );
704  SetStatusText( line, 3 );
705  }
706 
707  DisplayGridMsg();
708 }
709 
710 
712 {
713  EDA_DRAW_FRAME::unitsChangeRefresh(); // Update the status bar.
714 
716 }
717 
718 
720 {
722 
723  auto cfg = dynamic_cast<PCBNEW_SETTINGS*>( aCfg );
724  wxASSERT( cfg );
725 
726  // Ensure grid id is an existent grid id:
727  if( (m_LastGridSizeId <= 0) ||
730 
731  EDA_UNITS userGridUnits = static_cast<EDA_UNITS>( cfg->m_UserGrid.units );
732  m_UserGridSize.x = (int) From_User_Unit( userGridUnits, cfg->m_UserGrid.size_x );
733  m_UserGridSize.y = (int) From_User_Unit( userGridUnits, cfg->m_UserGrid.size_y );
734 
735  m_DisplayOptions = cfg->m_Display;
736  m_PolarCoords = cfg->m_PolarCoords;
737 
738  m_FastGrid1 = cfg->m_FastGrid1;
739  m_FastGrid2 = cfg->m_FastGrid2;
740 }
741 
742 
744 {
746 
747  auto cfg = dynamic_cast<PCBNEW_SETTINGS*>( aCfg );
748  wxASSERT( cfg );
749 
750  cfg->m_UserGrid.size_x = To_User_Unit( m_userUnits, m_UserGridSize.x );
751  cfg->m_UserGrid.size_y = To_User_Unit( m_userUnits, m_UserGridSize.y );
752  cfg->m_UserGrid.units = static_cast<int>( m_userUnits );
753 
754  cfg->m_Display = m_DisplayOptions;
755  cfg->m_PolarCoords = m_PolarCoords;
756 
757  cfg->m_FastGrid1 = m_FastGrid1;
758  cfg->m_FastGrid2 = m_FastGrid2;
759 }
760 
761 
763 {
764  return Pgm().GetSettingsManager().GetAppSettings<PCBNEW_SETTINGS>();
765 }
766 
767 
768 void PCB_BASE_FRAME::CommonSettingsChanged( bool aEnvVarsChanged )
769 {
770  EDA_DRAW_FRAME::CommonSettingsChanged( aEnvVarsChanged );
771 
773 
774  // The 3D viewer isn't in the Kiway, so send its update manually
775  EDA_3D_VIEWER* viewer = Get3DViewerFrame();
776 
777  if( viewer )
778  viewer->CommonSettingsChanged( aEnvVarsChanged );
779 }
780 
781 
783 {
784  GetScreen()->SetModify();
785  GetScreen()->SetSave();
786 
787  UpdateStatusBar();
788  UpdateMsgPanel();
789 }
790 
791 
793 {
795 }
796 
797 
799 {
800  UpdateStatusBar();
801  DisplayUnitsMsg();
802 
803  if( m_gridSelectBox == NULL )
804  return;
805 
806  // Update grid values with the current units setting.
807  m_gridSelectBox->Clear();
808  wxArrayString gridsList;
809  int icurr = GetScreen()->BuildGridsChoiceList( gridsList, GetUserUnits() != EDA_UNITS::INCHES );
810 
811  for( size_t i = 0; i < GetScreen()->GetGridCount(); i++ )
812  {
813  GRID_TYPE& grid = GetScreen()->GetGrid( i );
814  m_gridSelectBox->Append( gridsList[i], (void*) &grid.m_CmdId );
815  }
816 
817  m_gridSelectBox->Append( wxT( "---" ) );
818  m_gridSelectBox->Append( _( "Edit user grid..." ) );
819 
820  m_gridSelectBox->SetSelection( icurr );
821 }
822 
823 
825 {
826  if( m_zoomSelectBox == NULL )
827  return;
828 
829  wxString msg;
830 
831  m_zoomSelectBox->Clear();
832  m_zoomSelectBox->Append( _( "Zoom Auto" ) );
833  m_zoomSelectBox->SetSelection( 0 );
834 
835  for( unsigned i = 0; i < GetScreen()->m_ZoomList.size(); ++i )
836  {
837  msg = _( "Zoom " );
838 
839  double level = m_zoomLevelCoeff / (double)GetScreen()->m_ZoomList[i];
840  wxString value = wxString::Format( wxT( "%.2f" ), level );
841  msg += value;
842 
843  m_zoomSelectBox->Append( msg );
844 
845  if( GetScreen()->GetZoom() == GetScreen()->m_ZoomList[i] )
846  m_zoomSelectBox->SetSelection( i + 1 );
847  }
848 }
849 
850 
852 {
853  if( m_FastGrid1 >= (int)GetScreen()->GetGridCount() )
854  return;
855 
856  int cmdId = GetScreen()->GetGrids()[m_FastGrid1].m_CmdId - ID_POPUP_GRID_LEVEL_1000;
857  GetToolManager()->RunAction( "common.Control.gridPreset", true, cmdId );
858 }
859 
860 
862 {
863  if( m_FastGrid2 >= (int)GetScreen()->GetGridCount() )
864  return;
865 
866  int cmdId = GetScreen()->GetGrids()[m_FastGrid2].m_CmdId - ID_POPUP_GRID_LEVEL_1000;
867  GetToolManager()->RunAction( "common.Control.gridPreset", true, cmdId );
868 }
869 
870 
872 {
874 }
875 
876 
878 {
879  m_DisplayOptions.m_ShowGrid = aVisible;
880 
881  // Update the display with the new grid
882  if( GetCanvas() )
883  {
884  // Check to ensure these exist, since this function could be called before
885  // the GAL and View have been created
886  if( GetCanvas()->GetGAL() )
887  GetCanvas()->GetGAL()->SetGridVisibility( aVisible );
888 
889  if( GetCanvas()->GetView() )
891 
892  GetCanvas()->Refresh();
893  }
894 }
895 
896 
898 {
899  return static_cast<PCB_DRAW_PANEL_GAL*>( EDA_DRAW_FRAME::GetCanvas() );
900 }
901 
902 
904 {
906 
907  EDA_DRAW_PANEL_GAL* canvas = GetCanvas();
908 
909  if( m_toolManager )
910  {
912  GetCanvas()->GetViewControls(), this );
913  }
914 
915  SetBoard( m_Pcb );
916 
917  if( m_toolManager )
919 
920  // Transfer latest current display options from legacy to GAL canvas:
921  auto painter = static_cast<KIGFX::PCB_PAINTER*>( canvas->GetView()->GetPainter() );
922  auto settings = painter->GetSettings();
923  auto displ_opts = GetDisplayOptions();
924  settings->LoadDisplayOptions( displ_opts, ShowPageLimits() );
925  settings->LoadColors( ColorSettings() );
926 
927  canvas->GetView()->RecacheAllItems();
929  canvas->StartDrawing();
930 
931  // Initialize the grid settings
932  GetCanvas()->GetGAL()->SetGridSize( VECTOR2D( GetScreen()->GetGridSize() ) );
934 }
935 
double To_User_Unit(EDA_UNITS aUnit, double aValue, bool aUseMils)
Function To_User_Unit convert aValue in internal units to the appropriate user units defined by aUnit...
Definition: base_units.cpp:95
EDA_UNITS
Definition: common.h:184
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.
Definition: class_board.h:755
virtual void SetBoard(BOARD *aBoard)
Function SetBoard sets the m_Pcb member in such as way as to ensure deleting any previous BOARD.
to draw blind/buried vias
virtual void ShowChangedLanguage() override
Redraw the menus and what not in current language.
const PAGE_INFO & GetPageSettings() const
Definition: class_board.h:527
KIWAY & Kiway() const
Function Kiway returns a reference to the KIWAY that this object has an opportunity to participate in...
Definition: kiway_holder.h:56
void OnTogglePadDrawMode(wxCommandEvent &aEvent)
TOOL_MANAGER * GetToolManager() const
Return the MVC controller.
const PCB_PLOT_PARAMS & GetPlotOptions() const
Definition: class_board.h:530
virtual BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings returns the BOARD_DESIGN_SETTINGS for the BOARD owned by this frame.
virtual void unitsChangeRefresh() override
Called when when the units setting has changed to allow for any derived classes to handle refreshing ...
KIWAY Kiway & Pgm(), KFCTL_STANDALONE
The global Program "get" accessor.
Definition: single_top.cpp:103
void CommonSettingsChanged(bool aEnvVarsChanged) override
Notification that common settings are updated.
KIGFX::VIEW_CONTROLS * GetViewControls() const
Function GetViewControls() Returns a pointer to the VIEW_CONTROLS instance used in the panel.
void SetGridOrigin(const wxPoint &aPoint)
Function SetGridOrigin sets the origin point of the grid.
Definition: class_board.h:341
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition: confirm.cpp:252
void OnToggleTextDrawMode(wxCommandEvent &aEvent)
int BuildGridsChoiceList(wxArrayString &aGridsList, bool aMmFirst) const
Function BuildGridsChoiceList().
virtual bool IsGridVisible() const override
Function IsGridVisible()
void SetGridOrigin(const wxPoint &aPoint) override
virtual void AddModuleToBoard(MODULE *module)
Adds the given module to the board.
void SetSave()
Definition: base_screen.h:226
bool IsFlipped() const
function IsFlipped
Definition: class_module.h:292
multilayer pads, usually with holes
virtual void Update(VIEW_ITEM *aItem, int aUpdateFlags) override
For dynamic VIEWs, informs the associated VIEW that the graphical representation of this item has cha...
Definition: pcb_view.cpp:91
Implementation of conversion functions that require both schematic and board internal units.
This file is part of the common library.
BOARD_ITEM is a base class for any item which can be embedded within the BOARD container class,...
TOOL_DISPATCHER * m_toolDispatcher
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
Definition: class_board.h:534
const EDA_RECT GetBoardEdgesBoundingBox() const
Function GetBoardEdgesBoundingBox Returns the board bounding box calculated using exclusively the boa...
Definition: class_board.h:767
FRAME_T
Enum FRAME_T is the set of EDA_BASE_FRAME derivatives, typically stored in EDA_BASE_FRAME::m_Ident.
Definition: frame_type.h:34
EDA_DRAW_PANEL_GAL::GAL_TYPE m_canvasType
The current canvas type.
FP_LIB_TABLE GFootprintTable
!!!!!!!!!!!!!! This code is obsolete because of the merge into pcbnew, don't bother with it.
void OnToggleEdgeDrawMode(wxCommandEvent &aEvent)
void SetFastGrid2()
Function SetFastGrid2()
PCB_DRAW_PANEL_GAL * GetCanvas() const override
Return a pointer to GAL-based canvas of given EDA draw frame.
void SetPageSettings(const PAGE_INFO &aPageSettings)
Definition: class_board.h:528
virtual EDA_DRAW_PANEL_GAL * GetCanvas() const
Return a pointer to GAL-based canvas of given EDA draw frame.
void RecacheAllItems()
Function RecacheAllItems() Rebuilds GAL display lists.
Definition: view.cpp:1402
double RAD2DEG(double rad)
Definition: trigo.h:215
double From_User_Unit(EDA_UNITS aUnits, double aValue, bool aUseMils)
Return in internal units the value "val" given in a real unit such as "in", "mm" or "deg".
Definition: base_units.cpp:306
void CommonSettingsChanged(bool aEnvVarsChanged) override
Notification event that some of the common (suite-wide) settings have changed.
const wxPoint & GetGridOrigin() const override
Return the absolute coordinates of the origin of the snap grid.
int GetWidth() const
Definition: eda_rect.h:119
void SetBrightened()
Definition: base_struct.h:233
void OnToggleGraphicDrawMode(wxCommandEvent &aEvent)
void RecreateToolbars()
Rebuild all toolbars, and update the checked state of ckeck tools.
LSET GetVisibleLayers() const
Function GetVisibleLayers is a proxy function that calls the correspondent function in m_BoardSetting...
bool RunAction(const std::string &aActionName, bool aNow=false, T aParam=NULL)
Function RunAction() Runs the specified action.
Definition: tool_manager.h:139
void SetOrigin(const wxPoint &pos)
Definition: eda_rect.h:131
show modules values (when texts are visibles)
const GRID_TYPE & GetGrid() const
Return the grid object of the currently selected grid.
Definition: base_screen.h:286
BOARD_DESIGN_SETTINGS & GetDesignSettings() const
Function GetDesignSettings.
Definition: class_board.h:512
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock) override
void SetDisplayOptions(const PCB_DISPLAY_OPTIONS &aOptions)
wxAuiManager m_auimgr
void SetDrawBgColor(COLOR4D aColor) override
VTBL_ENTRY _ELEM * GetElem(ELEM_T aIndex)
Typically wrapped somewhere else in a more meaningful function wrapper.
Definition: project.cpp:232
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
The base class for create windows for drawing purpose.
virtual const PCB_PLOT_PARAMS & GetPlotSettings() const
Function GetPlotSettings returns the PCB_PLOT_PARAMS for the BOARD owned by this frame.
COLOR4D m_drawBgColor
const PCB_DISPLAY_OPTIONS & GetDisplayOptions() const
Function GetDisplayOptions returns the display options current in use Display options are relative to...
TITLE_BLOCK holds the information shown in the lower right corner of a plot, printout,...
Definition: title_block.h:40
BOARD_ITEM * GetItem(const KIID &aID)
void OnUpdateSelectZoom(wxUpdateUIEvent &aEvent)
wxChoice * m_gridSelectBox
void SetAuxOrigin(const wxPoint &aPoint)
Function SetAuxOrigin sets the origin point used for plotting.
Definition: class_board.h:334
const wxPoint & GetAuxOrigin() const override
Return the origin of the axis used for plotting and various exports.
PAINTER * GetPainter() const
Function GetPainter() Returns the painter object used by the view for drawing VIEW_ITEMS.
Definition: view.h:199
Definitions for tracks, vias and zones.
bool ShowPageLimits() const
Auxiliary rendering target (noncached)
Definition: definitions.h:49
void DisplayUnitsMsg()
Display current unit pane on the status bar.
VTBL_ENTRY void SetElem(ELEM_T aIndex, _ELEM *aElem)
Definition: project.cpp:244
void ClearBrightened()
Definition: base_struct.h:237
Classes used in Pcbnew, CvPcb and GerbView.
show modules on front
void SetFastGrid1()
Function SetFastGrid1()
#define IS_NEW
New item, just created.
Definition: base_struct.h:120
virtual PCB_LAYER_ID GetActiveLayer() const
Function GetActiveLayer returns the active layer.
void InitDataPoints(const wxSize &aPageSizeInternalUnits)
Definition: base_screen.cpp:65
void unitsChangeRefresh() override
Called when when the units setting has changed to allow for any derived classes to handle refreshing ...
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_MODE::INSERT) override
Adds an item to the container.
Definition: common.h:65
class MODULE, a footprint
Definition: typeinfo.h:89
PCB_LAYER_ID
A quick note on layer IDs:
GENERAL_COLLECTORS_GUIDE GetCollectorsGuide()
Function GetCollectorsGuide.
void SetGeneralSettings(PCBNEW_SETTINGS *aSettings)
Definition: class_board.h:540
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Saves common frame parameters to a configuration data file.
void SetFlags(STATUS_FLAGS aMask)
Definition: base_struct.h:257
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
Definition: app_settings.h:75
virtual void ActivateGalCanvas() override
#define NULL
VECTOR2< double > VECTOR2D
Definition: vector2d.h:593
virtual const wxString What() const
A composite of Problem() and Where()
Definition: exceptions.cpp:33
EDA_3D_VIEWER * CreateAndShow3D_Frame()
Shows the 3D view frame.
MODULES & Modules()
Definition: class_board.h:229
void MarkTargetDirty(int aTarget)
Function MarkTargetDirty() Sets or clears target 'dirty' flag.
Definition: view.h:585
void OnUpdateSelectGrid(wxUpdateUIEvent &aEvent)
PAGE_INFO describes the page size and margins of a paper page on which to eventually print or plot.
Definition: page_info.h:54
bool m_showBorderAndTitleBlock
COLOR_SETTINGS * ColorSettings()
Helper to retrieve the current color settings.
BASE_SCREEN handles how to draw a screen (a board, a schematic ...)
Definition: base_screen.h:74
void SetEnd(int x, int y)
Definition: eda_rect.h:192
wxChoice * m_zoomSelectBox
double GetLegacyZoom() const
Function GetLegacyZoom() Returns current view scale converted to zoom value used by the legacy canvas...
void Flip(const wxPoint &aCentre, bool aFlipLeftRight) override
Function Flip Flip this object, i.e.
KIFACE_I & Kiface()
Global KIFACE_I "get" accessor.
to draw usual through hole vias
const ZONE_SETTINGS & GetZoneSettings() const
KIID niluuid(0)
const GRIDS & GetGrids() const
Function GetGrids().
Definition: base_screen.h:339
Base window classes and related definitions.
Helper dialog and control classes.
void ResetTools(TOOL_BASE::RESET_REASON aReason)
Function ResetTools() Resets all tools (i.e.
wxRealPoint m_Size
Definition: base_screen.h:47
KIWAY is a minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the s...
Definition: kiway.h:273
KIGFX::GAL * GetGAL() const
Function GetGAL() Returns a pointer to the GAL instance used in the panel.
virtual KIGFX::VIEW * GetView() const
Function GetView() Returns a pointer to the VIEW instance used in the panel.
virtual void SetPlotSettings(const PCB_PLOT_PARAMS &aSettings)
EDA_RECT GetBoardBoundingBox(bool aBoardEdgesOnly=false) const
Function GetBoardBoundingBox calculates the bounding box containing all board items (or board edge se...
void SetDesignSettings(const BOARD_DESIGN_SETTINGS &aDesignSettings)
Function SetDesignSettings.
Definition: class_board.h:522
void SetPosition(const wxPoint &aPos) override
const wxPoint & GetAuxOrigin() const
Definition: class_board.h:335
void SetPlotOptions(const PCB_PLOT_PARAMS &aOptions)
Definition: class_board.h:531
virtual void SetActiveLayer(PCB_LAYER_ID aLayer)
Function SetActiveLayer will change the currently active layer to aLayer.
virtual void ActivateGalCanvas()
Use to start up the GAL drawing canvas.
void SetIgnoreMTextsMarkedNoShow(bool ignore)
Definition: collectors.h:541
wxPoint m_UserGridSize
virtual void ReCreateMenuBar() override
Recreates the menu bar.
void Load(const wxString &aFileName)
Load the library table using the path defined by aFileName aFallBackTable.
PCB_PLOT_PARAMS handles plot parameters and options when plotting/printing a board.
virtual KIGFX::PCB_VIEW * GetView() const override
Function GetView() Returns a pointer to the VIEW instance used in the panel.
void SetGridSize(const VECTOR2D &aGridSize)
Set the grid size.
void StartDrawing()
Function StartDrawing() Begins drawing if it was stopped previously.
KICAD_T Type() override
Definition: fp_lib_table.h:108
int GetHeight() const
Definition: eda_rect.h:120
const wxPoint & GetGridOrigin() const
Definition: class_board.h:342
virtual void Refresh(bool aEraseBackground=true, const wxRect *aRect=NULL) override
Update the board display after modifying it by a python script (note: it is automatically called by a...
void SetZoneSettings(const ZONE_SETTINGS &aSettings)
Set the zone settings for this container.
PCB_DISPLAY_OPTIONS m_DisplayOptions
void UpdateGridSelectBox()
virtual const wxPoint GetPosition() const =0
virtual const wxString GetZoomLevelIndicator() const
Return a human readable value which can be displayed as zoom level indicator in dialogs.
void SaveSettings(APP_SETTINGS_BASE *aCfg) override
Saves common frame parameters to a configuration data file.
virtual void SwitchLayer(wxDC *DC, PCB_LAYER_ID layer)
ZONE_SETTINGS handles zones parameters.
Definition: zone_settings.h:58
const KIID m_Uuid
Definition: base_struct.h:169
VTBL_ENTRY FP_LIB_TABLE * PcbFootprintLibs(KIWAY &aKiway)
Return the table of footprint libraries.
Definition: project.cpp:427
bool IsElementVisible(GAL_LAYER_ID aLayer) const
Function IsElementVisible tests whether a given element category is visible.
PCBNEW_SETTINGS * m_Settings
void DisplayGridMsg()
Function DisplayGridMsg()
const TITLE_BLOCK & GetTitleBlock() const override
virtual void OnModify()
Function OnModify Virtual Must be called after a change in order to set the "modify" flag of the curr...
const ZONE_SETTINGS & GetZoneSettings() const
Fetch the zone settings for this container.
virtual void UpdateStatusBar() override
Update the status bar information.
double m_zoomLevelCoeff
smd pads, front layer
TITLE_BLOCK & GetTitleBlock()
Definition: class_board.h:533
see class PGM_BASE
Declaration of the eda_3d_viewer class.
bool GetShowPolarCoords() const
For those frames that support polar coordinates.
Class to handle a graphic segment.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
GRID_TYPE is for grid arrays.
Definition: base_screen.h:43
BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:163
void SetEventDispatcher(TOOL_DISPATCHER *aEventDispatcher)
Function SetEventDispatcher() Sets a dispatcher that processes events and forwards them to tools.
#define _(s)
Definition: 3d_actions.cpp:33
void SetOrientation(double newangle)
virtual void SetDesignSettings(const BOARD_DESIGN_SETTINGS &aSettings)
virtual void SetGridVisibility(bool aVisible) override
Function SetGridVisibility() Turn the display of the canvas grid on/off.
int GetCopperLayerCount() const
Function GetCopperLayerCount.
size_t GetGridCount() const
Function GetGridCount().
Definition: base_screen.h:324
GERBVIEW_FRAME::OnZipFileHistory GERBVIEW_FRAME::OnToggleShowLayerManager GERBVIEW_FRAME::OnSelectHighlightChoice EVT_UPDATE_UI(ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER, GERBVIEW_FRAME::OnUpdateLayerSelectBox) EVT_UPDATE_UI_RANGE(ID_TB_OPTIONS_SHOW_GBR_MODE_0
EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
const PAGE_INFO & GetPageSettings() const override
EDA_UNITS m_userUnits
#define IU_PER_MILS
Definition: plotter.cpp:137
void SetEnvironment(EDA_ITEM *aModel, KIGFX::VIEW *aView, KIGFX::VIEW_CONTROLS *aViewControls, EDA_BASE_FRAME *aFrame)
Sets the work environment (model, view, view controls and the parent window).
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
void SetGridVisibility(bool aVisibility)
Sets the visibility setting of the grid.
virtual void SetPageSettings(const PAGE_INFO &aPageSettings) override
const wxSize GetPageSizeIU() const override
Works off of GetPageSettings() to return the size of the paper page in the internal units of this par...
bool IsCopperLayer(LAYER_NUM aLayerId)
Function IsCopperLayer tests whether a layer is a copper layer.
void CommonSettingsChanged(bool aEnvVarsChanged) override
Notification event that some of the common (suite-wide) settings have changed.
void SetZoneSettings(const ZONE_SETTINGS &aSettings)
void SetAuxOrigin(const wxPoint &aPoint) override
Create and handle a window for the 3d viewer connected to a Kiway and a pcbboard.
Definition: eda_3d_viewer.h:65
GAL_TYPE GetBackend() const
Function GetBackend Returns the type of backend currently used by GAL canvas.
TOOL_MANAGER * m_toolManager
void UpdateStatusBar() override
Update the status bar information.
Module description (excepted pads)
BOARD * GetBoard() const
void updateZoomSelectBox()
void SetModify()
Definition: base_screen.h:224
A general implementation of a COLLECTORS_GUIDE.
Definition: collectors.h:385
void LoadSettings(APP_SETTINGS_BASE *aCfg) override
Load common frame parameters from a configuration file.
virtual void Update3DView(bool aForceReload, const wxString *aTitle=nullptr)
Update the 3D view, if the viewer is opened by this frame.
int m_CmdId
Definition: base_screen.h:46
Message panel definition file.
void FocusOnLocation(const wxPoint &aPos)
Useful to focus on a particular location, in find functions Move the graphic cursor (crosshair cursor...
void NewDisplay(bool aForceImmediateRedraw=false)
Reload and refresh (rebuild) the 3D scene.
Rendering engine changes.
Definition: tool_base.h:82
EDA_3D_VIEWER * Get3DViewerFrame()
virtual void ShowChangedLanguage()
Redraw the menus and what not in current language.
Struct IO_ERROR is a class used to hold an error message and may be used when throwing exceptions con...
Definition: ki_exception.h:76
const wxPoint GetPosition() const override
Definition: class_module.h:210
#define QUALIFIED_VIEWER3D_FRAMENAME(parent)
Definition: eda_3d_viewer.h:50
void FocusOnItem(BOARD_ITEM *aItem)
PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
VTBL_ENTRY const wxString FootprintLibTblName() const
Function FootprintLibTblName returns the path and filename of this project's fp-lib-table,...
Definition: project.cpp:120
show modules references (when texts are visibles)
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
VECTOR2D GetCursorPosition() const
Returns the current cursor position in world coordinates.
std::vector< double > m_ZoomList
standard zoom (i.e. scale) coefficients.
Definition: base_screen.h:138
VECTOR2D m_LocalOrigin
Relative Screen cursor coordinate (on grid) in user units.
Definition: base_screen.h:114
KICAD_T Type() const
Function Type()
Definition: base_struct.h:212
Color has changed.
Definition: view_item.h:57
virtual void UpdateMsgPanel()
Redraw the message panel.
BOARD_DESIGN_SETTINGS contains design settings for a BOARD object.
PCBNEW_SETTINGS * GetSettings()
const wxString GetZoomLevelIndicator() const override
Function GetZoomLevelIndicator returns a human readable value which can be displayed as zoom level in...
COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:40