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 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 
231 const wxPoint& PCB_BASE_FRAME::GetAuxOrigin() const
232 {
233  wxASSERT( m_Pcb );
234  return m_Pcb->GetAuxOrigin();
235 }
236 
237 
238 void PCB_BASE_FRAME::SetAuxOrigin( const wxPoint& aPoint )
239 {
240  wxASSERT( m_Pcb );
241  m_Pcb->SetAuxOrigin( aPoint );
242 }
243 
244 
245 const wxPoint& PCB_BASE_FRAME::GetGridOrigin() const
246 {
247  wxASSERT( m_Pcb );
248  return m_Pcb->GetGridOrigin();
249 }
250 
251 
252 void PCB_BASE_FRAME::SetGridOrigin( const wxPoint& aPoint )
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 INCHES:
564  gridformatter = "grid X %.6f Y %.6f";
565  break;
566 
567  case MILLIMETRES:
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 != 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 INCHES: formatter = wxT( "r %.6f theta %.1f" ); break;
615  case MILLIMETRES: formatter = wxT( "r %.6f theta %.1f" ); break;
616  case UNSCALED_UNITS: formatter = wxT( "r %f theta %f" ); break;
617  default: wxASSERT( false ); break;
618  }
619 
620  line.Printf( formatter, To_User_Unit( GetUserUnits(), ro ), theta );
621 
622  SetStatusText( line, 3 );
623  }
624 
625  // Display absolute coordinates:
626  double dXpos = To_User_Unit( GetUserUnits(), cursorPos.x );
627  double dYpos = To_User_Unit( GetUserUnits(), cursorPos.y );
628 
629  // The following sadly is an if Eeschema/if Pcbnew
630  wxString absformatter;
631  wxString locformatter;
632 
633  switch( GetUserUnits() )
634  {
635  case INCHES:
636  absformatter = "X %.6f Y %.6f";
637  locformatter = "dx %.6f dy %.6f dist %.4f";
638  break;
639 
640  case MILLIMETRES:
641  absformatter = "X %.6f Y %.6f";
642  locformatter = "dx %.6f dy %.6f dist %.3f";
643  break;
644 
645  case UNSCALED_UNITS:
646  absformatter = "X %f Y %f";
647  locformatter = "dx %f dy %f dist %f";
648  break;
649 
650  default:
651  wxASSERT( false );
652  break;
653  }
654 
655  line.Printf( absformatter, dXpos, dYpos );
656  SetStatusText( line, 2 );
657 
658  if( !GetShowPolarCoords() ) // display relative cartesian coordinates
659  {
660  // Display relative coordinates:
661  dXpos = To_User_Unit( GetUserUnits(), cursorPos.x - screen->m_LocalOrigin.x );
662  dYpos = To_User_Unit( GetUserUnits(), cursorPos.y - screen->m_LocalOrigin.y );
663 
664  // We already decided the formatter above
665  line.Printf( locformatter, dXpos, dYpos, hypot( dXpos, dYpos ) );
666  SetStatusText( line, 3 );
667  }
668 
669  DisplayGridMsg();
670 }
671 
672 
674 {
675  EDA_DRAW_FRAME::unitsChangeRefresh(); // Update the status bar.
676 
678 }
679 
680 
681 void PCB_BASE_FRAME::LoadSettings( wxConfigBase* aCfg )
682 {
684 
685  // Ensure grid id is an existent grid id:
686  if( (m_LastGridSizeId <= 0) ||
689 
690  wxString baseCfgName = GetName();
691 
692  EDA_UNITS_T userGridUnits;
693  aCfg->Read( baseCfgName + UserGridUnitsEntry, ( int* )&userGridUnits, ( int )INCHES );
694 
695  double tmp;
696  aCfg->Read( baseCfgName + UserGridSizeXEntry, &tmp, 0.01 );
697  m_UserGridSize.x = (int) From_User_Unit( userGridUnits, tmp );
698 
699  aCfg->Read( baseCfgName + UserGridSizeYEntry, &tmp, 0.01 );
700  m_UserGridSize.y = (int) From_User_Unit( userGridUnits, tmp );
701 
702  aCfg->Read( baseCfgName + DisplayPadFillEntry, &m_DisplayOptions.m_DisplayPadFill, true );
703  aCfg->Read( baseCfgName + DisplayViaFillEntry, &m_DisplayOptions.m_DisplayViaFill, true );
704  aCfg->Read( baseCfgName + DisplayPadNumberEntry, &m_DisplayOptions.m_DisplayPadNum, true );
705  aCfg->Read( baseCfgName + DisplayModuleEdgeEntry, &m_DisplayOptions.m_DisplayModEdgeFill, true );
706 
707  long itmp;
708  aCfg->Read( baseCfgName + FastGrid1Entry, &itmp, ( long )0);
709  m_FastGrid1 = itmp;
710  aCfg->Read( baseCfgName + FastGrid2Entry, &itmp, ( long )0);
711  m_FastGrid2 = itmp;
712 
713  aCfg->Read( baseCfgName + DisplayModuleTextEntry, &m_DisplayOptions.m_DisplayModTextFill, true );
714 }
715 
716 
717 void PCB_BASE_FRAME::SaveSettings( wxConfigBase* aCfg )
718 {
720 
721  wxString baseCfgName = GetName();
722 
723  aCfg->Write( baseCfgName + UserGridSizeXEntry, To_User_Unit( m_userUnits, m_UserGridSize.x ) );
724  aCfg->Write( baseCfgName + UserGridSizeYEntry, To_User_Unit( m_userUnits, m_UserGridSize.y ) );
725  aCfg->Write( baseCfgName + UserGridUnitsEntry, ( long )m_userUnits );
726  aCfg->Write( baseCfgName + DisplayPadFillEntry, m_DisplayOptions.m_DisplayPadFill );
727  aCfg->Write( baseCfgName + DisplayViaFillEntry, m_DisplayOptions.m_DisplayViaFill );
728  aCfg->Write( baseCfgName + DisplayPadNumberEntry, m_DisplayOptions.m_DisplayPadNum );
729  aCfg->Write( baseCfgName + DisplayModuleEdgeEntry, m_DisplayOptions.m_DisplayModEdgeFill );
730  aCfg->Write( baseCfgName + DisplayModuleTextEntry, m_DisplayOptions.m_DisplayModTextFill );
731  aCfg->Write( baseCfgName + FastGrid1Entry, ( long )m_FastGrid1 );
732  aCfg->Write( baseCfgName + FastGrid2Entry, ( long )m_FastGrid2 );
733 }
734 
735 
736 void PCB_BASE_FRAME::CommonSettingsChanged( bool aEnvVarsChanged )
737 {
738  EDA_DRAW_FRAME::CommonSettingsChanged( aEnvVarsChanged );
739 
741 
742  // The 3D viewer isn't in the Kiway, so send its update manually
743  EDA_3D_VIEWER* viewer = Get3DViewerFrame();
744 
745  if( viewer )
746  viewer->CommonSettingsChanged( aEnvVarsChanged );
747 }
748 
749 
751 {
752  GetScreen()->SetModify();
753  GetScreen()->SetSave();
754 
755  UpdateStatusBar();
756  UpdateMsgPanel();
757 }
758 
759 
761 {
763 }
764 
765 
767 {
768  UpdateStatusBar();
769  DisplayUnitsMsg();
770 
771  if( m_gridSelectBox == NULL )
772  return;
773 
774  // Update grid values with the current units setting.
775  m_gridSelectBox->Clear();
776  wxArrayString gridsList;
777  int icurr = GetScreen()->BuildGridsChoiceList( gridsList, GetUserUnits() != INCHES );
778 
779  for( size_t i = 0; i < GetScreen()->GetGridCount(); i++ )
780  {
781  GRID_TYPE& grid = GetScreen()->GetGrid( i );
782  m_gridSelectBox->Append( gridsList[i], (void*) &grid.m_CmdId );
783  }
784 
785  m_gridSelectBox->Append( wxT( "---" ) );
786  m_gridSelectBox->Append( _( "Edit user grid..." ) );
787 
788  m_gridSelectBox->SetSelection( icurr );
789 }
790 
791 
793 {
794  if( m_zoomSelectBox == NULL )
795  return;
796 
797  wxString msg;
798 
799  m_zoomSelectBox->Clear();
800  m_zoomSelectBox->Append( _( "Zoom Auto" ) );
801  m_zoomSelectBox->SetSelection( 0 );
802 
803  for( unsigned i = 0; i < GetScreen()->m_ZoomList.size(); ++i )
804  {
805  msg = _( "Zoom " );
806 
807  double level = m_zoomLevelCoeff / (double)GetScreen()->m_ZoomList[i];
808  wxString value = wxString::Format( wxT( "%.2f" ), level );
809  msg += value;
810 
811  m_zoomSelectBox->Append( msg );
812 
813  if( GetScreen()->GetZoom() == GetScreen()->m_ZoomList[i] )
814  m_zoomSelectBox->SetSelection( i + 1 );
815  }
816 }
817 
818 
820 {
821  if( m_FastGrid1 >= (int)GetScreen()->GetGridCount() )
822  return;
823 
824  int cmdId = GetScreen()->GetGrids()[m_FastGrid1].m_CmdId - ID_POPUP_GRID_LEVEL_1000;
825  GetToolManager()->RunAction( "common.Control.gridPreset", true, cmdId );
826 }
827 
828 
830 {
831  if( m_FastGrid2 >= (int)GetScreen()->GetGridCount() )
832  return;
833 
834  int cmdId = GetScreen()->GetGrids()[m_FastGrid2].m_CmdId - ID_POPUP_GRID_LEVEL_1000;
835  GetToolManager()->RunAction( "common.Control.gridPreset", true, cmdId );
836 }
837 
838 
840 {
841  return static_cast<PCB_DRAW_PANEL_GAL*>( EDA_DRAW_FRAME::GetCanvas() );
842 }
843 
844 
846 {
848 
849  EDA_DRAW_PANEL_GAL* canvas = GetCanvas();
850 
851  if( m_toolManager )
852  {
854  GetCanvas()->GetViewControls(), this );
855  }
856 
857  SetBoard( m_Pcb );
858 
859  if( m_toolManager )
861 
862  // Transfer latest current display options from legacy to GAL canvas:
863  auto painter = static_cast<KIGFX::PCB_PAINTER*>( canvas->GetView()->GetPainter() );
864  auto settings = painter->GetSettings();
865  auto displ_opts = GetDisplayOptions();
866  settings->LoadDisplayOptions( displ_opts, ShowPageLimits() );
867 
868  canvas->GetView()->RecacheAllItems();
870  canvas->StartDrawing();
871 }
872 
const EDA_RECT GetBoundingBox() const override
Function GetBoundingBox returns the orthogonal, bounding box of this object for display purposes.
Definition: class_board.h:780
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:546
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:549
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:360
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().
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:288
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:553
const EDA_RECT GetBoardEdgesBoundingBox() const
Function GetBoardEdgesBoundingBox Returns the board bounding box calculated using exclusively the boa...
Definition: class_board.h:792
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:547
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
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: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:531
void SetTitleBlock(const TITLE_BLOCK &aTitleBlock) override
void SetDisplayOptions(const PCB_DISPLAY_OPTIONS &aOptions)
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:289
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...
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
void SetAuxOrigin(const wxPoint &aPoint)
Function SetAuxOrigin sets the origin point used for plotting.
Definition: class_board.h:353
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
FP_LIB_TABLE GFootprintTable
The global footprint library table.
Definition: pcbnew.cpp:311
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: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
PCB_LAYER_ID
A quick note on layer IDs:
GENERAL_COLLECTORS_GUIDE GetCollectorsGuide()
Function GetCollectorsGuide.
void SetFlags(STATUS_FLAGS aMask)
Definition: base_struct.h:265
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:227
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:192
Definition: common.h:134
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:274
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:541
void SetGeneralSettings(PCB_GENERAL_SETTINGS *aGeneralSettings)
Definition: class_board.h:565
PCB_GENERAL_SETTINGS m_configSettings
void SetPosition(const wxPoint &aPos) override
const wxPoint & GetAuxOrigin() const
Definition: class_board.h:354
void SetPlotOptions(const PCB_PLOT_PARAMS &aOptions)
Definition: class_board.h:550
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.
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:120
const wxPoint & GetGridOrigin() const
Definition: class_board.h:361
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)
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...
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:552
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:649
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:136
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.
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:213
#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:133
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:215
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