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_MODE::APPEND );
184 
185  module->SetFlags( IS_NEW );
186 
187  module->SetPosition( wxPoint( 0, 0 ) ); // cursor in GAL may not be initialized yet
188 
189  module->SetTimeStamp( GetNewTimeStamp() );
190 
191  // Put it on FRONT layer (note that it might be stored flipped if the lib is an archive
192  // built from a board)
193  if( module->IsFlipped() )
194  module->Flip( module->GetPosition(), m_configSettings.m_FlipLeftRight );
195 
196  // Place it in orientation 0 even if it is not saved with orientation 0 in lib (note that
197  // it might be stored in another orientation if the lib is an archive built from a board)
198  module->SetOrientation( 0 );
199  }
200 }
201 
202 
203 void PCB_BASE_FRAME::SetPageSettings( const PAGE_INFO& aPageSettings )
204 {
205  wxASSERT( m_Pcb );
206  m_Pcb->SetPageSettings( aPageSettings );
207 
208  if( GetScreen() )
209  GetScreen()->InitDataPoints( aPageSettings.GetSizeIU() );
210 }
211 
212 
214 {
215  wxASSERT( m_Pcb );
216  return m_Pcb->GetPageSettings();
217 }
218 
219 
220 const wxSize PCB_BASE_FRAME::GetPageSizeIU() const
221 {
222  wxASSERT( m_Pcb );
223 
224  // this function is only needed because EDA_DRAW_FRAME is not compiled
225  // with either -DPCBNEW or -DEESCHEMA, so the virtual is used to route
226  // into an application specific source file.
227  return m_Pcb->GetPageSettings().GetSizeIU();
228 }
229 
230 
232 {
233  wxASSERT( m_Pcb );
234  return m_Pcb->GetAuxOrigin();
235 }
236 
237 
239 {
240  wxASSERT( m_Pcb );
241  m_Pcb->SetAuxOrigin( aPoint );
242 }
243 
244 
246 {
247  wxASSERT( m_Pcb );
248  return m_Pcb->GetGridOrigin();
249 }
250 
251 
253 {
254  wxASSERT( m_Pcb );
255  m_Pcb->SetGridOrigin( aPoint );
256 }
257 
258 
260 {
261  wxASSERT( m_Pcb );
262  return m_Pcb->GetTitleBlock();
263 }
264 
265 
266 void PCB_BASE_FRAME::SetTitleBlock( const TITLE_BLOCK& aTitleBlock )
267 {
268  wxASSERT( m_Pcb );
269  m_Pcb->SetTitleBlock( aTitleBlock );
270 }
271 
272 
274 {
275  wxASSERT( m_Pcb );
276  return m_Pcb->GetDesignSettings();
277 }
278 
279 
281 {
282  wxASSERT( m_Pcb );
283  m_Pcb->SetDesignSettings( aSettings );
284 }
285 
286 
288 {
289  m_drawBgColor= aColor;
290  m_auimgr.Update();
291 }
292 
293 
295 {
296  wxASSERT( m_Pcb );
297  return m_Pcb->GetZoneSettings();
298 }
299 
300 
302 {
303  wxASSERT( m_Pcb );
304  m_Pcb->SetZoneSettings( aSettings );
305 }
306 
307 
309 {
310  wxASSERT( m_Pcb );
311  return m_Pcb->GetPlotOptions();
312 }
313 
314 
316 {
317  wxASSERT( m_Pcb );
318  m_Pcb->SetPlotOptions( aSettings );
319 }
320 
321 
322 EDA_RECT PCB_BASE_FRAME::GetBoardBoundingBox( bool aBoardEdgesOnly ) const
323 {
324  wxASSERT( m_Pcb );
325 
326  EDA_RECT area = aBoardEdgesOnly ? m_Pcb->GetBoardEdgesBoundingBox() : m_Pcb->GetBoundingBox();
327 
328  if( area.GetWidth() == 0 && area.GetHeight() == 0 )
329  {
330  wxSize pageSize = GetPageSizeIU();
331 
333  {
334  area.SetOrigin( 0, 0 );
335  area.SetEnd( pageSize.x, pageSize.y );
336  }
337  else
338  {
339  area.SetOrigin( -pageSize.x / 2, -pageSize.y / 2 );
340  area.SetEnd( pageSize.x / 2, pageSize.y / 2 );
341  }
342  }
343 
344  return area;
345 }
346 
347 
348 // Virtual function
350 {
351 }
352 
353 
355 {
356  // call my base class
358 
359  // tooltips in toolbars
361 
362  // status bar
363  UpdateMsgPanel();
364 }
365 
366 
368 {
369  EDA_3D_VIEWER* draw3DFrame = Get3DViewerFrame();
370 
371  if( !draw3DFrame )
372  draw3DFrame = new EDA_3D_VIEWER( &Kiway(), this, _( "3D Viewer" ) );
373 
374  // Raising the window does not show the window on Windows if iconized. This should work
375  // on any platform.
376  if( draw3DFrame->IsIconized() )
377  draw3DFrame->Iconize( false );
378 
379  draw3DFrame->Raise();
380  draw3DFrame->Show( true );
381 
382  // Raising the window does not set the focus on Linux. This should work on any platform.
383  if( wxWindow::FindFocus() != draw3DFrame )
384  draw3DFrame->SetFocus();
385 
386  return draw3DFrame;
387 }
388 
389 
390 // Note: virtual, overridden in PCB_EDIT_FRAME;
392 {
393  PCB_LAYER_ID preslayer = GetActiveLayer();
394  auto& displ_opts = GetDisplayOptions();
395 
396  // Check if the specified layer matches the present layer
397  if( layer == preslayer )
398  return;
399 
400  // Copper layers cannot be selected unconditionally; how many of those layers are
401  // currently enabled needs to be checked.
402  if( IsCopperLayer( layer ) )
403  {
404  // If only one copper layer is enabled, the only such layer that can be selected to
405  // is the "Copper" layer (so the selection of any other copper layer is disregarded).
406  if( m_Pcb->GetCopperLayerCount() < 2 )
407  {
408  if( layer != B_Cu )
409  return;
410  }
411 
412  // If more than one copper layer is enabled, the "Copper" and "Component" layers
413  // can be selected, but the total number of copper layers determines which internal
414  // layers are also capable of being selected.
415  else
416  {
417  if( layer != B_Cu && layer != F_Cu && layer >= ( m_Pcb->GetCopperLayerCount() - 1 ) )
418  return;
419  }
420  }
421 
422  // Is yet more checking required? E.g. when the layer to be selected is a non-copper
423  // layer, or when switching between a copper layer and a non-copper layer, or vice-versa?
424  // ...
425 
426  SetActiveLayer( layer );
427 
428  if( displ_opts.m_ContrastModeDisplay )
429  GetCanvas()->Refresh();
430 }
431 
432 
433 void PCB_BASE_FRAME::OnTogglePadDrawMode( wxCommandEvent& aEvent )
434 {
435  auto displ_opts = GetDisplayOptions();
436 
437  displ_opts.m_DisplayPadFill = !displ_opts.m_DisplayPadFill;
438 
439  if( GetCanvas() )
440  {
441  // Apply new display options to the GAL canvas
442  auto view = static_cast<KIGFX::PCB_VIEW*>( GetCanvas()->GetView() );
443  view->UpdateDisplayOptions( displ_opts );
444 
445  // Update pads
446  BOARD* board = GetBoard();
447  for( auto module : board->Modules() )
448  {
449  for( auto pad : module->Pads() )
450  view->Update( pad, KIGFX::GEOMETRY );
451  }
452  }
453 
454  SetDisplayOptions( displ_opts );
455  GetCanvas()->Refresh();
456 }
457 
458 
459 void PCB_BASE_FRAME::OnToggleGraphicDrawMode( wxCommandEvent& aEvent )
460 {
461  auto displ_opts = GetDisplayOptions();
462  displ_opts.m_DisplayDrawItemsFill = !displ_opts.m_DisplayDrawItemsFill;
463  SetDisplayOptions( displ_opts );
464  GetCanvas()->Refresh();
465 }
466 
467 
468 void PCB_BASE_FRAME::OnToggleEdgeDrawMode( wxCommandEvent& aEvent )
469 {
470  auto displ_opts = GetDisplayOptions();
471  displ_opts.m_DisplayModEdgeFill = !displ_opts.m_DisplayModEdgeFill;
472 
473  if( GetCanvas() )
474  {
475  // Apply new display options to the GAL canvas
476  auto view = static_cast<KIGFX::PCB_VIEW*>( GetCanvas()->GetView() );
477  view->UpdateDisplayOptions( displ_opts );
478  view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
479  }
480 
481  SetDisplayOptions( displ_opts );
482  GetCanvas()->Refresh();
483 }
484 
485 
486 void PCB_BASE_FRAME::OnToggleTextDrawMode( wxCommandEvent& aEvent )
487 {
488  auto displ_opts = GetDisplayOptions();
489  displ_opts.m_DisplayModTextFill = !displ_opts.m_DisplayModTextFill;
490 
491  if( GetCanvas() )
492  {
493  // Apply new display options to the canvas
494  auto view = static_cast<KIGFX::PCB_VIEW*>( GetCanvas()->GetView() );
495  view->UpdateDisplayOptions( displ_opts );
496  view->MarkTargetDirty( KIGFX::TARGET_NONCACHED );
497  }
498 
499  SetDisplayOptions( displ_opts );
500  GetCanvas()->Refresh();
501 }
502 
503 
504 void PCB_BASE_FRAME::OnUpdateSelectZoom( wxUpdateUIEvent& aEvent )
505 {
506  if( m_zoomSelectBox == NULL || m_zoomSelectBox->GetParent() == NULL )
507  return;
508 
509  int current = 0; // display Auto if no match found
510 
511  // check for a match within 1%
512  double zoom = GetCanvas()->GetLegacyZoom();
513 
514  for( unsigned i = 0; i < GetScreen()->m_ZoomList.size(); i++ )
515  {
516  if( std::fabs( zoom - GetScreen()->m_ZoomList[i] ) < ( zoom / 100.0 ) )
517  {
518  current = i + 1;
519  break;
520  }
521  }
522 
523  if( current != m_zoomSelectBox->GetSelection() )
524  m_zoomSelectBox->SetSelection( current );
525 }
526 
527 
529 {
531  GetCanvas()->GetView() );
532 
533  // account for the globals
535  guide.SetIgnoreMTextsOnBack( ! m_Pcb->IsElementVisible( LAYER_MOD_TEXT_BK ) );
536  guide.SetIgnoreMTextsOnFront( ! m_Pcb->IsElementVisible( LAYER_MOD_TEXT_FR ) );
537  guide.SetIgnoreModulesOnBack( ! m_Pcb->IsElementVisible( LAYER_MOD_BK ) );
538  guide.SetIgnoreModulesOnFront( ! m_Pcb->IsElementVisible( LAYER_MOD_FR ) );
539  guide.SetIgnorePadsOnBack( ! m_Pcb->IsElementVisible( LAYER_PAD_BK ) );
540  guide.SetIgnorePadsOnFront( ! m_Pcb->IsElementVisible( LAYER_PAD_FR ) );
541  guide.SetIgnoreThroughHolePads( ! m_Pcb->IsElementVisible( LAYER_PADS_TH ) );
542  guide.SetIgnoreModulesVals( ! m_Pcb->IsElementVisible( LAYER_MOD_VALUES ) );
543  guide.SetIgnoreModulesRefs( ! m_Pcb->IsElementVisible( LAYER_MOD_REFERENCES ) );
544  guide.SetIgnoreThroughVias( ! m_Pcb->IsElementVisible( LAYER_VIA_THROUGH ) );
545  guide.SetIgnoreBlindBuriedVias( ! m_Pcb->IsElementVisible( LAYER_VIA_BBLIND ) );
546  guide.SetIgnoreMicroVias( ! m_Pcb->IsElementVisible( LAYER_VIA_MICROVIA ) );
547  guide.SetIgnoreTracks( ! m_Pcb->IsElementVisible( LAYER_TRACKS ) );
548 
549  return guide;
550 }
551 
552 
553 /*
554  * Display the grid status.
555  */
557 {
558  wxString line;
559  wxString gridformatter;
560 
561  switch( m_userUnits )
562  {
563  case EDA_UNITS::INCHES:
564  gridformatter = "grid X %.6f Y %.6f";
565  break;
566 
568  gridformatter = "grid X %.6f Y %.6f";
569  break;
570 
571  default:
572  gridformatter = "grid X %f Y %f";
573  break;
574  }
575 
576  BASE_SCREEN* screen = GetScreen();
577  wxArrayString gridsList;
578 
579  int icurr = screen->BuildGridsChoiceList( gridsList, m_userUnits != EDA_UNITS::INCHES );
580  GRID_TYPE& grid = screen->GetGrid( icurr );
581  double grid_x = To_User_Unit( m_userUnits, grid.m_Size.x );
582  double grid_y = To_User_Unit( m_userUnits, grid.m_Size.y );
583  line.Printf( gridformatter, grid_x, grid_y );
584 
585  SetStatusText( line, 4 );
586 }
587 
588 
589 /*
590  * Update the status bar information.
591  */
593 {
595 
596  BASE_SCREEN* screen = GetScreen();
597 
598  if( !screen )
599  return;
600 
601  wxString line;
603 
604  if( GetShowPolarCoords() ) // display polar coordinates
605  {
606  double dx = cursorPos.x - screen->m_LocalOrigin.x;
607  double dy = cursorPos.y - screen->m_LocalOrigin.y;
608  double theta = RAD2DEG( atan2( -dy, dx ) );
609  double ro = hypot( dx, dy );
610  wxString formatter;
611 
612  switch( GetUserUnits() )
613  {
614  case EDA_UNITS::INCHES:
615  formatter = wxT( "r %.6f theta %.1f" );
616  break;
618  formatter = wxT( "r %.6f theta %.1f" );
619  break;
620  case EDA_UNITS::UNSCALED:
621  formatter = wxT( "r %f theta %f" );
622  break;
623  default: wxASSERT( false ); break;
624  }
625 
626  line.Printf( formatter, To_User_Unit( GetUserUnits(), ro ), theta );
627 
628  SetStatusText( line, 3 );
629  }
630 
631  // Display absolute coordinates:
632  double dXpos = To_User_Unit( GetUserUnits(), cursorPos.x );
633  double dYpos = To_User_Unit( GetUserUnits(), cursorPos.y );
634 
635  // The following sadly is an if Eeschema/if Pcbnew
636  wxString absformatter;
637  wxString locformatter;
638 
639  switch( GetUserUnits() )
640  {
641  case EDA_UNITS::INCHES:
642  absformatter = "X %.6f Y %.6f";
643  locformatter = "dx %.6f dy %.6f dist %.4f";
644  break;
645 
647  absformatter = "X %.6f Y %.6f";
648  locformatter = "dx %.6f dy %.6f dist %.3f";
649  break;
650 
651  case EDA_UNITS::UNSCALED:
652  absformatter = "X %f Y %f";
653  locformatter = "dx %f dy %f dist %f";
654  break;
655 
656  default:
657  wxASSERT( false );
658  break;
659  }
660 
661  line.Printf( absformatter, dXpos, dYpos );
662  SetStatusText( line, 2 );
663 
664  if( !GetShowPolarCoords() ) // display relative cartesian coordinates
665  {
666  // Display relative coordinates:
667  dXpos = To_User_Unit( GetUserUnits(), cursorPos.x - screen->m_LocalOrigin.x );
668  dYpos = To_User_Unit( GetUserUnits(), cursorPos.y - screen->m_LocalOrigin.y );
669 
670  // We already decided the formatter above
671  line.Printf( locformatter, dXpos, dYpos, hypot( dXpos, dYpos ) );
672  SetStatusText( line, 3 );
673  }
674 
675  DisplayGridMsg();
676 }
677 
678 
680 {
681  EDA_DRAW_FRAME::unitsChangeRefresh(); // Update the status bar.
682 
684 }
685 
686 
687 void PCB_BASE_FRAME::LoadSettings( wxConfigBase* aCfg )
688 {
690 
691  // Ensure grid id is an existent grid id:
692  if( (m_LastGridSizeId <= 0) ||
695 
696  wxString baseCfgName = GetName();
697 
698  EDA_UNITS userGridUnits;
699  aCfg->Read( baseCfgName + UserGridUnitsEntry, (int*) &userGridUnits, (int) EDA_UNITS::INCHES );
700 
701  double tmp;
702  aCfg->Read( baseCfgName + UserGridSizeXEntry, &tmp, 0.01 );
703  m_UserGridSize.x = (int) From_User_Unit( userGridUnits, tmp );
704 
705  aCfg->Read( baseCfgName + UserGridSizeYEntry, &tmp, 0.01 );
706  m_UserGridSize.y = (int) From_User_Unit( userGridUnits, tmp );
707 
708  aCfg->Read( baseCfgName + DisplayPadFillEntry, &m_DisplayOptions.m_DisplayPadFill, true );
709  aCfg->Read( baseCfgName + DisplayViaFillEntry, &m_DisplayOptions.m_DisplayViaFill, true );
710  aCfg->Read( baseCfgName + DisplayPadNumberEntry, &m_DisplayOptions.m_DisplayPadNum, true );
711  aCfg->Read( baseCfgName + DisplayModuleEdgeEntry, &m_DisplayOptions.m_DisplayModEdgeFill, true );
712 
713  long itmp;
714  aCfg->Read( baseCfgName + FastGrid1Entry, &itmp, ( long )0);
715  m_FastGrid1 = itmp;
716  aCfg->Read( baseCfgName + FastGrid2Entry, &itmp, ( long )0);
717  m_FastGrid2 = itmp;
718 
719  aCfg->Read( baseCfgName + DisplayModuleTextEntry, &m_DisplayOptions.m_DisplayModTextFill, true );
720 }
721 
722 
723 void PCB_BASE_FRAME::SaveSettings( wxConfigBase* aCfg )
724 {
726 
727  wxString baseCfgName = GetName();
728 
729  aCfg->Write( baseCfgName + UserGridSizeXEntry, To_User_Unit( m_userUnits, m_UserGridSize.x ) );
730  aCfg->Write( baseCfgName + UserGridSizeYEntry, To_User_Unit( m_userUnits, m_UserGridSize.y ) );
731  aCfg->Write( baseCfgName + UserGridUnitsEntry, ( long )m_userUnits );
732  aCfg->Write( baseCfgName + DisplayPadFillEntry, m_DisplayOptions.m_DisplayPadFill );
733  aCfg->Write( baseCfgName + DisplayViaFillEntry, m_DisplayOptions.m_DisplayViaFill );
734  aCfg->Write( baseCfgName + DisplayPadNumberEntry, m_DisplayOptions.m_DisplayPadNum );
735  aCfg->Write( baseCfgName + DisplayModuleEdgeEntry, m_DisplayOptions.m_DisplayModEdgeFill );
736  aCfg->Write( baseCfgName + DisplayModuleTextEntry, m_DisplayOptions.m_DisplayModTextFill );
737  aCfg->Write( baseCfgName + FastGrid1Entry, ( long )m_FastGrid1 );
738  aCfg->Write( baseCfgName + FastGrid2Entry, ( long )m_FastGrid2 );
739 }
740 
741 
742 void PCB_BASE_FRAME::CommonSettingsChanged( bool aEnvVarsChanged )
743 {
744  EDA_DRAW_FRAME::CommonSettingsChanged( aEnvVarsChanged );
745 
747 
748  // The 3D viewer isn't in the Kiway, so send its update manually
749  EDA_3D_VIEWER* viewer = Get3DViewerFrame();
750 
751  if( viewer )
752  viewer->CommonSettingsChanged( aEnvVarsChanged );
753 }
754 
755 
757 {
758  GetScreen()->SetModify();
759  GetScreen()->SetSave();
760 
761  UpdateStatusBar();
762  UpdateMsgPanel();
763 }
764 
765 
767 {
769 }
770 
771 
773 {
774  UpdateStatusBar();
775  DisplayUnitsMsg();
776 
777  if( m_gridSelectBox == NULL )
778  return;
779 
780  // Update grid values with the current units setting.
781  m_gridSelectBox->Clear();
782  wxArrayString gridsList;
783  int icurr = GetScreen()->BuildGridsChoiceList( gridsList, GetUserUnits() != EDA_UNITS::INCHES );
784 
785  for( size_t i = 0; i < GetScreen()->GetGridCount(); i++ )
786  {
787  GRID_TYPE& grid = GetScreen()->GetGrid( i );
788  m_gridSelectBox->Append( gridsList[i], (void*) &grid.m_CmdId );
789  }
790 
791  m_gridSelectBox->Append( wxT( "---" ) );
792  m_gridSelectBox->Append( _( "Edit user grid..." ) );
793 
794  m_gridSelectBox->SetSelection( icurr );
795 }
796 
797 
799 {
800  if( m_zoomSelectBox == NULL )
801  return;
802 
803  wxString msg;
804 
805  m_zoomSelectBox->Clear();
806  m_zoomSelectBox->Append( _( "Zoom Auto" ) );
807  m_zoomSelectBox->SetSelection( 0 );
808 
809  for( unsigned i = 0; i < GetScreen()->m_ZoomList.size(); ++i )
810  {
811  msg = _( "Zoom " );
812 
813  double level = m_zoomLevelCoeff / (double)GetScreen()->m_ZoomList[i];
814  wxString value = wxString::Format( wxT( "%.2f" ), level );
815  msg += value;
816 
817  m_zoomSelectBox->Append( msg );
818 
819  if( GetScreen()->GetZoom() == GetScreen()->m_ZoomList[i] )
820  m_zoomSelectBox->SetSelection( i + 1 );
821  }
822 }
823 
824 
826 {
827  if( m_FastGrid1 >= (int)GetScreen()->GetGridCount() )
828  return;
829 
830  int cmdId = GetScreen()->GetGrids()[m_FastGrid1].m_CmdId - ID_POPUP_GRID_LEVEL_1000;
831  GetToolManager()->RunAction( "common.Control.gridPreset", true, cmdId );
832 }
833 
834 
836 {
837  if( m_FastGrid2 >= (int)GetScreen()->GetGridCount() )
838  return;
839 
840  int cmdId = GetScreen()->GetGrids()[m_FastGrid2].m_CmdId - ID_POPUP_GRID_LEVEL_1000;
841  GetToolManager()->RunAction( "common.Control.gridPreset", true, cmdId );
842 }
843 
844 
846 {
848 }
849 
850 
852 {
853  m_DisplayOptions.m_ShowGrid = aVisible;
854 
855  // Update the display with the new grid
856  if( GetCanvas() )
857  {
858  // Check to ensure these exist, since this function could be called before
859  // the GAL and View have been created
860  if( GetCanvas()->GetGAL() )
861  GetCanvas()->GetGAL()->SetGridVisibility( aVisible );
862 
863  if( GetCanvas()->GetView() )
865 
866  GetCanvas()->Refresh();
867  }
868 }
869 
870 
872 {
873  return static_cast<PCB_DRAW_PANEL_GAL*>( EDA_DRAW_FRAME::GetCanvas() );
874 }
875 
876 
878 {
880 
881  EDA_DRAW_PANEL_GAL* canvas = GetCanvas();
882 
883  if( m_toolManager )
884  {
886  GetCanvas()->GetViewControls(), this );
887  }
888 
889  SetBoard( m_Pcb );
890 
891  if( m_toolManager )
893 
894  // Transfer latest current display options from legacy to GAL canvas:
895  auto painter = static_cast<KIGFX::PCB_PAINTER*>( canvas->GetView()->GetPainter() );
896  auto settings = painter->GetSettings();
897  auto displ_opts = GetDisplayOptions();
898  settings->LoadDisplayOptions( displ_opts, ShowPageLimits() );
899 
900  canvas->GetView()->RecacheAllItems();
902  canvas->StartDrawing();
903 
904  // Initialize the grid settings
905  GetCanvas()->GetGAL()->SetGridSize( VECTOR2D( GetScreen()->GetGridSize() ) );
907 }
908 
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:72
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.
Definition: class_board.h:779
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:545
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:548
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:359
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
Definition: confirm.cpp:249
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
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:552
const EDA_RECT GetBoardEdgesBoundingBox() const
Function GetBoardEdgesBoundingBox Returns the board bounding box calculated using exclusively the boa...
Definition: class_board.h:791
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.
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:546
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:1402
double RAD2DEG(double rad)
Definition: trigo.h:211
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:291
void CommonSettingsChanged(bool aEnvVarsChanged) override
Notification event that some of the common (suite-wide) settings have changed.
Definition: id.h:200
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 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:109
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:530
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: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
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
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:352
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
static const wxChar AUTO_ZOOM_KEY[]
Key in KifaceSettings to store the canvas type.
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: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: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.
timestamp_t GetNewTimeStamp()
Definition: common.cpp:215
PCB_LAYER_ID
A quick note on layer IDs:
GENERAL_COLLECTORS_GUIDE GetCollectorsGuide()
Function GetCollectorsGuide.
void SetFlags(STATUS_FLAGS aMask)
Definition: base_struct.h:255
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:226
void MarkTargetDirty(int aTarget)
Function MarkTargetDirty() Sets or clears target 'dirty' flag.
Definition: view.h:585
PCB_GENERAL_SETTINGS & Settings()
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
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.
to draw usual through hole vias
const ZONE_SETTINGS & GetZoneSettings() const
const GRIDS & GetGrids() const
Function GetGrids().
Definition: base_screen.h:339
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
KIWAY is a minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the s...
Definition: kiway.h:274
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:540
void SetGeneralSettings(PCB_GENERAL_SETTINGS *aGeneralSettings)
Definition: class_board.h:564
PCB_GENERAL_SETTINGS m_configSettings
void SetPosition(const wxPoint &aPos) override
const wxPoint & GetAuxOrigin() const
Definition: class_board.h:353
void SetPlotOptions(const PCB_PLOT_PARAMS &aOptions)
Definition: class_board.h:549
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 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.
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
void LoadSettings(wxConfigBase *aCfg) override
Load common frame parameters from a configuration file.
int GetHeight() const
Definition: eda_rect.h:120
const wxPoint & GetGridOrigin() const
Definition: class_board.h:360
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()
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)
ZONE_SETTINGS handles zones parameters.
Definition: zone_settings.h:58
VTBL_ENTRY FP_LIB_TABLE * PcbFootprintLibs(KIWAY &aKiway)
Return the table of footprint libraries.
Definition: project.cpp:400
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...
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:551
see class PGM_BASE
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
GRID_TYPE is for grid arrays.
Definition: base_screen.h:43
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
BOARD holds information pertinent to a Pcbnew printed circuit board.
Definition: class_board.h:160
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.
#define _(s)
Definition: 3d_actions.cpp:31
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: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:210
#define QUALIFIED_VIEWER3D_FRAMENAME(parent)
Definition: eda_3d_viewer.h:50
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.
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: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.
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:39