Splitter for 3D model page of Footprint Properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15606
This commit is contained in:
parent
33566f88a9
commit
91d949f59e
|
@ -41,6 +41,7 @@
|
||||||
#include <settings/common_settings.h>
|
#include <settings/common_settings.h>
|
||||||
#include <settings/settings_manager.h>
|
#include <settings/settings_manager.h>
|
||||||
#include <widgets/wx_infobar.h>
|
#include <widgets/wx_infobar.h>
|
||||||
|
#include <widgets/std_bitmap_button.h>
|
||||||
#include <eda_3d_viewer_settings.h>
|
#include <eda_3d_viewer_settings.h>
|
||||||
#include <board_design_settings.h>
|
#include <board_design_settings.h>
|
||||||
|
|
||||||
|
@ -123,7 +124,8 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM
|
||||||
// Create the 3D canvas
|
// Create the 3D canvas
|
||||||
m_previewPane = new EDA_3D_CANVAS( this,
|
m_previewPane = new EDA_3D_CANVAS( this,
|
||||||
OGL_ATT_LIST::GetAttributesList( ANTIALIASING_MODE::AA_8X ),
|
OGL_ATT_LIST::GetAttributesList( ANTIALIASING_MODE::AA_8X ),
|
||||||
m_boardAdapter, m_currentCamera, PROJECT_PCB::Get3DCacheManager( &aFrame->Prj() ) );
|
m_boardAdapter, m_currentCamera,
|
||||||
|
PROJECT_PCB::Get3DCacheManager( &aFrame->Prj() ) );
|
||||||
|
|
||||||
m_boardAdapter.SetBoard( m_dummyBoard );
|
m_boardAdapter.SetBoard( m_dummyBoard );
|
||||||
m_boardAdapter.m_IsBoardView = false;
|
m_boardAdapter.m_IsBoardView = false;
|
||||||
|
@ -161,26 +163,6 @@ PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL( wxWindow* aParent, PCB_BASE_FRAM
|
||||||
aFrame->Connect( EDA_EVT_UNITS_CHANGED,
|
aFrame->Connect( EDA_EVT_UNITS_CHANGED,
|
||||||
wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL::onUnitsChanged ),
|
wxCommandEventHandler( PANEL_PREVIEW_3D_MODEL::onUnitsChanged ),
|
||||||
nullptr, this );
|
nullptr, this );
|
||||||
|
|
||||||
#ifdef __WXOSX__
|
|
||||||
// Call layout once to get the proper button sizes after the bitmaps have been set
|
|
||||||
Layout();
|
|
||||||
|
|
||||||
// The rounded-button style used has a small border on the left/right sides.
|
|
||||||
// This is automatically fixed in wx for buttons with a bitmap < 20, but not
|
|
||||||
// when the bitmap is set to be 26x26.
|
|
||||||
wxSize borderFix = wxSize( 4, 4 );
|
|
||||||
|
|
||||||
m_bpvTop->SetMinSize( m_bpvTop->GetSize() + borderFix );
|
|
||||||
m_bpvFront->SetMinSize( m_bpvFront->GetSize() + borderFix );
|
|
||||||
m_bpvBack->SetMinSize( m_bpvBack->GetSize() + borderFix );
|
|
||||||
m_bpvLeft->SetMinSize( m_bpvLeft->GetSize() + borderFix );
|
|
||||||
m_bpvRight->SetMinSize( m_bpvRight->GetSize() + borderFix );
|
|
||||||
m_bpvBottom->SetMinSize( m_bpvBottom->GetSize() + borderFix );
|
|
||||||
m_bpvISO->SetMinSize( m_bpvISO->GetSize() + borderFix );
|
|
||||||
m_bpUpdate->SetMinSize( m_bpUpdate->GetSize() + borderFix );
|
|
||||||
m_bpSettings->SetMinSize( m_bpSettings->GetSize() + borderFix );
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006)
|
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "widgets/std_bitmap_button.h"
|
||||||
|
|
||||||
#include "panel_preview_3d_model_base.h"
|
#include "panel_preview_3d_model_base.h"
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -21,7 +23,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
|
||||||
sbSizerScale = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scale") ), wxVERTICAL );
|
sbSizerScale = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scale") ), wxVERTICAL );
|
||||||
|
|
||||||
wxFlexGridSizer* fgSizerScale;
|
wxFlexGridSizer* fgSizerScale;
|
||||||
fgSizerScale = new wxFlexGridSizer( 0, 3, 2, 3 );
|
fgSizerScale = new wxFlexGridSizer( 0, 3, 1, 3 );
|
||||||
fgSizerScale->AddGrowableCol( 1 );
|
fgSizerScale->AddGrowableCol( 1 );
|
||||||
fgSizerScale->SetFlexibleDirection( wxBOTH );
|
fgSizerScale->SetFlexibleDirection( wxBOTH );
|
||||||
fgSizerScale->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
fgSizerScale->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
@ -57,16 +59,16 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
|
||||||
fgSizerScale->Add( m_spinZscale, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
fgSizerScale->Add( m_spinZscale, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
sbSizerScale->Add( fgSizerScale, 0, wxBOTTOM|wxEXPAND|wxRIGHT, 5 );
|
sbSizerScale->Add( fgSizerScale, 0, wxBOTTOM|wxEXPAND|wxRIGHT, 2 );
|
||||||
|
|
||||||
|
|
||||||
bSizerLeft->Add( sbSizerScale, 0, wxLEFT|wxRIGHT|wxEXPAND, 5 );
|
bSizerLeft->Add( sbSizerScale, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
wxStaticBoxSizer* sbSizerRotation;
|
wxStaticBoxSizer* sbSizerRotation;
|
||||||
sbSizerRotation = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Rotation") ), wxVERTICAL );
|
sbSizerRotation = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Rotation") ), wxVERTICAL );
|
||||||
|
|
||||||
wxFlexGridSizer* fgSizerRotate;
|
wxFlexGridSizer* fgSizerRotate;
|
||||||
fgSizerRotate = new wxFlexGridSizer( 0, 3, 2, 3 );
|
fgSizerRotate = new wxFlexGridSizer( 0, 3, 1, 3 );
|
||||||
fgSizerRotate->AddGrowableCol( 1 );
|
fgSizerRotate->AddGrowableCol( 1 );
|
||||||
fgSizerRotate->SetFlexibleDirection( wxBOTH );
|
fgSizerRotate->SetFlexibleDirection( wxBOTH );
|
||||||
fgSizerRotate->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
fgSizerRotate->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
@ -102,7 +104,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
|
||||||
fgSizerRotate->Add( m_spinZrot, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
fgSizerRotate->Add( m_spinZrot, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
sbSizerRotation->Add( fgSizerRotate, 0, wxBOTTOM|wxRIGHT|wxEXPAND, 5 );
|
sbSizerRotation->Add( fgSizerRotate, 0, wxBOTTOM|wxRIGHT|wxEXPAND, 2 );
|
||||||
|
|
||||||
|
|
||||||
bSizerLeft->Add( sbSizerRotation, 0, wxLEFT|wxRIGHT|wxEXPAND, 5 );
|
bSizerLeft->Add( sbSizerRotation, 0, wxLEFT|wxRIGHT|wxEXPAND, 5 );
|
||||||
|
@ -111,7 +113,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
|
||||||
sbSizerOffset = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Offset") ), wxVERTICAL );
|
sbSizerOffset = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Offset") ), wxVERTICAL );
|
||||||
|
|
||||||
wxFlexGridSizer* fgSizerOffset;
|
wxFlexGridSizer* fgSizerOffset;
|
||||||
fgSizerOffset = new wxFlexGridSizer( 0, 3, 2, 3 );
|
fgSizerOffset = new wxFlexGridSizer( 0, 3, 1, 3 );
|
||||||
fgSizerOffset->AddGrowableCol( 1 );
|
fgSizerOffset->AddGrowableCol( 1 );
|
||||||
fgSizerOffset->SetFlexibleDirection( wxBOTH );
|
fgSizerOffset->SetFlexibleDirection( wxBOTH );
|
||||||
fgSizerOffset->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
fgSizerOffset->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
||||||
|
@ -147,7 +149,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
|
||||||
fgSizerOffset->Add( m_spinZoffset, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
fgSizerOffset->Add( m_spinZoffset, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
sbSizerOffset->Add( fgSizerOffset, 0, wxBOTTOM|wxRIGHT|wxEXPAND, 5 );
|
sbSizerOffset->Add( fgSizerOffset, 0, wxBOTTOM|wxRIGHT|wxEXPAND, 2 );
|
||||||
|
|
||||||
|
|
||||||
bSizerLeft->Add( sbSizerOffset, 0, wxLEFT|wxRIGHT|wxEXPAND, 5 );
|
bSizerLeft->Add( sbSizerOffset, 0, wxLEFT|wxRIGHT|wxEXPAND, 5 );
|
||||||
|
@ -155,8 +157,8 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
|
||||||
wxStaticBoxSizer* sbSizer4;
|
wxStaticBoxSizer* sbSizer4;
|
||||||
sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Opacity") ), wxVERTICAL );
|
sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Opacity") ), wxVERTICAL );
|
||||||
|
|
||||||
m_opacity = new wxSlider( sbSizer4->GetStaticBox(), wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS );
|
m_opacity = new wxSlider( sbSizer4->GetStaticBox(), wxID_ANY, 50, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL );
|
||||||
sbSizer4->Add( m_opacity, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
|
sbSizer4->Add( m_opacity, 0, wxRIGHT|wxLEFT, 2 );
|
||||||
|
|
||||||
|
|
||||||
bSizerLeft->Add( sbSizer4, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
bSizerLeft->Add( sbSizer4, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||||
|
@ -174,7 +176,7 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
|
||||||
m_previewLabel->Wrap( -1 );
|
m_previewLabel->Wrap( -1 );
|
||||||
m_previewLabel->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
|
m_previewLabel->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
|
||||||
|
|
||||||
bSizer6->Add( m_previewLabel, 1, wxEXPAND|wxLEFT|wxRIGHT, 10 );
|
bSizer6->Add( m_previewLabel, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizerRight->Add( bSizer6, 0, wxEXPAND, 5 );
|
bSizerRight->Add( bSizer6, 0, wxEXPAND, 5 );
|
||||||
|
@ -193,53 +195,53 @@ PANEL_PREVIEW_3D_MODEL_BASE::PANEL_PREVIEW_3D_MODEL_BASE( wxWindow* parent, wxWi
|
||||||
|
|
||||||
bSizer3DButtons->Add( 0, 10, 0, 0, 5 );
|
bSizer3DButtons->Add( 0, 10, 0, 0, 5 );
|
||||||
|
|
||||||
m_bpvISO = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
m_bpvISO = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||||
m_bpvISO->SetToolTip( _("Enable/disable orthographic projection") );
|
m_bpvISO->SetToolTip( _("Enable/disable orthographic projection") );
|
||||||
|
|
||||||
bSizer3DButtons->Add( m_bpvISO, 0, wxTOP, 5 );
|
bSizer3DButtons->Add( m_bpvISO, 0, wxTOP, 5 );
|
||||||
|
|
||||||
m_bpvBodyStyle = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
m_bpvBodyStyle = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||||
m_bpvBodyStyle->SetToolTip( _("Show or hide the board body\nIf hidden, show only copper and silkscreen layers.") );
|
m_bpvBodyStyle->SetToolTip( _("Show or hide the board body\nIf hidden, show only copper and silkscreen layers.") );
|
||||||
|
|
||||||
bSizer3DButtons->Add( m_bpvBodyStyle, 0, wxTOP|wxBOTTOM, 5 );
|
bSizer3DButtons->Add( m_bpvBodyStyle, 0, wxTOP, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
|
bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
m_bpvLeft = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
m_bpvLeft = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||||
bSizer3DButtons->Add( m_bpvLeft, 0, wxBOTTOM, 5 );
|
bSizer3DButtons->Add( m_bpvLeft, 0, wxBOTTOM, 5 );
|
||||||
|
|
||||||
m_bpvRight = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
m_bpvRight = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||||
bSizer3DButtons->Add( m_bpvRight, 0, wxBOTTOM, 5 );
|
bSizer3DButtons->Add( m_bpvRight, 0, wxBOTTOM, 5 );
|
||||||
|
|
||||||
m_bpvFront = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
m_bpvFront = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||||
bSizer3DButtons->Add( m_bpvFront, 0, wxBOTTOM, 5 );
|
bSizer3DButtons->Add( m_bpvFront, 0, wxBOTTOM, 5 );
|
||||||
|
|
||||||
m_bpvBack = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
m_bpvBack = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||||
bSizer3DButtons->Add( m_bpvBack, 0, wxBOTTOM, 5 );
|
bSizer3DButtons->Add( m_bpvBack, 0, wxBOTTOM, 5 );
|
||||||
|
|
||||||
m_bpvTop = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
m_bpvTop = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||||
bSizer3DButtons->Add( m_bpvTop, 0, wxBOTTOM, 5 );
|
bSizer3DButtons->Add( m_bpvTop, 0, wxBOTTOM, 5 );
|
||||||
|
|
||||||
m_bpvBottom = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
m_bpvBottom = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||||
bSizer3DButtons->Add( m_bpvBottom, 0, 0, 5 );
|
bSizer3DButtons->Add( m_bpvBottom, 0, 0, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
|
bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
m_bpUpdate = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
m_bpUpdate = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||||
m_bpUpdate->SetToolTip( _("Reload board and 3D models") );
|
m_bpUpdate->SetToolTip( _("Reload board and 3D models") );
|
||||||
|
|
||||||
bSizer3DButtons->Add( m_bpUpdate, 0, wxBOTTOM, 5 );
|
bSizer3DButtons->Add( m_bpUpdate, 0, wxTOP, 5 );
|
||||||
|
|
||||||
m_bpSettings = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
m_bpSettings = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||||
bSizer3DButtons->Add( m_bpSettings, 0, wxBOTTOM, 5 );
|
bSizer3DButtons->Add( m_bpSettings, 0, wxTOP, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizer3DButtons->Add( 0, 10, 0, 0, 5 );
|
bSizer3DButtons->Add( 0, 10, 0, 0, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizermain->Add( bSizer3DButtons, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
|
bSizermain->Add( bSizer3DButtons, 0, wxEXPAND|wxTOP, 5 );
|
||||||
|
|
||||||
|
|
||||||
this->SetSizer( bSizermain );
|
this->SetSizer( bSizermain );
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 3.10.1-282-g1fa54006)
|
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
@ -10,6 +10,8 @@
|
||||||
#include <wx/artprov.h>
|
#include <wx/artprov.h>
|
||||||
#include <wx/xrc/xmlres.h>
|
#include <wx/xrc/xmlres.h>
|
||||||
#include <wx/intl.h>
|
#include <wx/intl.h>
|
||||||
|
class STD_BITMAP_BUTTON;
|
||||||
|
|
||||||
#include <wx/string.h>
|
#include <wx/string.h>
|
||||||
#include <wx/stattext.h>
|
#include <wx/stattext.h>
|
||||||
#include <wx/gdicmn.h>
|
#include <wx/gdicmn.h>
|
||||||
|
@ -68,16 +70,16 @@ class PANEL_PREVIEW_3D_MODEL_BASE : public wxPanel
|
||||||
wxSlider* m_opacity;
|
wxSlider* m_opacity;
|
||||||
wxStaticText* m_previewLabel;
|
wxStaticText* m_previewLabel;
|
||||||
wxBoxSizer* m_SizerPanelView;
|
wxBoxSizer* m_SizerPanelView;
|
||||||
wxBitmapButton* m_bpvISO;
|
STD_BITMAP_BUTTON* m_bpvISO;
|
||||||
wxBitmapButton* m_bpvBodyStyle;
|
STD_BITMAP_BUTTON* m_bpvBodyStyle;
|
||||||
wxBitmapButton* m_bpvLeft;
|
STD_BITMAP_BUTTON* m_bpvLeft;
|
||||||
wxBitmapButton* m_bpvRight;
|
STD_BITMAP_BUTTON* m_bpvRight;
|
||||||
wxBitmapButton* m_bpvFront;
|
STD_BITMAP_BUTTON* m_bpvFront;
|
||||||
wxBitmapButton* m_bpvBack;
|
STD_BITMAP_BUTTON* m_bpvBack;
|
||||||
wxBitmapButton* m_bpvTop;
|
STD_BITMAP_BUTTON* m_bpvTop;
|
||||||
wxBitmapButton* m_bpvBottom;
|
STD_BITMAP_BUTTON* m_bpvBottom;
|
||||||
wxBitmapButton* m_bpUpdate;
|
STD_BITMAP_BUTTON* m_bpUpdate;
|
||||||
wxBitmapButton* m_bpSettings;
|
STD_BITMAP_BUTTON* m_bpSettings;
|
||||||
|
|
||||||
// Virtual event handlers, override them in your derived class
|
// Virtual event handlers, override them in your derived class
|
||||||
virtual void onMouseWheelScale( wxMouseEvent& event ) { event.Skip(); }
|
virtual void onMouseWheelScale( wxMouseEvent& event ) { event.Skip(); }
|
||||||
|
|
|
@ -54,15 +54,18 @@ enum MODELS_TABLE_COLUMNS
|
||||||
COL_SHOWN = 2
|
COL_SHOWN = 2
|
||||||
};
|
};
|
||||||
|
|
||||||
PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL(
|
PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL( PCB_BASE_EDIT_FRAME* aFrame,
|
||||||
PCB_BASE_EDIT_FRAME* aFrame, FOOTPRINT* aFootprint, DIALOG_SHIM* aDialogParent,
|
FOOTPRINT* aFootprint,
|
||||||
wxWindow* aParent, wxWindowID aId, const wxPoint& aPos, const wxSize& aSize, long aStyle,
|
DIALOG_SHIM* aDialogParent,
|
||||||
const wxString& aName ) :
|
wxWindow* aParent, wxWindowID aId,
|
||||||
PANEL_FP_PROPERTIES_3D_MODEL_BASE( aParent, aId, aPos, aSize, aStyle, aName ),
|
const wxPoint& aPos,
|
||||||
m_parentDialog( aDialogParent ),
|
const wxSize& aSize, long aStyle,
|
||||||
m_frame( aFrame ),
|
const wxString& aName ) :
|
||||||
m_footprint( aFootprint ),
|
PANEL_FP_PROPERTIES_3D_MODEL_BASE( aParent, aId, aPos, aSize, aStyle, aName ),
|
||||||
m_inSelect( false )
|
m_parentDialog( aDialogParent ),
|
||||||
|
m_frame( aFrame ),
|
||||||
|
m_footprint( aFootprint ),
|
||||||
|
m_inSelect( false )
|
||||||
{
|
{
|
||||||
m_modelsGrid->SetDefaultRowSize( m_modelsGrid->GetDefaultRowSize() + 4 );
|
m_modelsGrid->SetDefaultRowSize( m_modelsGrid->GetDefaultRowSize() + 4 );
|
||||||
|
|
||||||
|
@ -90,8 +93,9 @@ PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL(
|
||||||
|
|
||||||
// Filename
|
// Filename
|
||||||
attr = new wxGridCellAttr;
|
attr = new wxGridCellAttr;
|
||||||
attr->SetEditor( new GRID_CELL_PATH_EDITOR( m_parentDialog, m_modelsGrid, &cfg->m_lastFootprint3dDir,
|
attr->SetEditor( new GRID_CELL_PATH_EDITOR( m_parentDialog, m_modelsGrid,
|
||||||
wxT( "*.*" ), true, m_frame->Prj().GetProjectPath() ) );
|
&cfg->m_lastFootprint3dDir, wxT( "*.*" ), true,
|
||||||
|
m_frame->Prj().GetProjectPath() ) );
|
||||||
m_modelsGrid->SetColAttr( COL_FILENAME, attr );
|
m_modelsGrid->SetColAttr( COL_FILENAME, attr );
|
||||||
|
|
||||||
// Show checkbox
|
// Show checkbox
|
||||||
|
@ -104,7 +108,8 @@ PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL(
|
||||||
|
|
||||||
PROJECT_PCB::Get3DCacheManager( &m_frame->Prj() )->GetResolver()->SetProgramBase( &Pgm() );
|
PROJECT_PCB::Get3DCacheManager( &m_frame->Prj() )->GetResolver()->SetProgramBase( &Pgm() );
|
||||||
|
|
||||||
m_previewPane = new PANEL_PREVIEW_3D_MODEL( this, m_frame, m_footprint, &m_shapes3D_list );
|
m_previewPane = new PANEL_PREVIEW_3D_MODEL( m_lowerPanel, m_frame, m_footprint,
|
||||||
|
&m_shapes3D_list );
|
||||||
|
|
||||||
m_LowerSizer3D->Add( m_previewPane, 1, wxEXPAND, 5 );
|
m_LowerSizer3D->Add( m_previewPane, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,6 @@ class PANEL_FP_PROPERTIES_3D_MODEL : public PANEL_FP_PROPERTIES_3D_MODEL_BASE
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
PANEL_FP_PROPERTIES_3D_MODEL( PCB_BASE_EDIT_FRAME* aFrame, FOOTPRINT* aFootprint,
|
PANEL_FP_PROPERTIES_3D_MODEL( PCB_BASE_EDIT_FRAME* aFrame, FOOTPRINT* aFootprint,
|
||||||
DIALOG_SHIM* aDialogParent, wxWindow* aParent,
|
DIALOG_SHIM* aDialogParent, wxWindow* aParent,
|
||||||
wxWindowID aId = wxID_ANY,
|
wxWindowID aId = wxID_ANY,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
@ -16,10 +16,19 @@ PANEL_FP_PROPERTIES_3D_MODEL_BASE::PANEL_FP_PROPERTIES_3D_MODEL_BASE( wxWindow*
|
||||||
{
|
{
|
||||||
bSizerMain3D = new wxBoxSizer( wxVERTICAL );
|
bSizerMain3D = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
m_modelsGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE );
|
m_splitter1 = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3DSASH|wxSP_LIVE_UPDATE );
|
||||||
|
m_splitter1->SetSashGravity( 0.5 );
|
||||||
|
m_splitter1->Connect( wxEVT_IDLE, wxIdleEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::m_splitter1OnIdle ), NULL, this );
|
||||||
|
m_splitter1->SetMinimumPaneSize( 112 );
|
||||||
|
|
||||||
|
m_upperPanel = new wxPanel( m_splitter1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||||
|
wxBoxSizer* bSizer4;
|
||||||
|
bSizer4 = new wxBoxSizer( wxVERTICAL );
|
||||||
|
|
||||||
|
m_modelsGrid = new WX_GRID( m_upperPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxBORDER_SIMPLE );
|
||||||
|
|
||||||
// Grid
|
// Grid
|
||||||
m_modelsGrid->CreateGrid( 3, 3 );
|
m_modelsGrid->CreateGrid( 2, 3 );
|
||||||
m_modelsGrid->EnableEditing( true );
|
m_modelsGrid->EnableEditing( true );
|
||||||
m_modelsGrid->EnableGridLines( false );
|
m_modelsGrid->EnableGridLines( false );
|
||||||
m_modelsGrid->EnableDragGridSize( false );
|
m_modelsGrid->EnableDragGridSize( false );
|
||||||
|
@ -46,36 +55,45 @@ PANEL_FP_PROPERTIES_3D_MODEL_BASE::PANEL_FP_PROPERTIES_3D_MODEL_BASE( wxWindow*
|
||||||
|
|
||||||
// Cell Defaults
|
// Cell Defaults
|
||||||
m_modelsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
|
m_modelsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
|
||||||
bSizerMain3D->Add( m_modelsGrid, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
bSizer4->Add( m_modelsGrid, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||||
|
|
||||||
wxBoxSizer* bSizer3DButtons;
|
wxBoxSizer* bSizer3DButtons;
|
||||||
bSizer3DButtons = new wxBoxSizer( wxHORIZONTAL );
|
bSizer3DButtons = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
m_button3DShapeAdd = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
m_button3DShapeAdd = new STD_BITMAP_BUTTON( m_upperPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||||
bSizer3DButtons->Add( m_button3DShapeAdd, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
bSizer3DButtons->Add( m_button3DShapeAdd, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||||
|
|
||||||
m_button3DShapeBrowse = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
m_button3DShapeBrowse = new STD_BITMAP_BUTTON( m_upperPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||||
bSizer3DButtons->Add( m_button3DShapeBrowse, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
bSizer3DButtons->Add( m_button3DShapeBrowse, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizer3DButtons->Add( 20, 0, 0, 0, 5 );
|
bSizer3DButtons->Add( 20, 0, 0, 0, 5 );
|
||||||
|
|
||||||
m_button3DShapeRemove = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
m_button3DShapeRemove = new STD_BITMAP_BUTTON( m_upperPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
||||||
bSizer3DButtons->Add( m_button3DShapeRemove, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
bSizer3DButtons->Add( m_button3DShapeRemove, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
|
bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
m_buttonConfig3DPaths = new wxButton( this, wxID_ANY, _("Configure Paths..."), wxDefaultPosition, wxDefaultSize, 0 );
|
m_buttonConfig3DPaths = new wxButton( m_upperPanel, wxID_ANY, _("Configure Paths..."), wxDefaultPosition, wxDefaultSize, 0 );
|
||||||
bSizer3DButtons->Add( m_buttonConfig3DPaths, 0, wxALL, 5 );
|
bSizer3DButtons->Add( m_buttonConfig3DPaths, 0, wxALL, 5 );
|
||||||
|
|
||||||
|
|
||||||
bSizerMain3D->Add( bSizer3DButtons, 0, wxEXPAND|wxBOTTOM, 5 );
|
bSizer4->Add( bSizer3DButtons, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
|
||||||
|
|
||||||
|
|
||||||
|
m_upperPanel->SetSizer( bSizer4 );
|
||||||
|
m_upperPanel->Layout();
|
||||||
|
bSizer4->Fit( m_upperPanel );
|
||||||
|
m_lowerPanel = new wxPanel( m_splitter1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||||
m_LowerSizer3D = new wxBoxSizer( wxHORIZONTAL );
|
m_LowerSizer3D = new wxBoxSizer( wxHORIZONTAL );
|
||||||
|
|
||||||
|
|
||||||
bSizerMain3D->Add( m_LowerSizer3D, 0, wxEXPAND|wxTOP, 5 );
|
m_lowerPanel->SetSizer( m_LowerSizer3D );
|
||||||
|
m_lowerPanel->Layout();
|
||||||
|
m_LowerSizer3D->Fit( m_lowerPanel );
|
||||||
|
m_splitter1->SplitHorizontally( m_upperPanel, m_lowerPanel, 112 );
|
||||||
|
bSizerMain3D->Add( m_splitter1, 1, wxEXPAND, 5 );
|
||||||
|
|
||||||
|
|
||||||
this->SetSizer( bSizerMain3D );
|
this->SetSizer( bSizerMain3D );
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,5 +1,5 @@
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
|
||||||
// http://www.wxformbuilder.org/
|
// http://www.wxformbuilder.org/
|
||||||
//
|
//
|
||||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||||
|
@ -26,6 +26,7 @@ class WX_GRID;
|
||||||
#include <wx/button.h>
|
#include <wx/button.h>
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/panel.h>
|
#include <wx/panel.h>
|
||||||
|
#include <wx/splitter.h>
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -39,11 +40,14 @@ class PANEL_FP_PROPERTIES_3D_MODEL_BASE : public wxPanel
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
wxBoxSizer* bSizerMain3D;
|
wxBoxSizer* bSizerMain3D;
|
||||||
|
wxSplitterWindow* m_splitter1;
|
||||||
|
wxPanel* m_upperPanel;
|
||||||
WX_GRID* m_modelsGrid;
|
WX_GRID* m_modelsGrid;
|
||||||
STD_BITMAP_BUTTON* m_button3DShapeAdd;
|
STD_BITMAP_BUTTON* m_button3DShapeAdd;
|
||||||
STD_BITMAP_BUTTON* m_button3DShapeBrowse;
|
STD_BITMAP_BUTTON* m_button3DShapeBrowse;
|
||||||
STD_BITMAP_BUTTON* m_button3DShapeRemove;
|
STD_BITMAP_BUTTON* m_button3DShapeRemove;
|
||||||
wxButton* m_buttonConfig3DPaths;
|
wxButton* m_buttonConfig3DPaths;
|
||||||
|
wxPanel* m_lowerPanel;
|
||||||
wxBoxSizer* m_LowerSizer3D;
|
wxBoxSizer* m_LowerSizer3D;
|
||||||
|
|
||||||
// Virtual event handlers, override them in your derived class
|
// Virtual event handlers, override them in your derived class
|
||||||
|
@ -63,5 +67,11 @@ class PANEL_FP_PROPERTIES_3D_MODEL_BASE : public wxPanel
|
||||||
|
|
||||||
~PANEL_FP_PROPERTIES_3D_MODEL_BASE();
|
~PANEL_FP_PROPERTIES_3D_MODEL_BASE();
|
||||||
|
|
||||||
|
void m_splitter1OnIdle( wxIdleEvent& )
|
||||||
|
{
|
||||||
|
m_splitter1->SetSashPosition( 112 );
|
||||||
|
m_splitter1->Disconnect( wxEVT_IDLE, wxIdleEventHandler( PANEL_FP_PROPERTIES_3D_MODEL_BASE::m_splitter1OnIdle ), NULL, this );
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue