7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-21 16:03:43 +00:00

In-place editing for footprint TEXTE_MODULEs.

Fixes: lp:1102168
* https://bugs.launchpad.net/kicad/+bug/1102168

Fixes: lp:1779913
* https://bugs.launchpad.net/kicad/+bug/1779913

(cherry picked from commit 83781ab)
This commit is contained in:
Jeff Young 2018-03-28 18:14:04 +01:00
parent 8f0aa68ab8
commit 0010ad37d1
39 changed files with 17271 additions and 15928 deletions

View File

@ -1,353 +1,334 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jan 12 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "panel_prev_3d_base.h"
///////////////////////////////////////////////////////////////////////////
PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
wxBoxSizer* bSizermain;
bSizermain = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizerLeft;
bSizerLeft = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizerScale;
bSizerScale = new wxBoxSizer( wxVERTICAL );
m_staticTextScale = new wxStaticText( this, wxID_ANY, _("Scale"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextScale->Wrap( -1 );
bSizerScale->Add( m_staticTextScale, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxFlexGridSizer* fgSizerScale;
fgSizerScale = new wxFlexGridSizer( 0, 3, 0, 0 );
fgSizerScale->SetFlexibleDirection( wxBOTH );
fgSizerScale->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticText1 = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1->Wrap( -1 );
fgSizerScale->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
xscale = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerScale->Add( xscale, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_spinXscale = new wxSpinButton( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerScale->Add( m_spinXscale, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_staticText2 = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText2->Wrap( -1 );
fgSizerScale->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
yscale = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerScale->Add( yscale, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
m_spinYscale = new wxSpinButton( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerScale->Add( m_spinYscale, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_staticText3 = new wxStaticText( this, wxID_ANY, _("Z:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText3->Wrap( -1 );
fgSizerScale->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
zscale = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerScale->Add( zscale, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
m_spinZscale = new wxSpinButton( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerScale->Add( m_spinZscale, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
bSizerScale->Add( fgSizerScale, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
bSizerLeft->Add( bSizerScale, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerRotation;
bSizerRotation = new wxBoxSizer( wxVERTICAL );
m_staticTextRot = new wxStaticText( this, wxID_ANY, _("Rotation (degrees)"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRot->Wrap( -1 );
bSizerRotation->Add( m_staticTextRot, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxFlexGridSizer* fgSizerRotate;
fgSizerRotate = new wxFlexGridSizer( 0, 3, 0, 0 );
fgSizerRotate->SetFlexibleDirection( wxBOTH );
fgSizerRotate->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticText11 = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText11->Wrap( -1 );
fgSizerRotate->Add( m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
xrot = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
#ifdef __WXGTK__
if ( !xrot->HasFlag( wxTE_MULTILINE ) )
{
xrot->SetMaxLength( 9 );
}
#else
xrot->SetMaxLength( 9 );
#endif
fgSizerRotate->Add( xrot, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_spinXrot = new wxSpinButton( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerRotate->Add( m_spinXrot, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_staticText21 = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText21->Wrap( -1 );
fgSizerRotate->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
yrot = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
#ifdef __WXGTK__
if ( !yrot->HasFlag( wxTE_MULTILINE ) )
{
yrot->SetMaxLength( 9 );
}
#else
yrot->SetMaxLength( 9 );
#endif
fgSizerRotate->Add( yrot, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 5 );
m_spinYrot = new wxSpinButton( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerRotate->Add( m_spinYrot, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_staticText31 = new wxStaticText( this, wxID_ANY, _("Z:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText31->Wrap( -1 );
fgSizerRotate->Add( m_staticText31, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
zrot = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
#ifdef __WXGTK__
if ( !zrot->HasFlag( wxTE_MULTILINE ) )
{
zrot->SetMaxLength( 9 );
}
#else
zrot->SetMaxLength( 9 );
#endif
fgSizerRotate->Add( zrot, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
m_spinZrot = new wxSpinButton( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerRotate->Add( m_spinZrot, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
bSizerRotation->Add( fgSizerRotate, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
bSizerLeft->Add( bSizerRotation, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerOffset;
bSizerOffset = new wxBoxSizer( wxVERTICAL );
m_staticTextOffset = new wxStaticText( this, wxID_ANY, _("Offset"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextOffset->Wrap( -1 );
bSizerOffset->Add( m_staticTextOffset, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxFlexGridSizer* fgSizerOffset;
fgSizerOffset = new wxFlexGridSizer( 0, 3, 0, 0 );
fgSizerOffset->SetFlexibleDirection( wxBOTH );
fgSizerOffset->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticText12 = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText12->Wrap( -1 );
fgSizerOffset->Add( m_staticText12, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
xoff = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerOffset->Add( xoff, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_spinXoffset = new wxSpinButton( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerOffset->Add( m_spinXoffset, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_staticText22 = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText22->Wrap( -1 );
fgSizerOffset->Add( m_staticText22, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
yoff = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerOffset->Add( yoff, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxTOP, 5 );
m_spinYoffset = new wxSpinButton( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerOffset->Add( m_spinYoffset, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_staticText32 = new wxStaticText( this, wxID_ANY, _("Z:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText32->Wrap( -1 );
fgSizerOffset->Add( m_staticText32, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
zoff = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerOffset->Add( zoff, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_spinZoffset = new wxSpinButton( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerOffset->Add( m_spinZoffset, 0, wxALIGN_CENTER_VERTICAL, 5 );
bSizerOffset->Add( fgSizerOffset, 0, wxEXPAND|wxLEFT|wxRIGHT, 10 );
bSizerLeft->Add( bSizerOffset, 1, wxEXPAND, 5 );
bSizermain->Add( bSizerLeft, 0, wxEXPAND, 5 );
wxBoxSizer* bSizerRight;
bSizerRight = new wxBoxSizer( wxVERTICAL );
m_SizerPanelView = new wxBoxSizer( wxVERTICAL );
bSizerRight->Add( m_SizerPanelView, 1, wxEXPAND, 5 );
wxBoxSizer* bSizer3DButtons;
bSizer3DButtons = new wxBoxSizer( wxHORIZONTAL );
bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
m_fgSizerButtons = new wxFlexGridSizer( 0, 4, 0, 0 );
m_fgSizerButtons->AddGrowableCol( 0 );
m_fgSizerButtons->AddGrowableCol( 1 );
m_fgSizerButtons->AddGrowableCol( 2 );
m_fgSizerButtons->AddGrowableCol( 3 );
m_fgSizerButtons->SetFlexibleDirection( wxBOTH );
m_fgSizerButtons->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_bpvISO = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
m_bpvISO->SetToolTip( _("Change to isometric perspective") );
m_fgSizerButtons->Add( m_bpvISO, 0, wxALL|wxEXPAND, 5 );
m_bpvLeft = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
m_fgSizerButtons->Add( m_bpvLeft, 0, wxALL|wxEXPAND, 5 );
m_bpvFront = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
m_fgSizerButtons->Add( m_bpvFront, 0, wxALL|wxEXPAND, 5 );
m_bpvTop = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
m_fgSizerButtons->Add( m_bpvTop, 0, wxALL|wxEXPAND, 5 );
m_bpUpdate = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
m_bpUpdate->SetToolTip( _("Reload board and 3D models") );
m_fgSizerButtons->Add( m_bpUpdate, 0, wxALL|wxEXPAND, 5 );
m_bpvRight = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
m_fgSizerButtons->Add( m_bpvRight, 0, wxALL|wxEXPAND, 5 );
m_bpvBack = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
m_fgSizerButtons->Add( m_bpvBack, 0, wxALL|wxEXPAND, 5 );
m_bpvBottom = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
m_fgSizerButtons->Add( m_bpvBottom, 0, wxALL|wxEXPAND, 5 );
bSizer3DButtons->Add( m_fgSizerButtons, 6, wxEXPAND, 5 );
bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
bSizerRight->Add( bSizer3DButtons, 0, wxALL|wxEXPAND, 5 );
bSizermain->Add( bSizerRight, 1, wxEXPAND, 5 );
this->SetSizer( bSizermain );
this->Layout();
bSizermain->Fit( this );
// Connect Events
xscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
xscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinXscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
m_spinXscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
yscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
yscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinYscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
m_spinYscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
zscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
zscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinZscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
m_spinZscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
xrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
xrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinXrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
m_spinXrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
yrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
yrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinYrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
m_spinYrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
zrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
zrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinZrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
m_spinZrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
xoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
xoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinXoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
m_spinXoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
yoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
yoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinYoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
m_spinYoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
zoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
zoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinZoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
m_spinZoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
m_bpvISO->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DISO ), NULL, this );
m_bpvLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DLeft ), NULL, this );
m_bpvFront->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DFront ), NULL, this );
m_bpvTop->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DTop ), NULL, this );
m_bpUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DUpdate ), NULL, this );
m_bpvRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DRight ), NULL, this );
m_bpvBack->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBack ), NULL, this );
m_bpvBottom->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBottom ), NULL, this );
}
PANEL_PREV_3D_BASE::~PANEL_PREV_3D_BASE()
{
// Disconnect Events
xscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
xscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinXscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
m_spinXscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
yscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
yscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinYscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
m_spinYscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
zscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
zscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinZscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
m_spinZscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
xrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
xrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinXrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
m_spinXrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
yrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
yrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinYrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
m_spinYrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
zrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
zrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinZrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
m_spinZrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
xoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
xoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinXoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
m_spinXoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
yoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
yoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinYoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
m_spinYoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
zoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
zoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
m_bpvISO->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DISO ), NULL, this );
m_bpvLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DLeft ), NULL, this );
m_bpvFront->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DFront ), NULL, this );
m_bpvTop->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DTop ), NULL, this );
m_bpUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DUpdate ), NULL, this );
m_bpvRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DRight ), NULL, this );
m_bpvBack->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBack ), NULL, this );
m_bpvBottom->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBottom ), NULL, this );
}
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "panel_prev_3d_base.h"
///////////////////////////////////////////////////////////////////////////
PANEL_PREV_3D_BASE::PANEL_PREV_3D_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
{
wxBoxSizer* bSizermain;
bSizermain = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizerLeft;
bSizerLeft = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizerScale;
sbSizerScale = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scale") ), wxVERTICAL );
wxFlexGridSizer* fgSizerScale;
fgSizerScale = new wxFlexGridSizer( 0, 3, 0, 0 );
fgSizerScale->SetFlexibleDirection( wxBOTH );
fgSizerScale->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticText1 = new wxStaticText( sbSizerScale->GetStaticBox(), wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText1->Wrap( -1 );
fgSizerScale->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
xscale = new wxTextCtrl( sbSizerScale->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerScale->Add( xscale, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_spinXscale = new wxSpinButton( sbSizerScale->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerScale->Add( m_spinXscale, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_staticText2 = new wxStaticText( sbSizerScale->GetStaticBox(), wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText2->Wrap( -1 );
fgSizerScale->Add( m_staticText2, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
yscale = new wxTextCtrl( sbSizerScale->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerScale->Add( yscale, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_spinYscale = new wxSpinButton( sbSizerScale->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerScale->Add( m_spinYscale, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_staticText3 = new wxStaticText( sbSizerScale->GetStaticBox(), wxID_ANY, _("Z:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText3->Wrap( -1 );
fgSizerScale->Add( m_staticText3, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
zscale = new wxTextCtrl( sbSizerScale->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerScale->Add( zscale, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
m_spinZscale = new wxSpinButton( sbSizerScale->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerScale->Add( m_spinZscale, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
sbSizerScale->Add( fgSizerScale, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
bSizerLeft->Add( sbSizerScale, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* sbSizerRotation;
sbSizerRotation = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Rotation") ), wxVERTICAL );
wxFlexGridSizer* fgSizerRotate;
fgSizerRotate = new wxFlexGridSizer( 0, 3, 0, 0 );
fgSizerRotate->SetFlexibleDirection( wxBOTH );
fgSizerRotate->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticText11 = new wxStaticText( sbSizerRotation->GetStaticBox(), wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText11->Wrap( -1 );
fgSizerRotate->Add( m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
xrot = new wxTextCtrl( sbSizerRotation->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
#ifdef __WXGTK__
if ( !xrot->HasFlag( wxTE_MULTILINE ) )
{
xrot->SetMaxLength( 9 );
}
#else
xrot->SetMaxLength( 9 );
#endif
fgSizerRotate->Add( xrot, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_spinXrot = new wxSpinButton( sbSizerRotation->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerRotate->Add( m_spinXrot, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_staticText21 = new wxStaticText( sbSizerRotation->GetStaticBox(), wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText21->Wrap( -1 );
fgSizerRotate->Add( m_staticText21, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
yrot = new wxTextCtrl( sbSizerRotation->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
#ifdef __WXGTK__
if ( !yrot->HasFlag( wxTE_MULTILINE ) )
{
yrot->SetMaxLength( 9 );
}
#else
yrot->SetMaxLength( 9 );
#endif
fgSizerRotate->Add( yrot, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_spinYrot = new wxSpinButton( sbSizerRotation->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerRotate->Add( m_spinYrot, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_staticText31 = new wxStaticText( sbSizerRotation->GetStaticBox(), wxID_ANY, _("Z:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText31->Wrap( -1 );
fgSizerRotate->Add( m_staticText31, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
zrot = new wxTextCtrl( sbSizerRotation->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
#ifdef __WXGTK__
if ( !zrot->HasFlag( wxTE_MULTILINE ) )
{
zrot->SetMaxLength( 9 );
}
#else
zrot->SetMaxLength( 9 );
#endif
fgSizerRotate->Add( zrot, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
m_spinZrot = new wxSpinButton( sbSizerRotation->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerRotate->Add( m_spinZrot, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
sbSizerRotation->Add( fgSizerRotate, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
bSizerLeft->Add( sbSizerRotation, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* sbSizerOffset;
sbSizerOffset = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Offset") ), wxVERTICAL );
wxFlexGridSizer* fgSizerOffset;
fgSizerOffset = new wxFlexGridSizer( 0, 3, 0, 0 );
fgSizerOffset->SetFlexibleDirection( wxBOTH );
fgSizerOffset->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticText12 = new wxStaticText( sbSizerOffset->GetStaticBox(), wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText12->Wrap( -1 );
fgSizerOffset->Add( m_staticText12, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
xoff = new wxTextCtrl( sbSizerOffset->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerOffset->Add( xoff, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_spinXoffset = new wxSpinButton( sbSizerOffset->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerOffset->Add( m_spinXoffset, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_staticText22 = new wxStaticText( sbSizerOffset->GetStaticBox(), wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText22->Wrap( -1 );
fgSizerOffset->Add( m_staticText22, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
yoff = new wxTextCtrl( sbSizerOffset->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerOffset->Add( yoff, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
m_spinYoffset = new wxSpinButton( sbSizerOffset->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerOffset->Add( m_spinYoffset, 0, wxALIGN_CENTER_VERTICAL, 5 );
m_staticText32 = new wxStaticText( sbSizerOffset->GetStaticBox(), wxID_ANY, _("Z:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText32->Wrap( -1 );
fgSizerOffset->Add( m_staticText32, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
zoff = new wxTextCtrl( sbSizerOffset->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerOffset->Add( zoff, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 );
m_spinZoffset = new wxSpinButton( sbSizerOffset->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS|wxSP_VERTICAL );
fgSizerOffset->Add( m_spinZoffset, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
sbSizerOffset->Add( fgSizerOffset, 0, wxEXPAND|wxLEFT|wxRIGHT, 10 );
bSizerLeft->Add( sbSizerOffset, 0, wxEXPAND|wxALL, 5 );
bSizermain->Add( bSizerLeft, 0, 0, 5 );
wxBoxSizer* bSizerRight;
bSizerRight = new wxBoxSizer( wxVERTICAL );
wxStaticText* staticPreviewLabel;
staticPreviewLabel = new wxStaticText( this, wxID_ANY, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
staticPreviewLabel->Wrap( -1 );
staticPreviewLabel->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
bSizerRight->Add( staticPreviewLabel, 0, wxLEFT, 15 );
m_SizerPanelView = new wxBoxSizer( wxVERTICAL );
bSizerRight->Add( m_SizerPanelView, 1, wxEXPAND|wxBOTTOM, 8 );
bSizermain->Add( bSizerRight, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 4 );
wxBoxSizer* bSizer3DButtons;
bSizer3DButtons = new wxBoxSizer( wxVERTICAL );
bSizer3DButtons->Add( 0, 0, 0, wxEXPAND|wxTOP, 4 );
m_bpvISO = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
m_bpvISO->SetToolTip( _("Change to isometric perspective") );
bSizer3DButtons->Add( m_bpvISO, 0, wxTOP|wxBOTTOM, 5 );
m_bpvLeft = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
bSizer3DButtons->Add( m_bpvLeft, 0, 0, 5 );
m_bpvRight = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
bSizer3DButtons->Add( m_bpvRight, 0, 0, 5 );
m_bpvFront = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
bSizer3DButtons->Add( m_bpvFront, 0, 0, 5 );
m_bpvBack = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
bSizer3DButtons->Add( m_bpvBack, 0, 0, 5 );
m_bpvTop = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
bSizer3DButtons->Add( m_bpvTop, 0, 0, 5 );
m_bpvBottom = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
bSizer3DButtons->Add( m_bpvBottom, 0, 0, 5 );
m_bpUpdate = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 40,40 ), wxBU_AUTODRAW );
m_bpUpdate->SetToolTip( _("Reload board and 3D models") );
bSizer3DButtons->Add( m_bpUpdate, 0, wxTOP, 5 );
bSizermain->Add( bSizer3DButtons, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxALL, 5 );
this->SetSizer( bSizermain );
this->Layout();
bSizermain->Fit( this );
// Connect Events
xscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
xscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinXscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
m_spinXscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
yscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
yscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinYscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
m_spinYscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
zscale->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
zscale->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinZscale->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
m_spinZscale->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
xrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
xrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinXrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
m_spinXrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
yrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
yrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinYrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
m_spinYrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
zrot->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
zrot->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinZrot->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
m_spinZrot->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
xoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
xoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinXoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
m_spinXoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
yoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
yoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinYoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
m_spinYoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
zoff->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
zoff->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinZoffset->Connect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
m_spinZoffset->Connect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
m_bpvISO->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DISO ), NULL, this );
m_bpvLeft->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DLeft ), NULL, this );
m_bpvRight->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DRight ), NULL, this );
m_bpvFront->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DFront ), NULL, this );
m_bpvBack->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBack ), NULL, this );
m_bpvTop->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DTop ), NULL, this );
m_bpvBottom->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBottom ), NULL, this );
m_bpUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DUpdate ), NULL, this );
}
PANEL_PREV_3D_BASE::~PANEL_PREV_3D_BASE()
{
// Disconnect Events
xscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
xscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinXscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
m_spinXscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
yscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
yscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinYscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
m_spinYscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
zscale->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelScale ), NULL, this );
zscale->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinZscale->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementScale ), NULL, this );
m_spinZscale->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementScale ), NULL, this );
xrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
xrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinXrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
m_spinXrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
yrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
yrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinYrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
m_spinYrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
zrot->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelRot ), NULL, this );
zrot->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinZrot->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementRot ), NULL, this );
m_spinZrot->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementRot ), NULL, this );
xoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
xoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinXoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
m_spinXoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
yoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
yoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinYoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
m_spinYoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
zoff->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PANEL_PREV_3D_BASE::onMouseWheelOffset ), NULL, this );
zoff->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PANEL_PREV_3D_BASE::updateOrientation ), NULL, this );
m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEDOWN, wxSpinEventHandler( PANEL_PREV_3D_BASE::onDecrementOffset ), NULL, this );
m_spinZoffset->Disconnect( wxEVT_SCROLL_LINEUP, wxSpinEventHandler( PANEL_PREV_3D_BASE::onIncrementOffset ), NULL, this );
m_bpvISO->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DISO ), NULL, this );
m_bpvLeft->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DLeft ), NULL, this );
m_bpvRight->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DRight ), NULL, this );
m_bpvFront->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DFront ), NULL, this );
m_bpvBack->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBack ), NULL, this );
m_bpvTop->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DTop ), NULL, this );
m_bpvBottom->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DBottom ), NULL, this );
m_bpUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PREV_3D_BASE::View3DUpdate ), NULL, this );
}

File diff suppressed because it is too large Load Diff

View File

@ -1,110 +1,107 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Jan 12 2018)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __PANEL_PREV_3D_BASE_H__
#define __PANEL_PREV_3D_BASE_H__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/textctrl.h>
#include <wx/spinbutt.h>
#include <wx/sizer.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/bmpbuttn.h>
#include <wx/button.h>
#include <wx/panel.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class PANEL_PREV_3D_BASE
///////////////////////////////////////////////////////////////////////////////
class PANEL_PREV_3D_BASE : public wxPanel
{
private:
protected:
wxStaticText* m_staticTextScale;
wxStaticText* m_staticText1;
wxTextCtrl* xscale;
wxSpinButton* m_spinXscale;
wxStaticText* m_staticText2;
wxTextCtrl* yscale;
wxSpinButton* m_spinYscale;
wxStaticText* m_staticText3;
wxTextCtrl* zscale;
wxSpinButton* m_spinZscale;
wxStaticText* m_staticTextRot;
wxStaticText* m_staticText11;
wxTextCtrl* xrot;
wxSpinButton* m_spinXrot;
wxStaticText* m_staticText21;
wxTextCtrl* yrot;
wxSpinButton* m_spinYrot;
wxStaticText* m_staticText31;
wxTextCtrl* zrot;
wxSpinButton* m_spinZrot;
wxStaticText* m_staticTextOffset;
wxStaticText* m_staticText12;
wxTextCtrl* xoff;
wxSpinButton* m_spinXoffset;
wxStaticText* m_staticText22;
wxSpinButton* m_spinYoffset;
wxStaticText* m_staticText32;
wxTextCtrl* zoff;
wxSpinButton* m_spinZoffset;
wxBoxSizer* m_SizerPanelView;
wxFlexGridSizer* m_fgSizerButtons;
wxBitmapButton* m_bpvISO;
wxBitmapButton* m_bpvLeft;
wxBitmapButton* m_bpvFront;
wxBitmapButton* m_bpvTop;
wxBitmapButton* m_bpUpdate;
wxBitmapButton* m_bpvRight;
wxBitmapButton* m_bpvBack;
wxBitmapButton* m_bpvBottom;
// Virtual event handlers, overide them in your derived class
virtual void onMouseWheelScale( wxMouseEvent& event ) { event.Skip(); }
virtual void updateOrientation( wxCommandEvent& event ) { event.Skip(); }
virtual void onDecrementScale( wxSpinEvent& event ) { event.Skip(); }
virtual void onIncrementScale( wxSpinEvent& event ) { event.Skip(); }
virtual void onMouseWheelRot( wxMouseEvent& event ) { event.Skip(); }
virtual void onDecrementRot( wxSpinEvent& event ) { event.Skip(); }
virtual void onIncrementRot( wxSpinEvent& event ) { event.Skip(); }
virtual void onMouseWheelOffset( wxMouseEvent& event ) { event.Skip(); }
virtual void onDecrementOffset( wxSpinEvent& event ) { event.Skip(); }
virtual void onIncrementOffset( wxSpinEvent& event ) { event.Skip(); }
virtual void View3DISO( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DLeft( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DFront( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DTop( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DUpdate( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DRight( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DBack( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DBottom( wxCommandEvent& event ) { event.Skip(); }
public:
wxTextCtrl* yoff;
PANEL_PREV_3D_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
~PANEL_PREV_3D_BASE();
};
#endif //__PANEL_PREV_3D_BASE_H__
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#ifndef __PANEL_PREV_3D_BASE_H__
#define __PANEL_PREV_3D_BASE_H__
#include <wx/artprov.h>
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/textctrl.h>
#include <wx/spinbutt.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/bmpbuttn.h>
#include <wx/button.h>
#include <wx/panel.h>
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/// Class PANEL_PREV_3D_BASE
///////////////////////////////////////////////////////////////////////////////
class PANEL_PREV_3D_BASE : public wxPanel
{
private:
protected:
wxStaticText* m_staticText1;
wxTextCtrl* xscale;
wxSpinButton* m_spinXscale;
wxStaticText* m_staticText2;
wxTextCtrl* yscale;
wxSpinButton* m_spinYscale;
wxStaticText* m_staticText3;
wxTextCtrl* zscale;
wxSpinButton* m_spinZscale;
wxStaticText* m_staticText11;
wxTextCtrl* xrot;
wxSpinButton* m_spinXrot;
wxStaticText* m_staticText21;
wxTextCtrl* yrot;
wxSpinButton* m_spinYrot;
wxStaticText* m_staticText31;
wxTextCtrl* zrot;
wxSpinButton* m_spinZrot;
wxStaticText* m_staticText12;
wxTextCtrl* xoff;
wxSpinButton* m_spinXoffset;
wxStaticText* m_staticText22;
wxSpinButton* m_spinYoffset;
wxStaticText* m_staticText32;
wxTextCtrl* zoff;
wxSpinButton* m_spinZoffset;
wxBoxSizer* m_SizerPanelView;
wxBitmapButton* m_bpvISO;
wxBitmapButton* m_bpvLeft;
wxBitmapButton* m_bpvRight;
wxBitmapButton* m_bpvFront;
wxBitmapButton* m_bpvBack;
wxBitmapButton* m_bpvTop;
wxBitmapButton* m_bpvBottom;
wxBitmapButton* m_bpUpdate;
// Virtual event handlers, overide them in your derived class
virtual void onMouseWheelScale( wxMouseEvent& event ) { event.Skip(); }
virtual void updateOrientation( wxCommandEvent& event ) { event.Skip(); }
virtual void onDecrementScale( wxSpinEvent& event ) { event.Skip(); }
virtual void onIncrementScale( wxSpinEvent& event ) { event.Skip(); }
virtual void onMouseWheelRot( wxMouseEvent& event ) { event.Skip(); }
virtual void onDecrementRot( wxSpinEvent& event ) { event.Skip(); }
virtual void onIncrementRot( wxSpinEvent& event ) { event.Skip(); }
virtual void onMouseWheelOffset( wxMouseEvent& event ) { event.Skip(); }
virtual void onDecrementOffset( wxSpinEvent& event ) { event.Skip(); }
virtual void onIncrementOffset( wxSpinEvent& event ) { event.Skip(); }
virtual void View3DISO( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DLeft( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DRight( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DFront( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DBack( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DTop( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DBottom( wxCommandEvent& event ) { event.Skip(); }
virtual void View3DUpdate( wxCommandEvent& event ) { event.Skip(); }
public:
wxTextCtrl* yoff;
PANEL_PREV_3D_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
~PANEL_PREV_3D_BASE();
};
#endif //__PANEL_PREV_3D_BASE_H__

View File

@ -30,68 +30,50 @@
#include <3d_canvas/eda_3d_canvas.h>
#include <common_ogl/cogl_att_list.h>
#include <cstdlib>
#include <limits.h>
#include <bitmaps.h>
#include <wx/valnum.h>
#include <wx/tglbtn.h>
#include <base_units.h>
#include "project.h"
#include "panel_prev_model.h"
#include <class_board.h>
#include <class_drawpanel.h>
PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, EDA_UNITS_T aUnits, S3D_CACHE* aCacheManager,
MODULE* aModuleCopy,
COLORS_DESIGN_SETTINGS *aColors,
PANEL_PREV_3D::PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, MODULE* aModule,
std::vector<MODULE_3D_SETTINGS> *aParentInfoList ) :
PANEL_PREV_3D_BASE( aParent, wxID_ANY )
{
m_userUnits = aUnits;
m_userUnits = aFrame->GetUserUnits();
initPanel();
// Initialize the color settings to draw the board and the footprint
if( aColors )
m_dummyBoard->SetColorsSettings( aColors );
else
{
static COLORS_DESIGN_SETTINGS defaultColors( FRAME_PCB_DISPLAY3D );
m_dummyBoard->SetColorsSettings( &defaultColors );
}
if( NULL != aCacheManager )
m_resolver = aCacheManager->GetResolver();
m_dummyBoard->SetColorsSettings( &aFrame->Settings().Colors() );
m_parentInfoList = aParentInfoList;
m_dummyBoard->Add( (MODULE*)aModuleCopy );
m_copyModule = aModuleCopy;
m_copyModule = new MODULE( *aModule );
m_dummyBoard->Add( m_copyModule );
// Set 3d viewer configuration for preview
m_settings3Dviewer = new CINFO3D_VISU();
m_settings3Dviewer->SetFlag( FL_MOUSEWHEEL_PANNING,
aFrame->GetCanvas()->GetEnableMousewheelPan() );
// Create the 3D canvas
m_previewPane = new EDA_3D_CANVAS( this,
COGL_ATT_LIST::GetAttributesList( true ),
m_dummyBoard,
*m_settings3Dviewer,
aCacheManager );
m_previewPane = new EDA_3D_CANVAS( this, COGL_ATT_LIST::GetAttributesList( true ),
m_dummyBoard, *m_settings3Dviewer,
aFrame->Prj().Get3DCacheManager() );
m_SizerPanelView->Add( m_previewPane, 1, wxEXPAND );
m_SizerPanelView->Add( m_previewPane, 1, wxEXPAND, 5 );
m_previewPane->Connect( wxEVT_ENTER_WINDOW,
wxMouseEventHandler( PANEL_PREV_3D::onEnterPreviewCanvas ),
NULL, this );
m_previewPane->Connect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( PANEL_PREV_3D::onEnterPreviewCanvas ), nullptr, this );
}
PANEL_PREV_3D::~PANEL_PREV_3D()
{
m_previewPane->Disconnect( wxEVT_ENTER_WINDOW,
wxMouseEventHandler( PANEL_PREV_3D::onEnterPreviewCanvas ),
NULL, this );
m_previewPane->Disconnect( wxEVT_ENTER_WINDOW, wxMouseEventHandler( PANEL_PREV_3D::onEnterPreviewCanvas ), nullptr, this );
delete m_settings3Dviewer;
delete m_dummyBoard;
@ -101,8 +83,6 @@ PANEL_PREV_3D::~PANEL_PREV_3D()
void PANEL_PREV_3D::initPanel()
{
m_resolver = NULL;
currentModelFile.clear();
m_dummyBoard = new BOARD();
m_currentSelectedIdx = -1;
@ -129,323 +109,125 @@ void PANEL_PREV_3D::initPanel()
};
for( int ii = 0; ii < 9; ii++ )
{
spinButtonList[ii]->SetRange( INT_MIN, INT_MAX );
}
wxString units;
switch( m_userUnits )
{
case INCHES:
units = _( "inches" );
break;
case MILLIMETRES:
units = _( "mm" );
break;
default:
break;
}
if( !units.IsEmpty() )
{
units = wxString::Format( _( "Offset (%s)" ), units );
m_staticTextOffset->SetLabel( units );
}
}
/**
* @brief checkRotation
* @brief rotationFromString
* Ensure -MAX_ROTATION <= rotation <= MAX_ROTATION
* aRotation will be normalized between -MAX_ROTATION and MAX_ROTATION
* @param aRotation: in out parameter
*/
static void checkRotation( double& aRotation )
static double rotationFromString( const wxString& aValue )
{
if( aRotation > MAX_ROTATION )
double rotation = DoubleValueFromString( DEGREES, aValue ) / 10.0;
if( rotation > MAX_ROTATION )
{
int n = aRotation / MAX_ROTATION;
aRotation -= MAX_ROTATION * n;
int n = rotation / MAX_ROTATION;
rotation -= MAX_ROTATION * n;
}
else if( aRotation < -MAX_ROTATION )
else if( rotation < -MAX_ROTATION )
{
int n = -aRotation / MAX_ROTATION;
aRotation += MAX_ROTATION * n;
int n = -rotation / MAX_ROTATION;
rotation += MAX_ROTATION * n;
}
return rotation;
}
static bool validateFloatTextCtrl( wxTextCtrl* aTextCtrl )
wxString PANEL_PREV_3D::formatScaleValue( double aValue )
{
if( aTextCtrl == NULL )
return false;
if( aTextCtrl->GetLineLength(0) == 0 ) // This will skip the got and event with empty field
return false;
if( aTextCtrl->GetLineLength(0) == 1 )
{
if( (aTextCtrl->GetLineText(0).compare( "." ) == 0) ||
(aTextCtrl->GetLineText(0).compare( "," ) == 0) )
return false;
}
return true;
return wxString::Format( "%.4f", aValue );
}
static void incrementTextCtrl( wxTextCtrl* aTextCtrl, double aInc, double aMinval, double aMaxval )
wxString PANEL_PREV_3D::formatRotationValue( double aValue )
{
if( !validateFloatTextCtrl( aTextCtrl ) )
return;
double curr_value = 0;
aTextCtrl->GetValue().ToDouble( &curr_value );
curr_value += aInc;
if( curr_value > aMaxval )
curr_value = aMaxval;
if( curr_value < aMinval )
curr_value = aMinval;
aTextCtrl->SetValue( wxString::Format( "%.4f", curr_value ) );
return wxString::Format( "%.2f %s", aValue, GetAbbreviatedUnitsLabel( DEGREES ) );
}
void PANEL_PREV_3D::SetModelDataIdx( int idx, bool aReloadPreviewModule )
wxString PANEL_PREV_3D::formatOffsetValue( double aValue )
{
wxASSERT( m_parentInfoList != NULL );
// Convert from internal units (mm) to user units
if( m_userUnits == INCHES )
aValue /= 25.4f;
if( m_parentInfoList && (idx >= 0) )
{
wxASSERT( (unsigned int)idx < (*m_parentInfoList).size() );
if( (unsigned int)idx < (*m_parentInfoList).size() )
{
m_currentSelectedIdx = -1; // In case that we receive events on the
// next updates, it will set first an
// invalid selection
const MODULE_3D_SETTINGS *aModel = (const MODULE_3D_SETTINGS *)&((*m_parentInfoList)[idx]);
xscale->SetValue( wxString::Format( "%.4f", aModel->m_Scale.x ) );
yscale->SetValue( wxString::Format( "%.4f", aModel->m_Scale.y ) );
zscale->SetValue( wxString::Format( "%.4f", aModel->m_Scale.z ) );
xrot->SetValue( wxString::Format( "%.2f", aModel->m_Rotation.x ) );
yrot->SetValue( wxString::Format( "%.2f", aModel->m_Rotation.y ) );
zrot->SetValue( wxString::Format( "%.2f", aModel->m_Rotation.z ) );
// Convert from internal units (mm) to user units
double scaler = 1;
switch( m_userUnits )
{
case MILLIMETRES:
scaler = 1.0f;
break;
case INCHES:
scaler = 25.4f;
break;
default:
wxASSERT( 0 );
}
xoff->SetValue( wxString::Format( "%.4f", aModel->m_Offset.x / scaler ) );
yoff->SetValue( wxString::Format( "%.4f", aModel->m_Offset.y / scaler ) );
zoff->SetValue( wxString::Format( "%.4f", aModel->m_Offset.z / scaler ) );
UpdateModelName( aModel->m_Filename );
if( aReloadPreviewModule && m_previewPane )
{
updateListOnModelCopy();
m_previewPane->ReloadRequest();
m_previewPane->Request_refresh();
}
m_currentSelectedIdx = idx;
}
}
if( m_previewPane )
{
m_previewPane->SetFocus();
}
return;
return wxString::Format( "%.4f %s", aValue, GetAbbreviatedUnitsLabel( m_userUnits ) );
}
void PANEL_PREV_3D::ResetModelData( bool aReloadPreviewModule )
void PANEL_PREV_3D::SetModelDataIdx( int idx )
{
m_currentSelectedIdx = -1;
xscale->SetValue( wxString::FromDouble( 1.0 ) );
yscale->SetValue( wxString::FromDouble( 1.0 ) );
zscale->SetValue( wxString::FromDouble( 1.0 ) );
xrot->SetValue( wxString::FromDouble( 0.0 ) );
yrot->SetValue( wxString::FromDouble( 0.0 ) );
zrot->SetValue( wxString::FromDouble( 0.0 ) );
xoff->SetValue( wxString::FromDouble( 0.0 ) );
yoff->SetValue( wxString::FromDouble( 0.0 ) );
zoff->SetValue( wxString::FromDouble( 0.0 ) );
// This will update the model on the preview board with the current list of 3d shapes
if( aReloadPreviewModule )
if( m_parentInfoList && idx >= 0 && idx < (int) m_parentInfoList->size() )
{
updateListOnModelCopy();
m_currentSelectedIdx = idx;
const MODULE_3D_SETTINGS& modelInfo = m_parentInfoList->at( idx );
if( m_previewPane )
{
m_previewPane->ReloadRequest();
m_previewPane->Request_refresh();
}
}
// Use ChangeValue() instead of SetValue(). It's not the user making the change, so we
// don't want to generate wxEVT_GRID_CELL_CHANGED events.
if( m_previewPane )
m_previewPane->SetFocus();
}
xscale->ChangeValue( formatScaleValue( modelInfo.m_Scale.x ) );
yscale->ChangeValue( formatScaleValue( modelInfo.m_Scale.y ) );
zscale->ChangeValue( formatScaleValue( modelInfo.m_Scale.z ) );
xrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.x ) );
yrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.y ) );
zrot->ChangeValue( formatRotationValue( modelInfo.m_Rotation.z ) );
void PANEL_PREV_3D::UpdateModelName( wxString const& aModelName )
{
bool newModel = false;
m_modelInfo.m_Filename = aModelName;
// if the model name is a directory simply clear the current model
if( aModelName.empty() || wxFileName::DirExists( aModelName ) )
{
currentModelFile.clear();
m_modelInfo.m_Filename.clear();
xoff->ChangeValue( formatOffsetValue( modelInfo.m_Offset.x ) );
yoff->ChangeValue( formatOffsetValue( modelInfo.m_Offset.y ) );
zoff->ChangeValue( formatOffsetValue( modelInfo.m_Offset.z ) );
}
else
{
wxString newModelFile;
m_currentSelectedIdx = -1;
if( m_resolver )
newModelFile = m_resolver->ResolvePath( aModelName );
xscale->ChangeValue( wxEmptyString );
yscale->ChangeValue( wxEmptyString );
zscale->ChangeValue( wxEmptyString );
if( !newModelFile.empty() && newModelFile.Cmp( currentModelFile ) )
newModel = true;
xrot->ChangeValue( wxEmptyString );
yrot->ChangeValue( wxEmptyString );
zrot->ChangeValue( wxEmptyString );
currentModelFile = newModelFile;
xoff->ChangeValue( wxEmptyString );
yoff->ChangeValue( wxEmptyString );
zoff->ChangeValue( wxEmptyString );
}
if( currentModelFile.empty() || newModel )
{
updateListOnModelCopy();
if( m_previewPane )
{
m_previewPane->ReloadRequest();
m_previewPane->Refresh();
}
if( currentModelFile.empty() )
return;
}
else
{
if( m_previewPane )
m_previewPane->Refresh();
}
if( m_previewPane )
m_previewPane->SetFocus();
return;
}
void PANEL_PREV_3D::updateOrientation( wxCommandEvent &event )
{
wxTextCtrl *textCtrl = (wxTextCtrl *)event.GetEventObject();
MODULE_3D_SETTINGS modelInfo;
if( textCtrl == NULL )
return;
modelInfo.m_Scale.x = DoubleValueFromString( UNSCALED_UNITS, xscale->GetValue() );
modelInfo.m_Scale.y = DoubleValueFromString( UNSCALED_UNITS, yscale->GetValue() );
modelInfo.m_Scale.z = DoubleValueFromString( UNSCALED_UNITS, zscale->GetValue() );
if( textCtrl->GetLineLength(0) == 0 ) // This will skip the got and event with empty field
return;
modelInfo.m_Rotation.x = rotationFromString( xrot->GetValue() );
modelInfo.m_Rotation.y = rotationFromString( yrot->GetValue() );
modelInfo.m_Rotation.z = rotationFromString( zrot->GetValue() );
if( textCtrl->GetLineLength(0) == 1 )
if( (textCtrl->GetLineText(0).compare( "." ) == 0) ||
(textCtrl->GetLineText(0).compare( "," ) == 0) )
return;
SGPOINT scale;
SGPOINT rotation;
SGPOINT offset;
getOrientationVars( scale, rotation, offset );
m_modelInfo.m_Scale.x = scale.x;
m_modelInfo.m_Scale.y = scale.y;
m_modelInfo.m_Scale.z = scale.z;
m_modelInfo.m_Offset.x = offset.x;
m_modelInfo.m_Offset.y = offset.y;
m_modelInfo.m_Offset.z = offset.z;
m_modelInfo.m_Rotation.x = rotation.x;
m_modelInfo.m_Rotation.y = rotation.y;
m_modelInfo.m_Rotation.z = rotation.z;
modelInfo.m_Offset.x = DoubleValueFromString( m_userUnits, xoff->GetValue() ) / IU_PER_MM;
modelInfo.m_Offset.y = DoubleValueFromString( m_userUnits, yoff->GetValue() ) / IU_PER_MM;
modelInfo.m_Offset.z = DoubleValueFromString( m_userUnits, zoff->GetValue() ) / IU_PER_MM;
if( m_currentSelectedIdx >= 0 )
{
// This will update the parent list with the new data
(*m_parentInfoList)[m_currentSelectedIdx] = m_modelInfo;
m_parentInfoList->at( m_currentSelectedIdx ) = modelInfo;
// It will update the copy model in the preview board
updateListOnModelCopy();
// Since the OpenGL render does not need to be reloaded to update the
// shapes position, we just request to redraw again the canvas
if( m_previewPane )
m_previewPane->Refresh();
UpdateModelInfoList( false );
}
}
void PANEL_PREV_3D::onIncrementRot( wxSpinEvent& event )
{
wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
wxTextCtrl * textCtrl = xrot;
if( spinCtrl == m_spinYrot )
textCtrl = yrot;
else if( spinCtrl == m_spinZrot )
textCtrl = zrot;
incrementTextCtrl( textCtrl, ROTATION_INCREMENT, -MAX_ROTATION, MAX_ROTATION );
}
void PANEL_PREV_3D::onDecrementRot( wxSpinEvent& event )
{
wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
wxTextCtrl * textCtrl = xrot;
if( spinCtrl == m_spinYrot )
textCtrl = yrot;
else if( spinCtrl == m_spinZrot )
textCtrl = zrot;
incrementTextCtrl( textCtrl, -ROTATION_INCREMENT, -MAX_ROTATION, MAX_ROTATION );
}
void PANEL_PREV_3D::onIncrementScale( wxSpinEvent& event )
void PANEL_PREV_3D::doIncrementScale( wxSpinEvent& event, double aSign )
{
wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
@ -456,26 +238,37 @@ void PANEL_PREV_3D::onIncrementScale( wxSpinEvent& event )
else if( spinCtrl == m_spinZscale )
textCtrl = zscale;
incrementTextCtrl( textCtrl, SCALE_INCREMENT, 1/MAX_SCALE, MAX_SCALE );
double curr_value = DoubleValueFromString( UNSCALED_UNITS, textCtrl->GetValue() );
curr_value += ( SCALE_INCREMENT * aSign );
curr_value = std::max( 1/MAX_SCALE, curr_value );
curr_value = std::min( curr_value, MAX_SCALE );
textCtrl->SetValue( formatScaleValue( curr_value ) );
}
void PANEL_PREV_3D::onDecrementScale( wxSpinEvent& event )
void PANEL_PREV_3D::doIncrementRotation( wxSpinEvent& aEvent, double aSign )
{
wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
wxSpinButton* spinCtrl = (wxSpinButton*) aEvent.GetEventObject();
wxTextCtrl* textCtrl = xrot;
wxTextCtrl * textCtrl = xscale;
if( spinCtrl == m_spinYrot )
textCtrl = yrot;
else if( spinCtrl == m_spinZrot )
textCtrl = zrot;
if( spinCtrl == m_spinYscale )
textCtrl = yscale;
else if( spinCtrl == m_spinZscale )
textCtrl = zscale;
double curr_value = DoubleValueFromString( DEGREES, textCtrl->GetValue() ) / 10.0;
incrementTextCtrl( textCtrl, -SCALE_INCREMENT, 1/MAX_SCALE, MAX_SCALE );
curr_value += ( ROTATION_INCREMENT * aSign );
curr_value = std::max( -MAX_ROTATION, curr_value );
curr_value = std::min( curr_value, MAX_ROTATION );
textCtrl->SetValue( formatRotationValue( curr_value ) );
}
void PANEL_PREV_3D::onIncrementOffset( wxSpinEvent& event )
void PANEL_PREV_3D::doIncrementOffset( wxSpinEvent& event, double aSign )
{
wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
@ -491,27 +284,13 @@ void PANEL_PREV_3D::onIncrementOffset( wxSpinEvent& event )
if( m_userUnits == INCHES )
step = OFFSET_INCREMENT_MIL/1000.0;
incrementTextCtrl( textCtrl, step, -MAX_OFFSET, MAX_OFFSET );
}
double curr_value = DoubleValueFromString( m_userUnits, textCtrl->GetValue() ) / IU_PER_MM;
curr_value += ( step * aSign );
curr_value = std::max( -MAX_OFFSET, curr_value );
curr_value = std::min( curr_value, MAX_OFFSET );
void PANEL_PREV_3D::onDecrementOffset( wxSpinEvent& event )
{
wxSpinButton* spinCtrl = (wxSpinButton*) event.GetEventObject();
wxTextCtrl * textCtrl = xoff;
if( spinCtrl == m_spinYoffset )
textCtrl = yoff;
else if( spinCtrl == m_spinZoffset )
textCtrl = zoff;
double step = OFFSET_INCREMENT_MM;
if( m_userUnits == INCHES )
step = OFFSET_INCREMENT_MIL/1000.0;
incrementTextCtrl( textCtrl, -step, -MAX_OFFSET, MAX_OFFSET );
textCtrl->SetValue( formatOffsetValue( curr_value ) );
}
@ -527,7 +306,13 @@ void PANEL_PREV_3D::onMouseWheelScale( wxMouseEvent& event )
if( event.GetWheelRotation() >= 0 )
step = -step;
incrementTextCtrl( textCtrl, step, 1/MAX_SCALE, MAX_SCALE );
double curr_value = DoubleValueFromString( UNSCALED_UNITS, textCtrl->GetValue() );
curr_value += step;
curr_value = std::max( 1/MAX_SCALE, curr_value );
curr_value = std::min( curr_value, MAX_SCALE );
textCtrl->SetValue( formatScaleValue( curr_value ) );
}
@ -535,8 +320,6 @@ void PANEL_PREV_3D::onMouseWheelRot( wxMouseEvent& event )
{
wxTextCtrl* textCtrl = (wxTextCtrl*) event.GetEventObject();
wxKeyboardState kbdState;
double step = ROTATION_INCREMENT_WHEEL;
if( event.ShiftDown( ) )
@ -545,7 +328,13 @@ void PANEL_PREV_3D::onMouseWheelRot( wxMouseEvent& event )
if( event.GetWheelRotation() >= 0 )
step = -step;
incrementTextCtrl( textCtrl, step, -MAX_ROTATION, MAX_ROTATION );
double curr_value = DoubleValueFromString( DEGREES, textCtrl->GetValue() ) / 10.0;
curr_value += step;
curr_value = std::max( -MAX_ROTATION, curr_value );
curr_value = std::min( curr_value, MAX_ROTATION );
textCtrl->SetValue( formatRotationValue( curr_value ) );
}
@ -568,128 +357,30 @@ void PANEL_PREV_3D::onMouseWheelOffset( wxMouseEvent& event )
if( event.GetWheelRotation() >= 0 )
step = -step;
incrementTextCtrl( textCtrl, step, -MAX_OFFSET, MAX_OFFSET );
double curr_value = DoubleValueFromString( m_userUnits, textCtrl->GetValue() ) / IU_PER_MM;
curr_value += step;
curr_value = std::max( -MAX_OFFSET, curr_value );
curr_value = std::min( curr_value, MAX_OFFSET );
textCtrl->SetValue( formatOffsetValue( curr_value ) );
}
void PANEL_PREV_3D::getOrientationVars( SGPOINT& aScale, SGPOINT& aRotation, SGPOINT& aOffset )
void PANEL_PREV_3D::UpdateModelInfoList( bool aReloadRequired )
{
if( NULL == xscale || NULL == yscale || NULL == zscale
|| NULL == xrot || NULL == yrot || NULL == zrot
|| NULL == xoff || NULL == yoff || NULL == zoff )
auto moduleModelList = &m_copyModule->Models();
moduleModelList->clear();
for( size_t i = 0; i < m_parentInfoList->size(); ++i )
{
return;
if( m_parentInfoList->at( i ).m_Preview )
moduleModelList->insert( moduleModelList->end(), m_parentInfoList->at( i ) );
}
xscale->GetValue().ToDouble( &aScale.x );
yscale->GetValue().ToDouble( &aScale.y );
zscale->GetValue().ToDouble( &aScale.z );
if( aReloadRequired )
m_previewPane->ReloadRequest();
xrot->GetValue().ToDouble( &aRotation.x );
yrot->GetValue().ToDouble( &aRotation.y );
zrot->GetValue().ToDouble( &aRotation.z );
checkRotation( aRotation.x );
checkRotation( aRotation.y );
checkRotation( aRotation.z );
xoff->GetValue().ToDouble( &aOffset.x );
yoff->GetValue().ToDouble( &aOffset.y );
zoff->GetValue().ToDouble( &aOffset.z );
// Convert from user units to internal units (mm)
double scaler = 1.0f;
switch( m_userUnits )
{
case MILLIMETRES:
scaler = 1.0f;
break;
case INCHES:
scaler = 25.4f;
break;
default:
wxASSERT( 0 );
}
aOffset.x *= scaler;
aOffset.y *= scaler;
aOffset.z *= scaler;
return;
}
bool PANEL_PREV_3D::ValidateWithMessage( wxString& aErrorMessage )
{
bool invalidScale = false;
for( unsigned int idx = 0; idx < m_parentInfoList->size(); ++idx )
{
wxString msg;
bool addError = false;
MODULE_3D_SETTINGS& s3dshape = (*m_parentInfoList)[idx];
SGPOINT scale;
scale.x = s3dshape.m_Scale.x;
scale.y = s3dshape.m_Scale.y;
scale.z = s3dshape.m_Scale.z;
if( 1/MAX_SCALE > scale.x || MAX_SCALE < scale.x )
{
invalidScale = true;
addError = true;
msg += _( "Invalid X scale" );
}
if( 1/MAX_SCALE > scale.y || MAX_SCALE < scale.y )
{
invalidScale = true;
addError = true;
if( !msg.IsEmpty() )
msg += "\n";
msg += _( "Invalid Y scale" );
}
if( 1/MAX_SCALE > scale.z || MAX_SCALE < scale.z )
{
invalidScale = true;
addError = true;
if( !msg.IsEmpty() )
msg += "\n";
msg += _( "Invalid Z scale" );
}
if( addError )
{
msg.Prepend( s3dshape.m_Filename + "\n" );
if( !aErrorMessage.IsEmpty() )
aErrorMessage += "\n\n";
aErrorMessage += msg;
}
}
if( !aErrorMessage.IsEmpty() )
{
aErrorMessage += "\n\n";
aErrorMessage += wxString::Format( "Min value = %.4f and max value = %.4f",
1/MAX_SCALE, MAX_SCALE );
}
return invalidScale == false;
}
void PANEL_PREV_3D::updateListOnModelCopy()
{
auto draw3D = &m_copyModule->Models();
draw3D->clear();
draw3D->insert( draw3D->end(), m_parentInfoList->begin(), m_parentInfoList->end() );
m_previewPane->Request_refresh();
}

View File

@ -72,39 +72,22 @@ class COLORS_DESIGN_SETTINGS;
class PANEL_PREV_3D: public PANEL_PREV_3D_BASE
{
public:
PANEL_PREV_3D( wxWindow* aParent, EDA_UNITS_T aUnits, S3D_CACHE* aCacheManager,
MODULE* aModuleCopy,
COLORS_DESIGN_SETTINGS *aColors,
std::vector<MODULE_3D_SETTINGS> *aParentInfoList = NULL );
PANEL_PREV_3D( wxWindow* aParent, PCB_BASE_FRAME* aFrame, MODULE* aModule,
std::vector<MODULE_3D_SETTINGS> *aParentInfoList );
~PANEL_PREV_3D();
private:
wxString currentModelFile; ///< Used to check if the model file was changed
FILENAME_RESOLVER *m_resolver; ///< Used to get the full path name
EDA_3D_CANVAS* m_previewPane;
CINFO3D_VISU* m_settings3Dviewer;
/// The 3D canvas
EDA_3D_CANVAS *m_previewPane;
BOARD* m_dummyBoard;
MODULE* m_copyModule;
/// A dummy board used to store the copy moduled
BOARD *m_dummyBoard;
std::vector<MODULE_3D_SETTINGS>* m_parentInfoList;
int m_currentSelectedIdx; /// Index into m_parentInfoList
/// The settings that will be used for this 3D viewer canvas
CINFO3D_VISU *m_settings3Dviewer;
/// A pointer to a new copy of the original module
MODULE *m_copyModule;
/// A pointer to the parent MODULE_3D_SETTINGS list that we will use to copy to the preview module
std::vector<MODULE_3D_SETTINGS> *m_parentInfoList;
/// The current selected index of the MODULE_3D_SETTINGS list
int m_currentSelectedIdx;
/// Current MODULE_3D_SETTINGS that is being edited
MODULE_3D_SETTINGS m_modelInfo;
EDA_UNITS_T m_userUnits;
EDA_UNITS_T m_userUnits;
// Methods of the class
private:
@ -120,27 +103,38 @@ private:
void onMouseWheelRot( wxMouseEvent& event ) override;
void onMouseWheelOffset( wxMouseEvent& event ) override;
void onIncrementRot( wxSpinEvent& event ) override;
void onDecrementRot( wxSpinEvent& event ) override;
void onIncrementScale( wxSpinEvent& event ) override;
void onDecrementScale( wxSpinEvent& event ) override;
void onIncrementOffset( wxSpinEvent& event ) override;
void onDecrementOffset( wxSpinEvent& event ) override;
void onIncrementRot( wxSpinEvent& event ) override
{
doIncrementRotation( event, 1.0 );
}
void onDecrementRot( wxSpinEvent& event ) override
{
doIncrementRotation( event, -1.0 );
}
void onIncrementScale( wxSpinEvent& event ) override
{
doIncrementScale( event, 1.0 );
}
void onDecrementScale( wxSpinEvent& event ) override
{
doIncrementScale( event, -1.0 );
}
void onIncrementOffset( wxSpinEvent& event ) override
{
doIncrementOffset( event, 1.0 );
}
void onDecrementOffset( wxSpinEvent& event ) override
{
doIncrementOffset( event, -1.0 );
}
/**
* @brief getOrientationVars - gets the transformation from entries and validate it
* @param aScale: output scale var
* @param aRotation: output rotation var
* @param aOffset: output offset var
*/
void getOrientationVars( SGPOINT& aScale, SGPOINT& aRotation, SGPOINT& aOffset );
/**
* @brief updateListOnModelCopy - copy the current shape list to the copy of module that is on
* the preview dummy board
*/
void updateListOnModelCopy();
void doIncrementScale( wxSpinEvent& aEvent, double aSign );
void doIncrementRotation( wxSpinEvent& aEvent, double aSign );
void doIncrementOffset( wxSpinEvent& aEvent, double aSign );
wxString formatScaleValue( double aValue );
wxString formatRotationValue( double aValue );
wxString formatOffsetValue( double aValue );
void onEnterPreviewCanvas( wxMouseEvent& event )
{
@ -191,33 +185,16 @@ private:
public:
/**
* @brief SetModelDataIdx - This will set the index of the INFO list that was set on the parent.
* So we will update our values to edit based on the index on that list.
* @param idx - The index that was selected
* @param aReloadPreviewModule: if need to update the preview module
* @brief SetModelDataIdx - Sets the currently selected index in the infolist so that the
* scale/rotation/offset controls can be updated.
*/
void SetModelDataIdx( int idx, bool aReloadPreviewModule = false );
void SetModelDataIdx( int idx );
/**
* @brief ResetModelData - Clear the values and reload the preview board
* @param aReloadPreviewModule: if need to update the preview module
* @brief UpdateModelInfoList - copy shapes from the current shape list which are flagged
* for preview to the copy of module that is on the preview dummy board
*/
void ResetModelData( bool aReloadPreviewModule = false );
void UpdateModelName( wxString const& aModel );
/**
* @brief verify X,Y and Z scale factors are acceptable (> 0.001 and < 1000.0)
* @return false if one (or more) value is not acceptable.
* @param aErrorMessage is a wxString to store error messages, if any
*/
bool ValidateWithMessage( wxString& aErrorMessage );
bool Validate() override
{
wxString temp;
return ValidateWithMessage(temp);
}
void UpdateModelInfoList( bool aRelaodRequired = true );
};
#endif // PANEL_PREV_MODEL_H

View File

@ -178,6 +178,7 @@ set( COMMON_WIDGET_SRCS
widgets/footprint_preview_widget.cpp
widgets/footprint_select_widget.cpp
widgets/gal_options_panel.cpp
widgets/grid_combobox.cpp
widgets/grid_icon_text_helpers.cpp
widgets/indicator_icon.cpp
widgets/mathplot.cpp

View File

@ -99,32 +99,38 @@ bool DIALOG_CONFIGURE_PATHS::TransferDataToWindow()
if( !wxDialog::TransferDataToWindow() )
return false;
// Environment variables
const ENV_VAR_MAP& envVars = Pgm().GetLocalEnvVariables();
for( auto it = envVars.begin(); it != envVars.end(); ++it )
AppendEnvVar( it->first, it->second.GetValue(), it->second.GetDefinedExternally() );
// 3D search paths
// Do 3D search paths first so they get first crack at setting m_curdir
if( m_resolver )
{
const std::list<SEARCH_PATH>* paths = m_resolver->GetPaths();
auto it = paths->begin();
while( it != paths->end()
&& ( ( *it ).m_alias.StartsWith( "${" ) || ( *it ).m_alias.StartsWith( "$(" ) ) )
++it;
for( auto it = paths->begin(); it != paths->end(); ++it )
{
if ( !( *it ).m_alias.StartsWith( "${" ) && !( *it ).m_alias.StartsWith( "$(" ) )
{
AppendSearchPath( it->m_alias, it->m_pathvar, it->m_description );
if( it != paths->end() )
m_curdir = ( *it ).m_pathexp;
for( ; it != paths->end(); ++it )
AppendSearchPath( it->m_alias, it->m_pathvar, it->m_description );
if( m_curdir.IsEmpty() )
m_curdir = it->m_pathexp;
}
}
}
return true;
// Environment variables
const ENV_VAR_MAP& envVars = Pgm().GetLocalEnvVariables();
for( auto it = envVars.begin(); it != envVars.end(); ++it )
{
const wxString& path = it->second.GetValue();
AppendEnvVar( it->first, path, it->second.GetDefinedExternally() );
if( m_curdir.IsEmpty() && !path.StartsWith( "${" ) && !path.StartsWith( "$(" ) )
m_curdir = path;
}
return true;
}
@ -430,15 +436,14 @@ void DIALOG_CONFIGURE_PATHS::OnGridCellRightClick( wxGridEvent& aEvent )
AddMenuItem( &menu, 1, _( "File Browser..." ), KiBitmap( folder_xpm ) );
if( GetPopupMenuSelectionFromUser( menu ) == 1 )
{
wxString title = _( "Select Path" );
wxString path; // Currently the first opened path is not initialized
wxDirDialog dlg( nullptr, title, path, wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
wxDirDialog dlg( nullptr, _( "Select Path" ), m_curdir,
wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST );
if( dlg.ShowModal() == wxID_OK )
{
wxGrid* grid = dynamic_cast<wxGrid*>( aEvent.GetEventObject() );
grid->SetCellValue( aEvent.GetRow(), EV_PATH_COL, dlg.GetPath() );
m_curdir = dlg.GetPath();
}
}
}

View File

@ -45,7 +45,7 @@ bool LAYER_SELECTOR::SetLayersHotkeys( bool value )
}
void LAYER_SELECTOR::SetBitmapLayer( wxBitmap& aLayerbmp, LAYER_NUM aLayer )
void LAYER_SELECTOR::DrawColorSwatch( wxBitmap& aLayerbmp, COLOR4D aBackground, COLOR4D aColor )
{
wxMemoryDC bmpDC;
wxBrush brush;
@ -54,15 +54,14 @@ void LAYER_SELECTOR::SetBitmapLayer( wxBitmap& aLayerbmp, LAYER_NUM aLayer )
bmpDC.SelectObject( aLayerbmp );
brush.SetStyle( wxBRUSHSTYLE_SOLID );
COLOR4D backgroundColor = GetLayerColor( LAYER_PCB_BACKGROUND );
if( backgroundColor != COLOR4D::UNSPECIFIED )
if( aBackground != COLOR4D::UNSPECIFIED )
{
brush.SetColour( backgroundColor.WithAlpha(1.0).ToColour() );
brush.SetColour( aBackground.WithAlpha(1.0).ToColour() );
bmpDC.SetBrush( brush );
bmpDC.DrawRectangle( 0, 0, aLayerbmp.GetWidth(), aLayerbmp.GetHeight() );
}
brush.SetColour( GetLayerColor( aLayer ).ToColour() );
brush.SetColour( aColor.ToColour() );
bmpDC.SetBrush( brush );
bmpDC.DrawRectangle( 0, 0, aLayerbmp.GetWidth(), aLayerbmp.GetHeight() );
@ -150,7 +149,7 @@ void LAYER_BOX_SELECTOR::ResyncBitmapOnly()
for( LAYER_NUM i = 0; i < elements; ++i )
{
wxBitmap layerbmp( 14, 14 );
SetBitmapLayer( layerbmp, i );
DrawColorSwatch( layerbmp, GetLayerColor( LAYER_PCB_BACKGROUND ), GetLayerColor( i ) );
}
}

View File

@ -783,6 +783,15 @@ LSET LSET::BackMask()
}
LSET LSET::ForbiddenTextLayers()
{
static const LSET saved = AllCuMask().set( Edge_Cuts ).set( Margin )
.set( F_Paste ).set( B_Paste )
.set( F_Mask ).set( B_Mask );
return saved;
}
LSEQ LSET::UIOrder() const
{
LSEQ order = CuStack();

View File

@ -0,0 +1,128 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2018 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
* 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
*/
#include <widgets/grid_combobox.h>
//-------- Renderer ---------------------------------------------------------------------
// None required; just render as normal text.
//-------- Editor -----------------------------------------------------------------------
//
// Note: this implementation is an adaptation of wxGridCellChoiceEditor
GRID_CELL_COMBOBOX::GRID_CELL_COMBOBOX( const wxArrayString& names ) :
m_names( names )
{
}
wxGridCellEditor* GRID_CELL_COMBOBOX::Clone() const
{
return new GRID_CELL_COMBOBOX( m_names );
}
void GRID_CELL_COMBOBOX::Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler )
{
m_control = new wxComboBox( aParent, wxID_ANY, wxEmptyString,
wxDefaultPosition, wxDefaultSize, m_names );
wxGridCellEditor::Create(aParent, aId, aEventHandler);
}
wxString GRID_CELL_COMBOBOX::GetValue() const
{
return Combo()->GetValue();
}
void GRID_CELL_COMBOBOX::SetSize( const wxRect& aRect )
{
wxRect rect( aRect );
rect.Inflate( -1 );
#if defined( __WXMAC__ )
rect.Inflate( 3 ); // no FOCUS_RING, even on Mac
#endif
Combo()->SetSize( rect, wxSIZE_ALLOW_MINUS_ONE );
}
void GRID_CELL_COMBOBOX::BeginEdit( int aRow, int aCol, wxGrid* aGrid )
{
auto evtHandler = static_cast<wxGridCellEditorEvtHandler*>( m_control->GetEventHandler() );
// Don't immediately end if we get a kill focus event within BeginEdit
evtHandler->SetInSetFocus( true );
m_value = aGrid->GetTable()->GetValue( aRow, aCol );
Combo()->SetFocus();
#ifdef __WXOSX_COCOA__
// This is a work around for the combobox being simply dismissed when a
// choice is made in it under OS X. The bug is almost certainly due to a
// problem in focus events generation logic but it's not obvious to fix and
// for now this at least allows to use wxGrid.
Combo()->Popup();
#endif
// When dropping down the menu, a kill focus event
// happens after this point, so we can't reset the flag yet.
#if !defined(__WXGTK20__)
evtHandler->SetInSetFocus( false );
#endif
}
bool GRID_CELL_COMBOBOX::EndEdit( int , int , const wxGrid* , const wxString& , wxString *aNewVal )
{
const wxString value = Combo()->GetValue();
if( value == m_value )
return false;
m_value = value;
if( aNewVal )
*aNewVal = value;
return true;
}
void GRID_CELL_COMBOBOX::ApplyEdit( int aRow, int aCol, wxGrid* aGrid )
{
aGrid->GetTable()->SetValue( aRow, aCol, m_value );
}
void GRID_CELL_COMBOBOX::Reset()
{
}

View File

@ -45,18 +45,14 @@ void GBR_LAYER_BOX_SELECTOR::Resync()
for( unsigned layerid = 0; layerid < images.ImagesMaxCount(); ++layerid )
{
wxBitmap layerbmp( BM_SIZE, BM_SIZE );
wxString layername;
if( !IsLayerEnabled( layerid ) )
continue;
// Prepare Bitmap
SetBitmapLayer( layerbmp, layerid );
wxBitmap bmp( BM_SIZE, BM_SIZE );
DrawColorSwatch( bmp, GetLayerColor( LAYER_PCB_BACKGROUND ), GetLayerColor( layerid ) );
layername = GetLayerName( layerid );
Append( layername, layerbmp, (void*)(intptr_t) layerid );
Append( GetLayerName( layerid ), bmp, (void*)(intptr_t) layerid );
}
// Ensure the width of the widget is enough to show the text and the icon

View File

@ -34,37 +34,32 @@
class EDA_DRAW_FRAME;
class FILENAME_RESOLVER;
/**
* DIALOG_CONFIGURE_PATHS class declaration
*/
class DIALOG_CONFIGURE_PATHS: public DIALOG_CONFIGURE_PATHS_BASE
{
public:
DIALOG_CONFIGURE_PATHS( wxWindow* aParent, FILENAME_RESOLVER* aResolver );
virtual ~DIALOG_CONFIGURE_PATHS();
~DIALOG_CONFIGURE_PATHS() override;
bool TransferDataToWindow() override;
bool TransferDataFromWindow() override;
protected:
// Various button callbacks
virtual void OnGridCellRightClick( wxGridEvent& event ) override;
virtual void OnGridSize( wxSizeEvent& event ) override;
virtual void OnUpdateUI( wxUpdateUIEvent& event ) override;
virtual void OnGridCellChanging( wxGridEvent& event );
virtual void OnAddEnvVar( wxCommandEvent& event ) override;
virtual void OnRemoveEnvVar( wxCommandEvent& event ) override;
virtual void OnAddSearchPath( wxCommandEvent& event ) override;
virtual void OnDeleteSearchPath( wxCommandEvent& event ) override;
virtual void OnSearchPathMoveUp( wxCommandEvent& event ) override;
virtual void OnSearchPathMoveDown( wxCommandEvent& event ) override;
virtual void OnHelp( wxCommandEvent& event ) override;
void OnGridCellRightClick( wxGridEvent& event ) override;
void OnGridSize( wxSizeEvent& event ) override;
void OnUpdateUI( wxUpdateUIEvent& event ) override;
void OnGridCellChanging( wxGridEvent& event );
void OnAddEnvVar( wxCommandEvent& event ) override;
void OnRemoveEnvVar( wxCommandEvent& event ) override;
void OnAddSearchPath( wxCommandEvent& event ) override;
void OnDeleteSearchPath( wxCommandEvent& event ) override;
void OnSearchPathMoveUp( wxCommandEvent& event ) override;
void OnSearchPathMoveDown( wxCommandEvent& event ) override;
void OnHelp( wxCommandEvent& event ) override;
void AppendEnvVar( const wxString& aName, const wxString& aPath,
bool isExternal );
void AppendSearchPath( const wxString& aName, const wxString& aPath,
const wxString& aDescription );
void AppendEnvVar( const wxString& aName, const wxString& aPath, bool isExternal );
void AppendSearchPath( const wxString& aName, const wxString& aPath, const wxString& aDesc );
void AdjustGridColumns( int aWidth );
/**
@ -73,14 +68,14 @@ protected:
bool IsEnvVarImmutable( const wxString aEnvVar );
private:
wxString m_errorMsg;
wxGrid* m_errorGrid;
int m_errorRow;
int m_errorCol;
wxString m_errorMsg;
wxGrid* m_errorGrid;
int m_errorRow;
int m_errorCol;
FILENAME_RESOLVER* m_resolver;
wxString m_curdir;
wxTextValidator m_aliasValidator;
FILENAME_RESOLVER* m_resolver;
wxString m_curdir;
wxTextValidator m_aliasValidator;
};

View File

@ -60,12 +60,10 @@ public:
// Virtual function pure because GerbView uses its own functions in a derived class
virtual bool IsLayerEnabled( LAYER_NUM aLayer ) const = 0;
bool SetLayersOrdered( bool value );
bool SetLayersHotkeys( bool value );
protected:
// Fills the layer bitmap aLayerbmp with the layer color
void SetBitmapLayer( wxBitmap& aLayerbmp, LAYER_NUM aLayer );
static void DrawColorSwatch( wxBitmap& aLayerbmp, COLOR4D aBackground, COLOR4D aColor );
};

View File

@ -523,6 +523,7 @@ public:
static LSET UserMask();
static LSET ForbiddenTextLayers();
/**
* Function CuStack

View File

@ -0,0 +1,62 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2018 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
* 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
*/
#ifndef GRID_COMBOBOX_H
#define GRID_COMBOBOX_H
#include <wx/combobox.h>
#include <wx/generic/gridctrl.h>
#include <wx/generic/grideditors.h>
class wxGrid;
class GRID_CELL_COMBOBOX : public wxGridCellEditor
{
public:
GRID_CELL_COMBOBOX( const wxArrayString& names );
wxGridCellEditor* Clone() const override;
void Create( wxWindow* aParent, wxWindowID aId, wxEvtHandler* aEventHandler ) override;
wxString GetValue() const override;
void SetSize( const wxRect& aRect ) override;
void BeginEdit( int aRow, int aCol, wxGrid* aGrid ) override;
bool EndEdit( int , int , const wxGrid* , const wxString& , wxString *aNewVal ) override;
void ApplyEdit( int aRow, int aCol, wxGrid* aGrid ) override;
void Reset() override;
protected:
wxComboBox* Combo() const { return static_cast<wxComboBox*>( m_control ); }
const wxArrayString& m_names;
wxString m_value;
wxDECLARE_NO_COPY_CLASS( GRID_CELL_COMBOBOX );
};
#endif // GRID_COMBOBOX_H

View File

@ -235,6 +235,8 @@ set( PCBNEW_CLASS_SRCS
footprint_libraries_utils.cpp
footprint_viewer_frame.cpp
globaleditpad.cpp
grid_layer_box_helpers.cpp
grid_layer_box_helpers.h
highlight.cpp
hotkeys.cpp
hotkeys_board_editor.cpp
@ -275,6 +277,7 @@ set( PCBNEW_CLASS_SRCS
specctra_import_export/specctra_keywords.cpp
swap_layers.cpp
target_edit.cpp
text_mod_grid_table.cpp
tool_footprint_editor.cpp
tool_footprint_viewer.cpp
tool_onrightclick.cpp

View File

@ -87,7 +87,8 @@ class MODULE_3D_SETTINGS
// Initialize with sensible values
m_Scale { 1, 1, 1 },
m_Rotation { 0, 0, 0 },
m_Offset { 0, 0, 0 }
m_Offset { 0, 0, 0 },
m_Preview( true )
{
}
@ -100,6 +101,7 @@ class MODULE_3D_SETTINGS
VECTOR3D m_Rotation; ///< 3D model rotation (degrees)
VECTOR3D m_Offset; ///< 3D model offset (mm)
wxString m_Filename; ///< The 3D shape filename in 3D library
bool m_Preview; ///< Include module in 3D preview
};
class MODULE : public BOARD_ITEM_CONTAINER

File diff suppressed because it is too large Load Diff

View File

@ -29,32 +29,43 @@
#include <dialog_edit_footprint_for_BoardEditor_base.h>
#include <wx/valnum.h>
#include <text_mod_grid_table.h>
#include <widgets/unit_binder.h>
class PANEL_PREV_3D;
class DIALOG_FOOTPRINT_BOARD_EDITOR: public DIALOG_FOOTPRINT_BOARD_EDITOR_BASE
{
private:
PCB_EDIT_FRAME * m_Parent;
wxDC * m_DC;
MODULE* m_CurrentModule;
TEXTE_MODULE* m_ReferenceCopy;
TEXTE_MODULE* m_ValueCopy;
std::vector <MODULE_3D_SETTINGS> m_shapes3D_list;
int m_LastSelected3DShapeIndex;
static size_t m_page; // remember the last open page during session
PANEL_PREV_3D* m_PreviewPane;
MODULE* m_currentModuleCopy;
wxConfigBase* m_config;
PCB_EDIT_FRAME* m_frame;
wxDC* m_DC;
MODULE* m_footprint;
wxFloatingPointValidator<double> m_OrientValidator;
double m_OrientValue;
static int m_page; // remember the last open page during session
TEXT_MOD_GRID_TABLE* m_texts;
UNIT_BINDER m_posX;
UNIT_BINDER m_posY;
wxFloatingPointValidator<double> m_OrientValidator;
double m_OrientValue;
UNIT_BINDER m_netClearance;
UNIT_BINDER m_solderMask;
UNIT_BINDER m_solderPaste;
std::vector<MODULE_3D_SETTINGS> m_shapes3D_list;
PANEL_PREV_3D* m_PreviewPane;
wxString m_delayedErrorMessage;
wxGrid* m_delayedFocusGrid;
int m_delayedFocusRow;
int m_delayedFocusColumn;
public:
// The dialog can be closed for several reasons.
// they are listed here:
enum FP_PRM_EDITOR_RETVALUE
{
PRM_EDITOR_ABORT,
PRM_EDITOR_WANT_UPDATE_FP,
PRM_EDITOR_WANT_EXCHANGE_FP,
PRM_EDITOR_EDIT_OK,
@ -64,44 +75,33 @@ public:
public:
// Constructor and destructor
DIALOG_FOOTPRINT_BOARD_EDITOR( PCB_EDIT_FRAME* aParent, MODULE* aModule, wxDC* aDC );
~DIALOG_FOOTPRINT_BOARD_EDITOR();
~DIALOG_FOOTPRINT_BOARD_EDITOR() override;
private:
void BrowseAndAdd3DShapeFile();
void InitBoardProperties();
void InitModeditProperties();
void Edit3DShapeFileName();
// virtual event functions
void OnEditValue( wxCommandEvent& event ) override;
void OnEditReference( wxCommandEvent& event ) override;
void On3DShapeNameSelected( wxCommandEvent& event ) override;
void Edit3DShapeFilename( wxCommandEvent& event ) override
{
Edit3DShapeFileName();
}
void Remove3DShape( wxCommandEvent& event ) override;
void Add3DShape( wxCommandEvent& event ) override
{
BrowseAndAdd3DShapeFile();
}
void GotoModuleEditor( wxCommandEvent& event ) override;
void UpdateModule( wxCommandEvent& event ) override;
void ExchangeModule( wxCommandEvent& event ) override;
void ModuleOrientEvent( wxCommandEvent& event ) override;
void Cfg3DPath( wxCommandEvent& event ) override;
void OnInitDlg( wxInitDialogEvent& event ) override
{
// Call the default wxDialog handler of a wxInitDialogEvent
TransferDataToWindow();
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}
bool Validate() override;
bool TransferDataToWindow() override;
bool TransferDataFromWindow() override;
private:
// virtual event functions
void On3DModelSelected( wxGridEvent& ) override;
void On3DModelCellChanged( wxGridEvent& aEvent ) override;
void OnRemove3DModel( wxCommandEvent& ) override;
void OnAdd3DModel( wxCommandEvent& ) override;
void GotoModuleEditor( wxCommandEvent& ) override;
void UpdateModule( wxCommandEvent& ) override;
void ExchangeModule( wxCommandEvent& ) override;
void ModuleOrientEvent( wxCommandEvent& ) override;
void OnOtherOrientation( wxKeyEvent& aEvent ) override;
void Cfg3DPath( wxCommandEvent& ) override;
void OnGridSize( wxSizeEvent& aEvent ) override;
void OnAddField( wxCommandEvent& ) override;
void OnDeleteField( wxCommandEvent& ) override;
void OnUpdateUI( wxUpdateUIEvent& ) override;
void select3DModel( int aModelIdx );
void adjustGridColumns( int aWidth );
};

View File

@ -1,10 +1,11 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 22 2017)
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "text_mod_grid_table.h"
#include "widgets/text_ctrl_eval.h"
#include "dialog_edit_footprint_for_BoardEditor_base.h"
@ -18,363 +19,434 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow
m_GeneralBoxSizer = new wxBoxSizer( wxVERTICAL );
m_NoteBook = new wxNotebook( this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, 0 );
m_PanelProperties = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_PanelGeneral = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* m_PanelPropertiesBoxSizer;
m_PanelPropertiesBoxSizer = new wxBoxSizer( wxHORIZONTAL );
m_PanelPropertiesBoxSizer = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizerTexts;
sbSizerTexts = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, wxEmptyString ), wxVERTICAL );
m_itemsGrid = new TEXT_MOD_GRID( sbSizerTexts->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0 );
// Grid
m_itemsGrid->CreateGrid( 2, 11 );
m_itemsGrid->EnableEditing( true );
m_itemsGrid->EnableGridLines( true );
m_itemsGrid->EnableDragGridSize( false );
m_itemsGrid->SetMargins( 0, 0 );
// Columns
m_itemsGrid->SetColSize( 0, 120 );
m_itemsGrid->SetColSize( 1, 48 );
m_itemsGrid->SetColSize( 2, 90 );
m_itemsGrid->SetColSize( 3, 90 );
m_itemsGrid->SetColSize( 4, 90 );
m_itemsGrid->SetColSize( 5, 48 );
m_itemsGrid->SetColSize( 6, 112 );
m_itemsGrid->SetColSize( 7, 80 );
m_itemsGrid->SetColSize( 8, 48 );
m_itemsGrid->SetColSize( 9, 90 );
m_itemsGrid->SetColSize( 10, 90 );
m_itemsGrid->EnableDragColMove( false );
m_itemsGrid->EnableDragColSize( false );
m_itemsGrid->SetColLabelSize( 22 );
m_itemsGrid->SetColLabelValue( 0, _("Text Items") );
m_itemsGrid->SetColLabelValue( 1, _("Show") );
m_itemsGrid->SetColLabelValue( 2, _("Width") );
m_itemsGrid->SetColLabelValue( 3, _("Height") );
m_itemsGrid->SetColLabelValue( 4, _("Thickness") );
m_itemsGrid->SetColLabelValue( 5, _("Italic") );
m_itemsGrid->SetColLabelValue( 6, _("Layer") );
m_itemsGrid->SetColLabelValue( 7, _("Orientation") );
m_itemsGrid->SetColLabelValue( 8, _("Unconstrained") );
m_itemsGrid->SetColLabelValue( 9, _("X Offset") );
m_itemsGrid->SetColLabelValue( 10, _("Y Offset") );
m_itemsGrid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
// Rows
m_itemsGrid->EnableDragRowSize( false );
m_itemsGrid->SetRowLabelSize( 80 );
m_itemsGrid->SetRowLabelValue( 0, _("Reference") );
m_itemsGrid->SetRowLabelValue( 1, _("Value") );
m_itemsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
// Label Appearance
// Cell Defaults
m_itemsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
m_itemsGrid->SetMinSize( wxSize( 720,140 ) );
sbSizerTexts->Add( m_itemsGrid, 1, wxEXPAND|wxBOTTOM, 5 );
wxBoxSizer* bButtonSize;
bButtonSize = new wxBoxSizer( wxHORIZONTAL );
m_bpAdd = new wxBitmapButton( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
m_bpAdd->SetMinSize( wxSize( 29,29 ) );
bButtonSize->Add( m_bpAdd, 0, 0, 5 );
m_bpDelete = new wxBitmapButton( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
m_bpDelete->SetMinSize( wxSize( 29,29 ) );
bButtonSize->Add( m_bpDelete, 0, wxRIGHT, 10 );
bButtonSize->Add( 0, 0, 1, wxEXPAND, 5 );
sbSizerTexts->Add( bButtonSize, 0, wxEXPAND, 5 );
m_PanelPropertiesBoxSizer->Add( sbSizerTexts, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerProperties;
bSizerProperties = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizerLeft;
bSizerLeft = new wxBoxSizer( wxVERTICAL );
m_staticTextRef = new wxStaticText( m_PanelProperties, wxID_ANY, _("Reference:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRef->Wrap( -1 );
bSizerLeft->Add( m_staticTextRef, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerRef;
bSizerRef = new wxBoxSizer( wxHORIZONTAL );
m_ReferenceCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
bSizerRef->Add( m_ReferenceCtrl, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_button4 = new wxButton( m_PanelProperties, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
bSizerRef->Add( m_button4, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
bSizerLeft->Add( bSizerRef, 0, wxEXPAND, 5 );
m_staticTextVal = new wxStaticText( m_PanelProperties, wxID_ANY, _("Value:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextVal->Wrap( -1 );
bSizerLeft->Add( m_staticTextVal, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerVal;
bSizerVal = new wxBoxSizer( wxHORIZONTAL );
m_ValueCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
bSizerVal->Add( m_ValueCtrl, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_button5 = new wxButton( m_PanelProperties, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
bSizerVal->Add( m_button5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
bSizerLeft->Add( bSizerVal, 0, wxEXPAND, 5 );
bSizerLeft->Add( 0, 0, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
wxString m_LayerCtrlChoices[] = { _("Front"), _("Back") };
int m_LayerCtrlNChoices = sizeof( m_LayerCtrlChoices ) / sizeof( wxString );
m_LayerCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Board Side:"), wxDefaultPosition, wxDefaultSize, m_LayerCtrlNChoices, m_LayerCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_LayerCtrl->SetSelection( 0 );
bSizerLeft->Add( m_LayerCtrl, 0, wxALL|wxEXPAND, 5 );
wxString m_OrientCtrlChoices[] = { _("0.0"), _("+90.0"), _("-90.0"), _("180.0"), _("Other") };
int m_OrientCtrlNChoices = sizeof( m_OrientCtrlChoices ) / sizeof( wxString );
m_OrientCtrl = new wxRadioBox( m_PanelProperties, ID_LISTBOX_ORIENT_SELECT, _("Rotation:"), wxDefaultPosition, wxDefaultSize, m_OrientCtrlNChoices, m_OrientCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_OrientCtrl->SetSelection( 0 );
bSizerLeft->Add( m_OrientCtrl, 0, wxEXPAND|wxALL, 5 );
m_staticTextRotation = new wxStaticText( m_PanelProperties, wxID_ANY, _("Rotation (-360 to 360):"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRotation->Wrap( -1 );
bSizerLeft->Add( m_staticTextRotation, 0, wxRIGHT|wxLEFT, 5 );
m_OrientValueCtrl = new TEXT_CTRL_EVAL( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bSizerLeft->Add( m_OrientValueCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerLeft->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
wxFlexGridSizer* fgSizerPos;
fgSizerPos = new wxFlexGridSizer( 4, 2, 0, 0 );
fgSizerPos->AddGrowableCol( 0 );
fgSizerPos = new wxFlexGridSizer( 2, 3, 5, 0 );
fgSizerPos->AddGrowableCol( 1 );
fgSizerPos->AddGrowableRow( 0 );
fgSizerPos->AddGrowableRow( 1 );
fgSizerPos->SetFlexibleDirection( wxHORIZONTAL );
fgSizerPos->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_XPosLabel = new wxStaticText( m_PanelProperties, wxID_ANY, _("X Position:"), wxDefaultPosition, wxDefaultSize, 0 );
m_XPosLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Position X:"), wxDefaultPosition, wxDefaultSize, 0 );
m_XPosLabel->Wrap( -1 );
fgSizerPos->Add( m_XPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
fgSizerPos->Add( m_XPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT|wxLEFT, 5 );
m_ModPositionX = new TEXT_CTRL_EVAL( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerPos->Add( m_ModPositionX, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP, 5 );
fgSizerPos->Add( 0, 0, 1, wxEXPAND, 5 );
m_ModPositionX = new TEXT_CTRL_EVAL( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerPos->Add( m_ModPositionX, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_XPosUnit = new wxStaticText( m_PanelProperties, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_XPosUnit = new wxStaticText( m_PanelGeneral, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_XPosUnit->Wrap( -1 );
fgSizerPos->Add( m_XPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
fgSizerPos->Add( m_XPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
m_YPosLabel = new wxStaticText( m_PanelProperties, wxID_ANY, _("Y Position:"), wxDefaultPosition, wxDefaultSize, 0 );
m_YPosLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Position Y:"), wxDefaultPosition, wxDefaultSize, 0 );
m_YPosLabel->Wrap( -1 );
fgSizerPos->Add( m_YPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
fgSizerPos->Add( m_YPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_ModPositionY = new TEXT_CTRL_EVAL( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerPos->Add( m_ModPositionY, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM, 5 );
fgSizerPos->Add( 0, 0, 1, wxEXPAND, 5 );
m_ModPositionY = new TEXT_CTRL_EVAL( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerPos->Add( m_ModPositionY, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_YPosUnit = new wxStaticText( m_PanelProperties, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_YPosUnit = new wxStaticText( m_PanelGeneral, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_YPosUnit->Wrap( -1 );
fgSizerPos->Add( m_YPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
fgSizerPos->Add( m_YPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
bSizerLeft->Add( fgSizerPos, 0, wxALL|wxBOTTOM|wxEXPAND, 5 );
bSizerLeft->Add( fgSizerPos, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bSizerLeft->Add( 0, 0, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
bSizerLeft->Add( 0, 0, 0, wxEXPAND|wxTOP, 5 );
m_TextSheetPath = new wxStaticText( m_PanelProperties, wxID_ANY, _("Sheet path:"), wxDefaultPosition, wxDefaultSize, 0 );
m_TextSheetPath->Wrap( -1 );
bSizerLeft->Add( m_TextSheetPath, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* sbOrientationSizer;
sbOrientationSizer = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Orientation") ), wxVERTICAL );
m_textCtrlSheetPath = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
m_textCtrlSheetPath->SetToolTip( _("An unique ID (a time stamp) to identify the component.\nThis is an alternate identifier to the reference.") );
wxGridBagSizer* gbSizer1;
gbSizer1 = new wxGridBagSizer( 2, 0 );
gbSizer1->SetFlexibleDirection( wxBOTH );
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
bSizerLeft->Add( m_textCtrlSheetPath, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
m_Orient0 = new wxRadioButton( sbOrientationSizer->GetStaticBox(), wxID_ANY, _("0.0"), wxDefaultPosition, wxDefaultSize, 0 );
gbSizer1->Add( m_Orient0, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), 0, 5 );
m_Orient90 = new wxRadioButton( sbOrientationSizer->GetStaticBox(), wxID_ANY, _("90.0"), wxDefaultPosition, wxDefaultSize, 0 );
gbSizer1->Add( m_Orient90, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), 0, 5 );
m_Orient270 = new wxRadioButton( sbOrientationSizer->GetStaticBox(), wxID_ANY, _("-90.0"), wxDefaultPosition, wxDefaultSize, 0 );
gbSizer1->Add( m_Orient270, wxGBPosition( 2, 0 ), wxGBSpan( 1, 2 ), 0, 5 );
m_Orient180 = new wxRadioButton( sbOrientationSizer->GetStaticBox(), wxID_ANY, _("180.0"), wxDefaultPosition, wxDefaultSize, 0 );
gbSizer1->Add( m_Orient180, wxGBPosition( 3, 0 ), wxGBSpan( 1, 2 ), 0, 5 );
m_OrientOther = new wxRadioButton( sbOrientationSizer->GetStaticBox(), wxID_ANY, _("Other:"), wxDefaultPosition, wxDefaultSize, 0 );
gbSizer1->Add( m_OrientOther, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
m_OrientValueCtrl = new wxTextCtrl( sbOrientationSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
gbSizer1->Add( m_OrientValueCtrl, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerLeft->Add( 0, 0, 0, wxEXPAND|wxBOTTOM, 5 );
gbSizer1->AddGrowableCol( 1 );
sbOrientationSizer->Add( gbSizer1, 1, wxEXPAND, 5 );
m_PanelPropertiesBoxSizer->Add( bSizerLeft, 1, wxEXPAND, 5 );
bSizerLeft->Add( sbOrientationSizer, 1, wxEXPAND|wxALL, 5 );
m_PropRightSizer = new wxBoxSizer( wxVERTICAL );
m_buttonUpdate = new wxButton( m_PanelProperties, ID_MODULE_PROPERTIES_UPDATE, _("Update Footprint from Library"), wxDefaultPosition, wxDefaultSize, 0 );
m_PropRightSizer->Add( m_buttonUpdate, 0, wxALL|wxEXPAND, 5 );
wxBoxSizer* bSizer17;
bSizer17 = new wxBoxSizer( wxHORIZONTAL );
m_buttonExchange = new wxButton( m_PanelProperties, ID_MODULE_PROPERTIES_EXCHANGE, _("Change Footprint"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer17->Add( m_buttonExchange, 1, wxALL|wxEXPAND, 5 );
m_buttonModuleEditor = new wxButton( m_PanelProperties, ID_GOTO_MODULE_EDITOR, _("Footprint Editor"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer17->Add( m_buttonModuleEditor, 1, wxALL|wxEXPAND, 5 );
wxString m_LayerCtrlChoices[] = { _("Front"), _("Back") };
int m_LayerCtrlNChoices = sizeof( m_LayerCtrlChoices ) / sizeof( wxString );
m_LayerCtrl = new wxRadioBox( m_PanelGeneral, wxID_ANY, _("Board Side"), wxDefaultPosition, wxDefaultSize, m_LayerCtrlNChoices, m_LayerCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_LayerCtrl->SetSelection( 0 );
bSizerLeft->Add( m_LayerCtrl, 0, wxALL|wxEXPAND, 5 );
m_PropRightSizer->Add( bSizer17, 1, wxALL|wxEXPAND, 0 );
bSizerProperties->Add( bSizerLeft, 8, wxEXPAND, 5 );
wxBoxSizer* bSizerAttrib;
bSizerAttrib = new wxBoxSizer( wxHORIZONTAL );
wxString m_AttributsCtrlChoices[] = { _("Through hole"), _("Surface mount"), _("Virtual") };
int m_AttributsCtrlNChoices = sizeof( m_AttributsCtrlChoices ) / sizeof( wxString );
m_AttributsCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Placement Type:"), wxDefaultPosition, wxDefaultSize, m_AttributsCtrlNChoices, m_AttributsCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AttributsCtrl->SetSelection( 0 );
bSizerAttrib->Add( m_AttributsCtrl, 1, wxALL|wxEXPAND, 5 );
wxBoxSizer* bSizerMiddle;
bSizerMiddle = new wxBoxSizer( wxVERTICAL );
wxString m_AutoPlaceCtrlChoices[] = { _("Free"), _("Lock pads"), _("Lock footprint") };
int m_AutoPlaceCtrlNChoices = sizeof( m_AutoPlaceCtrlChoices ) / sizeof( wxString );
m_AutoPlaceCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Move and Place:"), wxDefaultPosition, wxDefaultSize, m_AutoPlaceCtrlNChoices, m_AutoPlaceCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AutoPlaceCtrl = new wxRadioBox( m_PanelGeneral, wxID_ANY, _("Move and Place"), wxDefaultPosition, wxDefaultSize, m_AutoPlaceCtrlNChoices, m_AutoPlaceCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AutoPlaceCtrl->SetSelection( 0 );
bSizerAttrib->Add( m_AutoPlaceCtrl, 1, wxALL|wxEXPAND, 5 );
m_PropRightSizer->Add( bSizerAttrib, 0, wxEXPAND, 5 );
bSizerMiddle->Add( m_AutoPlaceCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* sbSizerAP;
sbSizerAP = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Auto Place:") ), wxHORIZONTAL );
sbSizerAP = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Auto-placement Rules") ), wxVERTICAL );
wxBoxSizer* bSizerRotOpt;
bSizerRotOpt = new wxBoxSizer( wxVERTICAL );
m_staticText11 = new wxStaticText( sbSizerAP->GetStaticBox(), wxID_ANY, _("Allow 90 degree rotation:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText11 = new wxStaticText( sbSizerAP->GetStaticBox(), wxID_ANY, _("Allow 90 degree rotated placement:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText11->Wrap( -1 );
bSizerRotOpt->Add( m_staticText11, 0, wxRIGHT|wxLEFT, 5 );
m_staticText11->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
bSizerRotOpt->Add( m_staticText11, 0, 0, 5 );
m_CostRot90Ctrl = new wxSlider( sbSizerAP->GetStaticBox(), wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS );
bSizerRotOpt->Add( m_CostRot90Ctrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerRotOpt->Add( m_CostRot90Ctrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
sbSizerAP->Add( bSizerRotOpt, 1, wxEXPAND, 5 );
sbSizerAP->Add( bSizerRotOpt, 1, wxEXPAND|wxTOP, 5 );
wxBoxSizer* bSizerMoveOpt;
bSizerMoveOpt = new wxBoxSizer( wxVERTICAL );
m_staticText12 = new wxStaticText( sbSizerAP->GetStaticBox(), wxID_ANY, _("Allow 180 degree rotation:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText12 = new wxStaticText( sbSizerAP->GetStaticBox(), wxID_ANY, _("Allow 180 degree rotated placement:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText12->Wrap( -1 );
bSizerMoveOpt->Add( m_staticText12, 0, wxRIGHT|wxLEFT, 5 );
m_staticText12->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
bSizerMoveOpt->Add( m_staticText12, 0, wxTOP, 3 );
m_CostRot180Ctrl = new wxSlider( sbSizerAP->GetStaticBox(), wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS );
bSizerMoveOpt->Add( m_CostRot180Ctrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
bSizerMoveOpt->Add( m_CostRot180Ctrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
sbSizerAP->Add( bSizerMoveOpt, 1, wxEXPAND, 5 );
sbSizerAP->Add( bSizerMoveOpt, 1, wxEXPAND|wxTOP, 5 );
m_PropRightSizer->Add( sbSizerAP, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bSizerMiddle->Add( sbSizerAP, 0, wxEXPAND|wxALL, 5 );
bSizerProperties->Add( bSizerMiddle, 8, wxEXPAND|wxTOP, 5 );
wxBoxSizer* bSizerRight;
bSizerRight = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bButtonsSizer;
bButtonsSizer = new wxBoxSizer( wxVERTICAL );
m_buttonUpdate = new wxButton( m_PanelGeneral, ID_MODULE_PROPERTIES_UPDATE, _("Update Footprint from Library..."), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_buttonUpdate, 0, wxEXPAND|wxALL, 5 );
m_buttonExchange = new wxButton( m_PanelGeneral, ID_MODULE_PROPERTIES_EXCHANGE, _("Change Footprint..."), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_buttonExchange, 0, wxEXPAND|wxALL, 5 );
m_buttonModuleEditor = new wxButton( m_PanelGeneral, ID_GOTO_MODULE_EDITOR, _("Footprint Editor..."), wxDefaultPosition, wxDefaultSize, 0 );
bButtonsSizer->Add( m_buttonModuleEditor, 0, wxEXPAND|wxALL, 5 );
bSizerRight->Add( bButtonsSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bSizerRight->Add( 0, 0, 1, wxEXPAND, 5 );
wxString m_AttributsCtrlChoices[] = { _("Through hole"), _("Surface mount"), _("Virtual") };
int m_AttributsCtrlNChoices = sizeof( m_AttributsCtrlChoices ) / sizeof( wxString );
m_AttributsCtrl = new wxRadioBox( m_PanelGeneral, wxID_ANY, _("Fabrication Attributes"), wxDefaultPosition, wxDefaultSize, m_AttributsCtrlNChoices, m_AttributsCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AttributsCtrl->SetSelection( 0 );
bSizerRight->Add( m_AttributsCtrl, 0, wxALL|wxEXPAND, 5 );
bSizerProperties->Add( bSizerRight, 8, wxEXPAND, 5 );
m_PanelPropertiesBoxSizer->Add( bSizerProperties, 0, wxEXPAND, 5 );
m_PanelGeneral->SetSizer( m_PanelPropertiesBoxSizer );
m_PanelGeneral->Layout();
m_PanelPropertiesBoxSizer->Fit( m_PanelGeneral );
m_NoteBook->AddPage( m_PanelGeneral, _("General"), true );
m_PanelClearances = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizerPanelClearances;
bSizerPanelClearances = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizerLocalProperties;
sbSizerLocalProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Local Settings:") ), wxVERTICAL );
sbSizerLocalProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelClearances, wxID_ANY, _("Clearances") ), wxVERTICAL );
wxGridBagSizer* gbSizer1;
gbSizer1 = new wxGridBagSizer( 5, 5 );
gbSizer1->SetFlexibleDirection( wxBOTH );
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
gbSizer1->SetEmptyCellSize( wxSize( 0,0 ) );
m_staticText16 = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Pad connection to zones:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText16->Wrap( -1 );
gbSizer1->Add( m_staticText16, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
wxString m_ZoneConnectionChoiceChoices[] = { _("Use zone setting"), _("Solid"), _("Thermal relief"), _("None") };
int m_ZoneConnectionChoiceNChoices = sizeof( m_ZoneConnectionChoiceChoices ) / sizeof( wxString );
m_ZoneConnectionChoice = new wxChoice( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 );
m_ZoneConnectionChoice->SetSelection( 0 );
gbSizer1->Add( m_ZoneConnectionChoice, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_staticline1 = new wxStaticLine( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
gbSizer1->Add( m_staticline1, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxALL|wxEXPAND, 3 );
wxBoxSizer* bSizer10;
bSizer10 = new wxBoxSizer( wxVERTICAL );
m_staticTextInfo = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Set clearances to 0 to use netclass values."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfo = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Set values to 0 to use netclass values."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfo->Wrap( -1 );
m_staticTextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
bSizer10->Add( m_staticTextInfo, 0, 0, 5 );
sbSizerLocalProperties->Add( m_staticTextInfo, 0, wxRIGHT, 10 );
m_staticTextInfoValPos = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Positive clearance means area bigger than the pad (usual for solder mask)."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfoValPos = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Positive clearance means area bigger than the pad (usual for mask clearance)."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfoValPos->Wrap( -1 );
m_staticTextInfoValPos->SetFont( wxFont( 10, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
m_staticTextInfoValPos->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
bSizer10->Add( m_staticTextInfoValPos, 0, wxRIGHT|wxTOP, 5 );
sbSizerLocalProperties->Add( m_staticTextInfoValPos, 0, wxTOP|wxRIGHT, 10 );
m_staticTextInfoValNeg = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Negative clearance means area smaller than the pad (usual for solder paste)."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfoValNeg = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Negative clearance means area smaller than the pad (usual for paste clearance)."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfoValNeg->Wrap( -1 );
m_staticTextInfoValNeg->SetFont( wxFont( 10, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
m_staticTextInfoValNeg->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
bSizer10->Add( m_staticTextInfoValNeg, 0, wxBOTTOM|wxRIGHT, 5 );
sbSizerLocalProperties->Add( m_staticTextInfoValNeg, 0, wxBOTTOM|wxRIGHT, 10 );
wxFlexGridSizer* fgSizerClearances;
fgSizerClearances = new wxFlexGridSizer( 5, 3, 0, 0 );
fgSizerClearances->AddGrowableCol( 1 );
fgSizerClearances->SetFlexibleDirection( wxBOTH );
fgSizerClearances->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
gbSizer1->Add( bSizer10, wxGBPosition( 2, 0 ), wxGBSpan( 1, 3 ), wxEXPAND, 5 );
m_NetClearanceLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Pad clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_NetClearanceLabel->Wrap( -1 );
m_NetClearanceLabel->SetToolTip( _("This is the local net clearance for all pad of this footprint\nIf 0, the Netclass values are used\nThis value can be superseded by a pad local value.") );
m_staticTextNetClearance = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Pad clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextNetClearance->Wrap( -1 );
m_staticTextNetClearance->SetToolTip( _("This is the local net clearance for all pad of this footprint\nIf 0, the Netclass values are used\nThis value can be superseded by a pad local value.") );
fgSizerClearances->Add( m_NetClearanceLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
gbSizer1->Add( m_staticTextNetClearance, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
m_NetClearanceValueCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
gbSizer1->Add( m_NetClearanceValueCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_NetClearanceCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerClearances->Add( m_NetClearanceCtrl, 1, wxEXPAND|wxALL, 5 );
m_NetClearanceUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_NetClearanceUnits->Wrap( -1 );
gbSizer1->Add( m_NetClearanceUnits, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
fgSizerClearances->Add( m_NetClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
m_MaskClearanceTitle = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_MaskClearanceTitle->Wrap( -1 );
m_MaskClearanceTitle->SetToolTip( _("This is the local clearance between pads and the solder mask\nfor this footprint\nThis value can be superseded by a pad local value.\nIf 0, the global value is used") );
m_SolderMaskMarginLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderMaskMarginLabel->Wrap( -1 );
m_SolderMaskMarginLabel->SetToolTip( _("This is the local clearance between pads and the solder mask\nfor this footprint\nThis value can be superseded by a pad local value.\nIf 0, the global value is used") );
gbSizer1->Add( m_MaskClearanceTitle, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
fgSizerClearances->Add( m_SolderMaskMarginLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
m_SolderMaskMarginCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SolderMaskMarginCtrl->SetMinSize( wxSize( 150,-1 ) );
gbSizer1->Add( m_SolderMaskMarginCtrl, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
fgSizerClearances->Add( m_SolderMaskMarginCtrl, 1, wxALL|wxEXPAND, 5 );
m_SolderMaskMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderMaskMarginUnits->Wrap( -1 );
gbSizer1->Add( m_SolderMaskMarginUnits, wxGBPosition( 4, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
fgSizerClearances->Add( m_SolderMaskMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
m_staticTextSolderPaste = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSolderPaste->Wrap( -1 );
m_staticTextSolderPaste->SetToolTip( _("This is the local clearance between pads and the solder paste\nfor this footprint.\nThis value can be superseded by a pad local values.\nThe final clearance value is the sum of this value and the clearance value ratio\nA negative value means a smaller mask size than pad size") );
m_SolderPasteMarginLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteMarginLabel->Wrap( -1 );
m_SolderPasteMarginLabel->SetToolTip( _("This is the local clearance between pads and the solder paste\nfor this footprint.\nThis value can be superseded by a pad local values.\nThe final clearance value is the sum of this value and the clearance value ratio\nA negative value means a smaller mask size than pad size") );
gbSizer1->Add( m_staticTextSolderPaste, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
fgSizerClearances->Add( m_SolderPasteMarginLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_SolderPasteMarginCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
gbSizer1->Add( m_SolderPasteMarginCtrl, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
fgSizerClearances->Add( m_SolderPasteMarginCtrl, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_SolderPasteMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteMarginUnits->Wrap( -1 );
gbSizer1->Add( m_SolderPasteMarginUnits, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
fgSizerClearances->Add( m_SolderPasteMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_staticTextRatio = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder paste ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRatio->Wrap( -1 );
m_staticTextRatio->SetToolTip( _("This is the local clearance ratio in per cent between pads and the solder paste\nfor this footprint.\nA value of 10 means the clearance value is 10 per cent of the pad size\nThis value can be superseded by a pad local value.\nThe final clearance value is the sum of this value and the clearance value\nA negative value means a smaller mask size than pad size.") );
gbSizer1->Add( m_staticTextRatio, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
fgSizerClearances->Add( m_staticTextRatio, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
m_SolderPasteMarginRatioCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
gbSizer1->Add( m_SolderPasteMarginRatioCtrl, wxGBPosition( 6, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
fgSizerClearances->Add( m_SolderPasteMarginRatioCtrl, 1, wxALL|wxEXPAND, 5 );
m_SolderPasteRatioMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteRatioMarginUnits->Wrap( -1 );
gbSizer1->Add( m_SolderPasteRatioMarginUnits, wxGBPosition( 6, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
fgSizerClearances->Add( m_SolderPasteRatioMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
sbSizerLocalProperties->Add( fgSizerClearances, 1, wxEXPAND, 5 );
m_staticTextInfo2 = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Note: solder mask and paste values are used only for pads on copper layers."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfo2->Wrap( -1 );
m_staticTextInfo2->SetFont( wxFont( 10, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
m_staticTextInfo2->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
gbSizer1->Add( m_staticTextInfo2, wxGBPosition( 7, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL, 5 );
sbSizerLocalProperties->Add( m_staticTextInfo2, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 10 );
gbSizer1->AddGrowableCol( 1 );
bSizerPanelClearances->Add( sbSizerLocalProperties, 0, wxEXPAND|wxALL, 10 );
sbSizerLocalProperties->Add( gbSizer1, 0, wxEXPAND|wxLEFT, 5 );
wxStaticBoxSizer* sbSizer5;
sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( m_PanelClearances, wxID_ANY, _("Connection to Copper Zones") ), wxHORIZONTAL );
m_staticText16 = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("Pad connection to zones:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText16->Wrap( -1 );
sbSizer5->Add( m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxString m_ZoneConnectionChoiceChoices[] = { _("Use zone setting"), _("Solid"), _("Thermal relief"), _("None") };
int m_ZoneConnectionChoiceNChoices = sizeof( m_ZoneConnectionChoiceChoices ) / sizeof( wxString );
m_ZoneConnectionChoice = new wxChoice( sbSizer5->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 );
m_ZoneConnectionChoice->SetSelection( 0 );
sbSizer5->Add( m_ZoneConnectionChoice, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_PropRightSizer->Add( sbSizerLocalProperties, 0, wxALL|wxEXPAND, 5 );
bSizerPanelClearances->Add( sbSizer5, 0, wxALL|wxEXPAND, 10 );
m_PanelPropertiesBoxSizer->Add( m_PropRightSizer, 0, 0, 5 );
m_PanelProperties->SetSizer( m_PanelPropertiesBoxSizer );
m_PanelProperties->Layout();
m_PanelPropertiesBoxSizer->Fit( m_PanelProperties );
m_NoteBook->AddPage( m_PanelProperties, _("Properties"), true );
m_PanelClearances->SetSizer( bSizerPanelClearances );
m_PanelClearances->Layout();
bSizerPanelClearances->Fit( m_PanelClearances );
m_NoteBook->AddPage( m_PanelClearances, _("Local Clearance and Settings"), false );
m_Panel3D = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
bSizerMain3D = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizer3;
sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_Panel3D, wxID_ANY, _("3D Shape Name:") ), wxHORIZONTAL );
sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_Panel3D, wxID_ANY, wxEmptyString ), wxVERTICAL );
wxBoxSizer* bSizer18;
bSizer18 = new wxBoxSizer( wxVERTICAL );
m_modelsGrid = new wxGrid( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
m_3D_ShapeNameListBox = new wxListBox( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE );
m_3D_ShapeNameListBox->SetMinSize( wxSize( 200,110 ) );
m_3D_ShapeNameListBox->SetMaxSize( wxSize( -1,200 ) );
// Grid
m_modelsGrid->CreateGrid( 3, 2 );
m_modelsGrid->EnableEditing( true );
m_modelsGrid->EnableGridLines( false );
m_modelsGrid->EnableDragGridSize( false );
m_modelsGrid->SetMargins( 0, 0 );
bSizer18->Add( m_3D_ShapeNameListBox, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
// Columns
m_modelsGrid->SetColSize( 0, 662 );
m_modelsGrid->SetColSize( 1, 53 );
m_modelsGrid->EnableDragColMove( false );
m_modelsGrid->EnableDragColSize( false );
m_modelsGrid->SetColLabelSize( 22 );
m_modelsGrid->SetColLabelValue( 0, _("3D Model(s)") );
m_modelsGrid->SetColLabelValue( 1, _("Preview") );
m_modelsGrid->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
// Rows
m_modelsGrid->EnableDragRowSize( false );
m_modelsGrid->SetRowLabelSize( 0 );
m_modelsGrid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
sbSizer3->Add( bSizer18, 1, wxEXPAND, 5 );
// Label Appearance
wxBoxSizer* bSizer19;
bSizer19 = new wxBoxSizer( wxHORIZONTAL );
// Cell Defaults
m_modelsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
sbSizer3->Add( m_modelsGrid, 1, wxEXPAND|wxRIGHT, 5 );
wxBoxSizer* bSizer3DButtons;
bSizer3DButtons = new wxBoxSizer( wxVERTICAL );
bSizer3DButtons = new wxBoxSizer( wxHORIZONTAL );
m_buttonAdd = new wxButton( sbSizer3->GetStaticBox(), ID_ADD_3D_SHAPE, _("Add 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_buttonAdd, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
m_buttonAdd = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 29,29 ), wxBU_AUTODRAW );
bSizer3DButtons->Add( m_buttonAdd, 0, wxTOP, 5 );
m_buttonRemove = new wxButton( sbSizer3->GetStaticBox(), ID_REMOVE_3D_SHAPE, _("Remove 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_buttonRemove, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
m_buttonEdit = new wxButton( sbSizer3->GetStaticBox(), wxID_ANY, _("Edit Filename"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_buttonEdit, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
m_button8 = new wxButton( sbSizer3->GetStaticBox(), wxID_ANY, _("Configure Paths"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_button8, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_buttonRemove = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 29,29 ), wxBU_AUTODRAW );
bSizer3DButtons->Add( m_buttonRemove, 0, wxTOP, 5 );
bSizer19->Add( bSizer3DButtons, 0, wxALIGN_CENTER_VERTICAL, 5 );
bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
m_button8 = new wxButton( sbSizer3->GetStaticBox(), wxID_ANY, _("Configure Paths..."), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_button8, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
sbSizer3->Add( bSizer19, 0, wxEXPAND, 5 );
sbSizer3->Add( bSizer3DButtons, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizerMain3D->Add( sbSizer3, 0, wxEXPAND, 5 );
bSizerMain3D->Add( sbSizer3, 5, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bLowerSizer3D = new wxBoxSizer( wxHORIZONTAL );
bSizerMain3D->Add( bLowerSizer3D, 1, wxEXPAND, 5 );
bSizerMain3D->Add( bLowerSizer3D, 10, wxEXPAND, 5 );
m_Panel3D->SetSizer( bSizerMain3D );
@ -382,7 +454,42 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow
bSizerMain3D->Fit( m_Panel3D );
m_NoteBook->AddPage( m_Panel3D, _("3D Settings"), false );
m_GeneralBoxSizer->Add( m_NoteBook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_GeneralBoxSizer->Add( m_NoteBook, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizer16;
bSizer16 = new wxBoxSizer( wxHORIZONTAL );
wxFlexGridSizer* fgSizerSymbolRef;
fgSizerSymbolRef = new wxFlexGridSizer( 2, 2, 0, 0 );
fgSizerSymbolRef->SetFlexibleDirection( wxBOTH );
fgSizerSymbolRef->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
symbolLabel = new wxStaticText( this, wxID_ANY, _("Library reference:"), wxDefaultPosition, wxDefaultSize, 0 );
symbolLabel->Wrap( -1 );
symbolLabel->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
fgSizerSymbolRef->Add( symbolLabel, 0, wxRIGHT|wxLEFT, 1 );
m_staticLibraryID = new wxStaticText( this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticLibraryID->Wrap( -1 );
m_staticLibraryID->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
fgSizerSymbolRef->Add( m_staticLibraryID, 0, wxRIGHT|wxLEFT, 1 );
sheetPathLabel = new wxStaticText( this, wxID_ANY, _("Schematic sheet:"), wxDefaultPosition, wxDefaultSize, 0 );
sheetPathLabel->Wrap( -1 );
sheetPathLabel->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
fgSizerSymbolRef->Add( sheetPathLabel, 0, wxTOP|wxRIGHT|wxLEFT, 1 );
m_staticSheetPath = new wxStaticText( this, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticSheetPath->Wrap( -1 );
m_staticSheetPath->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
fgSizerSymbolRef->Add( m_staticSheetPath, 0, wxTOP|wxRIGHT|wxLEFT, 1 );
bSizer16->Add( fgSizerSymbolRef, 1, wxEXPAND|wxRIGHT|wxLEFT, 12 );
m_sdbSizerStdButtons = new wxStdDialogButtonSizer();
m_sdbSizerStdButtonsOK = new wxButton( this, wxID_OK );
@ -391,7 +498,10 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow
m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsCancel );
m_sdbSizerStdButtons->Realize();
m_GeneralBoxSizer->Add( m_sdbSizerStdButtons, 0, wxALL|wxEXPAND, 5 );
bSizer16->Add( m_sdbSizerStdButtons, 0, wxEXPAND, 5 );
m_GeneralBoxSizer->Add( bSizer16, 0, wxEXPAND, 5 );
this->SetSizer( m_GeneralBoxSizer );
@ -400,17 +510,23 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::DIALOG_FOOTPRINT_BOARD_EDITOR_BASE( wxWindow
// Connect Events
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnInitDlg ) );
m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnEditReference ), NULL, this );
m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnEditValue ), NULL, this );
m_OrientCtrl->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnUpdateUI ) );
m_itemsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnGridSize ), NULL, this );
m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnAddField ), NULL, this );
m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnDeleteField ), NULL, this );
m_Orient0->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
m_Orient90->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
m_Orient270->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
m_Orient180->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
m_OrientOther->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
m_OrientValueCtrl->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnOtherOrientation ), NULL, this );
m_buttonUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::UpdateModule ), NULL, this );
m_buttonExchange->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this );
m_buttonModuleEditor->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this );
m_3D_ShapeNameListBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this );
m_3D_ShapeNameListBox->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::Edit3DShapeFilename ), NULL, this );
m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::Add3DShape ), NULL, this );
m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this );
m_buttonEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::Edit3DShapeFilename ), NULL, this );
m_modelsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::On3DModelCellChanged ), NULL, this );
m_modelsGrid->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::On3DModelSelected ), NULL, this );
m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnAdd3DModel ), NULL, this );
m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnRemove3DModel ), NULL, this );
m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::Cfg3DPath ), NULL, this );
}
@ -418,17 +534,23 @@ DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::~DIALOG_FOOTPRINT_BOARD_EDITOR_BASE()
{
// Disconnect Events
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnInitDlg ) );
m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnEditReference ), NULL, this );
m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnEditValue ), NULL, this );
m_OrientCtrl->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnUpdateUI ) );
m_itemsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnGridSize ), NULL, this );
m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnAddField ), NULL, this );
m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnDeleteField ), NULL, this );
m_Orient0->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
m_Orient90->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
m_Orient270->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
m_Orient180->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
m_OrientOther->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this );
m_OrientValueCtrl->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnOtherOrientation ), NULL, this );
m_buttonUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::UpdateModule ), NULL, this );
m_buttonExchange->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this );
m_buttonModuleEditor->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this );
m_3D_ShapeNameListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this );
m_3D_ShapeNameListBox->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::Edit3DShapeFilename ), NULL, this );
m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::Add3DShape ), NULL, this );
m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this );
m_buttonEdit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::Edit3DShapeFilename ), NULL, this );
m_modelsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::On3DModelCellChanged ), NULL, this );
m_modelsGrid->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::On3DModelSelected ), NULL, this );
m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnAdd3DModel ), NULL, this );
m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::OnRemove3DModel ), NULL, this );
m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_BOARD_EDITOR_BASE::Cfg3DPath ), NULL, this );
}

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 22 2017)
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
@ -12,40 +12,39 @@
#include <wx/xrc/xmlres.h>
#include <wx/intl.h>
class TEXT_CTRL_EVAL;
class TEXT_MOD_GRID;
#include "dialog_shim.h"
#include <wx/string.h>
#include <wx/stattext.h>
#include <wx/gdicmn.h>
#include <wx/font.h>
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/textctrl.h>
#include <wx/button.h>
#include <wx/sizer.h>
#include <wx/radiobox.h>
#include <wx/slider.h>
#include <wx/statbox.h>
#include <wx/choice.h>
#include <wx/statline.h>
#include <wx/gbsizer.h>
#include <wx/panel.h>
#include <wx/string.h>
#include <wx/font.h>
#include <wx/grid.h>
#include <wx/gdicmn.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/listbox.h>
#include <wx/bmpbuttn.h>
#include <wx/button.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/radiobut.h>
#include <wx/gbsizer.h>
#include <wx/radiobox.h>
#include <wx/slider.h>
#include <wx/panel.h>
#include <wx/choice.h>
#include <wx/notebook.h>
#include <wx/dialog.h>
///////////////////////////////////////////////////////////////////////////
#define ID_NOTEBOOK 1000
#define ID_LISTBOX_ORIENT_SELECT 1001
#define ID_MODULE_PROPERTIES_UPDATE 1002
#define ID_MODULE_PROPERTIES_EXCHANGE 1003
#define ID_GOTO_MODULE_EDITOR 1004
#define ID_ADD_3D_SHAPE 1005
#define ID_REMOVE_3D_SHAPE 1006
#define ID_MODULE_PROPERTIES_UPDATE 1001
#define ID_MODULE_PROPERTIES_EXCHANGE 1002
#define ID_GOTO_MODULE_EDITOR 1003
///////////////////////////////////////////////////////////////////////////////
/// Class DIALOG_FOOTPRINT_BOARD_EDITOR_BASE
@ -54,81 +53,85 @@ class DIALOG_FOOTPRINT_BOARD_EDITOR_BASE : public DIALOG_SHIM
{
private:
wxBoxSizer* m_GeneralBoxSizer;
wxBoxSizer* m_PropRightSizer;
wxBoxSizer* bSizerLeft;
wxStaticText* symbolLabel;
wxStaticText* sheetPathLabel;
protected:
wxNotebook* m_NoteBook;
wxPanel* m_PanelProperties;
wxStaticText* m_staticTextRef;
wxTextCtrl* m_ReferenceCtrl;
wxButton* m_button4;
wxStaticText* m_staticTextVal;
wxTextCtrl* m_ValueCtrl;
wxButton* m_button5;
wxRadioBox* m_LayerCtrl;
wxRadioBox* m_OrientCtrl;
wxStaticText* m_staticTextRotation;
TEXT_CTRL_EVAL* m_OrientValueCtrl;
wxPanel* m_PanelGeneral;
TEXT_MOD_GRID* m_itemsGrid;
wxBitmapButton* m_bpAdd;
wxBitmapButton* m_bpDelete;
wxStaticText* m_XPosLabel;
TEXT_CTRL_EVAL* m_ModPositionX;
wxStaticText* m_XPosUnit;
wxStaticText* m_YPosLabel;
TEXT_CTRL_EVAL* m_ModPositionY;
wxStaticText* m_YPosUnit;
wxStaticText* m_TextSheetPath;
wxTextCtrl* m_textCtrlSheetPath;
wxButton* m_buttonUpdate;
wxButton* m_buttonExchange;
wxButton* m_buttonModuleEditor;
wxRadioBox* m_AttributsCtrl;
wxRadioButton* m_Orient0;
wxRadioButton* m_Orient90;
wxRadioButton* m_Orient270;
wxRadioButton* m_Orient180;
wxRadioButton* m_OrientOther;
wxTextCtrl* m_OrientValueCtrl;
wxRadioBox* m_LayerCtrl;
wxRadioBox* m_AutoPlaceCtrl;
wxStaticText* m_staticText11;
wxSlider* m_CostRot90Ctrl;
wxStaticText* m_staticText12;
wxSlider* m_CostRot180Ctrl;
wxStaticText* m_staticText16;
wxChoice* m_ZoneConnectionChoice;
wxStaticLine* m_staticline1;
wxButton* m_buttonUpdate;
wxButton* m_buttonExchange;
wxButton* m_buttonModuleEditor;
wxRadioBox* m_AttributsCtrl;
wxPanel* m_PanelClearances;
wxStaticText* m_staticTextInfo;
wxStaticText* m_staticTextInfoValPos;
wxStaticText* m_staticTextInfoValNeg;
wxStaticText* m_staticTextNetClearance;
TEXT_CTRL_EVAL* m_NetClearanceValueCtrl;
wxStaticText* m_NetClearanceLabel;
TEXT_CTRL_EVAL* m_NetClearanceCtrl;
wxStaticText* m_NetClearanceUnits;
wxStaticText* m_MaskClearanceTitle;
wxStaticText* m_SolderMaskMarginLabel;
TEXT_CTRL_EVAL* m_SolderMaskMarginCtrl;
wxStaticText* m_SolderMaskMarginUnits;
wxStaticText* m_staticTextSolderPaste;
wxStaticText* m_SolderPasteMarginLabel;
TEXT_CTRL_EVAL* m_SolderPasteMarginCtrl;
wxStaticText* m_SolderPasteMarginUnits;
wxStaticText* m_staticTextRatio;
TEXT_CTRL_EVAL* m_SolderPasteMarginRatioCtrl;
wxStaticText* m_SolderPasteRatioMarginUnits;
wxStaticText* m_staticTextInfo2;
wxStaticText* m_staticText16;
wxChoice* m_ZoneConnectionChoice;
wxPanel* m_Panel3D;
wxBoxSizer* bSizerMain3D;
wxListBox* m_3D_ShapeNameListBox;
wxButton* m_buttonAdd;
wxButton* m_buttonRemove;
wxButton* m_buttonEdit;
wxGrid* m_modelsGrid;
wxBitmapButton* m_buttonAdd;
wxBitmapButton* m_buttonRemove;
wxButton* m_button8;
wxBoxSizer* bLowerSizer3D;
wxStaticText* m_staticLibraryID;
wxStaticText* m_staticSheetPath;
wxStdDialogButtonSizer* m_sdbSizerStdButtons;
wxButton* m_sdbSizerStdButtonsOK;
wxButton* m_sdbSizerStdButtonsCancel;
// Virtual event handlers, overide them in your derived class
virtual void OnInitDlg( wxInitDialogEvent& event ) { event.Skip(); }
virtual void OnEditReference( wxCommandEvent& event ) { event.Skip(); }
virtual void OnEditValue( wxCommandEvent& event ) { event.Skip(); }
virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); }
virtual void OnGridSize( wxSizeEvent& event ) { event.Skip(); }
virtual void OnAddField( wxCommandEvent& event ) { event.Skip(); }
virtual void OnDeleteField( wxCommandEvent& event ) { event.Skip(); }
virtual void ModuleOrientEvent( wxCommandEvent& event ) { event.Skip(); }
virtual void OnOtherOrientation( wxKeyEvent& event ) { event.Skip(); }
virtual void UpdateModule( wxCommandEvent& event ) { event.Skip(); }
virtual void ExchangeModule( wxCommandEvent& event ) { event.Skip(); }
virtual void GotoModuleEditor( wxCommandEvent& event ) { event.Skip(); }
virtual void On3DShapeNameSelected( wxCommandEvent& event ) { event.Skip(); }
virtual void Edit3DShapeFilename( wxCommandEvent& event ) { event.Skip(); }
virtual void Add3DShape( wxCommandEvent& event ) { event.Skip(); }
virtual void Remove3DShape( wxCommandEvent& event ) { event.Skip(); }
virtual void On3DModelCellChanged( wxGridEvent& event ) { event.Skip(); }
virtual void On3DModelSelected( wxGridEvent& event ) { event.Skip(); }
virtual void OnAdd3DModel( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRemove3DModel( wxCommandEvent& event ) { event.Skip(); }
virtual void Cfg3DPath( wxCommandEvent& event ) { event.Skip(); }

File diff suppressed because it is too large Load Diff

View File

@ -28,6 +28,8 @@
// Include the wxFormBuider header base:
#include <vector>
#include <dialog_edit_footprint_for_fp_editor_base.h>
#include <text_mod_grid_table.h>
#include <widgets/unit_binder.h>
class PANEL_PREV_3D;
class MODULE;
@ -35,56 +37,52 @@ class MODULE;
class DIALOG_FOOTPRINT_FP_EDITOR : public DIALOG_FOOTPRINT_FP_EDITOR_BASE
{
private:
wxConfigBase* m_config;
FOOTPRINT_EDIT_FRAME* m_frame;
MODULE* m_footprint;
FOOTPRINT_EDIT_FRAME* m_parent;
MODULE* m_currentModule;
TEXTE_MODULE* m_referenceCopy;
TEXTE_MODULE* m_valueCopy;
std::vector<MODULE_3D_SETTINGS> m_shapes3D_list;
int m_lastSelected3DShapeIndex;
static size_t m_page; // remember the last open page during session
PANEL_PREV_3D* m_PreviewPane;
MODULE* m_currentModuleCopy;
LIB_ID m_currentFPID; // the full initial FPID
static int m_page; // remember the last open page during session
TEXT_MOD_GRID_TABLE* m_texts;
UNIT_BINDER m_netClearance;
UNIT_BINDER m_solderMask;
UNIT_BINDER m_solderPaste;
std::vector<MODULE_3D_SETTINGS> m_shapes3D_list;
PANEL_PREV_3D* m_PreviewPane;
wxString m_delayedErrorMessage;
wxGrid* m_delayedFocusGrid;
int m_delayedFocusRow;
int m_delayedFocusColumn;
public:
// Constructor and destructor
DIALOG_FOOTPRINT_FP_EDITOR( FOOTPRINT_EDIT_FRAME* aParent, MODULE* aModule );
~DIALOG_FOOTPRINT_FP_EDITOR();
~DIALOG_FOOTPRINT_FP_EDITOR() override;
private:
void BrowseAndAdd3DShapeFile();
void initModeditProperties();
void Edit3DShapeFileName();
// virtual event functions
void OnEditValue( wxCommandEvent& event ) override;
void OnEditReference( wxCommandEvent& event ) override;
void On3DShapeSelection( wxCommandEvent& event );
void On3DShapeNameSelected( wxCommandEvent& event ) override;
void Add3DShape( wxCommandEvent& event ) override
{
BrowseAndAdd3DShapeFile();
}
void Remove3DShape( wxCommandEvent& event ) override;
void Edit3DShapeFilename( wxCommandEvent& event ) override
{
Edit3DShapeFileName();
}
void Cfg3DPath( wxCommandEvent& event ) override;
bool Validate() override;
bool TransferDataToWindow() override;
bool TransferDataFromWindow() override;
void OnInitDlg( wxInitDialogEvent& event ) override
{
// Call the default wxDialog handler of a wxInitDialogEvent
TransferDataToWindow();
private:
// virtual event functions
void On3DModelSelected( wxGridEvent& ) override;
void On3DModelCellChanged( wxGridEvent& aEvent ) override;
void OnRemove3DModel( wxCommandEvent& event ) override;
void OnAdd3DModel( wxCommandEvent& event ) override;
void Cfg3DPath( wxCommandEvent& event ) override;
void OnGridSize( wxSizeEvent& event ) override;
void OnAddField( wxCommandEvent& event ) override;
void OnDeleteField( wxCommandEvent& event ) override;
void OnUpdateUI( wxUpdateUIEvent& event ) override;
// Now all widgets have the size fixed, call FinishDialogSettings
FinishDialogSettings();
}
void select3DModel( int aModelIdx );
void adjustGridColumns( int aWidth );
};

View File

@ -1,10 +1,11 @@
///////////////////////////////////////////////////////////////////////////
// C++ code generated with wxFormBuilder (version Nov 22 2017)
// C++ code generated with wxFormBuilder (version Dec 30 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO *NOT* EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
#include "text_mod_grid_table.h"
#include "widgets/text_ctrl_eval.h"
#include "dialog_edit_footprint_for_fp_editor_base.h"
@ -18,308 +19,364 @@ DIALOG_FOOTPRINT_FP_EDITOR_BASE::DIALOG_FOOTPRINT_FP_EDITOR_BASE( wxWindow* pare
m_GeneralBoxSizer = new wxBoxSizer( wxVERTICAL );
m_NoteBook = new wxNotebook( this, ID_NOTEBOOK, wxDefaultPosition, wxDefaultSize, 0 );
m_PanelProperties = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
m_PanelGeneral = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* m_PanelPropertiesBoxSizer;
m_PanelPropertiesBoxSizer = new wxBoxSizer( wxHORIZONTAL );
m_PanelPropertiesBoxSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bLeftSizer;
bLeftSizer = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizerTexts;
sbSizerTexts = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, wxEmptyString ), wxVERTICAL );
m_staticTextRef = new wxStaticText( m_PanelProperties, wxID_ANY, _("Reference:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRef->Wrap( -1 );
bLeftSizer->Add( m_staticTextRef, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_itemsGrid = new TEXT_MOD_GRID( sbSizerTexts->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), 0 );
wxBoxSizer* bSizerRef;
bSizerRef = new wxBoxSizer( wxHORIZONTAL );
// Grid
m_itemsGrid->CreateGrid( 2, 11 );
m_itemsGrid->EnableEditing( true );
m_itemsGrid->EnableGridLines( true );
m_itemsGrid->EnableDragGridSize( false );
m_itemsGrid->SetMargins( 0, 0 );
m_ReferenceCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
bSizerRef->Add( m_ReferenceCtrl, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
// Columns
m_itemsGrid->SetColSize( 0, 120 );
m_itemsGrid->SetColSize( 1, 48 );
m_itemsGrid->SetColSize( 2, 96 );
m_itemsGrid->SetColSize( 3, 96 );
m_itemsGrid->SetColSize( 4, 96 );
m_itemsGrid->SetColSize( 5, 48 );
m_itemsGrid->SetColSize( 6, 112 );
m_itemsGrid->SetColSize( 7, 80 );
m_itemsGrid->SetColSize( 8, 48 );
m_itemsGrid->SetColSize( 9, 96 );
m_itemsGrid->SetColSize( 10, 96 );
m_itemsGrid->EnableDragColMove( false );
m_itemsGrid->EnableDragColSize( false );
m_itemsGrid->SetColLabelSize( 22 );
m_itemsGrid->SetColLabelValue( 0, _("Text Items") );
m_itemsGrid->SetColLabelValue( 1, _("Show") );
m_itemsGrid->SetColLabelValue( 2, _("Width") );
m_itemsGrid->SetColLabelValue( 3, _("Height") );
m_itemsGrid->SetColLabelValue( 4, _("Thickness") );
m_itemsGrid->SetColLabelValue( 5, _("Italic") );
m_itemsGrid->SetColLabelValue( 6, _("Layer") );
m_itemsGrid->SetColLabelValue( 7, _("Orientation") );
m_itemsGrid->SetColLabelValue( 8, _("Unconstrained") );
m_itemsGrid->SetColLabelValue( 9, _("X Offset") );
m_itemsGrid->SetColLabelValue( 10, _("Y Offset") );
m_itemsGrid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
m_button4 = new wxButton( m_PanelProperties, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
bSizerRef->Add( m_button4, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
// Rows
m_itemsGrid->EnableDragRowSize( false );
m_itemsGrid->SetRowLabelSize( 80 );
m_itemsGrid->SetRowLabelValue( 0, _("Reference") );
m_itemsGrid->SetRowLabelValue( 1, _("Value") );
m_itemsGrid->SetRowLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
// Label Appearance
// Cell Defaults
m_itemsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
m_itemsGrid->SetMinSize( wxSize( 732,140 ) );
sbSizerTexts->Add( m_itemsGrid, 1, wxEXPAND|wxBOTTOM, 5 );
wxBoxSizer* bButtonSize;
bButtonSize = new wxBoxSizer( wxHORIZONTAL );
m_bpAdd = new wxBitmapButton( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
m_bpAdd->SetMinSize( wxSize( 29,29 ) );
bButtonSize->Add( m_bpAdd, 0, 0, 5 );
m_bpDelete = new wxBitmapButton( sbSizerTexts->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
m_bpDelete->SetMinSize( wxSize( 29,29 ) );
bButtonSize->Add( m_bpDelete, 0, wxRIGHT, 10 );
bLeftSizer->Add( bSizerRef, 0, wxBOTTOM|wxEXPAND, 5 );
m_staticTextVal = new wxStaticText( m_PanelProperties, wxID_ANY, _("Value:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextVal->Wrap( -1 );
bLeftSizer->Add( m_staticTextVal, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerVal;
bSizerVal = new wxBoxSizer( wxHORIZONTAL );
m_ValueCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
bSizerVal->Add( m_ValueCtrl, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_button5 = new wxButton( m_PanelProperties, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
bSizerVal->Add( m_button5, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
bButtonSize->Add( 0, 0, 1, wxEXPAND, 5 );
bLeftSizer->Add( bSizerVal, 0, wxEXPAND|wxBOTTOM, 5 );
sbSizerTexts->Add( bButtonSize, 0, wxEXPAND, 5 );
bLeftSizer->Add( 0, 0, 0, wxEXPAND|wxTOP|wxBOTTOM, 10 );
m_PanelPropertiesBoxSizer->Add( sbSizerTexts, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticTextDoc = new wxStaticText( m_PanelProperties, wxID_ANY, _("Document link:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextDoc->Wrap( -1 );
bLeftSizer->Add( m_staticTextDoc, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxFlexGridSizer* fgSizerFPID;
fgSizerFPID = new wxFlexGridSizer( 4, 2, 0, 0 );
fgSizerFPID->AddGrowableCol( 1 );
fgSizerFPID->SetFlexibleDirection( wxBOTH );
fgSizerFPID->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_DocCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bLeftSizer->Add( m_DocCtrl, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
wxStaticText* staticLibraryLabel;
staticLibraryLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Library:"), wxDefaultPosition, wxDefaultSize, 0 );
staticLibraryLabel->Wrap( -1 );
fgSizerFPID->Add( staticLibraryLabel, 0, wxALL, 5 );
m_staticTextKeywords = new wxStaticText( m_PanelProperties, wxID_ANY, _("Keywords:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextKeywords->Wrap( -1 );
bLeftSizer->Add( m_staticTextKeywords, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_libraryName = new wxStaticText( m_PanelGeneral, wxID_ANY, _("MyLabel"), wxDefaultPosition, wxDefaultSize, 0 );
m_libraryName->Wrap( -1 );
fgSizerFPID->Add( m_libraryName, 0, wxEXPAND|wxALL, 5 );
m_KeywordCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bLeftSizer->Add( m_KeywordCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxStaticText* staticFPNameLabel;
staticFPNameLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Footprint name:"), wxDefaultPosition, wxDefaultSize, 0 );
staticFPNameLabel->Wrap( -1 );
fgSizerFPID->Add( staticFPNameLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
m_FootprintNameCtrl = new wxTextCtrl( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerFPID->Add( m_FootprintNameCtrl, 0, wxALL|wxEXPAND, 5 );
wxStaticText* staticDescriptionLabel;
staticDescriptionLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Description:"), wxDefaultPosition, wxDefaultSize, 0 );
staticDescriptionLabel->Wrap( -1 );
fgSizerFPID->Add( staticDescriptionLabel, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
m_DocCtrl = new wxTextCtrl( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerFPID->Add( m_DocCtrl, 0, wxALL|wxEXPAND, 5 );
staticKeywordsLabel = new wxStaticText( m_PanelGeneral, wxID_ANY, _("Keywords:"), wxDefaultPosition, wxDefaultSize, 0 );
staticKeywordsLabel->Wrap( -1 );
fgSizerFPID->Add( staticKeywordsLabel, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_KeywordCtrl = new wxTextCtrl( m_PanelGeneral, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerFPID->Add( m_KeywordCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
bLeftSizer->Add( 0, 20, 0, wxTOP|wxBOTTOM, 10 );
m_PanelPropertiesBoxSizer->Add( fgSizerFPID, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticTextFp = new wxStaticText( m_PanelProperties, wxID_ANY, _("Footprint name in library:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextFp->Wrap( -1 );
bLeftSizer->Add( m_staticTextFp, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizerProperties;
bSizerProperties = new wxBoxSizer( wxHORIZONTAL );
m_FootprintNameCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
bLeftSizer->Add( m_FootprintNameCtrl, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
wxString m_AutoPlaceCtrlChoices[] = { _("Free"), _("Lock footprint") };
int m_AutoPlaceCtrlNChoices = sizeof( m_AutoPlaceCtrlChoices ) / sizeof( wxString );
m_AutoPlaceCtrl = new wxRadioBox( m_PanelGeneral, wxID_ANY, _("Move and Place"), wxDefaultPosition, wxDefaultSize, m_AutoPlaceCtrlNChoices, m_AutoPlaceCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AutoPlaceCtrl->SetSelection( 0 );
bSizerProperties->Add( m_AutoPlaceCtrl, 1, wxRIGHT|wxLEFT, 5 );
m_staticTextLibNickname = new wxStaticText( m_PanelProperties, wxID_ANY, _("Library nickname:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextLibNickname->Wrap( -1 );
bLeftSizer->Add( m_staticTextLibNickname, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
wxStaticBoxSizer* sbSizerAP;
sbSizerAP = new wxStaticBoxSizer( new wxStaticBox( m_PanelGeneral, wxID_ANY, _("Auto-placement Rules") ), wxVERTICAL );
m_LibraryNicknameCtrl = new wxTextCtrl( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
bLeftSizer->Add( m_LibraryNicknameCtrl, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
wxBoxSizer* bSizerRotOpt;
bSizerRotOpt = new wxBoxSizer( wxVERTICAL );
m_staticText11 = new wxStaticText( sbSizerAP->GetStaticBox(), wxID_ANY, _("Allow 90 degree rotated placement:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText11->Wrap( -1 );
m_staticText11->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
bSizerRotOpt->Add( m_staticText11, 0, 0, 5 );
m_CostRot90Ctrl = new wxSlider( sbSizerAP->GetStaticBox(), wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS );
bSizerRotOpt->Add( m_CostRot90Ctrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bLeftSizer->Add( 0, 0, 1, wxEXPAND|wxBOTTOM, 5 );
sbSizerAP->Add( bSizerRotOpt, 1, wxEXPAND|wxTOP, 5 );
wxBoxSizer* bSizerMoveOpt;
bSizerMoveOpt = new wxBoxSizer( wxVERTICAL );
m_staticText12 = new wxStaticText( sbSizerAP->GetStaticBox(), wxID_ANY, _("Allow 180 degree rotated placement:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText12->Wrap( -1 );
m_staticText12->SetFont( wxFont( 11, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
bSizerMoveOpt->Add( m_staticText12, 0, wxTOP, 5 );
m_CostRot180Ctrl = new wxSlider( sbSizerAP->GetStaticBox(), wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS );
bSizerMoveOpt->Add( m_CostRot180Ctrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_PanelPropertiesBoxSizer->Add( bLeftSizer, 1, wxEXPAND, 5 );
sbSizerAP->Add( bSizerMoveOpt, 1, wxEXPAND|wxTOP, 5 );
m_PropRightSizer = new wxBoxSizer( wxVERTICAL );
wxBoxSizer* bSizerAttrib;
bSizerAttrib = new wxBoxSizer( wxHORIZONTAL );
bSizerProperties->Add( sbSizerAP, 1, wxEXPAND, 10 );
wxString m_AttributsCtrlChoices[] = { _("Through hole"), _("Surface mount"), _("Virtual") };
int m_AttributsCtrlNChoices = sizeof( m_AttributsCtrlChoices ) / sizeof( wxString );
m_AttributsCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Placement Type:"), wxDefaultPosition, wxDefaultSize, m_AttributsCtrlNChoices, m_AttributsCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AttributsCtrl->SetSelection( 0 );
bSizerAttrib->Add( m_AttributsCtrl, 1, wxALL|wxEXPAND, 5 );
wxString m_AutoPlaceCtrlChoices[] = { _("Free"), _("Locked") };
int m_AutoPlaceCtrlNChoices = sizeof( m_AutoPlaceCtrlChoices ) / sizeof( wxString );
m_AutoPlaceCtrl = new wxRadioBox( m_PanelProperties, wxID_ANY, _("Move and Place:"), wxDefaultPosition, wxDefaultSize, m_AutoPlaceCtrlNChoices, m_AutoPlaceCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AutoPlaceCtrl->SetSelection( 0 );
bSizerAttrib->Add( m_AutoPlaceCtrl, 1, wxALL|wxEXPAND, 5 );
m_AttributsCtrl = new wxRadioBox( m_PanelGeneral, wxID_ANY, _("Fabrication Attributes"), wxDefaultPosition, wxDefaultSize, m_AttributsCtrlNChoices, m_AttributsCtrlChoices, 1, wxRA_SPECIFY_COLS );
m_AttributsCtrl->SetSelection( 1 );
bSizerProperties->Add( m_AttributsCtrl, 1, wxRIGHT|wxLEFT, 5 );
m_PropRightSizer->Add( bSizerAttrib, 0, wxEXPAND, 5 );
wxStaticBoxSizer* sbSizerAutoplace;
sbSizerAutoplace = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Auto Place:") ), wxHORIZONTAL );
wxBoxSizer* bSizerRot90;
bSizerRot90 = new wxBoxSizer( wxVERTICAL );
m_staticText11 = new wxStaticText( sbSizerAutoplace->GetStaticBox(), wxID_ANY, _("Allow 90 degree rotation:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText11->Wrap( -1 );
bSizerRot90->Add( m_staticText11, 0, wxRIGHT|wxLEFT, 5 );
m_CostRot90Ctrl = new wxSlider( sbSizerAutoplace->GetStaticBox(), wxID_ANY, 0, 0, 10, wxDefaultPosition, wxSize( -1,-1 ), wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS );
bSizerRot90->Add( m_CostRot90Ctrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_PanelPropertiesBoxSizer->Add( bSizerProperties, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
sbSizerAutoplace->Add( bSizerRot90, 1, 0, 5 );
wxBoxSizer* bSizerRot180;
bSizerRot180 = new wxBoxSizer( wxVERTICAL );
m_staticText12 = new wxStaticText( sbSizerAutoplace->GetStaticBox(), wxID_ANY, _("Allow 180 degree rotation:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText12->Wrap( -1 );
bSizerRot180->Add( m_staticText12, 0, wxRIGHT|wxLEFT, 5 );
m_CostRot180Ctrl = new wxSlider( sbSizerAutoplace->GetStaticBox(), wxID_ANY, 0, 0, 10, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS );
bSizerRot180->Add( m_CostRot180Ctrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
sbSizerAutoplace->Add( bSizerRot180, 1, 0, 5 );
m_PropRightSizer->Add( sbSizerAutoplace, 0, wxEXPAND|wxALL, 5 );
m_PanelGeneral->SetSizer( m_PanelPropertiesBoxSizer );
m_PanelGeneral->Layout();
m_PanelPropertiesBoxSizer->Fit( m_PanelGeneral );
m_NoteBook->AddPage( m_PanelGeneral, _("General"), true );
m_PanelClearances = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizerPanelClearances;
bSizerPanelClearances = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizerLocalProperties;
sbSizerLocalProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Local Settings:") ), wxVERTICAL );
sbSizerLocalProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelClearances, wxID_ANY, _("Clearances") ), wxVERTICAL );
wxGridBagSizer* gbSizer1;
gbSizer1 = new wxGridBagSizer( 3, 3 );
gbSizer1->SetFlexibleDirection( wxBOTH );
gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_staticText16 = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Pad connection to zones:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText16->Wrap( -1 );
gbSizer1->Add( m_staticText16, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
wxString m_ZoneConnectionChoiceChoices[] = { _("Use zone setting"), _("Solid"), _("Thermal relief"), _("None") };
int m_ZoneConnectionChoiceNChoices = sizeof( m_ZoneConnectionChoiceChoices ) / sizeof( wxString );
m_ZoneConnectionChoice = new wxChoice( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 );
m_ZoneConnectionChoice->SetSelection( 0 );
gbSizer1->Add( m_ZoneConnectionChoice, wxGBPosition( 0, 1 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_staticline11 = new wxStaticLine( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
gbSizer1->Add( m_staticline11, wxGBPosition( 1, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP, 3 );
wxBoxSizer* bSizer10;
bSizer10 = new wxBoxSizer( wxVERTICAL );
m_staticTextInfo = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Set clearances to 0 to use netclass values."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfo = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Set values to 0 to use netclass values."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfo->Wrap( -1 );
m_staticTextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
bSizer10->Add( m_staticTextInfo, 0, wxBOTTOM, 5 );
sbSizerLocalProperties->Add( m_staticTextInfo, 0, wxRIGHT, 10 );
m_staticTextInfoValPos = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Positive clearance means area bigger than the pad (usual for solder mask)."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfoValPos = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Positive clearance means area bigger than the pad (usual for mask clearance)."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfoValPos->Wrap( -1 );
m_staticTextInfoValPos->SetFont( wxFont( 10, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
m_staticTextInfoValPos->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
bSizer10->Add( m_staticTextInfoValPos, 0, 0, 5 );
sbSizerLocalProperties->Add( m_staticTextInfoValPos, 0, wxTOP|wxRIGHT, 10 );
m_staticTextInfoValNeg = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Negative clearance means area smaller than the pad (usual for solder paste)."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfoValNeg = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Negative clearance means area smaller than the pad (usual for paste clearance)."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfoValNeg->Wrap( -1 );
m_staticTextInfoValNeg->SetFont( wxFont( 10, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
m_staticTextInfoValNeg->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_ITALIC, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
bSizer10->Add( m_staticTextInfoValNeg, 0, wxBOTTOM, 5 );
sbSizerLocalProperties->Add( m_staticTextInfoValNeg, 0, wxBOTTOM|wxRIGHT, 10 );
wxFlexGridSizer* fgSizerClearances;
fgSizerClearances = new wxFlexGridSizer( 5, 3, 0, 0 );
fgSizerClearances->AddGrowableCol( 1 );
fgSizerClearances->SetFlexibleDirection( wxBOTH );
fgSizerClearances->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
gbSizer1->Add( bSizer10, wxGBPosition( 2, 0 ), wxGBSpan( 1, 3 ), wxEXPAND, 5 );
m_NetClearanceLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Pad clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_NetClearanceLabel->Wrap( -1 );
m_NetClearanceLabel->SetToolTip( _("This is the local net clearance for all pad of this footprint\nIf 0, the Netclass values are used\nThis value can be superseded by a pad local value.") );
m_staticTextNetClearance = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Pad clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextNetClearance->Wrap( -1 );
m_staticTextNetClearance->SetToolTip( _("This is the local net clearance for all pad of this footprint\nIf 0, the Netclass values are used\nThis value can be superseded by a pad local value.") );
fgSizerClearances->Add( m_NetClearanceLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
gbSizer1->Add( m_staticTextNetClearance, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
m_NetClearanceValueCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
gbSizer1->Add( m_NetClearanceValueCtrl, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_NetClearanceCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
fgSizerClearances->Add( m_NetClearanceCtrl, 1, wxEXPAND|wxALL, 5 );
m_NetClearanceUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_NetClearanceUnits->Wrap( -1 );
gbSizer1->Add( m_NetClearanceUnits, wxGBPosition( 3, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
fgSizerClearances->Add( m_NetClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
m_MaskClearanceTitle = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_MaskClearanceTitle->Wrap( -1 );
m_MaskClearanceTitle->SetToolTip( _("This is the local clearance between pads and the solder mask\nfor this footprint\nThis value can be superseded by a pad local value.\nIf 0, the global value is used") );
m_SolderMaskMarginLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder mask clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderMaskMarginLabel->Wrap( -1 );
m_SolderMaskMarginLabel->SetToolTip( _("This is the local clearance between pads and the solder mask\nfor this footprint\nThis value can be superseded by a pad local value.\nIf 0, the global value is used") );
gbSizer1->Add( m_MaskClearanceTitle, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
fgSizerClearances->Add( m_SolderMaskMarginLabel, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
m_SolderMaskMarginCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
m_SolderMaskMarginCtrl->SetMinSize( wxSize( 150,-1 ) );
gbSizer1->Add( m_SolderMaskMarginCtrl, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
fgSizerClearances->Add( m_SolderMaskMarginCtrl, 1, wxALL|wxEXPAND, 5 );
m_SolderMaskMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderMaskMarginUnits->Wrap( -1 );
gbSizer1->Add( m_SolderMaskMarginUnits, wxGBPosition( 4, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
fgSizerClearances->Add( m_SolderMaskMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
m_staticTextSolderPaste = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextSolderPaste->Wrap( -1 );
m_staticTextSolderPaste->SetToolTip( _("This is the local clearance between pads and the solder paste\nfor this footprint.\nThis value can be superseded by a pad local values.\nThe final clearance value is the sum of this value and the clearance value ratio\nA negative value means a smaller mask size than pad size") );
m_SolderPasteMarginLabel = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder paste clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteMarginLabel->Wrap( -1 );
m_SolderPasteMarginLabel->SetToolTip( _("This is the local clearance between pads and the solder paste\nfor this footprint.\nThis value can be superseded by a pad local values.\nThe final clearance value is the sum of this value and the clearance value ratio\nA negative value means a smaller mask size than pad size") );
gbSizer1->Add( m_staticTextSolderPaste, wxGBPosition( 5, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
fgSizerClearances->Add( m_SolderPasteMarginLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_SolderPasteMarginCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
gbSizer1->Add( m_SolderPasteMarginCtrl, wxGBPosition( 5, 1 ), wxGBSpan( 1, 1 ), wxEXPAND, 2 );
fgSizerClearances->Add( m_SolderPasteMarginCtrl, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_SolderPasteMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteMarginUnits->Wrap( -1 );
gbSizer1->Add( m_SolderPasteMarginUnits, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
fgSizerClearances->Add( m_SolderPasteMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_staticTextRatio = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Solder paste ratio clearance:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextRatio->Wrap( -1 );
m_staticTextRatio->SetToolTip( _("This is the local clearance ratio in per cent between pads and the solder paste\nfor this footprint.\nA value of 10 means the clearance value is 10 per cent of the pad size\nThis value can be superseded by a pad local value.\nThe final clearance value is the sum of this value and the clearance value\nA negative value means a smaller mask size than pad size.") );
gbSizer1->Add( m_staticTextRatio, wxGBPosition( 6, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
fgSizerClearances->Add( m_staticTextRatio, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
m_SolderPasteMarginRatioCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
gbSizer1->Add( m_SolderPasteMarginRatioCtrl, wxGBPosition( 6, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 2 );
fgSizerClearances->Add( m_SolderPasteMarginRatioCtrl, 1, wxALL|wxEXPAND, 5 );
m_SolderPasteRatioMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 );
m_SolderPasteRatioMarginUnits->Wrap( -1 );
gbSizer1->Add( m_SolderPasteRatioMarginUnits, wxGBPosition( 6, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
fgSizerClearances->Add( m_SolderPasteRatioMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
sbSizerLocalProperties->Add( fgSizerClearances, 1, wxEXPAND, 5 );
m_staticTextInfo2 = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Note: solder mask and paste values are used only for pads on copper layers."), wxDefaultPosition, wxDefaultSize, 0 );
m_staticTextInfo2->Wrap( -1 );
m_staticTextInfo2->SetFont( wxFont( 10, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
m_staticTextInfo2->SetFont( wxFont( 12, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL, false, wxEmptyString ) );
gbSizer1->Add( m_staticTextInfo2, wxGBPosition( 7, 0 ), wxGBSpan( 1, 3 ), wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
sbSizerLocalProperties->Add( m_staticTextInfo2, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 10 );
gbSizer1->AddGrowableCol( 1 );
bSizerPanelClearances->Add( sbSizerLocalProperties, 0, wxEXPAND|wxALL, 10 );
sbSizerLocalProperties->Add( gbSizer1, 0, wxEXPAND|wxLEFT, 5 );
wxStaticBoxSizer* sbSizer5;
sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( m_PanelClearances, wxID_ANY, _("Connection to Copper Zones") ), wxHORIZONTAL );
m_staticText16 = new wxStaticText( sbSizer5->GetStaticBox(), wxID_ANY, _("Pad connection to zones:"), wxDefaultPosition, wxDefaultSize, 0 );
m_staticText16->Wrap( -1 );
sbSizer5->Add( m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxString m_ZoneConnectionChoiceChoices[] = { _("Use zone setting"), _("Solid"), _("Thermal relief"), _("None") };
int m_ZoneConnectionChoiceNChoices = sizeof( m_ZoneConnectionChoiceChoices ) / sizeof( wxString );
m_ZoneConnectionChoice = new wxChoice( sbSizer5->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_ZoneConnectionChoiceNChoices, m_ZoneConnectionChoiceChoices, 0 );
m_ZoneConnectionChoice->SetSelection( 0 );
sbSizer5->Add( m_ZoneConnectionChoice, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_PropRightSizer->Add( sbSizerLocalProperties, 1, wxALL|wxEXPAND, 5 );
bSizerPanelClearances->Add( sbSizer5, 0, wxALL|wxEXPAND, 10 );
m_PanelPropertiesBoxSizer->Add( m_PropRightSizer, 0, 0, 5 );
m_PanelProperties->SetSizer( m_PanelPropertiesBoxSizer );
m_PanelProperties->Layout();
m_PanelPropertiesBoxSizer->Fit( m_PanelProperties );
m_NoteBook->AddPage( m_PanelProperties, _("Properties"), true );
m_PanelClearances->SetSizer( bSizerPanelClearances );
m_PanelClearances->Layout();
bSizerPanelClearances->Fit( m_PanelClearances );
m_NoteBook->AddPage( m_PanelClearances, _("Local Clearance and Settings"), false );
m_Panel3D = new wxPanel( m_NoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
wxBoxSizer* bSizerMain3D;
bSizerMain3D = new wxBoxSizer( wxVERTICAL );
wxStaticBoxSizer* sbSizer4;
sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( m_Panel3D, wxID_ANY, _("3D Shape Names:") ), wxVERTICAL );
wxStaticBoxSizer* sbSizer3;
sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_Panel3D, wxID_ANY, wxEmptyString ), wxVERTICAL );
wxBoxSizer* bSizer15;
bSizer15 = new wxBoxSizer( wxHORIZONTAL );
m_modelsGrid = new wxGrid( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
wxBoxSizer* bSizer16;
bSizer16 = new wxBoxSizer( wxVERTICAL );
// Grid
m_modelsGrid->CreateGrid( 3, 2 );
m_modelsGrid->EnableEditing( true );
m_modelsGrid->EnableGridLines( false );
m_modelsGrid->EnableDragGridSize( false );
m_modelsGrid->SetMargins( 0, 0 );
m_3D_ShapeNameListBox = new wxListBox( sbSizer4->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxSize( 200,110 ), 0, NULL, wxLB_SINGLE );
m_3D_ShapeNameListBox->SetMinSize( wxSize( -1,110 ) );
m_3D_ShapeNameListBox->SetMaxSize( wxSize( -1,200 ) );
// Columns
m_modelsGrid->SetColSize( 0, 662 );
m_modelsGrid->SetColSize( 1, 53 );
m_modelsGrid->EnableDragColMove( false );
m_modelsGrid->EnableDragColSize( false );
m_modelsGrid->SetColLabelSize( 22 );
m_modelsGrid->SetColLabelValue( 0, _("3D Model(s)") );
m_modelsGrid->SetColLabelValue( 1, _("Preview") );
m_modelsGrid->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
bSizer16->Add( m_3D_ShapeNameListBox, 1, wxEXPAND, 5 );
// Rows
m_modelsGrid->EnableDragRowSize( false );
m_modelsGrid->SetRowLabelSize( 0 );
m_modelsGrid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
// Label Appearance
bSizer15->Add( bSizer16, 1, wxEXPAND, 5 );
// Cell Defaults
m_modelsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
sbSizer3->Add( m_modelsGrid, 1, wxEXPAND|wxRIGHT, 5 );
wxBoxSizer* bSizer3DButtons;
bSizer3DButtons = new wxBoxSizer( wxVERTICAL );
bSizer3DButtons = new wxBoxSizer( wxHORIZONTAL );
m_buttonBrowse = new wxButton( sbSizer4->GetStaticBox(), ID_BROWSE_3D_LIB, _("Add 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_buttonBrowse, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_buttonAdd = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 29,29 ), wxBU_AUTODRAW );
bSizer3DButtons->Add( m_buttonAdd, 0, wxTOP, 5 );
m_buttonRemove = new wxButton( sbSizer4->GetStaticBox(), ID_REMOVE_3D_SHAPE, _("Remove 3D Shape"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_buttonRemove, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_buttonEdit = new wxButton( sbSizer4->GetStaticBox(), wxID_ANY, _("Edit Filename"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_buttonEdit, 0, wxALL|wxEXPAND, 5 );
m_button6 = new wxButton( sbSizer4->GetStaticBox(), wxID_ANY, _("Configure Paths"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_button6, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_buttonRemove = new wxBitmapButton( sbSizer3->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 29,29 ), wxBU_AUTODRAW );
bSizer3DButtons->Add( m_buttonRemove, 0, wxTOP, 5 );
bSizer15->Add( bSizer3DButtons, 0, wxALIGN_CENTER_VERTICAL, 5 );
bSizer3DButtons->Add( 0, 0, 1, wxEXPAND, 5 );
m_button8 = new wxButton( sbSizer3->GetStaticBox(), wxID_ANY, _("Configure Paths..."), wxDefaultPosition, wxDefaultSize, 0 );
bSizer3DButtons->Add( m_button8, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
sbSizer4->Add( bSizer15, 1, wxEXPAND, 5 );
sbSizer3->Add( bSizer3DButtons, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
bSizerMain3D->Add( sbSizer4, 0, wxALL|wxEXPAND, 5 );
bSizerMain3D->Add( sbSizer3, 5, wxEXPAND|wxRIGHT|wxLEFT, 5 );
bLowerSizer3D = new wxBoxSizer( wxHORIZONTAL );
bSizerMain3D->Add( bLowerSizer3D, 1, wxALL|wxEXPAND, 5 );
bSizerMain3D->Add( bLowerSizer3D, 10, wxEXPAND, 5 );
m_Panel3D->SetSizer( bSizerMain3D );
@ -327,7 +384,10 @@ DIALOG_FOOTPRINT_FP_EDITOR_BASE::DIALOG_FOOTPRINT_FP_EDITOR_BASE( wxWindow* pare
bSizerMain3D->Fit( m_Panel3D );
m_NoteBook->AddPage( m_Panel3D, _("3D Settings"), false );
m_GeneralBoxSizer->Add( m_NoteBook, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_GeneralBoxSizer->Add( m_NoteBook, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizer16;
bSizer16 = new wxBoxSizer( wxHORIZONTAL );
m_sdbSizerStdButtons = new wxStdDialogButtonSizer();
m_sdbSizerStdButtonsOK = new wxButton( this, wxID_OK );
@ -336,7 +396,10 @@ DIALOG_FOOTPRINT_FP_EDITOR_BASE::DIALOG_FOOTPRINT_FP_EDITOR_BASE( wxWindow* pare
m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsCancel );
m_sdbSizerStdButtons->Realize();
m_GeneralBoxSizer->Add( m_sdbSizerStdButtons, 0, wxALL|wxEXPAND, 5 );
bSizer16->Add( m_sdbSizerStdButtons, 1, wxEXPAND, 5 );
m_GeneralBoxSizer->Add( bSizer16, 0, wxEXPAND, 5 );
this->SetSizer( m_GeneralBoxSizer );
@ -345,27 +408,29 @@ DIALOG_FOOTPRINT_FP_EDITOR_BASE::DIALOG_FOOTPRINT_FP_EDITOR_BASE( wxWindow* pare
// Connect Events
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnInitDlg ) );
m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnEditReference ), NULL, this );
m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnEditValue ), NULL, this );
m_3D_ShapeNameListBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::On3DShapeNameSelected ), NULL, this );
m_3D_ShapeNameListBox->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Edit3DShapeFilename ), NULL, this );
m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Add3DShape ), NULL, this );
m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Remove3DShape ), NULL, this );
m_buttonEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Edit3DShapeFilename ), NULL, this );
m_button6->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Cfg3DPath ), NULL, this );
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnUpdateUI ) );
m_itemsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnGridSize ), NULL, this );
m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAddField ), NULL, this );
m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnDeleteField ), NULL, this );
m_modelsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::On3DModelCellChanged ), NULL, this );
m_modelsGrid->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::On3DModelSelected ), NULL, this );
m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAdd3DModel ), NULL, this );
m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnRemove3DModel ), NULL, this );
m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Cfg3DPath ), NULL, this );
}
DIALOG_FOOTPRINT_FP_EDITOR_BASE::~DIALOG_FOOTPRINT_FP_EDITOR_BASE()
{
// Disconnect Events
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnInitDlg ) );
m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnEditReference ), NULL, this );
m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnEditValue ), NULL, this );
m_3D_ShapeNameListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::On3DShapeNameSelected ), NULL, this );
m_3D_ShapeNameListBox->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Edit3DShapeFilename ), NULL, this );
m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Add3DShape ), NULL, this );
m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Remove3DShape ), NULL, this );
m_buttonEdit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Edit3DShapeFilename ), NULL, this );
m_button6->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Cfg3DPath ), NULL, this );
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnUpdateUI ) );
m_itemsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnGridSize ), NULL, this );
m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAddField ), NULL, this );
m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnDeleteField ), NULL, this );
m_modelsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::On3DModelCellChanged ), NULL, this );
m_modelsGrid->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::On3DModelSelected ), NULL, this );
m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAdd3DModel ), NULL, this );
m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnRemove3DModel ), NULL, this );
m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Cfg3DPath ), NULL, this );
}

Some files were not shown because too many files have changed in this diff Show More