2011-10-13 19:56:32 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2013-10-07 14:50:23 +00:00
|
|
|
* Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
|
|
|
* Copyright (C) 2013 Wayne Stambaugh <stambaughw@verizon.net>
|
|
|
|
* Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors.
|
2011-10-13 19:56:32 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file 3d_toolbar.cpp
|
|
|
|
*/
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <fctsys.h>
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2012-01-23 04:33:36 +00:00
|
|
|
#include <3d_viewer.h>
|
2012-08-11 12:52:13 +00:00
|
|
|
#include <info3d_visu.h>
|
2012-04-09 09:16:47 +00:00
|
|
|
#include <menus_helpers.h>
|
2012-08-11 12:52:13 +00:00
|
|
|
#include <3d_viewer_id.h>
|
2007-05-06 16:03:28 +00:00
|
|
|
|
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
void EDA_3D_FRAME::ReCreateMainToolbar()
|
2007-05-06 16:03:28 +00:00
|
|
|
{
|
2014-01-30 08:18:47 +00:00
|
|
|
if( m_mainToolBar != NULL )
|
2009-11-04 20:46:53 +00:00
|
|
|
{
|
|
|
|
// Simple update to the list of old files.
|
2007-09-09 02:21:43 +00:00
|
|
|
SetToolbars();
|
|
|
|
return;
|
|
|
|
}
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar = new wxAuiToolBar( this, ID_H_TOOLBAR, wxDefaultPosition, wxDefaultSize,
|
2011-12-16 13:32:23 +00:00
|
|
|
wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_HORZ_LAYOUT );
|
2009-11-04 20:46:53 +00:00
|
|
|
|
2007-09-09 02:21:43 +00:00
|
|
|
// Set up toolbar
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddTool( ID_RELOAD3D_BOARD, wxEmptyString,
|
|
|
|
KiBitmap( import3d_xpm ), _( "Reload board" ) );
|
2011-09-17 15:31:21 +00:00
|
|
|
|
2009-11-04 20:46:53 +00:00
|
|
|
#if (defined(__WINDOWS__) || defined(__APPLE__ ) )
|
|
|
|
|
|
|
|
// Does not work properly under linux
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddSeparator();
|
2007-09-09 02:21:43 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddTool( ID_TOOL_SCREENCOPY_TOCLIBBOARD, wxEmptyString,
|
2011-08-29 03:04:59 +00:00
|
|
|
KiBitmap( copy_button_xpm ),
|
2009-11-04 20:46:53 +00:00
|
|
|
_( "Copy 3D Image to Clipboard" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
#endif
|
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddSeparator();
|
2013-05-16 19:04:21 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddTool( ID_TOOL_SET_VISIBLE_ITEMS, wxEmptyString,
|
2013-05-16 19:04:21 +00:00
|
|
|
KiBitmap( read_setup_xpm ),
|
|
|
|
_( "Set display options, and some layers visibility" ) );
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddSeparator();
|
2013-05-16 19:04:21 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddTool( ID_ZOOM_IN, wxEmptyString, KiBitmap( zoom_in_xpm ),
|
2009-04-05 20:49:15 +00:00
|
|
|
_( "Zoom in" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddTool( ID_ZOOM_OUT, wxEmptyString, KiBitmap( zoom_out_xpm ),
|
2009-04-05 20:49:15 +00:00
|
|
|
_( "Zoom out" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddTool( ID_ZOOM_REDRAW, wxEmptyString,
|
2011-08-28 20:02:27 +00:00
|
|
|
KiBitmap( zoom_redraw_xpm ),
|
2009-04-05 20:49:15 +00:00
|
|
|
_( "Redraw view" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddTool( ID_ZOOM_PAGE, wxEmptyString, KiBitmap( zoom_fit_in_page_xpm ),
|
2011-03-20 17:10:38 +00:00
|
|
|
_( "Fit in page" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddSeparator();
|
|
|
|
m_mainToolBar->AddTool( ID_ROTATE3D_X_NEG, wxEmptyString,
|
2011-08-29 03:04:59 +00:00
|
|
|
KiBitmap( rotate_neg_x_xpm ),
|
2009-04-05 20:49:15 +00:00
|
|
|
_( "Rotate X <-" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddTool( ID_ROTATE3D_X_POS, wxEmptyString,
|
2011-08-29 03:04:59 +00:00
|
|
|
KiBitmap( rotate_pos_x_xpm ),
|
2009-04-05 20:49:15 +00:00
|
|
|
_( "Rotate X ->" ) );
|
2007-06-14 18:39:36 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddSeparator();
|
|
|
|
m_mainToolBar->AddTool( ID_ROTATE3D_Y_NEG, wxEmptyString,
|
2011-08-29 03:04:59 +00:00
|
|
|
KiBitmap( rotate_neg_y_xpm ),
|
2009-04-05 20:49:15 +00:00
|
|
|
_( "Rotate Y <-" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddTool( ID_ROTATE3D_Y_POS, wxEmptyString,
|
2011-08-29 03:04:59 +00:00
|
|
|
KiBitmap( rotate_pos_y_xpm ),
|
2009-04-05 20:49:15 +00:00
|
|
|
_( "Rotate Y ->" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddSeparator();
|
|
|
|
m_mainToolBar->AddTool( ID_ROTATE3D_Z_NEG, wxEmptyString,
|
2011-08-29 03:04:59 +00:00
|
|
|
KiBitmap( rotate_neg_z_xpm ),
|
2009-04-05 20:49:15 +00:00
|
|
|
_( "Rotate Z <-" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddTool( ID_ROTATE3D_Z_POS, wxEmptyString,
|
2011-08-29 03:04:59 +00:00
|
|
|
KiBitmap( rotate_pos_z_xpm ),
|
2009-04-05 20:49:15 +00:00
|
|
|
_( "Rotate Z ->" ) );
|
2007-06-14 18:39:36 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddSeparator();
|
|
|
|
m_mainToolBar->AddTool( ID_MOVE3D_LEFT, wxEmptyString, KiBitmap( left_xpm ),
|
2013-04-05 07:38:00 +00:00
|
|
|
_( "Move left" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddTool( ID_MOVE3D_RIGHT, wxEmptyString, KiBitmap( right_xpm ),
|
2013-04-05 07:38:00 +00:00
|
|
|
_( "Move right" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddTool( ID_MOVE3D_UP, wxEmptyString, KiBitmap( up_xpm ),
|
2013-04-05 07:38:00 +00:00
|
|
|
_( "Move up" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddTool( ID_MOVE3D_DOWN, wxEmptyString, KiBitmap( down_xpm ),
|
2013-04-05 07:38:00 +00:00
|
|
|
_( "Move down" ) );
|
2010-11-01 18:33:44 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->AddSeparator();
|
|
|
|
m_mainToolBar->AddTool( ID_ORTHO, wxEmptyString, KiBitmap( ortho_xpm ),
|
2010-11-01 18:33:44 +00:00
|
|
|
_( "Enable/Disable orthographic projection" ),
|
2010-10-04 12:58:07 +00:00
|
|
|
wxITEM_CHECK );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2014-01-30 08:18:47 +00:00
|
|
|
m_mainToolBar->Realize();
|
2007-05-06 16:03:28 +00:00
|
|
|
}
|
|
|
|
|
2007-09-09 02:21:43 +00:00
|
|
|
|
2013-05-25 09:01:44 +00:00
|
|
|
void EDA_3D_FRAME::CreateMenuBar()
|
2007-05-06 16:03:28 +00:00
|
|
|
{
|
2012-04-09 09:16:47 +00:00
|
|
|
wxMenuBar* menuBar = new wxMenuBar;
|
|
|
|
wxMenu* fileMenu = new wxMenu;
|
|
|
|
wxMenu* prefsMenu = new wxMenu;
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2007-09-09 02:21:43 +00:00
|
|
|
menuBar->Append( fileMenu, _( "&File" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2011-09-17 15:31:21 +00:00
|
|
|
fileMenu->Append( ID_MENU_SCREENCOPY_PNG, _( "Create Image (png format)" ) );
|
|
|
|
fileMenu->Append( ID_MENU_SCREENCOPY_JPEG, _( "Create Image (jpeg format)" ) );
|
2010-10-04 11:50:43 +00:00
|
|
|
|
|
|
|
#if (defined(__WINDOWS__) || defined(__APPLE__ ) )
|
|
|
|
// Does not work properly under linux
|
|
|
|
fileMenu->AppendSeparator();
|
2011-09-17 15:31:21 +00:00
|
|
|
fileMenu->Append( ID_TOOL_SCREENCOPY_TOCLIBBOARD, _( "Copy 3D Image to Clipboard" ) );
|
2010-10-04 11:50:43 +00:00
|
|
|
#endif
|
2013-05-16 19:04:21 +00:00
|
|
|
|
2007-09-09 02:21:43 +00:00
|
|
|
fileMenu->AppendSeparator();
|
|
|
|
fileMenu->Append( wxID_EXIT, _( "&Exit" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2012-04-09 09:16:47 +00:00
|
|
|
menuBar->Append( prefsMenu, _( "&Preferences" ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2013-10-07 11:51:08 +00:00
|
|
|
AddMenuItem( prefsMenu, ID_MENU3D_REALISTIC_MODE,
|
2014-07-21 16:26:18 +00:00
|
|
|
_( "Realistic Mode" ),
|
|
|
|
KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
|
|
|
|
|
2014-08-19 14:51:15 +00:00
|
|
|
wxMenu * renderOptionsMenu = new wxMenu;
|
|
|
|
AddMenuItem( prefsMenu, renderOptionsMenu, ID_MENU3D_COLOR,
|
2014-08-25 16:31:32 +00:00
|
|
|
_( "Render Options" ), KiBitmap( tools_xpm ) );
|
2014-08-19 14:51:15 +00:00
|
|
|
|
|
|
|
AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_SHADOWS,
|
|
|
|
_( "Render Shadows" ),
|
|
|
|
KiBitmap( green_xpm ), wxITEM_CHECK );
|
|
|
|
|
|
|
|
AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_SHOW_HOLES_IN_ZONES,
|
|
|
|
_( "Show Holes in Zones" ),
|
|
|
|
_( "Holes inside a copper layer copper zones are shown, "
|
|
|
|
"but the calculation time is longer" ),
|
|
|
|
KiBitmap( green_xpm ), wxITEM_CHECK );
|
|
|
|
|
|
|
|
AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_TEXTURES,
|
|
|
|
_( "Render Textures" ),
|
|
|
|
_( "Apply a grid/cloud textures to Board, Solder Mask and Silkscreen" ),
|
|
|
|
KiBitmap( green_xpm ), wxITEM_CHECK );
|
|
|
|
|
2015-03-10 20:15:41 +00:00
|
|
|
AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_SMOOTH_NORMALS,
|
2014-08-19 14:51:15 +00:00
|
|
|
_( "Render Smooth Normals" ),
|
|
|
|
KiBitmap( green_xpm ), wxITEM_CHECK );
|
2015-03-29 10:59:53 +00:00
|
|
|
|
2015-03-10 20:15:41 +00:00
|
|
|
AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_USE_MODEL_NORMALS,
|
|
|
|
_( "Use Model Normals" ),
|
|
|
|
KiBitmap( green_xpm ), wxITEM_CHECK );
|
2014-08-19 14:51:15 +00:00
|
|
|
|
|
|
|
AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_MATERIAL,
|
2014-08-25 16:31:32 +00:00
|
|
|
_( "Render Material Properties" ),
|
2014-08-19 14:51:15 +00:00
|
|
|
KiBitmap( green_xpm ), wxITEM_CHECK );
|
2014-07-21 16:26:18 +00:00
|
|
|
|
2015-03-28 11:33:56 +00:00
|
|
|
AddMenuItem( renderOptionsMenu, ID_MENU3D_FL_RENDER_SHOW_MODEL_BBOX,
|
2015-03-29 10:59:53 +00:00
|
|
|
_( "Show Model Bounding Boxes" ),
|
2015-03-28 11:33:56 +00:00
|
|
|
KiBitmap( green_xpm ), wxITEM_CHECK );
|
|
|
|
|
2013-10-07 11:51:08 +00:00
|
|
|
prefsMenu->AppendSeparator();
|
|
|
|
|
2014-08-19 14:51:15 +00:00
|
|
|
wxMenu * backgrounColorMenu = new wxMenu;
|
|
|
|
|
|
|
|
// Add submenu Choose Colors
|
|
|
|
AddMenuItem( prefsMenu, backgrounColorMenu, ID_MENU3D_COLOR,
|
|
|
|
_( "Choose Colors" ), KiBitmap( palette_xpm ) );
|
|
|
|
|
|
|
|
AddMenuItem( backgrounColorMenu, ID_MENU3D_BGCOLOR_TOP_SELECTION,
|
|
|
|
_( "Background Top Color" ), KiBitmap( palette_xpm ) );
|
|
|
|
|
|
|
|
AddMenuItem( backgrounColorMenu, ID_MENU3D_BGCOLOR_SELECTION,
|
2014-08-20 08:39:19 +00:00
|
|
|
_( "Background Bottom Color" ), KiBitmap( palette_xpm ) );
|
2007-05-06 16:03:28 +00:00
|
|
|
|
2013-10-07 11:51:08 +00:00
|
|
|
AddMenuItem( prefsMenu, ID_MENU3D_AXIS_ONOFF,
|
2014-07-21 16:26:18 +00:00
|
|
|
_( "Show 3D &Axis" ), KiBitmap( axis3d_front_xpm ), wxITEM_CHECK );
|
2012-04-09 09:16:47 +00:00
|
|
|
|
2013-05-16 19:04:21 +00:00
|
|
|
// Creates grid menu
|
|
|
|
wxMenu * gridlistMenu = new wxMenu;
|
2013-10-07 11:51:08 +00:00
|
|
|
AddMenuItem( prefsMenu, gridlistMenu, ID_MENU3D_GRID,
|
2013-05-16 19:04:21 +00:00
|
|
|
_( "3D Grid" ), KiBitmap( grid_xpm ) );
|
2014-08-19 14:51:15 +00:00
|
|
|
gridlistMenu->AppendCheckItem( ID_MENU3D_GRID_NOGRID, _( "No 3D Grid" ), wxEmptyString );
|
|
|
|
gridlistMenu->AppendCheckItem( ID_MENU3D_GRID_10_MM, _( "3D Grid 10 mm" ), wxEmptyString );
|
|
|
|
gridlistMenu->AppendCheckItem( ID_MENU3D_GRID_5_MM, _( "3D Grid 5 mm" ), wxEmptyString );
|
|
|
|
gridlistMenu->AppendCheckItem( ID_MENU3D_GRID_2P5_MM, _( "3D Grid 2.5 mm" ), wxEmptyString );
|
|
|
|
gridlistMenu->AppendCheckItem( ID_MENU3D_GRID_1_MM, _( "3D Grid 1 mm" ), wxEmptyString );
|
2014-03-08 19:04:23 +00:00
|
|
|
|
|
|
|
// If the grid is on, check the corresponding menuitem showing the grid size
|
2014-08-21 11:59:57 +00:00
|
|
|
if( IsEnabled( FL_GRID ) )
|
2014-03-08 19:04:23 +00:00
|
|
|
{
|
2014-08-21 11:59:57 +00:00
|
|
|
gridlistMenu->Check( ID_MENU3D_GRID_10_MM, GetPrm3DVisu().m_3D_Grid == 10.0 );
|
|
|
|
gridlistMenu->Check( ID_MENU3D_GRID_5_MM, GetPrm3DVisu().m_3D_Grid == 5.0 );
|
|
|
|
gridlistMenu->Check( ID_MENU3D_GRID_2P5_MM, GetPrm3DVisu().m_3D_Grid == 2.5 );
|
|
|
|
gridlistMenu->Check( ID_MENU3D_GRID_1_MM, GetPrm3DVisu().m_3D_Grid == 1.0 );
|
2014-03-08 19:04:23 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
gridlistMenu->Check( ID_MENU3D_GRID_NOGRID, true );
|
2013-05-16 19:04:21 +00:00
|
|
|
|
2013-10-07 14:50:23 +00:00
|
|
|
prefsMenu->AppendSeparator();
|
|
|
|
|
2013-10-07 11:51:08 +00:00
|
|
|
AddMenuItem( prefsMenu, ID_MENU3D_SHOW_BOARD_BODY,
|
2014-08-25 16:31:32 +00:00
|
|
|
_( "Show Board Bod&y" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
|
2013-10-07 11:51:08 +00:00
|
|
|
|
|
|
|
AddMenuItem( prefsMenu, ID_MENU3D_USE_COPPER_THICKNESS,
|
2014-08-25 16:31:32 +00:00
|
|
|
_( "Show Copper &Thickness" ), KiBitmap( use_3D_copper_thickness_xpm ), wxITEM_CHECK );
|
2013-05-16 19:04:21 +00:00
|
|
|
|
2013-10-07 11:51:08 +00:00
|
|
|
AddMenuItem( prefsMenu, ID_MENU3D_MODULE_ONOFF,
|
2013-05-16 19:04:21 +00:00
|
|
|
_( "Show 3D F&ootprints" ), KiBitmap( shape_3d_xpm ), wxITEM_CHECK );
|
|
|
|
|
2013-10-07 11:51:08 +00:00
|
|
|
AddMenuItem( prefsMenu, ID_MENU3D_ZONE_ONOFF,
|
2013-05-16 19:04:21 +00:00
|
|
|
_( "Show Zone &Filling" ), KiBitmap( add_zone_xpm ), wxITEM_CHECK );
|
|
|
|
|
2013-10-07 16:39:39 +00:00
|
|
|
prefsMenu->AppendSeparator();
|
|
|
|
|
2014-08-19 14:51:15 +00:00
|
|
|
wxMenu * layersMenu = new wxMenu;
|
|
|
|
AddMenuItem( prefsMenu, layersMenu, ID_MENU3D_LAYERS,
|
2014-08-25 16:31:32 +00:00
|
|
|
_( "Show &Layers" ), KiBitmap( tools_xpm ) );
|
2014-08-19 14:51:15 +00:00
|
|
|
|
|
|
|
AddMenuItem( layersMenu, ID_MENU3D_ADHESIVE_ONOFF,
|
2013-05-16 19:04:21 +00:00
|
|
|
_( "Show &Adhesive Layers" ), KiBitmap( tools_xpm ), wxITEM_CHECK );
|
|
|
|
|
2014-08-19 14:51:15 +00:00
|
|
|
AddMenuItem( layersMenu, ID_MENU3D_SILKSCREEN_ONOFF,
|
2013-05-16 19:04:21 +00:00
|
|
|
_( "Show &Silkscreen Layer" ), KiBitmap( add_text_xpm ), wxITEM_CHECK );
|
|
|
|
|
2014-08-19 14:51:15 +00:00
|
|
|
AddMenuItem( layersMenu, ID_MENU3D_SOLDER_MASK_ONOFF,
|
2013-05-16 19:04:21 +00:00
|
|
|
_( "Show Solder &Mask Layers" ), KiBitmap( pads_mask_layers_xpm ), wxITEM_CHECK );
|
|
|
|
|
2014-08-19 14:51:15 +00:00
|
|
|
AddMenuItem( layersMenu, ID_MENU3D_SOLDER_PASTE_ONOFF,
|
2013-05-16 19:04:21 +00:00
|
|
|
_( "Show Solder &Paste Layers" ), KiBitmap( pads_mask_layers_xpm ), wxITEM_CHECK );
|
|
|
|
|
2014-08-19 14:51:15 +00:00
|
|
|
AddMenuItem( layersMenu, ID_MENU3D_COMMENTS_ONOFF,
|
2013-05-16 19:04:21 +00:00
|
|
|
_( "Show &Comments and Drawings Layer" ), KiBitmap( edit_sheet_xpm ), wxITEM_CHECK );
|
|
|
|
|
2014-08-19 14:51:15 +00:00
|
|
|
AddMenuItem( layersMenu, ID_MENU3D_ECO_ONOFF,
|
2013-05-16 19:04:21 +00:00
|
|
|
_( "Show &Eco Layers" ), KiBitmap( edit_sheet_xpm ), wxITEM_CHECK );
|
2007-09-09 02:21:43 +00:00
|
|
|
|
|
|
|
SetMenuBar( menuBar );
|
2013-10-04 14:52:09 +00:00
|
|
|
SetMenuBarOptionsState();
|
2007-05-06 16:03:28 +00:00
|
|
|
}
|
|
|
|
|
2013-05-25 09:01:44 +00:00
|
|
|
void EDA_3D_FRAME::SetMenuBarOptionsState()
|
|
|
|
{
|
|
|
|
wxMenuBar* menuBar = GetMenuBar();
|
|
|
|
|
|
|
|
if( menuBar == NULL )
|
|
|
|
return;
|
|
|
|
|
|
|
|
wxMenuItem* item;
|
|
|
|
// Set the state of toggle menus according to the current display options
|
2013-10-07 11:51:08 +00:00
|
|
|
item = menuBar->FindItem( ID_MENU3D_REALISTIC_MODE );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().IsRealisticMode() );
|
2014-07-21 16:26:18 +00:00
|
|
|
|
2014-08-19 14:51:15 +00:00
|
|
|
item = menuBar->FindItem( ID_MENU3D_FL_RENDER_SHADOWS );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_RENDER_SHADOWS ) );
|
2014-08-19 14:51:15 +00:00
|
|
|
|
|
|
|
item = menuBar->FindItem( ID_MENU3D_FL_RENDER_SHADOWS );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_RENDER_SHADOWS ) );
|
2014-08-19 14:51:15 +00:00
|
|
|
|
|
|
|
item = menuBar->FindItem( ID_MENU3D_FL_RENDER_SHOW_HOLES_IN_ZONES );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_RENDER_SHOW_HOLES_IN_ZONES ) );
|
2014-08-19 14:51:15 +00:00
|
|
|
|
|
|
|
item = menuBar->FindItem( ID_MENU3D_FL_RENDER_TEXTURES );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_RENDER_TEXTURES ) );
|
2014-08-19 14:51:15 +00:00
|
|
|
|
2015-03-10 20:15:41 +00:00
|
|
|
item = menuBar->FindItem( ID_MENU3D_FL_RENDER_SMOOTH_NORMALS );
|
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_RENDER_SMOOTH_NORMALS ) );
|
|
|
|
|
|
|
|
item = menuBar->FindItem( ID_MENU3D_FL_RENDER_USE_MODEL_NORMALS );
|
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_RENDER_USE_MODEL_NORMALS ) );
|
2014-08-19 14:51:15 +00:00
|
|
|
|
|
|
|
item = menuBar->FindItem( ID_MENU3D_FL_RENDER_MATERIAL );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_RENDER_MATERIAL ) );
|
2013-10-07 11:51:08 +00:00
|
|
|
|
2015-03-28 11:33:56 +00:00
|
|
|
item = menuBar->FindItem( ID_MENU3D_FL_RENDER_SHOW_MODEL_BBOX );
|
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_RENDER_SHOW_MODEL_BBOX ) );
|
|
|
|
|
2013-10-07 11:51:08 +00:00
|
|
|
item = menuBar->FindItem( ID_MENU3D_SHOW_BOARD_BODY );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_SHOW_BOARD_BODY ) );
|
2013-10-07 11:51:08 +00:00
|
|
|
|
2013-05-25 09:01:44 +00:00
|
|
|
item = menuBar->FindItem( ID_MENU3D_USE_COPPER_THICKNESS );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_USE_COPPER_THICKNESS ) );
|
2013-05-25 09:01:44 +00:00
|
|
|
|
|
|
|
item = menuBar->FindItem( ID_MENU3D_MODULE_ONOFF );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_MODULE ) );
|
2013-05-25 09:01:44 +00:00
|
|
|
|
|
|
|
item = menuBar->FindItem( ID_MENU3D_ZONE_ONOFF );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_ZONE ) );
|
2013-05-25 09:01:44 +00:00
|
|
|
|
2013-10-07 11:51:08 +00:00
|
|
|
item = menuBar->FindItem( ID_MENU3D_AXIS_ONOFF );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_AXIS ) );
|
2013-10-07 11:51:08 +00:00
|
|
|
|
2013-05-25 09:01:44 +00:00
|
|
|
item = menuBar->FindItem( ID_MENU3D_ADHESIVE_ONOFF );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_ADHESIVE ) );
|
2013-05-25 09:01:44 +00:00
|
|
|
|
|
|
|
item = menuBar->FindItem( ID_MENU3D_SILKSCREEN_ONOFF );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_SILKSCREEN ) );
|
2013-05-25 09:01:44 +00:00
|
|
|
|
|
|
|
item = menuBar->FindItem( ID_MENU3D_SOLDER_MASK_ONOFF );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_SOLDERMASK ) );
|
2013-05-25 09:01:44 +00:00
|
|
|
|
|
|
|
item = menuBar->FindItem( ID_MENU3D_SOLDER_PASTE_ONOFF );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_SOLDERPASTE ) );
|
2013-05-25 09:01:44 +00:00
|
|
|
|
|
|
|
item = menuBar->FindItem( ID_MENU3D_COMMENTS_ONOFF );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_COMMENTS ) );
|
2013-05-25 09:01:44 +00:00
|
|
|
|
|
|
|
item = menuBar->FindItem( ID_MENU3D_ECO_ONOFF );
|
2014-08-21 11:59:57 +00:00
|
|
|
item->Check( GetPrm3DVisu().GetFlag( FL_ECO ));
|
2013-05-25 09:01:44 +00:00
|
|
|
}
|
2007-09-09 02:21:43 +00:00
|
|
|
|
2011-08-03 15:09:39 +00:00
|
|
|
void EDA_3D_FRAME::SetToolbars()
|
2007-05-06 16:03:28 +00:00
|
|
|
{
|
|
|
|
}
|