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  KICAD_AUI_TB_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_xpm ),
61  _( "Copy 3D image to clipboard" ) );
62 
63  m_mainToolBar->AddSeparator();
64 
65  m_mainToolBar->AddTool( ID_TOOL_SET_VISIBLE_ITEMS, wxEmptyString,
66  KiBitmap( read_setup_xpm ),
67  _( "Set display options, and some layers visibility" ) );
68  m_mainToolBar->AddSeparator();
69 
70  m_mainToolBar->AddTool( ID_RENDER_CURRENT_VIEW, wxEmptyString,
71  KiBitmap( render_mode_xpm ),
72  _( "Render current view using Raytracing" ) );
73 
74  m_mainToolBar->AddSeparator();
75 
76  m_mainToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ),
77  _( "Zoom in" ) );
78 
79  m_mainToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ),
80  _( "Zoom out" ) );
81 
82  m_mainToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString,
83  KiBitmap( zoom_redraw_xpm ),
84  _( "Redraw view" ) );
85 
86  m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ),
87  _( "Fit in page" ) );
88 
89  m_mainToolBar->AddSeparator();
90  m_mainToolBar->AddTool( ID_ROTATE3D_X_NEG, wxEmptyString,
91  KiBitmap( rotate_neg_x_xpm ),
92  _( "Rotate X <-" ) );
93 
94  m_mainToolBar->AddTool( ID_ROTATE3D_X_POS, wxEmptyString,
95  KiBitmap( rotate_pos_x_xpm ),
96  _( "Rotate X ->" ) );
97 
98  m_mainToolBar->AddSeparator();
99  m_mainToolBar->AddTool( ID_ROTATE3D_Y_NEG, wxEmptyString,
100  KiBitmap( rotate_neg_y_xpm ),
101  _( "Rotate Y <-" ) );
102 
103  m_mainToolBar->AddTool( ID_ROTATE3D_Y_POS, wxEmptyString,
104  KiBitmap( rotate_pos_y_xpm ),
105  _( "Rotate Y ->" ) );
106 
107  m_mainToolBar->AddSeparator();
108  m_mainToolBar->AddTool( ID_ROTATE3D_Z_NEG, wxEmptyString,
109  KiBitmap( rotate_neg_z_xpm ),
110  _( "Rotate Z <-" ) );
111 
112  m_mainToolBar->AddTool( ID_ROTATE3D_Z_POS, wxEmptyString,
113  KiBitmap( rotate_pos_z_xpm ),
114  _( "Rotate Z ->" ) );
115 
116  m_mainToolBar->AddSeparator();
117  m_mainToolBar->AddTool( ID_MOVE3D_LEFT, wxEmptyString, KiBitmap( left_xpm ),
118  _( "Move left" ) );
119 
120  m_mainToolBar->AddTool( ID_MOVE3D_RIGHT, wxEmptyString, KiBitmap( right_xpm ),
121  _( "Move right" ) );
122 
123  m_mainToolBar->AddTool( ID_MOVE3D_UP, wxEmptyString, KiBitmap( up_xpm ),
124  _( "Move up" ) );
125 
126  m_mainToolBar->AddTool( ID_MOVE3D_DOWN, wxEmptyString, KiBitmap( down_xpm ),
127  _( "Move down" ) );
128 
129  m_mainToolBar->AddSeparator();
130  m_mainToolBar->AddTool( ID_ORTHO, wxEmptyString, KiBitmap( ortho_xpm ),
131  _( "Enable/Disable orthographic projection" ),
132  wxITEM_CHECK );
133 
134  m_mainToolBar->Realize();
135 }
136 
137 
139 {
140  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::CreateMenuBar" ) );
141 
142  wxMenuBar* menuBar = new wxMenuBar;
143  wxMenu* fileMenu = new wxMenu;
144  wxMenu* prefsMenu = new wxMenu;
145  wxMenu* helpMenu = new wxMenu;
146 
147  menuBar->Append( fileMenu, _( "&File" ) );
148 
150  _( "Create Image (png format)" ),
151  KiBitmap( export_xpm ) );
152 
154  _( "Create Image (jpeg format)" ),
155  KiBitmap( export_xpm ) );
156 
157  fileMenu->AppendSeparator();
159  _( "Copy 3D Image to Clipboard" ),
160  KiBitmap( copy_xpm ) );
161 
162  fileMenu->AppendSeparator();
163  AddMenuItem( fileMenu, wxID_EXIT,
164  _( "&Exit" ),
165  KiBitmap( exit_xpm ) );
166 
167  menuBar->Append( prefsMenu, _( "&Preferences" ) );
168 
170  _( "Use Touchpad to Pan" ),
171  KiBitmap( tools_xpm ), wxITEM_CHECK );
172 
173  prefsMenu->AppendSeparator();
174 
176  _( "Realistic Mode" ),
177  KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
178 
179  wxMenu * renderEngineList = new wxMenu;
180  AddMenuItem( prefsMenu, renderEngineList, ID_MENU3D_ENGINE,
181  _( "Render Engine" ), KiBitmap( render_mode_xpm ) );
182 
183  renderEngineList->AppendRadioItem( ID_MENU3D_ENGINE_OPENGL_LEGACY,
184  _( "OpenGL" ),
185  wxEmptyString );
186 
187  renderEngineList->AppendRadioItem( ID_MENU3D_ENGINE_RAYTRACING,
188  _( "Raytracing" ),
189  wxEmptyString );
190 
191  renderEngineList->Check( ID_MENU3D_ENGINE_OPENGL_LEGACY,
193 
194  renderEngineList->Check( ID_MENU3D_ENGINE_RAYTRACING,
196 
197  wxMenu * renderOptionsMenu = new wxMenu;
198  AddMenuItem( prefsMenu, renderOptionsMenu, ID_MENU3D_FL,
199  _( "Render Options" ), KiBitmap( options_3drender_xpm ) );
200 
201  wxMenu * materialsList = new wxMenu;
202  AddMenuItem( renderOptionsMenu, materialsList, ID_MENU3D_FL_RENDER_MATERIAL,
203  _( "Material Properties" ), KiBitmap( color_materials_xpm ) );
204 
205  materialsList->AppendRadioItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_NORMAL,
206  _( "Use all properties" ),
207  _( "Use all material properties from each 3D model file" ) );
208 
209  materialsList->AppendRadioItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_DIFFUSE_ONLY,
210  _( "Use diffuse only" ),
211  _( "Use only the diffuse color property from model 3D model file " ) );
212 
213  materialsList->AppendRadioItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_CAD_MODE,
214  _( "CAD color style" ),
215  _( "Use a CAD color style based on the diffuse color of the material" ) );
216 
217  // Add specific preferences for OpenGL
218  // /////////////////////////////////////////////////////////////////////////
219  wxMenu * renderOptionsMenu_OPENGL = new wxMenu;
220 
221  AddMenuItem( renderOptionsMenu, renderOptionsMenu_OPENGL, ID_MENU3D_FL_OPENGL,
222  _( "OpenGL Options" ), KiBitmap( tools_xpm ) );
223 
224  AddMenuItem( renderOptionsMenu_OPENGL, ID_MENU3D_FL_OPENGL_RENDER_COPPER_THICKNESS,
225  _( "Show Copper Thickness" ),
226  _( "Shows the copper thickness on copper layers (slower loading)"),
227  KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
228 
229  AddMenuItem( renderOptionsMenu_OPENGL, ID_MENU3D_FL_OPENGL_RENDER_SHOW_MODEL_BBOX,
230  _( "Show Model Bounding Boxes" ),
231  KiBitmap( ortho_xpm ), wxITEM_CHECK );
232 
233 
234  // Add specific preferences for Raytracing
235  // /////////////////////////////////////////////////////////////////////////
236  wxMenu * renderOptionsMenu_RAYTRACING = new wxMenu;
237  AddMenuItem( renderOptionsMenu, renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING,
238  _( "Raytracing Options" ), KiBitmap( tools_xpm ) );
239 
240  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_RENDER_SHADOWS,
241  _( "Render Shadows" ),
242  KiBitmap( green_xpm ), wxITEM_CHECK );
243 
244  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_PROCEDURAL_TEXTURES,
245  _( "Procedural Textures" ),
246  _( "Apply procedural textures to materials (slow)"),
247  KiBitmap( green_xpm ), wxITEM_CHECK );
248 
249  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_BACKFLOOR,
250  _( "Add floor" ),
251  _( "Adds a floor plane below the board (slow)"),
252  KiBitmap( green_xpm ), wxITEM_CHECK );
253 
254  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_REFRACTIONS,
255  _( "Refractions" ),
256  _( "Render materials with refractions properties on final render (slow)"),
257  KiBitmap( green_xpm ), wxITEM_CHECK );
258 
259  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_REFLECTIONS,
260  _( "Reflections" ),
261  _( "Render materials with reflections properties on final render (slow)"),
262  KiBitmap( green_xpm ), wxITEM_CHECK );
263 
264  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_ANTI_ALIASING,
265  _( "Anti-aliasing" ),
266  _( "Render with improoved quality on final render (slow)"),
267  KiBitmap( green_xpm ), wxITEM_CHECK );
268 
269  AddMenuItem( renderOptionsMenu_RAYTRACING, ID_MENU3D_FL_RAYTRACING_POST_PROCESSING,
270  _( "Post-processing" ),
271  _( "Apply Screen Space Ambient Occlusion and Global Illumination reflections on final render (slow)"),
272  KiBitmap( green_xpm ), wxITEM_CHECK );
273 
274  prefsMenu->AppendSeparator();
275 
276 
277  // Colors, axis and grid elements
278  // /////////////////////////////////////////////////////////////////////////
279 
280  // Add submenu set Colors
281  wxMenu * setColorMenu = new wxMenu;
282  AddMenuItem( prefsMenu, setColorMenu, ID_MENU3D_COLOR,
283  _( "Choose Colors" ), KiBitmap( palette_xpm ) );
284 
285  wxMenu * setBgColorMenu = new wxMenu;
286  AddMenuItem( setColorMenu, setBgColorMenu, ID_MENU3D_BGCOLOR,
287  _( "Background Color" ), KiBitmap( palette_xpm ) );
288 
290  _( "Background Top Color" ), KiBitmap( setcolor_3d_bg_xpm ) );
291 
293  _( "Background Bottom Color" ), KiBitmap( setcolor_3d_bg_xpm ) );
294 
296  _( "Silkscreen Color" ), KiBitmap( setcolor_silkscreen_xpm ) );
297 
299  _( "Solder Mask Color" ), KiBitmap( setcolor_soldermask_xpm ) );
300 
302  _( "Solder Paste Color" ), KiBitmap( setcolor_solderpaste_xpm ) );
303 
305  _( "Copper/Surface Finish Color" ), KiBitmap( setcolor_copper_xpm ) );
306 
308  _( "Board Body Color" ), KiBitmap( setcolor_board_body_xpm ) );
309 
310  AddMenuItem( prefsMenu, ID_MENU3D_AXIS_ONOFF,
311  _( "Show 3D &Axis" ), KiBitmap( axis3d_front_xpm ), wxITEM_CHECK );
312 
313 
314  // Creates grid menu
315  // /////////////////////////////////////////////////////////////////////////
316 
317  wxMenu * gridlistMenu = new wxMenu;
318  AddMenuItem( prefsMenu, gridlistMenu, ID_MENU3D_GRID,
319  _( "3D Grid" ), KiBitmap( grid_xpm ) );
320  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_NOGRID, _( "No 3D Grid" ), wxEmptyString );
321  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_10_MM, _( "3D Grid 10 mm" ), wxEmptyString );
322  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_5_MM, _( "3D Grid 5 mm" ), wxEmptyString );
323  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_2P5_MM, _( "3D Grid 2.5 mm" ), wxEmptyString );
324  gridlistMenu->AppendRadioItem( ID_MENU3D_GRID_1_MM, _( "3D Grid 1 mm" ), wxEmptyString );
325 
326  // If the grid is on, check the corresponding menuitem showing the grid size
327  if( m_settings.GridGet() != GRID3D_NONE )
328  {
329  gridlistMenu->Check( ID_MENU3D_GRID_10_MM, m_settings.GridGet() == GRID3D_10MM );
330  gridlistMenu->Check( ID_MENU3D_GRID_5_MM, m_settings.GridGet() == GRID3D_5MM );
331  gridlistMenu->Check( ID_MENU3D_GRID_2P5_MM, m_settings.GridGet() == GRID3D_2P5MM );
332  gridlistMenu->Check( ID_MENU3D_GRID_1_MM, m_settings.GridGet() == GRID3D_1MM );
333  }
334  else
335  gridlistMenu->Check( ID_MENU3D_GRID_NOGRID, true );
336 
337 
338  // Display elements options
339  // /////////////////////////////////////////////////////////////////////////
340  prefsMenu->AppendSeparator();
341 
343  _( "Show Board Bod&y" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
344 
345  AddMenuItem( prefsMenu, ID_MENU3D_ZONE_ONOFF,
346  _( "Show Zone &Filling" ), KiBitmap( add_zone_xpm ), wxITEM_CHECK );
347 
348  wxMenu * moduleAttributes = new wxMenu;
349  AddMenuItem( prefsMenu, moduleAttributes, ID_MENU3D_MODULE_ONOFF,
350  _( "Show 3D M&odels" ), KiBitmap( shape_3d_xpm ) );
351  moduleAttributes->AppendCheckItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL,
352  _( "Through hole" ),
353  _( "Footprint Properties -> Placement type -> Through hole" ) );
354 
355  moduleAttributes->AppendCheckItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL_INSERT,
356  _( "Surface mount" ),
357  _( "Footprint Properties -> Placement type -> Surface mount" ) );
358 
359  moduleAttributes->AppendCheckItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_VIRTUAL,
360  _( "Virtual" ),
361  _( "Footprint Properties -> Placement type -> Virtual (eg: edge connectors, test points, mechanical parts)" ) );
362 
363  // Layer options
364  // /////////////////////////////////////////////////////////////////////////
365  prefsMenu->AppendSeparator();
366 
367  wxMenu * layersMenu = new wxMenu;
368  AddMenuItem( prefsMenu, layersMenu, ID_MENU3D_LAYERS,
369  _( "Show &Layers" ), KiBitmap( tools_xpm ) );
370 
372  _( "Show &Adhesive Layers" ), KiBitmap( tools_xpm ), wxITEM_CHECK );
373 
375  _( "Show &Silkscreen Layers" ), KiBitmap( text_xpm ), wxITEM_CHECK );
376 
378  _( "Show Solder &Mask Layers" ), KiBitmap( pads_mask_layers_xpm ), wxITEM_CHECK );
379 
381  _( "Show Solder &Paste Layers" ), KiBitmap( pads_mask_layers_xpm ), wxITEM_CHECK );
382 
383  // Other layers are not "board" layers, and are not shown in realistic mode
384  // These menus will be disabled in in realistic mode
386  _( "Show &Comments and Drawings Layers" ), KiBitmap( editor_xpm ), wxITEM_CHECK );
387 
388  AddMenuItem( layersMenu, ID_MENU3D_ECO_ONOFF,
389  _( "Show &Eco Layers" ), KiBitmap( editor_xpm ), wxITEM_CHECK );
390 
391  // Reset options
392  // /////////////////////////////////////////////////////////////////////////
393  prefsMenu->AppendSeparator();
394 
396  _( "Reset to default settings" ),
397  KiBitmap( tools_xpm ) );
398 
399  // Help menu
400  // /////////////////////////////////////////////////////////////////////////
401  menuBar->Append( helpMenu, _( "&Help" ) );
402 
404  _( "&List Hotkeys" ),
405  _( "Displays the current hotkeys list and corresponding commands" ),
406  KiBitmap( hotkeys_xpm ) );
407 
408  SetMenuBar( menuBar );
410 }
411 
412 
414 {
415  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::SetMenuBarOptionsState" ) );
416 
417  wxMenuBar* menuBar = GetMenuBar();
418 
419  if( menuBar == NULL )
420  {
421  wxLogTrace( m_logTrace, wxT( "EDA_3D_VIEWER::SetMenuBarOptionsState menuBar == NULL" ) );
422 
423  return;
424  }
425 
426  wxMenuItem* item;
427  // Set the state of toggle menus according to the current display options
428  item = menuBar->FindItem( ID_MENU3D_MOUSEWHEEL_PANNING );
429  item->Check( m_settings.GetFlag( FL_MOUSEWHEEL_PANNING ) );
430 
431 
432  item = menuBar->FindItem( ID_MENU3D_ENGINE_OPENGL_LEGACY );
434 
435  item = menuBar->FindItem( ID_MENU3D_ENGINE_RAYTRACING );
437 
438  item = menuBar->FindItem( ID_MENU3D_REALISTIC_MODE );
439  item->Check( m_settings.GetFlag( FL_USE_REALISTIC_MODE ) );
440  item = menuBar->FindItem( ID_MENU3D_COMMENTS_ONOFF );
441  item->Enable( !m_settings.GetFlag( FL_USE_REALISTIC_MODE ) );
442  item = menuBar->FindItem( ID_MENU3D_ECO_ONOFF );
443  item->Enable( !m_settings.GetFlag( FL_USE_REALISTIC_MODE ) );
444 
445  item = menuBar->FindItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_NORMAL );
446  item->Check( m_settings.MaterialModeGet() == MATERIAL_MODE_NORMAL );
447 
448  item = menuBar->FindItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_DIFFUSE_ONLY );
450 
451  item = menuBar->FindItem( ID_MENU3D_FL_RENDER_MATERIAL_MODE_CAD_MODE );
453 
454  // OpenGL
455  item = menuBar->FindItem( ID_MENU3D_FL_OPENGL_RENDER_COPPER_THICKNESS );
457 
458  item = menuBar->FindItem( ID_MENU3D_FL_OPENGL_RENDER_SHOW_MODEL_BBOX );
460 
461  // Raytracing
462  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_RENDER_SHADOWS );
464 
465  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_BACKFLOOR );
467 
468  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_REFRACTIONS );
470 
471  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_REFLECTIONS );
473 
474  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_POST_PROCESSING );
476 
477  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_ANTI_ALIASING );
479 
480  item = menuBar->FindItem( ID_MENU3D_FL_RAYTRACING_PROCEDURAL_TEXTURES );
482 
483 
484  item = menuBar->FindItem( ID_MENU3D_SHOW_BOARD_BODY );
485  item->Check( m_settings.GetFlag( FL_SHOW_BOARD_BODY ) );
486 
487  item = menuBar->FindItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL );
489 
490  item = menuBar->FindItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_NORMAL_INSERT );
492 
493  item = menuBar->FindItem( ID_MENU3D_MODULE_ONOFF_ATTRIBUTES_VIRTUAL );
495 
496  item = menuBar->FindItem( ID_MENU3D_ZONE_ONOFF );
497  item->Check( m_settings.GetFlag( FL_ZONE ) );
498 
499  item = menuBar->FindItem( ID_MENU3D_AXIS_ONOFF );
500  item->Check( m_settings.GetFlag( FL_AXIS ) );
501 
502  item = menuBar->FindItem( ID_MENU3D_ADHESIVE_ONOFF );
503  item->Check( m_settings.GetFlag( FL_ADHESIVE ) );
504 
505  item = menuBar->FindItem( ID_MENU3D_SILKSCREEN_ONOFF );
506  item->Check( m_settings.GetFlag( FL_SILKSCREEN ) );
507 
508  item = menuBar->FindItem( ID_MENU3D_SOLDER_MASK_ONOFF );
509  item->Check( m_settings.GetFlag( FL_SOLDERMASK ) );
510 
511  item = menuBar->FindItem( ID_MENU3D_SOLDER_PASTE_ONOFF );
512  item->Check( m_settings.GetFlag( FL_SOLDERPASTE ) );
513 
514  item = menuBar->FindItem( ID_MENU3D_COMMENTS_ONOFF );
515  item->Check( m_settings.GetFlag( FL_COMMENTS ) );
516 
517  item = menuBar->FindItem( ID_MENU3D_ECO_ONOFF );
518  item->Check( m_settings.GetFlag( FL_ECO ));
519 }
520 
521 
523 {
524 }
GRID3D_TYPE GridGet() const
GridGet - get the current grid.
Definition: cinfo3d_visu.h:216
Use only diffuse material properties.
Definition: 3d_enums.h:93
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:173
void SetMenuBarOptionsState()
Set the state of toggle menus according to the current display options.
Definition: 3d_toolbar.cpp:413
Definition: id.h:238
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:78
Use a gray shading based on diffuse material.
Definition: 3d_enums.h:94
void ReCreateMainToolbar()
Definition: 3d_toolbar.cpp:39
wxAuiToolBar * m_mainToolBar
Standard horizontal Toolbar.
Definition: wxstruct.h:145
RENDER_ENGINE RenderEngineGet() const
RenderEngineGet.
Definition: cinfo3d_visu.h:234
Use all material properties from model file.
Definition: 3d_enums.h:92
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:522
static const wxChar * m_logTrace
Trace mask used to enable or disable the trace output of this class.
void CreateMenuBar()
Definition: 3d_toolbar.cpp:138
static constexpr int KICAD_AUI_TB_STYLE
Default style flags used for wxAUI toolbars
Definition: wxstruct.h:168
static const char * text_xpm[]