diff --git a/3d-viewer/3d_viewer/3d_toolbar.cpp b/3d-viewer/3d_viewer/3d_toolbar.cpp
index 860a4e21fb..b0d2024eef 100644
--- a/3d-viewer/3d_viewer/3d_toolbar.cpp
+++ b/3d-viewer/3d_viewer/3d_toolbar.cpp
@@ -62,6 +62,11 @@ void EDA_3D_VIEWER::ReCreateMainToolbar()
m_mainToolBar->AddSeparator();
+ m_mainToolBar->AddTool( ID_TOOL_SET_VISIBLE_ITEMS, wxEmptyString,
+ KiBitmap( read_setup_xpm ),
+ _( "Set display options, and some layers visibility" ) );
+ m_mainToolBar->AddSeparator();
+
m_mainToolBar->AddTool( ID_RENDER_CURRENT_VIEW, wxEmptyString,
KiBitmap( render_mode_xpm ),
_( "Render current view using Raytracing" ) );
@@ -229,7 +234,7 @@ void EDA_3D_VIEWER::CreateMenuBar()
AddMenuItem( renderOptionsMenu_OPENGL, ID_MENU3D_FL_OPENGL_RENDER_SHOW_MODEL_BBOX,
_( "Show Model Bounding Boxes" ),
- KiBitmap( green_xpm ), wxITEM_CHECK );
+ KiBitmap( ortho_xpm ), wxITEM_CHECK );
// Add specific preferences for Raytracing
diff --git a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option.cpp b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option.cpp
index 170b48ebfd..60b1ceffb3 100644
--- a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option.cpp
+++ b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option.cpp
@@ -1,8 +1,8 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
- * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr
- * Copyright (C) 2014-2015 KiCad Developers, see CHANGELOG.TXT for contributors.
+ * Copyright (C) 2017 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 2014-2017 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -34,14 +34,15 @@ public:
private:
EDA_3D_VIEWER* m_parent;
- CINFO3D_VISU & m_3Dprms;
+ CINFO3D_VISU& m_3Dprms;
void initDialog();
- // Event functions:
- void OnShowAllClick( wxCommandEvent& event ) override;
- void OnShowNoneClick( wxCommandEvent& event ) override;
- void OnOKClick( wxCommandEvent& event ) override;
+ /// Automatically called when clicking on the OK button
+ bool TransferDataFromWindow() override;
+
+ /// Automatically called after creating the dialog
+ bool TransferDataToWindow() override;
};
@@ -52,7 +53,10 @@ void EDA_3D_VIEWER::Install3DViewOptionDialog( wxCommandEvent& event )
if( dlg.ShowModal() == wxID_OK )
{
SetMenuBarOptionsState();
- NewDisplay();
+
+ // Force immediate display redraw:
+ ReloadRequest();
+ m_canvas->Request_refresh();
}
}
@@ -64,17 +68,21 @@ DIALOG_3D_VIEW_OPTIONS::DIALOG_3D_VIEW_OPTIONS( EDA_3D_VIEWER* parent )
initDialog();
- SetDefaultItem( m_sdbSizerOK );
- Layout();
- GetSizer()->SetSizeHints( this );
- Centre();
+ m_sdbSizerOK->SetDefault();
+
+ // Now all widgets have the size fixed, call FinishDialogSettings
+ FinishDialogSettings();
}
void DIALOG_3D_VIEW_OPTIONS::initDialog()
{
+ m_bitmapRealisticMode->SetBitmap( KiBitmap( use_3D_copper_thickness_xpm ) );
m_bitmapCuThickness->SetBitmap( KiBitmap( use_3D_copper_thickness_xpm ) );
- m_bitmap3Dshapes->SetBitmap( KiBitmap( shape_3d_xpm ) );
+ m_bitmap3DshapesTH->SetBitmap( KiBitmap( shape_3d_xpm ) );
+ m_bitmap3DshapesSMD->SetBitmap( KiBitmap( shape_3d_xpm ) );
+ m_bitmap3DshapesVirtual->SetBitmap( KiBitmap( shape_3d_xpm ) );
+ m_bitmapBoundingBoxes->SetBitmap( KiBitmap( ortho_xpm ) );
m_bitmapAreas->SetBitmap( KiBitmap( add_zone_xpm ) );
m_bitmapSilkscreen->SetBitmap( KiBitmap( text_xpm ) );
m_bitmapSolderMask->SetBitmap( KiBitmap( pads_mask_layers_xpm ) );
@@ -82,51 +90,48 @@ void DIALOG_3D_VIEW_OPTIONS::initDialog()
m_bitmapAdhesive->SetBitmap( KiBitmap( tools_xpm ) );
m_bitmapComments->SetBitmap( KiBitmap( editor_xpm ) );
m_bitmapECO->SetBitmap( KiBitmap( editor_xpm ) );
+}
+
+bool DIALOG_3D_VIEW_OPTIONS::TransferDataToWindow()
+{
// Check/uncheck checkboxes
+ m_checkBoxRealisticMode->SetValue( m_3Dprms.GetFlag( FL_USE_REALISTIC_MODE ) );
+ m_checkBoxCuThickness->SetValue( m_3Dprms.GetFlag( FL_RENDER_OPENGL_COPPER_THICKNESS ) );
m_checkBoxAreas->SetValue( m_3Dprms.GetFlag( FL_ZONE ) );
+ m_checkBoxBoundingBoxes->SetValue( m_3Dprms.GetFlag( FL_RENDER_OPENGL_SHOW_MODEL_BBOX ) );
+
+ m_checkBox3DshapesTH->SetValue( m_3Dprms.GetFlag( FL_MODULE_ATTRIBUTES_NORMAL ) );
+ m_checkBox3DshapesSMD->SetValue( m_3Dprms.GetFlag( FL_MODULE_ATTRIBUTES_NORMAL_INSERT ) );
+ m_checkBox3DshapesVirtual->SetValue( m_3Dprms.GetFlag( FL_MODULE_ATTRIBUTES_VIRTUAL ) );
+
m_checkBoxSilkscreen->SetValue( m_3Dprms.GetFlag( FL_SILKSCREEN ) );
m_checkBoxSolderMask->SetValue( m_3Dprms.GetFlag( FL_SOLDERMASK ) );
m_checkBoxSolderpaste->SetValue( m_3Dprms.GetFlag( FL_SOLDERPASTE ) );
m_checkBoxAdhesive->SetValue( m_3Dprms.GetFlag( FL_ADHESIVE ) );
m_checkBoxComments->SetValue( m_3Dprms.GetFlag( FL_COMMENTS ) );
m_checkBoxECO->SetValue( m_3Dprms.GetFlag( FL_ECO ) );
+
+ return true;
}
-void DIALOG_3D_VIEW_OPTIONS::OnShowAllClick( wxCommandEvent& event )
+bool DIALOG_3D_VIEW_OPTIONS::TransferDataFromWindow()
{
- bool state = true;
- m_checkBoxCuThickness->SetValue( state );
- //m_checkBox3Dshapes->SetValue( state );
- m_checkBoxAreas->SetValue( state );
- m_checkBoxSilkscreen->SetValue( state );
- m_checkBoxSolderMask->SetValue( state );
- m_checkBoxSolderpaste->SetValue( state );
- m_checkBoxAdhesive->SetValue( state );
- m_checkBoxComments->SetValue( state );
- m_checkBoxECO->SetValue( state );
-}
+ // Set render mode
+ m_3Dprms.SetFlag( FL_USE_REALISTIC_MODE, m_checkBoxRealisticMode->GetValue() );
-
-void DIALOG_3D_VIEW_OPTIONS::OnShowNoneClick( wxCommandEvent& event )
-{
- bool state = false;
- m_checkBoxCuThickness->SetValue( state );
- //m_checkBox3Dshapes->SetValue( state );
- m_checkBoxAreas->SetValue( state );
- m_checkBoxSilkscreen->SetValue( state );
- m_checkBoxSolderMask->SetValue( state );
- m_checkBoxSolderpaste->SetValue( state );
- m_checkBoxAdhesive->SetValue( state );
- m_checkBoxComments->SetValue( state );
- m_checkBoxECO->SetValue( state );
-}
-
-
-void DIALOG_3D_VIEW_OPTIONS::OnOKClick( wxCommandEvent& event )
-{
+ // Set visibility of items
+ m_3Dprms.SetFlag( FL_RENDER_OPENGL_COPPER_THICKNESS, m_checkBoxCuThickness->GetValue() );
m_3Dprms.SetFlag( FL_ZONE, m_checkBoxAreas->GetValue() );
+ m_3Dprms.SetFlag( FL_RENDER_OPENGL_SHOW_MODEL_BBOX, m_checkBoxBoundingBoxes->GetValue() );
+
+ // Set 3D shapes visibility
+ m_3Dprms.SetFlag( FL_MODULE_ATTRIBUTES_NORMAL, m_checkBox3DshapesTH->GetValue() );
+ m_3Dprms.SetFlag( FL_MODULE_ATTRIBUTES_NORMAL_INSERT, m_checkBox3DshapesSMD->GetValue() );
+ m_3Dprms.SetFlag( FL_MODULE_ATTRIBUTES_VIRTUAL, m_checkBox3DshapesVirtual->GetValue() );
+
+ // Set Layer visibility
m_3Dprms.SetFlag( FL_SILKSCREEN, m_checkBoxSilkscreen->GetValue() );
m_3Dprms.SetFlag( FL_SOLDERMASK, m_checkBoxSolderMask->GetValue() );
m_3Dprms.SetFlag( FL_SOLDERPASTE, m_checkBoxSolderpaste->GetValue() );
@@ -134,5 +139,5 @@ void DIALOG_3D_VIEW_OPTIONS::OnOKClick( wxCommandEvent& event )
m_3Dprms.SetFlag( FL_COMMENTS, m_checkBoxComments->GetValue() );
m_3Dprms.SetFlag( FL_ECO, m_checkBoxECO->GetValue( ) );
- EndModal( wxID_OK );
+ return true;
}
diff --git a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.cpp b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.cpp
index 339b42a14e..593e69252a 100644
--- a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.cpp
+++ b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.cpp
@@ -1,8 +1,8 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Nov 22 2017)
+// C++ code generated with wxFormBuilder (version Jul 2 2017)
// http://www.wxformbuilder.org/
//
-// PLEASE DO *NOT* EDIT THIS FILE!
+// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "dialog_3D_view_option_base.h"
@@ -16,94 +16,216 @@ DIALOG_3D_VIEW_OPTIONS_BASE::DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWi
wxBoxSizer* bSizerMain;
bSizerMain = new wxBoxSizer( wxVERTICAL );
- wxBoxSizer* bSizerLeft;
- bSizerLeft = new wxBoxSizer( wxHORIZONTAL );
+ wxBoxSizer* bSizerUpper;
+ bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
- wxFlexGridSizer* fgSizeShowOpts;
- fgSizeShowOpts = new wxFlexGridSizer( 0, 2, 0, 0 );
- fgSizeShowOpts->SetFlexibleDirection( wxBOTH );
- fgSizeShowOpts->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+ wxBoxSizer* bSizeLeft;
+ bSizeLeft = new wxBoxSizer( wxVERTICAL );
+
+ m_staticText3DRenderOpts = new wxStaticText( this, wxID_ANY, _("Render options:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText3DRenderOpts->Wrap( -1 );
+ m_staticText3DRenderOpts->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+
+ bSizeLeft->Add( m_staticText3DRenderOpts, 0, wxALL, 5 );
+
+ wxFlexGridSizer* fgSizerRenderOptions;
+ fgSizerRenderOptions = new wxFlexGridSizer( 0, 3, 0, 0 );
+ fgSizerRenderOptions->SetFlexibleDirection( wxBOTH );
+ fgSizerRenderOptions->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+
+ fgSizerRenderOptions->Add( 0, 0, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 );
m_bitmapRealisticMode = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_bitmapRealisticMode, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizerRenderOptions->Add( m_bitmapRealisticMode, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_checkBoxRealisticMode = new wxCheckBox( this, wxID_ANY, _("Realistic mode"), wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_checkBoxRealisticMode, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizerRenderOptions->Add( m_checkBoxRealisticMode, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ fgSizerRenderOptions->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
m_bitmapCuThickness = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_bitmapCuThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizerRenderOptions->Add( m_bitmapCuThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_checkBoxCuThickness = new wxCheckBox( this, wxID_ANY, _("Show copper thickness"), wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_checkBoxCuThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizerRenderOptions->Add( m_checkBoxCuThickness, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_bitmap3Dshapes = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_bitmap3Dshapes, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_checkBox3Dshapes = new wxCheckBox( this, wxID_ANY, _("Show 3D Models"), wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_checkBox3Dshapes, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizerRenderOptions->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
+
+ m_bitmapBoundingBoxes = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerRenderOptions->Add( m_bitmapBoundingBoxes, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_checkBoxBoundingBoxes = new wxCheckBox( this, wxID_ANY, _("Show model bounding boxes"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerRenderOptions->Add( m_checkBoxBoundingBoxes, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ fgSizerRenderOptions->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
m_bitmapAreas = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_bitmapAreas, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizerRenderOptions->Add( m_bitmapAreas, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
m_checkBoxAreas = new wxCheckBox( this, wxID_ANY, _("Show filled areas in zones"), wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_checkBoxAreas, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizerRenderOptions->Add( m_checkBoxAreas, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
- m_bitmapSilkscreen = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_bitmapSilkscreen, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_checkBoxSilkscreen = new wxCheckBox( this, wxID_ANY, _("Show silkscreen layers"), wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_checkBoxSilkscreen, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapSolderMask = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_bitmapSolderMask, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_checkBoxSolderMask = new wxCheckBox( this, wxID_ANY, _("Show solder mask layers"), wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_checkBoxSolderMask, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapSolderPaste = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_bitmapSolderPaste, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_checkBoxSolderpaste = new wxCheckBox( this, wxID_ANY, _("Show solder paste layers"), wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_checkBoxSolderpaste, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapAdhesive = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_bitmapAdhesive, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_checkBoxAdhesive = new wxCheckBox( this, wxID_ANY, _("Show adhesive layers"), wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_checkBoxAdhesive, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapComments = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_bitmapComments, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_checkBoxComments = new wxCheckBox( this, wxID_ANY, _("Show comments and drawings layers"), wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_checkBoxComments, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_bitmapECO = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_bitmapECO, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
-
- m_checkBoxECO = new wxCheckBox( this, wxID_ANY, _("Show ECO layers"), wxDefaultPosition, wxDefaultSize, 0 );
- fgSizeShowOpts->Add( m_checkBoxECO, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+ wxFlexGridSizer* fgSizer3;
+ fgSizer3 = new wxFlexGridSizer( 0, 2, 0, 0 );
+ fgSizer3->SetFlexibleDirection( wxBOTH );
+ fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- bSizerLeft->Add( fgSizeShowOpts, 1, wxEXPAND, 5 );
+ fgSizerRenderOptions->Add( fgSizer3, 1, wxEXPAND, 5 );
+
+
+ bSizeLeft->Add( fgSizerRenderOptions, 1, wxEXPAND, 5 );
+
+ m_staticText3DmodelVisibility = new wxStaticText( this, wxID_ANY, _("3D model visibility:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticText3DmodelVisibility->Wrap( -1 );
+ m_staticText3DmodelVisibility->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+
+ bSizeLeft->Add( m_staticText3DmodelVisibility, 0, wxALL, 5 );
+
+ wxFlexGridSizer* fgSizer3DVisibility;
+ fgSizer3DVisibility = new wxFlexGridSizer( 0, 3, 0, 0 );
+ fgSizer3DVisibility->SetFlexibleDirection( wxBOTH );
+ fgSizer3DVisibility->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+
+ fgSizer3DVisibility->Add( 0, 0, 1, wxRIGHT|wxLEFT, 10 );
+
+ m_bitmap3DshapesTH = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizer3DVisibility->Add( m_bitmap3DshapesTH, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_checkBox3DshapesTH = new wxCheckBox( this, wxID_ANY, _("Show 3D through hole models"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizer3DVisibility->Add( m_checkBox3DshapesTH, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ fgSizer3DVisibility->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
+
+ m_bitmap3DshapesSMD = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizer3DVisibility->Add( m_bitmap3DshapesSMD, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_checkBox3DshapesSMD = new wxCheckBox( this, wxID_ANY, _("Show 3D SMD models"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizer3DVisibility->Add( m_checkBox3DshapesSMD, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ fgSizer3DVisibility->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
+
+ m_bitmap3DshapesVirtual = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizer3DVisibility->Add( m_bitmap3DshapesVirtual, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_checkBox3DshapesVirtual = new wxCheckBox( this, wxID_ANY, _("Show 3D virtual models"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizer3DVisibility->Add( m_checkBox3DshapesVirtual, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizeLeft->Add( fgSizer3DVisibility, 1, wxEXPAND, 5 );
+
+
+ bSizerUpper->Add( bSizeLeft, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+ m_staticlineVertical = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
+ bSizerUpper->Add( m_staticlineVertical, 0, wxEXPAND | wxALL, 5 );
wxBoxSizer* bSizerRight;
- bSizerRight = new wxBoxSizer( wxVERTICAL );
+ bSizerRight = new wxBoxSizer( wxHORIZONTAL );
- m_buttonShowAll = new wxButton( this, wxID_ANY, _("Show All"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizerRight->Add( m_buttonShowAll, 0, wxALL|wxEXPAND, 5 );
+ wxBoxSizer* bSizeLayer;
+ bSizeLayer = new wxBoxSizer( wxVERTICAL );
- m_buttonShowNone = new wxButton( this, wxID_ANY, _("Show None"), wxDefaultPosition, wxDefaultSize, 0 );
- bSizerRight->Add( m_buttonShowNone, 0, wxALL|wxEXPAND, 5 );
+ m_staticTextBoardLayers = new wxStaticText( this, wxID_ANY, _("Board layers:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextBoardLayers->Wrap( -1 );
+ m_staticTextBoardLayers->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+
+ bSizeLayer->Add( m_staticTextBoardLayers, 0, wxALL, 5 );
+
+ wxFlexGridSizer* fgSizerShowBrdLayersOpts;
+ fgSizerShowBrdLayersOpts = new wxFlexGridSizer( 0, 3, 0, 0 );
+ fgSizerShowBrdLayersOpts->SetFlexibleDirection( wxBOTH );
+ fgSizerShowBrdLayersOpts->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
- bSizerLeft->Add( bSizerRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
+ fgSizerShowBrdLayersOpts->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
+
+ m_bitmapSilkscreen = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShowBrdLayersOpts->Add( m_bitmapSilkscreen, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_checkBoxSilkscreen = new wxCheckBox( this, wxID_ANY, _("Show silkscreen layers"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShowBrdLayersOpts->Add( m_checkBoxSilkscreen, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
- bSizerMain->Add( bSizerLeft, 1, wxEXPAND, 5 );
+ fgSizerShowBrdLayersOpts->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
- m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerMain->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
+ m_bitmapSolderMask = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShowBrdLayersOpts->Add( m_bitmapSolderMask, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_checkBoxSolderMask = new wxCheckBox( this, wxID_ANY, _("Show solder mask layers"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShowBrdLayersOpts->Add( m_checkBoxSolderMask, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ fgSizerShowBrdLayersOpts->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
+
+ m_bitmapSolderPaste = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShowBrdLayersOpts->Add( m_bitmapSolderPaste, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_checkBoxSolderpaste = new wxCheckBox( this, wxID_ANY, _("Show solder paste layers"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShowBrdLayersOpts->Add( m_checkBoxSolderpaste, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ fgSizerShowBrdLayersOpts->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
+
+ m_bitmapAdhesive = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShowBrdLayersOpts->Add( m_bitmapAdhesive, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_checkBoxAdhesive = new wxCheckBox( this, wxID_ANY, _("Show adhesive layers"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShowBrdLayersOpts->Add( m_checkBoxAdhesive, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizeLayer->Add( fgSizerShowBrdLayersOpts, 1, wxEXPAND, 5 );
+
+ m_staticTextUserLayers = new wxStaticText( this, wxID_ANY, _("User layers:"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_staticTextUserLayers->Wrap( -1 );
+ m_staticTextUserLayers->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+
+ bSizeLayer->Add( m_staticTextUserLayers, 0, wxALL, 5 );
+
+ wxFlexGridSizer* fgSizerShowUserLayersOpts;
+ fgSizerShowUserLayersOpts = new wxFlexGridSizer( 0, 3, 0, 0 );
+ fgSizerShowUserLayersOpts->SetFlexibleDirection( wxBOTH );
+ fgSizerShowUserLayersOpts->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+
+ fgSizerShowUserLayersOpts->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
+
+ m_bitmapComments = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShowUserLayersOpts->Add( m_bitmapComments, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_checkBoxComments = new wxCheckBox( this, wxID_ANY, _("Show comments and drawings layers"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShowUserLayersOpts->Add( m_checkBoxComments, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ fgSizerShowUserLayersOpts->Add( 0, 0, 0, wxRIGHT|wxLEFT, 10 );
+
+ m_bitmapECO = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShowUserLayersOpts->Add( m_bitmapECO, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+ m_checkBoxECO = new wxCheckBox( this, wxID_ANY, _("Show ECO layers"), wxDefaultPosition, wxDefaultSize, 0 );
+ fgSizerShowUserLayersOpts->Add( m_checkBoxECO, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+ bSizeLayer->Add( fgSizerShowUserLayersOpts, 1, wxEXPAND, 5 );
+
+
+ bSizerRight->Add( bSizeLayer, 1, wxEXPAND, 5 );
+
+
+ bSizerUpper->Add( bSizerRight, 1, wxEXPAND, 5 );
+
+
+ bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
+
+ m_staticlineH = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerMain->Add( m_staticlineH, 0, wxEXPAND | wxALL, 5 );
m_sdbSizer = new wxStdDialogButtonSizer();
m_sdbSizerOK = new wxButton( this, wxID_OK );
@@ -117,23 +239,16 @@ DIALOG_3D_VIEW_OPTIONS_BASE::DIALOG_3D_VIEW_OPTIONS_BASE( wxWindow* parent, wxWi
this->SetSizer( bSizerMain );
this->Layout();
- bSizerMain->Fit( this );
this->Centre( wxBOTH );
// Connect Events
m_checkBoxRealisticMode->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnCheckRealisticMode ), NULL, this );
- m_buttonShowAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnShowAllClick ), NULL, this );
- m_buttonShowNone->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnShowNoneClick ), NULL, this );
- m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnOKClick ), NULL, this );
}
DIALOG_3D_VIEW_OPTIONS_BASE::~DIALOG_3D_VIEW_OPTIONS_BASE()
{
// Disconnect Events
m_checkBoxRealisticMode->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnCheckRealisticMode ), NULL, this );
- m_buttonShowAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnShowAllClick ), NULL, this );
- m_buttonShowNone->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnShowNoneClick ), NULL, this );
- m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_3D_VIEW_OPTIONS_BASE::OnOKClick ), NULL, this );
}
diff --git a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.fbp b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.fbp
index b12bf41752..1a24ddf109 100644
--- a/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.fbp
+++ b/3d-viewer/3d_viewer/dialogs/dialog_3D_view_option_base.fbp
@@ -44,7 +44,7 @@
DIALOG_3D_VIEW_OPTIONS_BASE
- -1,-1
+ 571,349
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
DIALOG_SHIM; dialog_shim.h
3D Display Options
@@ -99,111 +99,23 @@
1