KiCad PCB EDA Suite
3d_toolbar.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) 2016 Mario Luzeiro <mrluzeiro@ua.pt>
5  * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
6  * Copyright (C) 2013 Wayne Stambaugh <stambaughw@verizon.net>
7  * Copyright (C) 1992-2016 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 
31 #include <fctsys.h>
32 
33 #include <eda_3d_viewer.h>
34 #include <3d_canvas/cinfo3d_visu.h>
35 #include <menus_helpers.h>
36 #include <3d_viewer_id.h>
37 
38 
40 {
41  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::ReCreateMainToolbar" ) );
42 
43  if( m_mainToolBar != NULL )
44  {
45  // Simple update to the list of old files.
46  SetToolbars();
47  return;
48  }
49 
50  m_mainToolBar = new wxAuiToolBar( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
51  wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_HORZ_LAYOUT );
52 
53  // Set up toolbar
54  m_mainToolBar->AddTool( ID_RELOAD3D_BOARD, wxEmptyString,
55  KiBitmap( import3d_xpm ), _( "Reload board" ) );
56 
57  m_mainToolBar->AddSeparator();
58 
59  m_mainToolBar->AddTool( ID_TOOL_SCREENCOPY_TOCLIBBOARD, wxEmptyString,
60  KiBitmap( copy_button_xpm ),
61  _( "Copy 3D image to clipboard" ) );
62 
63  m_mainToolBar->AddSeparator();
64 
65  m_mainToolBar->AddTool( ID_RENDER_CURRENT_VIEW, wxEmptyString,
66  KiBitmap( render_mode_xpm ),
67  _( "Render current view using Raytracing" ) );
68 
69  m_mainToolBar->AddSeparator();
70 
71  m_mainToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ),
72  _( "Zoom in" ) );
73 
74  m_mainToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ),
75  _( "Zoom out" ) );
76 
77  m_mainToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString,
78  KiBitmap( zoom_redraw_xpm ),
79  _( "Redraw view" ) );
80 
81  m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ),
82  _( "Fit in page" ) );
83 
84  m_mainToolBar->AddSeparator();
85  m_mainToolBar->AddTool( ID_ROTATE3D_X_NEG, wxEmptyString,
86  KiBitmap( rotate_neg_x_xpm ),
87  _( "Rotate X <-" ) );
88 
89  m_mainToolBar->AddTool( ID_ROTATE3D_X_POS, wxEmptyString,
90  KiBitmap( rotate_pos_x_xpm ),
91  _( "Rotate X ->" ) );
92 
93  m_mainToolBar->AddSeparator();
94  m_mainToolBar->AddTool( ID_ROTATE3D_Y_NEG, wxEmptyString,
95  KiBitmap( rotate_neg_y_xpm ),
96  _( "Rotate Y <-" ) );
97 
98  m_mainToolBar->AddTool( ID_ROTATE3D_Y_POS, wxEmptyString,
99  KiBitmap( rotate_pos_y_xpm ),
100  _( "Rotate Y ->" ) );
101 
102  m_mainToolBar->AddSeparator();
103  m_mainToolBar->AddTool( ID_ROTATE3D_Z_NEG, wxEmptyString,
104  KiBitmap( rotate_neg_z_xpm ),
105  _( "Rotate Z <-" ) );
106 
107  m_mainToolBar->AddTool( ID_ROTATE3D_Z_POS, wxEmptyString,
108  KiBitmap( rotate_pos_z_xpm ),
109  _( "Rotate Z ->" ) );
110 
111  m_mainToolBar->AddSeparator();
112  m_mainToolBar->AddTool( ID_MOVE3D_LEFT, wxEmptyString, KiBitmap( left_xpm ),
113  _( "Move left" ) );
114 
115  m_mainToolBar->AddTool( ID_MOVE3D_RIGHT, wxEmptyString, KiBitmap( right_xpm ),
116  _( "Move right" ) );
117 
118  m_mainToolBar->AddTool( ID_MOVE3D_UP, wxEmptyString, KiBitmap( up_xpm ),
119  _( "Move up" ) );
120 
121  m_mainToolBar->AddTool( ID_MOVE3D_DOWN, wxEmptyString, KiBitmap( down_xpm ),
122  _( "Move down" ) );
123 
124  m_mainToolBar->AddSeparator();
125  m_mainToolBar->AddTool( ID_ORTHO, wxEmptyString, KiBitmap( ortho_xpm ),
126  _( "Enable/Disable orthographic projection" ),
127  wxITEM_CHECK );
128 
129  m_mainToolBar->Realize();
130 }
131 
132 
134 {
135  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::CreateMenuBar" ) );
136 
137  wxMenuBar* menuBar = new wxMenuBar;
138  wxMenu* fileMenu = new wxMenu;
139  wxMenu* prefsMenu = new wxMenu;
140  wxMenu* helpMenu = new wxMenu;
141 
142  menuBar->Append( fileMenu, _( "&File" ) );
143 
145  _( "Create Image (png format)" ),
146  KiBitmap( export_xpm ) );
147 
149  _( "Create Image (jpeg format)" ),
150  KiBitmap( export_xpm ) );
151 
152  fileMenu->AppendSeparator();
154  _( "Copy 3D Image to Clipboard" ),
155  KiBitmap( copy_button_xpm ) );
156 
157  fileMenu->AppendSeparator();
158  AddMenuItem( fileMenu, wxID_EXIT,
159  _( "&Exit" ),
160  KiBitmap( exit_xpm ) );
161 
162  menuBar->Append( prefsMenu, _( "&Preferences" ) );
163 
165  _( "Use Touchpad to Pan" ),
166  KiBitmap( tools_xpm ), wxITEM_CHECK );
167 
168  prefsMenu->AppendSeparator();
169 
171  _( "Realistic Mode" ),
172  KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
173 
174  wxMenu * renderEngineList = new wxMenu;
175  AddMenuItem( prefsMenu, renderEngineList, ID_MENU3D_ENGINE,
176  _( "Render Engine" ), KiBitmap( render_mode_xpm ) );
177 
178  renderEngineList->AppendRadioItem( ID_MENU3D_ENGINE_OPENGL_LEGACY,
179  _( "OpenGL" ),
180  wxEmptyString );
181 
182  renderEngineList->AppendRadioItem( ID_MENU3D_ENGINE_RAYTRACING,
183  _( "Raytracing" ),
184  wxEmptyString );
185 
186  renderEngineList->Check( ID_MENU3D_ENGINE_OPENGL_LEGACY,
188 
189  renderEngineList->Check( ID_MENU3D_ENGINE_RAYTRACING,
191 
192  wxMenu * renderOptionsMenu = new wxMenu;
193  AddMenuItem( prefsMenu, renderOptionsMenu, ID_MENU3D_FL,
194  _( "Render Options" ), KiBitmap( options_3drender_xpm ) );
195 
197  _( "Show Holes in Zones" ),
198  _( "Holes inside a copper layer copper zones are shown, "
199  "but the calculation time is longer" ),
200  KiBitmap( green_xpm ), wxITEM_CHECK );
201 
202  wxMenu * materialsList = new wxMenu;
203  AddMenuItem( renderOptionsMenu, materialsList, ID_MENU3D_FL_RENDER_MATERIAL,
204  _( "Material Properties" ), KiBitmap( color_materials_xpm ) );
205 
206  materialsList->AppendRadioItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_NORMAL,
207  _( "Use all properties" ),
208  _( "Use all material properties from each 3D model file" ) );
209 
210  materialsList->AppendRadioItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_DIFFUSE_ONLY,
211  _( "Use diffuse only" ),
212  _( "Use only the diffuse color property from model 3D model file " ) );
213 
214  materialsList->AppendRadioItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_CAD_MODE,
215  _( "CAD color style" ),
216  _( "Use a CAD color style based on the diffuse color of the material" ) );
217 
218  // Add specific preferences for OpenGL
219  // /////////////////////////////////////////////////////////////////////////
220  wxMenu * renderOptionsMenu_OPENGL = new wxMenu;
221 
222  AddMenuItem( renderOptionsMenu, renderOptionsMenu_OPENGL, ID_MENU3D_FL_OPENGL,
223  _( "OpenGL Options" ), KiBitmap( tools_xpm ) );
224 
225  AddMenuItem( renderOptionsMenu_OPENGL, ID_MENU3D_FL_OPENGL_RENDER_COPPER_THICKNESS,
226  _( "Show Copper Thickness" ),
227  _( "Shows the copper thickness on copper layers (slower loading)"),
228  KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
229 
230  AddMenuItem( renderOptionsMenu_OPENGL, ID_MENU3D_FL_OPENGL_RENDER_SHOW_MODEL_BBOX,
231  _( "Show Model Bounding Boxes" ),
232  KiBitmap( green_xpm ), wxITEM_CHECK );
233 
234 
235  // Add specific preferences for Raytracing
236  // /////////////////////////////////////////////////////////////////////////
237  wxMenu * renderOptionsMenu_RAYTRACING = new wxMenu;
238  AddMenuItem( renderOptionsMenu, renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING,
239  _( "Raytracing Options" ), KiBitmap( tools_xpm ) );
240 
241  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_RENDER_SHADOWS,
242  _( "Render Shadows" ),
243  KiBitmap( green_xpm ), wxITEM_CHECK );
244 
245  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_PROCEDURAL_TEXTURES,
246  _( "Procedural Textures" ),
247  _( "Apply procedural textures to materials (slow)"),
248  KiBitmap( green_xpm ), wxITEM_CHECK );
249 
250  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_BACKFLOOR,
251  _( "Add floor" ),
252  _( "Adds a floor plane below the board (slow)"),
253  KiBitmap( green_xpm ), wxITEM_CHECK );
254 
255  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_REFRACTIONS,
256  _( "Refractions" ),
257  _( "Render materials with refractions properties on final render (slow)"),
258  KiBitmap( green_xpm ), wxITEM_CHECK );
259 
260  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_REFLECTIONS,
261  _( "Reflections" ),
262  _( "Render materials with reflections properties on final render (slow)"),
263  KiBitmap( green_xpm ), wxITEM_CHECK );
264 
265  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_ANTI_ALIASING,
266  _( "Anti-aliasing" ),
267  _( "Render with improoved quality on final render (slow)"),
268  KiBitmap( green_xpm ), wxITEM_CHECK );
269 
270  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_POST_PROCESSING,
271  _( "Post-processing" ),
272  _( "Apply Screen Space Ambient Occlusion and Global Illumination reflections on final render (slow)"),
273  KiBitmap( green_xpm ), wxITEM_CHECK );
274 
275  prefsMenu->AppendSeparator();
276 
277 
278  // Colors, axis and grid elements
279  // /////////////////////////////////////////////////////////////////////////
280 
281  // Add submenu set Colors
282  wxMenu * setColorMenu = new wxMenu;
283  AddMenuItem( prefsMenu, setColorMenu, ID_MENU3D_COLOR,
284  _( "Choose Colors" ), KiBitmap( palette_xpm ) );
285 
286  wxMenu * setBgColorMenu = new wxMenu;
287  AddMenuItem( setColorMenu, setBgColorMenu, ID_MENU3D_BGCOLOR,
288  _( "Background Color" ), KiBitmap( palette_xpm ) );
289 
291  _( "Background Top Color" ), KiBitmap( setcolor_3d_bg_xpm ) );
292 
294  _( "Background Bottom Color" ), KiBitmap( setcolor_3d_bg_xpm ) );
295 
297  _( "Silkscreen Color" ), KiBitmap( setcolor_silkscreen_xpm ) );
298 
300  _( "Solder Mask Color" ), KiBitmap( setcolor_soldermask_xpm ) );
301 
303  _( "Solder Paste Color" ), KiBitmap( setcolor_solderpaste_xpm ) );
304 
306  _( "Copper/Surface Finish Color" ), KiBitmap( setcolor_copper_xpm ) );
307 
309  _( "Board Body Color" ), KiBitmap( setcolor_board_body_xpm ) );
310 
311  AddMenuItem( prefsMenu, ID_MENU3D_AXIS_ONOFF,
312  _( "Show 3D &Axis" ), KiBitmap( axis3d_front_xpm ), wxITEM_CHECK );
313 
314 
315  // Creates grid menu
316  // /////////////////////////////////////////////////////////////////////////
317 
318  wxMenu * gridlistMenu = new wxMenu;
319  AddMenuItem( prefsMenu, gridlistMenu, ID_MENU3D_GRID,
320  _( "3D Grid" ), KiBitmap( grid_xpm ) );
321  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_NOGRID, _( "No 3D Grid" ), wxEmptyString );
322  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_10_MM, _( "3D Grid 10 mm" ), wxEmptyString );
323  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_5_MM, _( "3D Grid 5 mm" ), wxEmptyString );
324  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_2P5_MM, _( "3D Grid 2.5 mm" ), wxEmptyString );
325  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_1_MM, _( "3D Grid 1 mm" ), wxEmptyString );
326 
327  // If the grid is on, check the corresponding menuitem showing the grid size
328  if( m_settings.GridGet() != GRID3D_NONE )
329  {
330  gridlistMenu->Check( ID_MENU3D_GRID_10_MM, m_settings.GridGet() == GRID3D_10MM );
331  gridlistMenu->Check( ID_MENU3D_GRID_5_MM, m_settings.GridGet() == GRID3D_5MM );
332  gridlistMenu->Check( ID_MENU3D_GRID_2P5_MM, m_settings.GridGet() == GRID3D_2P5MM );
333  gridlistMenu->Check( ID_MENU3D_GRID_1_MM, m_settings.GridGet() == GRID3D_1MM );
334  }
335  else
336  gridlistMenu->Check( ID_MENU3D_GRID_NOGRID, true );
337 
338 
339  // Display elements options
340  // /////////////////////////////////////////////////////////////////////////
341  prefsMenu->AppendSeparator();
342 
344  _( "Show Board Bod&y" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
345 
346  AddMenuItem( prefsMenu, ID_MENU3D_ZONE_ONOFF,
347  _( "Show Zone &Filling" ), KiBitmap( add_zone_xpm ), wxITEM_CHECK );
348 
349  wxMenu * moduleAttributes = new wxMenu;
350  AddMenuItem( prefsMenu, moduleAttributes, ID_MENU3D_MODULE_ONOFF,
351  _( "Show 3D M&odels" ), KiBitmap( shape_3d_xpm ) );
352  moduleAttributes->AppendCheckItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL,
353  _( "Through hole" ),
354  _( "Footprint Properties -> Placement type -> Through hole" ) );
355 
356  moduleAttributes->AppendCheckItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL_INSERT,
357  _( "Surface mount" ),
358  _( "Footprint Properties -> Placement type -> Surface mount" ) );
359 
360  moduleAttributes->AppendCheckItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_VIRTUAL,
361  _( "Virtual" ),
362  _( "Footprint Properties -> Placement type -> Virtual (eg: edge connectors, test points, mechanical parts)" ) );
363 
364  // Layer options
365  // /////////////////////////////////////////////////////////////////////////
366  prefsMenu->AppendSeparator();
367 
368  wxMenu * layersMenu = new wxMenu;
369  AddMenuItem( prefsMenu, layersMenu, ID_MENU3D_LAYERS,
370  _( "Show &Layers" ), KiBitmap( tools_xpm ) );
371 
373  _( "Show &Adhesive Layers" ), KiBitmap( tools_xpm ), wxITEM_CHECK );
374 
376  _( "Show &Silkscreen Layers" ), KiBitmap( add_text_xpm ), wxITEM_CHECK );
377 
379  _( "Show Solder &Mask Layers" ), KiBitmap( pads_mask_layers_xpm ), wxITEM_CHECK );
380 
382  _( "Show Solder &Paste Layers" ), KiBitmap( pads_mask_layers_xpm ), wxITEM_CHECK );
383 
384  // Other layers are not "board" layers, and are not shown in realistic mode
385  // These menus will be disabled in in realistic mode
387  _( "Show &Comments and Drawings Layers" ), KiBitmap( edit_sheet_xpm ), wxITEM_CHECK );
388 
389  AddMenuItem( layersMenu, ID_MENU3D_ECO_ONOFF,
390  _( "Show &Eco Layers" ), KiBitmap( edit_sheet_xpm ), wxITEM_CHECK );
391 
392  // Reset options
393  // /////////////////////////////////////////////////////////////////////////
394  prefsMenu->AppendSeparator();
395 
397  _( "Reset to default settings" ),
398  KiBitmap( tools_xpm ) );
399 
400  // Help menu
401  // /////////////////////////////////////////////////////////////////////////
402  menuBar->Append( helpMenu, _( "&Help" ) );
403 
405  _( "&List Hotkeys" ),
406  _( "Displays the current hotkeys list and corresponding commands" ),
407  KiBitmap( hotkeys_xpm ) );
408 
409  SetMenuBar( menuBar );
411 }
412 
413 
415 {
416  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::SetMenuBarOptionsState" ) );
417 
418  wxMenuBar* menuBar = GetMenuBar();
419 
420  if( menuBar == NULL )
421  {
422  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::SetMenuBarOptionsState menuBar == NULL" ) );
423 
424  return;
425  }
426 
427  wxMenuItem* item;
428  // Set the state of toggle menus according to the current display options
429  item = menuBar->FindItem( ID_MENU3D_MOUSEWHEEL_PANNING );
430  item->Check( m_settings.GetFlag( FL_MOUSEWHEEL_PANNING ) );
431 
432 
433  item = menuBar->FindItem( ID_MENU3D_ENGINE_OPENGL_LEGACY );
435 
436  item = menuBar->FindItem( ID_MENU3D_ENGINE_RAYTRACING );
438 
439  item = menuBar->FindItem( ID_MENU3D_REALISTIC_MODE );
440  item->Check( m_settings.GetFlag( FL_USE_REALISTIC_MODE ) );
441  item = menuBar->FindItem( ID_MENU3D_COMMENTS_ONOFF );
442  item->Enable( !m_settings.GetFlag( FL_USE_REALISTIC_MODE ) );
443  item = menuBar->FindItem( ID_MENU3D_ECO_ONOFF );
444  item->Enable( !m_settings.GetFlag( FL_USE_REALISTIC_MODE ) );
445 
446  item = menuBar->FindItem( ID_MENU3D_FL_RENDER_SHOW_HOLES_IN_ZONES );
448 
449  item = menuBar->FindItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_NORMAL );
450  item->Check( m_settings.MaterialModeGet() == MATERIAL_MODE_NORMAL );
451 
452  item = menuBar->FindItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_DIFFUSE_ONLY );
454 
455  item = menuBar->FindItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_CAD_MODE );
457 
458  // OpenGL
459  item = menuBar->FindItem( ID_MENU3D_FL_OPENGL_RENDER_COPPER_THICKNESS );
461 
462  item = menuBar->FindItem( ID_MENU3D_FL_OPENGL_RENDER_SHOW_MODEL_BBOX );
464 
465  // Raytracing
466  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_RENDER_SHADOWS );
468 
469  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_BACKFLOOR );
471 
472  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_REFRACTIONS );
474 
475  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_REFLECTIONS );
477 
478  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_POST_PROCESSING );
480 
481  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_ANTI_ALIASING );
483 
484  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_PROCEDURAL_TEXTURES );
486 
487 
488  item = menuBar->FindItem( ID_MENU3D_SHOW_BOARD_BODY );
489  item->Check( m_settings.GetFlag( FL_SHOW_BOARD_BODY ) );
490 
491  item = menuBar->FindItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL );
493 
494  item = menuBar->FindItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL_INSERT );
496 
497  item = menuBar->FindItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_VIRTUAL );
499 
500  item = menuBar->FindItem( ID_MENU3D_ZONE_ONOFF );
501  item->Check( m_settings.GetFlag( FL_ZONE ) );
502 
503  item = menuBar->FindItem( ID_MENU3D_AXIS_ONOFF );
504  item->Check( m_settings.GetFlag( FL_AXIS ) );
505 
506  item = menuBar->FindItem( ID_MENU3D_ADHESIVE_ONOFF );
507  item->Check( m_settings.GetFlag( FL_ADHESIVE ) );
508 
509  item = menuBar->FindItem( ID_MENU3D_SILKSCREEN_ONOFF );
510  item->Check( m_settings.GetFlag( FL_SILKSCREEN ) );
511 
512  item = menuBar->FindItem( ID_MENU3D_SOLDER_MASK_ONOFF );
513  item->Check( m_settings.GetFlag( FL_SOLDERMASK ) );
514 
515  item = menuBar->FindItem( ID_MENU3D_SOLDER_PASTE_ONOFF );
516  item->Check( m_settings.GetFlag( FL_SOLDERPASTE ) );
517 
518  item = menuBar->FindItem( ID_MENU3D_COMMENTS_ONOFF );
519  item->Check( m_settings.GetFlag( FL_COMMENTS ) );
520 
521  item = menuBar->FindItem( ID_MENU3D_ECO_ONOFF );
522  item->Check( m_settings.GetFlag( FL_ECO ));
523 }
524 
525 
527 {
528 }
GRID3D_TYPE GridGet() const
GridGet - get the current grid.
Definition: cinfo3d_visu.h:216
Use only diffuse material properties.
Definition: 3d_enums.h:94
CINFO3D_VISU m_settings
Store all the settings and options to be used by the renders.
MATERIAL_MODE MaterialModeGet() const
MaterialModeGet.
Definition: cinfo3d_visu.h:246
wxMenuItem * AddMenuItem(wxMenu *aMenu, int aId, const wxString &aText, const wxBitmap &aImage, wxItemKind aType=wxITEM_NORMAL)
Function AddMenuItem is an inline helper function to create and insert a menu item with an icon into ...
Definition: bitmap.cpp:55
void SetMenuBarOptionsState()
Set the state of toggle menus according to the current display options.
Definition: 3d_toolbar.cpp:414
Definition: id.h:232
Handles data related with the board to be visualized.
wxBitmap KiBitmap(BITMAP_DEF aBitmap)
Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF.
Definition: bitmap.cpp:36
Use a gray shading based on diffuse material.
Definition: 3d_enums.h:95
void ReCreateMainToolbar()
Definition: 3d_toolbar.cpp:39
wxAuiToolBar * m_mainToolBar
Standard horizontal Toolbar.
Definition: wxstruct.h:135
RENDER_ENGINE RenderEngineGet() const
RenderEngineGet.
Definition: cinfo3d_visu.h:234
Use all material properties from model file.
Definition: 3d_enums.h:93
bool GetFlag(DISPLAY3D_FLG aFlag) const
GetFlag - get a configuration status of a flag.
Declaration of the eda_3d_viewer class.
void SetToolbars()
Definition: 3d_toolbar.cpp:526
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
void CreateMenuBar()
Definition: 3d_toolbar.cpp:133