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-2019 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>
51 #include <tool/tool_manager.h>
52 #include <tool/tool_dispatcher.h>
53 #include <tools/pcb_actions.h>
54 
55 const wxChar PCB_BASE_FRAME::AUTO_ZOOM_KEY[] = wxT( "AutoZoom" );
56 const wxChar PCB_BASE_FRAME::ZOOM_KEY[] = wxT( "Zoom" );
57 
58 // Configuration entry names.
59 static const wxChar UserGridSizeXEntry[] = wxT( "PcbUserGrid_X" );
60 static const wxChar UserGridSizeYEntry[] = wxT( "PcbUserGrid_Y" );
61 static const wxChar UserGridUnitsEntry[] = wxT( "PcbUserGrid_Unit" );
62 static const wxChar DisplayPadFillEntry[] = wxT( "DiPadFi" );
63 static const wxChar DisplayViaFillEntry[] = wxT( "DiViaFi" );
64 static const wxChar DisplayPadNumberEntry[] = wxT( "DiPadNu" );
65 static const wxChar DisplayModuleEdgeEntry[] = wxT( "DiModEd" );
66 static const wxChar DisplayModuleTextEntry[] = wxT( "DiModTx" );
67 static const wxChar FastGrid1Entry[] = wxT( "FastGrid1" );
68 static const wxChar FastGrid2Entry[] = wxT( "FastGrid2" );
69 
70 
71 BEGIN_EVENT_TABLE( PCB_BASE_FRAME, EDA_DRAW_FRAME )
76 
79 
81 END_EVENT_TABLE()
82 
83 
84 PCB_BASE_FRAME::PCB_BASE_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrameType,
85  const wxString& aTitle, const wxPoint& aPos, const wxSize& aSize,
86  long aStyle, const wxString & aFrameName ) :
87  EDA_DRAW_FRAME( aKiway, aParent, aFrameType, aTitle, aPos, aSize, aStyle, aFrameName ),
88  m_Pcb( nullptr ),
89  m_configSettings( aFrameType )
90 {
91  m_UserGridSize = wxPoint( (int) 10 * IU_PER_MILS, (int) 10 * IU_PER_MILS );
92 
93  m_FastGrid1 = 0;
94  m_FastGrid2 = 0;
95 
96  m_zoomLevelCoeff = 11.0 * IU_PER_MILS; // Adjusted to roughly displays zoom level = 1
97  // when the screen shows a 1:1 image
98  // obviously depends on the monitor,
99  // but this is an acceptable value
100 }
101 
102 
104 {
105  // Ensure m_canvasType is up to date, to save it in config
107 
108  delete m_Pcb;
109 }
110 
111 
113 {
114  return dynamic_cast<EDA_3D_VIEWER*>( FindWindowByName( QUALIFIED_VIEWER3D_FRAMENAME( this ) ) );
115 }
116 
117 
118 void PCB_BASE_FRAME::Update3DView( bool aForceReload, const wxString* aTitle )
119 {
120  EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame();
121 
122  if( draw3DFrame )
123  {
124  if( aTitle )
125  draw3DFrame->SetTitle( *aTitle );
126 
127  draw3DFrame->NewDisplay( aForceReload );
128  }
129 }
130 
131 
133 {
134  // This is a lazy loading function, it loads the project specific table when
135  // that table is asked for, not before.
136 
138 
139  // its gotta be NULL or a FP_LIB_TABLE, or a bug.
140  wxASSERT( !tbl || tbl->Type() == FP_LIB_TABLE_T );
141 
142  if( !tbl )
143  {
144  // Stack the project specific FP_LIB_TABLE overlay on top of the global table.
145  // ~FP_LIB_TABLE() will not touch the fallback table, so multiple projects may
146  // stack this way, all using the same global fallback table.
147  tbl = new FP_LIB_TABLE( &GFootprintTable );
148 
149  SetElem( ELEM_FPTBL, tbl );
150 
151  wxString projectFpLibTableFileName = FootprintLibTblName();
152 
153  try
154  {
155  tbl->Load( projectFpLibTableFileName );
156  }
157  catch( const IO_ERROR& ioe )
158  {
159  DisplayErrorMessage( nullptr, _( "Error loading project footprint libraries" ),
160  ioe.What() );
161  }
162  }
163 
164  return tbl;
165 }
166 
167 
169 {
170  if( m_Pcb != aBoard )
171  {
172  delete m_Pcb;
173  m_Pcb = aBoard;
175  }
176 }
177 
178 
180 {
181  if( module )
182  {
183  GetBoard()->Add( module, ADD_APPEND );
184 
185  module->SetFlags( IS_NEW );
186 
187  module->SetPosition( wxPoint( 0, 0 ) ); // cursor in GAL may not be initialized at the moment
188 
189  module->SetTimeStamp( GetNewTimeStamp() );
190 
191  // Put it on FRONT layer,
192  // (Can be stored flipped if the lib is an archive built from a board)
193  if( module->IsFlipped() )
194  module->Flip( module->GetPosition(), m_configSettings.m_FlipLeftRight );
195 
196  // Place it in orientation 0,
197  // even if it is not saved with orientation 0 in lib
198  // (Can happen if the lib is an archive built from a board)
199  module->SetOrientation( 0 );
200  }
201 }
202 
203 
204 void PCB_BASE_FRAME::SetPageSettings( const PAGE_INFO& aPageSettings )
205 {
206  wxASSERT( m_Pcb );
207  m_Pcb->SetPageSettings( aPageSettings );
208 
209  if( GetScreen() )
210  GetScreen()->InitDataPoints( aPageSettings.GetSizeIU() );
211 }
212 
213 
215 {
216  wxASSERT( m_Pcb );
217  return m_Pcb->GetPageSettings();
218 }
219 
220 
221 const wxSize PCB_BASE_FRAME::GetPageSizeIU() const
222 {
223  wxASSERT( m_Pcb );
224 
225  // this function is only needed because EDA_DRAW_FRAME is not compiled
226  // with either -DPCBNEW or -DEESCHEMA, so the virtual is used to route
227  // into an application specific source file.
228  return m_Pcb->GetPageSettings().GetSizeIU();
229 }
230 
231 
232 const wxPoint& PCB_BASE_FRAME::GetAuxOrigin() const
233 {
234  wxASSERT( m_Pcb );
235  return m_Pcb->GetAuxOrigin();
236 }
237 
238 
239 void PCB_BASE_FRAME::SetAuxOrigin( const wxPoint& aPoint )
240 {
241  wxASSERT( m_Pcb );
242  m_Pcb->SetAuxOrigin( aPoint );
243 }
244 
245 
246 const wxPoint& PCB_BASE_FRAME::GetGridOrigin() const
247 {
248  wxASSERT( m_Pcb );
249  return m_Pcb->GetGridOrigin();
250 }
251 
252 
253 void PCB_BASE_FRAME::SetGridOrigin( const wxPoint& aPoint )
254 {
255  wxASSERT( m_Pcb );
256  m_Pcb->SetGridOrigin( aPoint );
257 }
258 
259 
261 {
262  wxASSERT( m_Pcb );
263  return m_Pcb->GetTitleBlock();
264 }
265 
266 
267 void PCB_BASE_FRAME::SetTitleBlock( const TITLE_BLOCK& aTitleBlock )
268 {
269  wxASSERT( m_Pcb );
270  m_Pcb->SetTitleBlock( aTitleBlock );
271 }
272 
273 
275 {
276  wxASSERT( m_Pcb );
277  return m_Pcb->GetDesignSettings();
278 }
279 
280 
282 {
283  wxASSERT( m_Pcb );
284  m_Pcb->SetDesignSettings( aSettings );
285 }
286 
287 
289 {
290  m_drawBgColor= aColor;
291  m_auimgr.Update();
292 }
293 
294 
296 {
297  wxASSERT( m_Pcb );
298  return m_Pcb->GetZoneSettings();
299 }
300 
301 
303 {
304  wxASSERT( m_Pcb );
305  m_Pcb->SetZoneSettings( aSettings );
306 }
307 
308 
310 {
311  wxASSERT( m_Pcb );
312  return m_Pcb->GetPlotOptions();
313 }
314 
315 
317 {
318  wxASSERT( m_Pcb );
319  m_Pcb->SetPlotOptions( aSettings );
320 }
321 
322 
323 EDA_RECT PCB_BASE_FRAME::GetBoardBoundingBox( bool aBoardEdgesOnly ) const
324 {
325  wxASSERT( m_Pcb );
326 
327  EDA_RECT area = aBoardEdgesOnly ? m_Pcb->GetBoardEdgesBoundingBox() : m_Pcb->GetBoundingBox();
328 
329  if( area.GetWidth() == 0 && area.GetHeight() == 0 )
330  {
331  wxSize pageSize = GetPageSizeIU();
332 
334  {
335  area.SetOrigin( 0, 0 );
336  area.SetEnd( pageSize.x, pageSize.y );
337  }
338  else
339  {
340  area.SetOrigin( -pageSize.x / 2, -pageSize.y / 2 );
341  area.SetEnd( pageSize.x / 2, pageSize.y / 2 );
342  }
343  }
344 
345  return area;
346 }
347 
348 
350 {
351  EDA_RECT ibbbox = GetBoardBoundingBox();
352 
353  double sizeX = (double) ibbbox.GetWidth();
354  double sizeY = (double) ibbbox.GetHeight();
355  wxPoint centre = ibbbox.Centre();
356 
357  // Reserve a 10% margin around board bounding box.
358  double margin_scale_factor = 1.1;
359 
360  return bestZoom( sizeX, sizeY, margin_scale_factor, centre );
361 }
362 
363 
364 // Virtual function
366 {
367 }
368 
369 
371 {
372  // call my base class
374 
375  // tooltips in toolbars
380 
381  // status bar
382  UpdateMsgPanel();
383 }
384 
385 
387 {
388  EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame();
389 
390  if( !draw3DFrame )
391  draw3DFrame = new EDA_3D_VIEWER( &Kiway(), this, _( "3D Viewer" ) );
392 
393  // Raising the window does not show the window on Windows if iconized. This should work
394  // on any platform.
395  if( draw3DFrame->IsIconized() )
396  draw3DFrame->Iconize( false );
397 
398  draw3DFrame->Raise();
399  draw3DFrame->Show( true );
400 
401  // Raising the window does not set the focus on Linux. This should work on any platform.
402  if( wxWindow::FindFocus() != draw3DFrame )
403  draw3DFrame->SetFocus();
404 
405  return draw3DFrame;
406 }
407 
408 
409 // Note: virtual, overridden in PCB_EDIT_FRAME;
411 {
412  PCB_LAYER_ID preslayer = GetActiveLayer();
413  auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
414 
415  // Check if the specified layer matches the present layer
416  if( layer == preslayer )
417  return;
418 
419  // Copper layers cannot be selected unconditionally; how many of those layers are
420  // currently enabled needs to be checked.
421  if( IsCopperLayer( layer ) )
422  {
423  // If only one copper layer is enabled, the only such layer that can be selected to
424  // is the "Copper" layer (so the selection of any other copper layer is disregarded).
425  if( m_Pcb->GetCopperLayerCount() < 2 )
426  {
427  if( layer != B_Cu )
428  return;
429  }
430 
431  // If more than one copper layer is enabled, the "Copper" and "Component" layers
432  // can be selected, but the total number of copper layers determines which internal
433  // layers are also capable of being selected.
434  else
435  {
436  if( layer != B_Cu && layer != F_Cu && layer >= ( m_Pcb->GetCopperLayerCount() - 1 ) )
437  return;
438  }
439  }
440 
441  // Is yet more checking required? E.g. when the layer to be selected is a non-copper
442  // layer, or when switching between a copper layer and a non-copper layer, or vice-versa?
443  // ...
444 
445  GetScreen()->m_Active_Layer = layer;
446 
447  if( displ_opts->m_ContrastModeDisplay )
448  GetCanvas()->Refresh();
449 }
450 
451 
452 void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent )
453 {
454  auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
455 
456  displ_opts->m_DisplayPadFill = !displ_opts->m_DisplayPadFill;
457 
458  if( GetCanvas() )
459  {
460  // Apply new display options to the GAL canvas
461  auto view = static_cast<KIGFX::PCB_VIEW*>( GetCanvas()->GetView() );
462  view->UpdateDisplayOptions( displ_opts );
463 
464  // Update pads
465  BOARD* board = GetBoard();
466  for( auto module : board->Modules() )
467  {
468  for( auto pad : module->Pads() )
469  view->Update( pad, KIGFX::GEOMETRY );
470  }
471  }
472 
473  GetCanvas()->Refresh();
474 }
475 
476 
477 void PCB_BASE_FRAME::OnToggleGraphicDrawMode( wxCommandEvent& aEvent )
478 {
479  auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
480  displ_opts->m_DisplayDrawItemsFill = !displ_opts->m_DisplayDrawItemsFill;
481  GetCanvas()->Refresh();
482 }
483 
484 
485 void PCB_BASE_FRAME::OnToggleEdgeDrawMode( wxCommandEvent& aEvent )
486 {
487  auto displ_opts = (PCB_DISPLAY_OPTIONS*)GetDisplayOptions();
488  displ_opts->m_DisplayModEdgeFill = !displ_opts->m_DisplayModEdgeFill;
489 
490  if( GetCanvas() )
491  {
492  // Apply new display options to the GAL canvas
493  auto view = static_cast<KIGFX::PCB_VIEW*>( GetCanvas()->GetView() );
494  view->UpdateDisplayOptions( displ_opts );
495  view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
496  }
497 
498  GetCanvas()->Refresh();
499 }
500 
501 
502 void PCB_BASE_FRAME::OnToggleTextDrawMode( wxCommandEvent& aEvent )
503 {
504  auto displ_opts = (PCB_DISPLAY_OPTIONS*) GetDisplayOptions();
505  displ_opts->m_DisplayModTextFill = !displ_opts->m_DisplayModTextFill;
506 
507  if( GetCanvas() )
508  {
509  // Apply new display options to the canvas
510  auto view = static_cast<KIGFX::PCB_VIEW*>( GetCanvas()->GetView() );
511  view->UpdateDisplayOptions( displ_opts );
512  view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
513  }
514 
515  GetCanvas()->Refresh();
516 }
517 
518 
519 void PCB_BASE_FRAME::OnUpdateSelectZoom( wxUpdateUIEvent& aEvent )
520 {
521  if( m_zoomSelectBox == NULL || m_zoomSelectBox->GetParent() == NULL )
522  return;
523 
524  int current = 0; // display Auto if no match found
525 
526  // check for a match within 1%
527  double zoom = GetCanvas()->GetLegacyZoom();
528 
529  for( unsigned i = 0; i < GetScreen()->m_ZoomList.size(); i++ )
530  {
531  if( std::fabs( zoom - GetScreen()->m_ZoomList[i] ) < ( zoom / 100.0 ) )
532  {
533  current = i + 1;
534  break;
535  }
536  }
537 
538  if( current != m_zoomSelectBox->GetSelection() )
539  m_zoomSelectBox->SetSelection( current );
540 }
541 
542 
544 {
546  GetCanvas()->GetView() );
547 
548  // account for the globals
550  guide.SetIgnoreMTextsOnBack( ! m_Pcb->IsElementVisible( LAYER_MOD_TEXT_BK ) );
551  guide.SetIgnoreMTextsOnFront( ! m_Pcb->IsElementVisible( LAYER_MOD_TEXT_FR ) );
552  guide.SetIgnoreModulesOnBack( ! m_Pcb->IsElementVisible( LAYER_MOD_BK ) );
553  guide.SetIgnoreModulesOnFront( ! m_Pcb->IsElementVisible( LAYER_MOD_FR ) );
554  guide.SetIgnorePadsOnBack( ! m_Pcb->IsElementVisible( LAYER_PAD_BK ) );
555  guide.SetIgnorePadsOnFront( ! m_Pcb->IsElementVisible( LAYER_PAD_FR ) );
556  guide.SetIgnoreThroughHolePads( ! m_Pcb->IsElementVisible( LAYER_PADS_TH ) );
557  guide.SetIgnoreModulesVals( ! m_Pcb->IsElementVisible( LAYER_MOD_VALUES ) );
558  guide.SetIgnoreModulesRefs( ! m_Pcb->IsElementVisible( LAYER_MOD_REFERENCES ) );
559  guide.SetIgnoreThroughVias( ! m_Pcb->IsElementVisible( LAYER_VIA_THROUGH ) );
560  guide.SetIgnoreBlindBuriedVias( ! m_Pcb->IsElementVisible( LAYER_VIA_BBLIND ) );
561  guide.SetIgnoreMicroVias( ! m_Pcb->IsElementVisible( LAYER_VIA_MICROVIA ) );
562  guide.SetIgnoreTracks( ! m_Pcb->IsElementVisible( LAYER_TRACKS ) );
563 
564  return guide;
565 }
566 
567 
568 /*
569  * Display the grid status.
570  */
572 {
573  wxString line;
574  wxString gridformatter;
575 
576  switch( m_userUnits )
577  {
578  case INCHES:
579  gridformatter = "grid X %.6f Y %.6f";
580  break;
581 
582  case MILLIMETRES:
583  gridformatter = "grid X %.6f Y %.6f";
584  break;
585 
586  default:
587  gridformatter = "grid X %f Y %f";
588  break;
589  }
590 
591  BASE_SCREEN* screen = GetScreen();
592  wxArrayString gridsList;
593 
594  int icurr = screen->BuildGridsChoiceList( gridsList, m_userUnits != INCHES );
595  GRID_TYPE& grid = screen->GetGrid( icurr );
596  double grid_x = To_User_Unit( m_userUnits, grid.m_Size.x );
597  double grid_y = To_User_Unit( m_userUnits, grid.m_Size.y );
598  line.Printf( gridformatter, grid_x, grid_y );
599 
600  SetStatusText( line, 4 );
601 }
602 
603 
604 /*
605  * Update the status bar information.
606  */
608 {
610 
611  BASE_SCREEN* screen = GetScreen();
612 
613  if( !screen )
614  return;
615 
616  wxString line;
618 
619  if( GetShowPolarCoords() ) // display polar coordinates
620  {
621  double dx = cursorPos.x - screen->m_LocalOrigin.x;
622  double dy = cursorPos.y - screen->m_LocalOrigin.y;
623  double theta = RAD2DEG( atan2( -dy, dx ) );
624  double ro = hypot( dx, dy );
625  wxString formatter;
626 
627  switch( GetUserUnits() )
628  {
629  case INCHES: formatter = wxT( "r %.6f theta %.1f" ); break;
630  case MILLIMETRES: formatter = wxT( "r %.6f theta %.1f" ); break;
631  case UNSCALED_UNITS: formatter = wxT( "r %f theta %f" ); break;
632  default: wxASSERT( false ); break;
633  }
634 
635  line.Printf( formatter, To_User_Unit( GetUserUnits(), ro ), theta );
636 
637  SetStatusText( line, 3 );
638  }
639 
640  // Display absolute coordinates:
641  double dXpos = To_User_Unit( GetUserUnits(), cursorPos.x );
642  double dYpos = To_User_Unit( GetUserUnits(), cursorPos.y );
643 
644  // The following sadly is an if Eeschema/if Pcbnew
645  wxString absformatter;
646  wxString locformatter;
647 
648  switch( GetUserUnits() )
649  {
650  case INCHES:
651  absformatter = "X %.6f Y %.6f";
652  locformatter = "dx %.6f dy %.6f dist %.4f";
653  break;
654 
655  case MILLIMETRES:
656  absformatter = "X %.6f Y %.6f";
657  locformatter = "dx %.6f dy %.6f dist %.3f";
658  break;
659 
660  case UNSCALED_UNITS:
661  absformatter = "X %f Y %f";
662  locformatter = "dx %f dy %f dist %f";
663  break;
664 
665  default:
666  wxASSERT( false );
667  break;
668  }
669 
670  line.Printf( absformatter, dXpos, dYpos );
671  SetStatusText( line, 2 );
672 
673  if( !GetShowPolarCoords() ) // display relative cartesian coordinates
674  {
675  // Display relative coordinates:
676  dXpos = To_User_Unit( GetUserUnits(), cursorPos.x - screen->m_LocalOrigin.x );
677  dYpos = To_User_Unit( GetUserUnits(), cursorPos.y - screen->m_LocalOrigin.y );
678 
679  // We already decided the formatter above
680  line.Printf( locformatter, dXpos, dYpos, hypot( dXpos, dYpos ) );
681  SetStatusText( line, 3 );
682  }
683 
684  DisplayGridMsg();
685 }
686 
687 
689 {
690  EDA_DRAW_FRAME::unitsChangeRefresh(); // Update the status bar.
691 
693 }
694 
695 
696 void PCB_BASE_FRAME::LoadSettings( wxConfigBase* aCfg )
697 {
699 
700  // Ensure grid id is an existent grid id:
701  if( (m_LastGridSizeId <= 0) ||
704 
705  wxString baseCfgName = GetName();
706 
707  EDA_UNITS_T userGridUnits;
708  aCfg->Read( baseCfgName + UserGridUnitsEntry, ( int* )&userGridUnits, ( int )INCHES );
709 
710  double tmp;
711  aCfg->Read( baseCfgName + UserGridSizeXEntry, &tmp, 0.01 );
712  m_UserGridSize.x = (int) From_User_Unit( userGridUnits, tmp );
713 
714  aCfg->Read( baseCfgName + UserGridSizeYEntry, &tmp, 0.01 );
715  m_UserGridSize.y = (int) From_User_Unit( userGridUnits, tmp );
716 
717  aCfg->Read( baseCfgName + DisplayPadFillEntry, &m_DisplayOptions.m_DisplayPadFill, true );
718  aCfg->Read( baseCfgName + DisplayViaFillEntry, &m_DisplayOptions.m_DisplayViaFill, true );
719  aCfg->Read( baseCfgName + DisplayPadNumberEntry, &m_DisplayOptions.m_DisplayPadNum, true );
720  aCfg->Read( baseCfgName + DisplayModuleEdgeEntry, &m_DisplayOptions.m_DisplayModEdgeFill, true );
721 
722  long itmp;
723  aCfg->Read( baseCfgName + FastGrid1Entry, &itmp, ( long )0);
724  m_FastGrid1 = itmp;
725  aCfg->Read( baseCfgName + FastGrid2Entry, &itmp, ( long )0);
726  m_FastGrid2 = itmp;
727 
728  aCfg->Read( baseCfgName + DisplayModuleTextEntry, &m_DisplayOptions.m_DisplayModTextFill, true );
729 }
730 
731 
732 void PCB_BASE_FRAME::SaveSettings( wxConfigBase* aCfg )
733 {
735 
736  wxString baseCfgName = GetName();
737 
738  aCfg->Write( baseCfgName + UserGridSizeXEntry, To_User_Unit( m_userUnits, m_UserGridSize.x ) );
739  aCfg->Write( baseCfgName + UserGridSizeYEntry, To_User_Unit( m_userUnits, m_UserGridSize.y ) );
740  aCfg->Write( baseCfgName + UserGridUnitsEntry, ( long )m_userUnits );
741  aCfg->Write( baseCfgName + DisplayPadFillEntry, m_DisplayOptions.m_DisplayPadFill );
742  aCfg->Write( baseCfgName + DisplayViaFillEntry, m_DisplayOptions.m_DisplayViaFill );
743  aCfg->Write( baseCfgName + DisplayPadNumberEntry, m_DisplayOptions.m_DisplayPadNum );
744  aCfg->Write( baseCfgName + DisplayModuleEdgeEntry, m_DisplayOptions.m_DisplayModEdgeFill );
745  aCfg->Write( baseCfgName + DisplayModuleTextEntry, m_DisplayOptions.m_DisplayModTextFill );
746  aCfg->Write( baseCfgName + FastGrid1Entry, ( long )m_FastGrid1 );
747  aCfg->Write( baseCfgName + FastGrid2Entry, ( long )m_FastGrid2 );
748 }
749 
750 
751 void PCB_BASE_FRAME::CommonSettingsChanged( bool aEnvVarsChanged )
752 {
753  EDA_DRAW_FRAME::CommonSettingsChanged( aEnvVarsChanged );
754 
759 
760  // The 3D viewer isn't in the Kiway, so send its update manually
761  EDA_3D_VIEWER* viewer = Get3DViewerFrame();
762 
763  if( viewer )
764  viewer->CommonSettingsChanged( aEnvVarsChanged );
765 }
766 
767 
769 {
770  GetScreen()->SetModify();
771  GetScreen()->SetSave();
772 
773  UpdateStatusBar();
774  UpdateMsgPanel();
775 }
776 
777 
779 {
781 }
782 
783 
785 {
786  UpdateStatusBar();
787  DisplayUnitsMsg();
788 
789  if( m_gridSelectBox == NULL )
790  return;
791 
792  // Update grid values with the current units setting.
793  m_gridSelectBox->Clear();
794  wxArrayString gridsList;
795  int icurr = GetScreen()->BuildGridsChoiceList( gridsList, GetUserUnits() != INCHES );
796 
797  for( size_t i = 0; i < GetScreen()->GetGridCount(); i++ )
798  {
799  GRID_TYPE& grid = GetScreen()->GetGrid( i );
800  m_gridSelectBox->Append( gridsList[i], (void*) &grid.m_CmdId );
801  }
802 
803  m_gridSelectBox->Append( wxT( "---" ) );
804  m_gridSelectBox->Append( _( "Edit user grid..." ) );
805 
806  m_gridSelectBox->SetSelection( icurr );
807 }
808 
809 
811 {
812  if( m_zoomSelectBox == NULL )
813  return;
814 
815  wxString msg;
816 
817  m_zoomSelectBox->Clear();
818  m_zoomSelectBox->Append( _( "Zoom Auto" ) );
819  m_zoomSelectBox->SetSelection( 0 );
820 
821  for( unsigned i = 0; i < GetScreen()->m_ZoomList.size(); ++i )
822  {
823  msg = _( "Zoom " );
824 
825  double level = m_zoomLevelCoeff / (double)GetScreen()->m_ZoomList[i];
826  wxString value = wxString::Format( wxT( "%.2f" ), level );
827  msg += value;
828 
829  m_zoomSelectBox->Append( msg );
830 
831  if( GetScreen()->GetZoom() == GetScreen()->m_ZoomList[i] )
832  m_zoomSelectBox->SetSelection( i + 1 );
833  }
834 }
835 
836 
838 {
839  if( m_FastGrid1 >= (int)GetScreen()->GetGridCount() )
840  return;
841 
842  int cmdId = GetScreen()->GetGrids()[m_FastGrid1].m_CmdId - ID_POPUP_GRID_LEVEL_1000;
843  GetToolManager()->RunAction( "common.Control.gridPreset", true, cmdId );
844 }
845 
846 
848 {
849  if( m_FastGrid2 >= (int)GetScreen()->GetGridCount() )
850  return;
851 
852  int cmdId = GetScreen()->GetGrids()[m_FastGrid2].m_CmdId - ID_POPUP_GRID_LEVEL_1000;
853  GetToolManager()->RunAction( "common.Control.gridPreset", true, cmdId );
854 }
855 
856 
858 {
859  return static_cast<PCB_DRAW_PANEL_GAL*>( EDA_DRAW_FRAME::GetCanvas() );
860 }
861 
862 
864 {
866 
867  EDA_DRAW_PANEL_GAL* canvas = GetCanvas();
868 
869  if( m_toolManager )
870  {
872  GetCanvas()->GetViewControls(), this );
873  }
874 
875  SetBoard( m_Pcb );
876 
877  if( m_toolManager )
879 
880  // Transfer latest current display options from legacy to GAL canvas:
881  auto painter = static_cast<KIGFX::PCB_PAINTER*>( canvas->GetView()->GetPainter() );
882  auto settings = painter->GetSettings();
883  auto displ_opts = (PCB_DISPLAY_OPTIONS*) GetDisplayOptions();
884  settings->LoadDisplayOptions( displ_opts, ShowPageLimits() );
885 
886  canvas->GetView()->RecacheAllItems();
888  canvas->StartDrawing();
889 }
890 
virtual void ReCreateVToolbar()=0
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.
Definition: class_board.h:792
virtual void SetBoard(BOARD *aBoard)
Function SetBoard sets the m_Pcb member in such as way as to ensure deleting any previous BOARD.
void SetZoneSettings(const ZONE_SETTINGS &aSettings)
Definition: class_board.h:565
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:555
EVT_UPDATE_UI(ID_MODEDIT_LOAD_MODULE_FROM_BOARD, FOOTPRINT_EDIT_FRAME::OnUpdateLoadModuleFromBoard) EVT_UPDATE_UI(ID_ADD_FOOTPRINT_TO_BOARD
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:558
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 ...
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:369
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition: confirm.cpp:258
void OnToggleTextDrawMode(wxCommandEvent &aEvent)
int BuildGridsChoiceList(wxArrayString &aGridsList, bool aMmFirst) const
Function BuildGridsChoiceList().
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:263
multilayer pads, usually with holes
Implementation of conversion functions that require both schematic and board internal units.
This file is part of the common library.
TOOL_DISPATCHER * m_toolDispatcher
static const wxChar DisplayViaFillEntry[]
static const wxChar UserGridSizeYEntry[]
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock)
Definition: class_board.h:562
double bestZoom(double sizeX, double sizeY, double scaleFactor, wxPoint centre)
const EDA_RECT GetBoardEdgesBoundingBox() const
Function GetBoardEdgesBoundingBox Returns the board bounding box calculated using exclusively the boa...
Definition: class_board.h:804
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.
static const wxChar DisplayModuleEdgeEntry[]
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:556
static const wxChar DisplayModuleTextEntry[]
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:1401
double RAD2DEG(double rad)
Definition: trigo.h:211
void CommonSettingsChanged(bool aEnvVarsChanged) override
Notification event that some of the common (suite-wide) settings have changed.
Definition: id.h:215
const wxPoint & GetGridOrigin() const override
Return the absolute coordinates of the origin of the snap grid.
int GetWidth() const
Definition: eda_rect.h:117
void OnToggleGraphicDrawMode(wxCommandEvent &aEvent)
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:109
void SetOrigin(const wxPoint &pos)
Definition: eda_rect.h:124
show modules values (when texts are visibles)
virtual void ReCreateOptToolbar()
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:540
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock) override
wxAuiManager m_auimgr
void SetDrawBgColor(COLOR4D aColor) override
double From_User_Unit(EDA_UNITS_T 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:282
VTBL_ENTRY _ELEM * GetElem(ELEM_T aIndex)
Typically wrapped somewhere else in a more meaningful function wrapper.
Definition: project.cpp:205
static const wxChar FastGrid2Entry[]
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
the background color of the draw canvas BLACK for Pcbnew, BLACK or WHITE for eeschema
PCB_LAYER_ID m_Active_Layer
Definition: pcb_screen.h:44
Class TITLE_BLOCK holds the information shown in the lower right corner of a plot,...
Definition: title_block.h:40
void OnUpdateSelectZoom(wxUpdateUIEvent &aEvent)
wxChoice * m_gridSelectBox
Show first run dialog on startup.
void SetAuxOrigin(const wxPoint &aPoint)
Function SetAuxOrigin sets the origin point used for plotting.
Definition: class_board.h:362
void SaveSettings(wxConfigBase *aCfg) override
Saves common frame parameters to a configuration data file.
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
EVT_TOOL(ID_CVPCB_FOOTPRINT_DISPLAY_FILTERED_LIST, CVPCB_MAINFRAME::OnSelectFilteringFootprint) EVT_TOOL(ID_CVPCB_FOOTPRINT_DISPLAY_PIN_FILTERED_LIST
static const wxChar AUTO_ZOOM_KEY[]
Key in KifaceSettings to store the canvas type.
Definitions for tracks, vias and zones.
void * GetDisplayOptions() override
Function GetDisplayOptions returns the display options current in use Display options are relative to...
bool ShowPageLimits() const
Auxiliary rendering target (noncached)
Definition: definitions.h:49
FP_LIB_TABLE GFootprintTable
The global footprint library table.
Definition: pcbnew.cpp:310
void DisplayUnitsMsg()
Display current unit pane on the status bar.
VTBL_ENTRY void SetElem(ELEM_T aIndex, _ELEM *aElem)
Definition: project.cpp:217
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:107
virtual PCB_LAYER_ID GetActiveLayer() const
Function GetActiveLayer returns the active layer.
void InitDataPoints(const wxSize &aPageSizeInternalUnits)
Definition: base_screen.cpp:63
void unitsChangeRefresh() override
Called when when the units setting has changed to allow for any derived classes to handle refreshing ...
timestamp_t GetNewTimeStamp()
Definition: common.cpp:217
Class PCB_DISPLAY_OPTIONS handles display options like enable/disable some optional drawings.
PCB_LAYER_ID
A quick note on layer IDs:
GENERAL_COLLECTORS_GUIDE GetCollectorsGuide()
Function GetCollectorsGuide.
void SetFlags(STATUS_FLAGS aMask)
Definition: base_struct.h:252
virtual void ActivateGalCanvas() override
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:236
PCB_GENERAL_SETTINGS & Settings()
void OnUpdateSelectGrid(wxUpdateUIEvent &aEvent)
Class PAGE_INFO describes the page size and margins of a paper page on which to eventually print or p...
Definition: page_info.h:54
double To_User_Unit(EDA_UNITS_T 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:93
bool m_showBorderAndTitleBlock
Class 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:134
Definition: common.h:158
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.
to draw usual through hole vias
const ZONE_SETTINGS & GetZoneSettings() const
const GRIDS & GetGrids() const
Function GetGrids().
Definition: base_screen.h:339
void Add(BOARD_ITEM *aItem, ADD_MODE aMode=ADD_INSERT) override
Adds an item to the container.
Base window classes and related definitions.
static const wxChar UserGridSizeXEntry[]
Helper dialog and control classes.
void ResetTools(TOOL_BASE::RESET_REASON aReason)
Function ResetTools() Resets all tools (i.e.
static const wxChar DisplayPadNumberEntry[]
wxRealPoint m_Size
Definition: base_screen.h:47
Class KIWAY is a minimalistic software bus for communications between various DLLs/DSOs (DSOs) within...
Definition: kiway.h:258
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:550
void SetGeneralSettings(PCB_GENERAL_SETTINGS *aGeneralSettings)
Definition: class_board.h:577
PCB_GENERAL_SETTINGS m_configSettings
void SetPosition(const wxPoint &aPos) override
const wxPoint & GetAuxOrigin() const
Definition: class_board.h:363
void SetPlotOptions(const PCB_PLOT_PARAMS &aOptions)
Definition: class_board.h:559
virtual void ActivateGalCanvas()
Use to start up the GAL drawing canvas.
void SaveSettings(wxConfigBase *aCfg) override
Saves common frame parameters to a configuration data file.
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.
Class PCB_PLOT_PARAMS handles plot parameters and options when plotting/printing a board.
#define _(s)
virtual KIGFX::PCB_VIEW * GetView() const override
Function GetView() Returns a pointer to the VIEW instance used in the panel.
void StartDrawing()
Function StartDrawing() Begins drawing if it was stopped previously.
KICAD_T Type() override
Definition: fp_lib_table.h:108
void LoadSettings(wxConfigBase *aCfg) override
Load common frame parameters from a configuration file.
int GetHeight() const
Definition: eda_rect.h:118
const wxPoint & GetGridOrigin() const
Definition: class_board.h:370
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...
virtual double BestZoom() override
Function BestZoom.
PCB_DISPLAY_OPTIONS m_DisplayOptions
void UpdateGridSelectBox()
static const wxChar FastGrid1Entry[]
virtual const wxString GetZoomLevelIndicator() const
Return a human readable value which can be displayed as zoom level indicator in dialogs.
virtual void SwitchLayer(wxDC *DC, PCB_LAYER_ID layer)
Class ZONE_SETTINGS handles zones parameters.
Definition: zone_settings.h:49
VTBL_ENTRY FP_LIB_TABLE * PcbFootprintLibs(KIWAY &aKiway)
Return the table of footprint libraries.
bool IsElementVisible(GAL_LAYER_ID aLayer) const
Function IsElementVisible tests whether a given element category is visible.
void DisplayGridMsg()
Function DisplayGridMsg()
const TITLE_BLOCK & GetTitleBlock() const override
static const wxChar UserGridUnitsEntry[]
virtual void OnModify()
Function OnModify Virtual Must be called after a change in order to set the "modify" flag of the curr...
virtual void UpdateStatusBar() override
Update the status bar information.
double m_zoomLevelCoeff
a suitable value to convert the internal zoom scaling factor
virtual void ReCreateHToolbar()=0
smd pads, front layer
TITLE_BLOCK & GetTitleBlock()
Definition: class_board.h:561
see class PGM_BASE
EDA_UNITS_T m_userUnits
Declaration of the eda_3d_viewer class.
bool GetShowPolarCoords() const
For those frames that support polar coordinates.
static const wxChar DisplayPadFillEntry[]
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
Class GRID_TYPE is for grid arrays.
Definition: base_screen.h:43
EDA_UNITS_T GetUserUnits() const
Return the user units currently in use.
PCB_EDIT_FRAME::OnUpdateSelectTrackWidth EVT_UPDATE_UI_RANGE(ID_POPUP_PCB_SELECT_VIASIZE1, ID_POPUP_PCB_SELECT_VIASIZE8, PCB_EDIT_FRAME::OnUpdateSelectViaSize) PCB_EDIT_FRAME
Class BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:161
void SetEventDispatcher(TOOL_DISPATCHER *aEventDispatcher)
Function SetEventDispatcher() Sets a dispatcher that processes events and forwards them to tools.
void LoadSettings(wxConfigBase *aCfg) override
Load common frame parameters from a configuration file.
void SetOrientation(double newangle)
virtual void SetDesignSettings(const BOARD_DESIGN_SETTINGS &aSettings)
size_t i
Definition: json11.cpp:597
int GetCopperLayerCount() const
Function GetCopperLayerCount.
size_t GetGridCount() const
Function GetGridCount().
Definition: base_screen.h:324
Class EDA_RECT handles the component boundary box.
Definition: eda_rect.h:44
const PAGE_INFO & GetPageSettings() const override
#define IU_PER_MILS
Definition: plotter.cpp:134
const ZONE_SETTINGS & GetZoneSettings() const
Definition: class_board.h:564
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).
virtual void ReCreateAuxiliaryToolbar()
PCB_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
wxPoint Centre() const
Definition: eda_rect.h:60
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:56
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
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 NewDisplay(bool aForceImmediateRedraw=false)
Reload and refresh (rebuild) the 3D scene.
Rendering engine changes.
Definition: tool_base.h:83
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:188
#define QUALIFIED_VIEWER3D_FRAMENAME(parent)
Definition: eda_3d_viewer.h:50
class PCB_BASE_FRAME basic PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
EDA_UNITS_T
Definition: common.h:157
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)
static const wxChar ZOOM_KEY[]
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
void SetTimeStamp(timestamp_t aNewTimeStamp)
Definition: base_struct.h:202
Color has changed.
Definition: view_item.h:57
virtual void UpdateMsgPanel()
Redraw the message panel.
Class BOARD_DESIGN_SETTINGS contains design settings for a BOARD object.
const wxString GetZoomLevelIndicator() const override
Function GetZoomLevelIndicator returns a human readable value which can be displayed as zoom level in...
Class COLOR4D is the color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:39