From 4c29ab6c09d027ff55714d2b4f5db3884fef13cf Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 12 Jan 2018 19:36:15 +0000 Subject: [PATCH] Simplify Exchange Footprints dialog and add Update mode. This commit also adds a no-selection-mode, which allows the user to specify what gets update (through the various match modes). The no-selection-mode is accessed via the Edit menu, although it could also be applied to the context menu. Fixes: lp:1466857 * https://bugs.launchpad.net/kicad/+bug/1466857 --- .../dialog_edit_module_for_BoardEditor.cpp | 6 + .../dialog_edit_module_for_BoardEditor.h | 2 + ...ialog_edit_module_for_BoardEditor_base.cpp | 809 +- ...ialog_edit_module_for_BoardEditor_base.fbp | 10013 ++++++++-------- .../dialog_edit_module_for_BoardEditor_base.h | 279 +- pcbnew/dialogs/dialog_exchange_modules.cpp | 371 +- pcbnew/dialogs/dialog_exchange_modules.h | 27 +- .../dialogs/dialog_exchange_modules_base.cpp | 251 +- .../dialogs/dialog_exchange_modules_base.fbp | 2487 ++-- pcbnew/dialogs/dialog_exchange_modules_base.h | 69 +- pcbnew/edit.cpp | 24 +- pcbnew/editmod.cpp | 9 +- pcbnew/menubar_pcbframe.cpp | 10 + pcbnew/onrightclick.cpp | 3 + pcbnew/pcbframe.cpp | 6 +- pcbnew/pcbnew_id.h | 3 + pcbnew/tools/edit_tool.cpp | 29 +- pcbnew/tools/edit_tool.h | 4 +- pcbnew/tools/pcb_actions.h | 3 + pcbnew/wxPcbStruct.h | 2 +- 20 files changed, 7785 insertions(+), 6622 deletions(-) diff --git a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp index 73f69956aa..787cd87e45 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp +++ b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp @@ -242,6 +242,12 @@ void DIALOG_MODULE_BOARD_EDITOR::GotoModuleEditor( wxCommandEvent& event ) } +void DIALOG_MODULE_BOARD_EDITOR::UpdateModule( wxCommandEvent& event ) +{ + EndModal( PRM_EDITOR_WANT_UPDATE_FP ); +} + + void DIALOG_MODULE_BOARD_EDITOR::ExchangeModule( wxCommandEvent& event ) { EndModal( PRM_EDITOR_WANT_EXCHANGE_FP ); diff --git a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.h b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.h index b35d85727d..fe6ed58ea3 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.h +++ b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.h @@ -55,6 +55,7 @@ public: enum FP_PRM_EDITOR_RETVALUE { PRM_EDITOR_ABORT, + PRM_EDITOR_WANT_UPDATE_FP, PRM_EDITOR_WANT_EXCHANGE_FP, PRM_EDITOR_EDIT_OK, PRM_EDITOR_WANT_MODEDIT @@ -86,6 +87,7 @@ private: 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; diff --git a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.cpp b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.cpp index 6cb93a4380..17b5c22953 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.cpp +++ b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.cpp @@ -1,399 +1,410 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jan 12 2018) -// http://www.wxformbuilder.org/ -// -// PLEASE DO *NOT* EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include "widgets/text_ctrl_eval.h" - -#include "dialog_edit_module_for_BoardEditor_base.h" - -/////////////////////////////////////////////////////////////////////////// - -DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - 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 ); - wxBoxSizer* m_PanelPropertiesBoxSizer; - m_PanelPropertiesBoxSizer = 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 ); - - 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, wxTOP|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 ); - - m_staticTextPos = new wxStaticText( m_PanelProperties, wxID_ANY, _("Position:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextPos->Wrap( -1 ); - bSizerLeft->Add( m_staticTextPos, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - wxFlexGridSizer* fgSizerPos; - fgSizerPos = new wxFlexGridSizer( 2, 3, 5, 0 ); - fgSizerPos->AddGrowableCol( 1 ); - fgSizerPos->SetFlexibleDirection( wxHORIZONTAL ); - fgSizerPos->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - m_XPosLabel = new wxStaticText( m_PanelProperties, wxID_ANY, _("X"), wxDefaultPosition, wxDefaultSize, 0 ); - m_XPosLabel->Wrap( -1 ); - fgSizerPos->Add( m_XPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_ModPositionX = new TEXT_CTRL_EVAL( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerPos->Add( m_ModPositionX, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); - - m_XPosUnit = new wxStaticText( m_PanelProperties, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); - m_XPosUnit->Wrap( -1 ); - fgSizerPos->Add( m_XPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - m_YPosLabel = new wxStaticText( m_PanelProperties, wxID_ANY, _("Y"), wxDefaultPosition, wxDefaultSize, 0 ); - m_YPosLabel->Wrap( -1 ); - fgSizerPos->Add( m_YPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); - - m_ModPositionY = new TEXT_CTRL_EVAL( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerPos->Add( m_ModPositionY, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); - - m_YPosUnit = new wxStaticText( m_PanelProperties, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); - m_YPosUnit->Wrap( -1 ); - fgSizerPos->Add( m_YPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - - bSizerLeft->Add( fgSizerPos, 0, wxEXPAND|wxBOTTOM, 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 ); - - 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.") ); - - bSizerLeft->Add( m_textCtrlSheetPath, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - - m_PanelPropertiesBoxSizer->Add( bSizerLeft, 1, wxEXPAND, 5 ); - - m_PropRightSizer = new wxBoxSizer( wxVERTICAL ); - - m_buttonExchange = new wxButton( m_PanelProperties, ID_MODULE_PROPERTIES_EXCHANGE, _("Change Footprint(s)"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PropRightSizer->Add( m_buttonExchange, 0, wxALL|wxEXPAND, 5 ); - - m_buttonModuleEditor = new wxButton( m_PanelProperties, ID_GOTO_MODULE_EDITOR, _("Footprint Editor"), wxDefaultPosition, wxDefaultSize, 0 ); - m_PropRightSizer->Add( m_buttonModuleEditor, 0, wxALL|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 ); - - 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->SetSelection( 0 ); - bSizerAttrib->Add( m_AutoPlaceCtrl, 1, wxALL|wxEXPAND, 5 ); - - - m_PropRightSizer->Add( bSizerAttrib, 0, wxEXPAND, 5 ); - - wxStaticBoxSizer* sbSizerAP; - sbSizerAP = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Auto Place") ), wxHORIZONTAL ); - - wxBoxSizer* bSizerRotOpt; - bSizerRotOpt = new wxBoxSizer( wxVERTICAL ); - - m_staticText11 = new wxStaticText( sbSizerAP->GetStaticBox(), wxID_ANY, _("Rotate 90 degrees"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText11->Wrap( -1 ); - bSizerRotOpt->Add( m_staticText11, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 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 ); - - - sbSizerAP->Add( bSizerRotOpt, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizerMoveOpt; - bSizerMoveOpt = new wxBoxSizer( wxVERTICAL ); - - m_staticText12 = new wxStaticText( sbSizerAP->GetStaticBox(), wxID_ANY, _("Rotate 180 degrees"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText12->Wrap( -1 ); - bSizerMoveOpt->Add( m_staticText12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 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, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); - - - sbSizerAP->Add( bSizerMoveOpt, 1, wxEXPAND, 5 ); - - - m_PropRightSizer->Add( sbSizerAP, 0, wxEXPAND|wxALL, 5 ); - - wxStaticBoxSizer* sbSizerLocalProperties; - sbSizerLocalProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Local Settings") ), wxVERTICAL ); - - wxBoxSizer* bSizer11; - bSizer11 = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bSizer10; - bSizer10 = new wxBoxSizer( wxHORIZONTAL ); - - m_staticText16 = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Pad connection to zones:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText16->Wrap( -1 ); - bSizer10->Add( m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 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 ); - bSizer10->Add( m_ZoneConnectionChoice, 1, wxALL|wxEXPAND, 5 ); - - - bSizer11->Add( bSizer10, 1, wxEXPAND, 5 ); - - m_staticTextInfo = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Set clearances to 0 to use global values"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextInfo->Wrap( -1 ); - m_staticTextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); - - bSizer11->Add( m_staticTextInfo, 0, wxALL, 5 ); - - - sbSizerLocalProperties->Add( bSizer11, 0, wxEXPAND, 5 ); - - wxFlexGridSizer* fgSizerClearances; - fgSizerClearances = new wxFlexGridSizer( 5, 3, 0, 0 ); - fgSizerClearances->AddGrowableCol( 1 ); - fgSizerClearances->SetFlexibleDirection( wxBOTH ); - fgSizerClearances->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); - - 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_staticTextNetClearance, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); - - m_NetClearanceValueCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerClearances->Add( m_NetClearanceValueCtrl, 1, wxALL|wxEXPAND, 5 ); - - m_NetClearanceUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); - m_NetClearanceUnits->Wrap( -1 ); - fgSizerClearances->Add( m_NetClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - m_staticline1 = new wxStaticLine( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - fgSizerClearances->Add( m_staticline1, 1, wxEXPAND, 5 ); - - m_staticline2 = new wxStaticLine( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - fgSizerClearances->Add( m_staticline2, 1, wxEXPAND, 5 ); - - m_staticline3 = new wxStaticLine( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - fgSizerClearances->Add( m_staticline3, 1, wxEXPAND, 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") ); - - fgSizerClearances->Add( m_MaskClearanceTitle, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_SolderMaskMarginCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerClearances->Add( m_SolderMaskMarginCtrl, 1, wxALL|wxEXPAND, 5 ); - - m_SolderMaskMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); - m_SolderMaskMarginUnits->Wrap( -1 ); - 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") ); - - fgSizerClearances->Add( m_staticTextSolderPaste, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - - m_SolderPasteMarginCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - 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 ); - 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.") ); - - fgSizerClearances->Add( m_staticTextRatio, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); - - m_SolderPasteMarginRatioCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerClearances->Add( m_SolderPasteMarginRatioCtrl, 1, wxALL|wxEXPAND, 5 ); - - m_SolderPasteRatioMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); - m_SolderPasteRatioMarginUnits->Wrap( -1 ); - fgSizerClearances->Add( m_SolderPasteRatioMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); - - - sbSizerLocalProperties->Add( fgSizerClearances, 1, wxEXPAND, 5 ); - - - m_PropRightSizer->Add( sbSizerLocalProperties, 0, wxALL|wxEXPAND, 5 ); - - - 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_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 ); - - wxBoxSizer* bSizer18; - bSizer18 = new wxBoxSizer( wxVERTICAL ); - - 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 ) ); - - bSizer18->Add( m_3D_ShapeNameListBox, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - - sbSizer3->Add( bSizer18, 1, wxEXPAND, 5 ); - - wxBoxSizer* bSizer19; - bSizer19 = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bSizer3DButtons; - bSizer3DButtons = new wxBoxSizer( wxVERTICAL ); - - 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_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 ); - - - bSizer19->Add( bSizer3DButtons, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - - sbSizer3->Add( bSizer19, 0, wxEXPAND, 5 ); - - - bSizerMain3D->Add( sbSizer3, 0, wxEXPAND, 5 ); - - bLowerSizer3D = new wxBoxSizer( wxHORIZONTAL ); - - - bSizerMain3D->Add( bLowerSizer3D, 1, wxEXPAND, 5 ); - - - m_Panel3D->SetSizer( bSizerMain3D ); - m_Panel3D->Layout(); - bSizerMain3D->Fit( m_Panel3D ); - m_NoteBook->AddPage( m_Panel3D, _("3D Settings"), false ); - - m_GeneralBoxSizer->Add( m_NoteBook, 1, wxEXPAND | wxALL, 5 ); - - m_sdbSizerStdButtons = new wxStdDialogButtonSizer(); - m_sdbSizerStdButtonsOK = new wxButton( this, wxID_OK ); - m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsOK ); - m_sdbSizerStdButtonsCancel = new wxButton( this, wxID_CANCEL ); - m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsCancel ); - m_sdbSizerStdButtons->Realize(); - - m_GeneralBoxSizer->Add( m_sdbSizerStdButtons, 0, wxALL|wxEXPAND, 5 ); - - - this->SetSizer( m_GeneralBoxSizer ); - this->Layout(); - m_GeneralBoxSizer->Fit( this ); - - // Connect Events - this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnInitDlg ) ); - m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditReference ), NULL, this ); - m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditValue ), NULL, this ); - m_OrientCtrl->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this ); - m_buttonExchange->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this ); - m_buttonModuleEditor->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this ); - m_3D_ShapeNameListBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this ); - m_3D_ShapeNameListBox->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Edit3DShapeFilename ), NULL, this ); - m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Add3DShape ), NULL, this ); - m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this ); - m_buttonEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Edit3DShapeFilename ), NULL, this ); - m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Cfg3DPath ), NULL, this ); -} - -DIALOG_MODULE_BOARD_EDITOR_BASE::~DIALOG_MODULE_BOARD_EDITOR_BASE() -{ - // Disconnect Events - this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnInitDlg ) ); - m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditReference ), NULL, this ); - m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditValue ), NULL, this ); - m_OrientCtrl->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this ); - m_buttonExchange->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this ); - m_buttonModuleEditor->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this ); - m_3D_ShapeNameListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this ); - m_3D_ShapeNameListBox->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Edit3DShapeFilename ), NULL, this ); - m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Add3DShape ), NULL, this ); - m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this ); - m_buttonEdit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Edit3DShapeFilename ), NULL, this ); - m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Cfg3DPath ), NULL, this ); - -} +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Dec 30 2017) +// http://www.wxformbuilder.org/ +// +// PLEASE DO *NOT* EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "widgets/text_ctrl_eval.h" + +#include "dialog_edit_module_for_BoardEditor_base.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_MODULE_BOARD_EDITOR_BASE::DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + 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 ); + wxBoxSizer* m_PanelPropertiesBoxSizer; + m_PanelPropertiesBoxSizer = 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 ); + + 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, wxTOP|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 ); + + m_staticTextPos = new wxStaticText( m_PanelProperties, wxID_ANY, _("Position:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextPos->Wrap( -1 ); + bSizerLeft->Add( m_staticTextPos, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + wxFlexGridSizer* fgSizerPos; + fgSizerPos = new wxFlexGridSizer( 2, 3, 5, 0 ); + fgSizerPos->AddGrowableCol( 1 ); + fgSizerPos->SetFlexibleDirection( wxHORIZONTAL ); + fgSizerPos->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + m_XPosLabel = new wxStaticText( m_PanelProperties, wxID_ANY, _("X"), wxDefaultPosition, wxDefaultSize, 0 ); + m_XPosLabel->Wrap( -1 ); + fgSizerPos->Add( m_XPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + m_ModPositionX = new TEXT_CTRL_EVAL( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerPos->Add( m_ModPositionX, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); + + m_XPosUnit = new wxStaticText( m_PanelProperties, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_XPosUnit->Wrap( -1 ); + fgSizerPos->Add( m_XPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_YPosLabel = new wxStaticText( m_PanelProperties, wxID_ANY, _("Y"), wxDefaultPosition, wxDefaultSize, 0 ); + m_YPosLabel->Wrap( -1 ); + fgSizerPos->Add( m_YPosLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 ); + + m_ModPositionY = new TEXT_CTRL_EVAL( m_PanelProperties, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerPos->Add( m_ModPositionY, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT, 5 ); + + m_YPosUnit = new wxStaticText( m_PanelProperties, wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_YPosUnit->Wrap( -1 ); + fgSizerPos->Add( m_YPosUnit, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + + bSizerLeft->Add( fgSizerPos, 0, wxEXPAND|wxBOTTOM, 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 ); + + 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.") ); + + bSizerLeft->Add( m_textCtrlSheetPath, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + + m_PanelPropertiesBoxSizer->Add( bSizerLeft, 1, wxEXPAND, 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 ); + + + m_PropRightSizer->Add( bSizer17, 1, wxALL|wxEXPAND, 0 ); + + 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 ); + + 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->SetSelection( 0 ); + bSizerAttrib->Add( m_AutoPlaceCtrl, 1, wxALL|wxEXPAND, 5 ); + + + m_PropRightSizer->Add( bSizerAttrib, 0, wxEXPAND, 5 ); + + wxStaticBoxSizer* sbSizerAP; + sbSizerAP = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Auto Place") ), wxHORIZONTAL ); + + wxBoxSizer* bSizerRotOpt; + bSizerRotOpt = new wxBoxSizer( wxVERTICAL ); + + m_staticText11 = new wxStaticText( sbSizerAP->GetStaticBox(), wxID_ANY, _("Rotate 90 degrees"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText11->Wrap( -1 ); + bSizerRotOpt->Add( m_staticText11, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 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 ); + + + sbSizerAP->Add( bSizerRotOpt, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizerMoveOpt; + bSizerMoveOpt = new wxBoxSizer( wxVERTICAL ); + + m_staticText12 = new wxStaticText( sbSizerAP->GetStaticBox(), wxID_ANY, _("Rotate 180 degrees"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText12->Wrap( -1 ); + bSizerMoveOpt->Add( m_staticText12, 0, wxALIGN_CENTER_HORIZONTAL|wxALL, 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, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + + + sbSizerAP->Add( bSizerMoveOpt, 1, wxEXPAND, 5 ); + + + m_PropRightSizer->Add( sbSizerAP, 0, wxEXPAND|wxALL, 0 ); + + wxStaticBoxSizer* sbSizerLocalProperties; + sbSizerLocalProperties = new wxStaticBoxSizer( new wxStaticBox( m_PanelProperties, wxID_ANY, _("Local Settings") ), wxVERTICAL ); + + wxBoxSizer* bSizer11; + bSizer11 = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer10; + bSizer10 = new wxBoxSizer( wxHORIZONTAL ); + + m_staticText16 = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Pad connection to zones:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText16->Wrap( -1 ); + bSizer10->Add( m_staticText16, 0, wxALIGN_CENTER_VERTICAL|wxALL, 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 ); + bSizer10->Add( m_ZoneConnectionChoice, 1, wxALL|wxEXPAND, 5 ); + + + bSizer11->Add( bSizer10, 1, wxEXPAND, 5 ); + + m_staticTextInfo = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("Set clearances to 0 to use global values"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextInfo->Wrap( -1 ); + m_staticTextInfo->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) ); + + bSizer11->Add( m_staticTextInfo, 0, wxALL, 5 ); + + + sbSizerLocalProperties->Add( bSizer11, 0, wxEXPAND, 5 ); + + wxFlexGridSizer* fgSizerClearances; + fgSizerClearances = new wxFlexGridSizer( 5, 3, 0, 0 ); + fgSizerClearances->AddGrowableCol( 1 ); + fgSizerClearances->SetFlexibleDirection( wxBOTH ); + fgSizerClearances->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + + 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_staticTextNetClearance, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_NetClearanceValueCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerClearances->Add( m_NetClearanceValueCtrl, 1, wxALL|wxEXPAND, 5 ); + + m_NetClearanceUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_NetClearanceUnits->Wrap( -1 ); + fgSizerClearances->Add( m_NetClearanceUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + m_staticline1 = new wxStaticLine( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + fgSizerClearances->Add( m_staticline1, 1, wxEXPAND, 5 ); + + m_staticline2 = new wxStaticLine( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + fgSizerClearances->Add( m_staticline2, 1, wxEXPAND, 5 ); + + m_staticline3 = new wxStaticLine( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + fgSizerClearances->Add( m_staticline3, 1, wxEXPAND, 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") ); + + fgSizerClearances->Add( m_MaskClearanceTitle, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_SolderMaskMarginCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerClearances->Add( m_SolderMaskMarginCtrl, 1, wxALL|wxEXPAND, 5 ); + + m_SolderMaskMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("unit"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SolderMaskMarginUnits->Wrap( -1 ); + 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") ); + + fgSizerClearances->Add( m_staticTextSolderPaste, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); + + m_SolderPasteMarginCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + 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 ); + 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.") ); + + fgSizerClearances->Add( m_staticTextRatio, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + + m_SolderPasteMarginRatioCtrl = new TEXT_CTRL_EVAL( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + fgSizerClearances->Add( m_SolderPasteMarginRatioCtrl, 1, wxALL|wxEXPAND, 5 ); + + m_SolderPasteRatioMarginUnits = new wxStaticText( sbSizerLocalProperties->GetStaticBox(), wxID_ANY, _("%"), wxDefaultPosition, wxDefaultSize, 0 ); + m_SolderPasteRatioMarginUnits->Wrap( -1 ); + fgSizerClearances->Add( m_SolderPasteRatioMarginUnits, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 ); + + + sbSizerLocalProperties->Add( fgSizerClearances, 1, wxEXPAND, 5 ); + + + m_PropRightSizer->Add( sbSizerLocalProperties, 0, wxALL|wxEXPAND, 5 ); + + + 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_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 ); + + wxBoxSizer* bSizer18; + bSizer18 = new wxBoxSizer( wxVERTICAL ); + + 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 ) ); + + bSizer18->Add( m_3D_ShapeNameListBox, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + + sbSizer3->Add( bSizer18, 1, wxEXPAND, 5 ); + + wxBoxSizer* bSizer19; + bSizer19 = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bSizer3DButtons; + bSizer3DButtons = new wxBoxSizer( wxVERTICAL ); + + 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_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 ); + + + bSizer19->Add( bSizer3DButtons, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + + sbSizer3->Add( bSizer19, 0, wxEXPAND, 5 ); + + + bSizerMain3D->Add( sbSizer3, 0, wxEXPAND, 5 ); + + bLowerSizer3D = new wxBoxSizer( wxHORIZONTAL ); + + + bSizerMain3D->Add( bLowerSizer3D, 1, wxEXPAND, 5 ); + + + m_Panel3D->SetSizer( bSizerMain3D ); + m_Panel3D->Layout(); + bSizerMain3D->Fit( m_Panel3D ); + m_NoteBook->AddPage( m_Panel3D, _("3D Settings"), false ); + + m_GeneralBoxSizer->Add( m_NoteBook, 1, wxEXPAND | wxALL, 5 ); + + m_sdbSizerStdButtons = new wxStdDialogButtonSizer(); + m_sdbSizerStdButtonsOK = new wxButton( this, wxID_OK ); + m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsOK ); + m_sdbSizerStdButtonsCancel = new wxButton( this, wxID_CANCEL ); + m_sdbSizerStdButtons->AddButton( m_sdbSizerStdButtonsCancel ); + m_sdbSizerStdButtons->Realize(); + + m_GeneralBoxSizer->Add( m_sdbSizerStdButtons, 0, wxALL|wxEXPAND, 5 ); + + + this->SetSizer( m_GeneralBoxSizer ); + this->Layout(); + m_GeneralBoxSizer->Fit( this ); + + // Connect Events + this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnInitDlg ) ); + m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditReference ), NULL, this ); + m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditValue ), NULL, this ); + m_OrientCtrl->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this ); + m_buttonUpdate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::UpdateModule ), NULL, this ); + m_buttonExchange->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this ); + m_buttonModuleEditor->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this ); + m_3D_ShapeNameListBox->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this ); + m_3D_ShapeNameListBox->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Edit3DShapeFilename ), NULL, this ); + m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Add3DShape ), NULL, this ); + m_buttonRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this ); + m_buttonEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Edit3DShapeFilename ), NULL, this ); + m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Cfg3DPath ), NULL, this ); +} + +DIALOG_MODULE_BOARD_EDITOR_BASE::~DIALOG_MODULE_BOARD_EDITOR_BASE() +{ + // Disconnect Events + this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnInitDlg ) ); + m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditReference ), NULL, this ); + m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::OnEditValue ), NULL, this ); + m_OrientCtrl->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ModuleOrientEvent ), NULL, this ); + m_buttonUpdate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::UpdateModule ), NULL, this ); + m_buttonExchange->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::ExchangeModule ), NULL, this ); + m_buttonModuleEditor->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::GotoModuleEditor ), NULL, this ); + m_3D_ShapeNameListBox->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::On3DShapeNameSelected ), NULL, this ); + m_3D_ShapeNameListBox->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Edit3DShapeFilename ), NULL, this ); + m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Add3DShape ), NULL, this ); + m_buttonRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Remove3DShape ), NULL, this ); + m_buttonEdit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Edit3DShapeFilename ), NULL, this ); + m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_MODULE_BOARD_EDITOR_BASE::Cfg3DPath ), NULL, this ); + +} diff --git a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.fbp b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.fbp index 12b381b863..a0e1778bc3 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.fbp +++ b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.fbp @@ -1,4957 +1,5056 @@ - - - - - - C++ - 1 - source_name - 0 - 0 - res - UTF-8 - connect - dialog_edit_module_for_BoardEditor_base - 1000 - none - 1 - dialog_edit_module_for_BoardEditor_base - - . - - 1 - 1 - 1 - 1 - UI - 0 - 0 - - 0 - wxAUI_MGR_DEFAULT - - - - 1 - 1 - impl_virtual - - - - 0 - wxID_ANY - - - DIALOG_MODULE_BOARD_EDITOR_BASE - - -1,-1 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - DIALOG_SHIM; dialog_shim.h - Footprint Properties - - - - - - - - - - - - - - - - - - - - OnInitDlg - - - - - - - - - - - - - - - - - - - - - - - m_GeneralBoxSizer - wxVERTICAL - private - - 5 - wxEXPAND | wxALL - 1 - - 1 - 1 - 1 - 1 - - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_NOTEBOOK - - 0 - - - 0 - - 1 - m_NoteBook - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Properties - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_PanelProperties - 1 - - - protected - 1 - - Resizable - 1 - - - 0 - - - - wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - m_PanelPropertiesBoxSizer - wxHORIZONTAL - none - - 5 - wxEXPAND - 1 - - - bSizerLeft - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Reference: - - 0 - - - 0 - - 1 - m_staticTextRef - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - - bSizerRef - wxHORIZONTAL - none - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_ReferenceCtrl - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_READONLY - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Edit - - 0 - - - 0 - - 1 - m_button4 - 1 - - - protected - 1 - - Resizable - 1 - - wxBU_EXACTFIT - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnEditReference - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Value: - - 0 - - - 0 - - 1 - m_staticTextVal - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - - bSizerVal - wxHORIZONTAL - none - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_ValueCtrl - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_READONLY - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Edit - - 0 - - - 0 - - 1 - m_button5 - 1 - - - protected - 1 - - Resizable - 1 - - wxBU_EXACTFIT - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnEditValue - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Front" "Back" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Board Side - 1 - - 0 - - - 0 - - 1 - m_LayerCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "0.0" "+90.0" "-90.0" "180.0" "Other" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_LISTBOX_ORIENT_SELECT - Rotation - 1 - - 0 - - - 0 - - 1 - m_OrientCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - ModuleOrientEvent - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Rotation (-360 to 360): - - 0 - - - 0 - - 1 - m_staticTextRotation - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_OrientValueCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Position: - - 0 - - - 0 - - 1 - m_staticTextPos - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM - 0 - - 3 - wxHORIZONTAL - 1 - - 0 - - fgSizerPos - wxFLEX_GROWMODE_SPECIFIED - none - 2 - 5 - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - X - - 0 - - - 0 - - 1 - m_XPosLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_ModPositionX - 1 - - - protected - 1 - - Resizable - 1 - - - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - unit - - 0 - - - 0 - - 1 - m_XPosUnit - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Y - - 0 - - - 0 - - 1 - m_YPosLabel - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_ModPositionY - 1 - - - protected - 1 - - Resizable - 1 - - - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - unit - - 0 - - - 0 - - 1 - m_YPosUnit - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Sheet path: - - 0 - - - 0 - - 1 - m_TextSheetPath - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_textCtrlSheetPath - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_READONLY - - 0 - An unique ID (a time stamp) to identify the component. This is an alternate identifier to the reference. - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - - 0 - - - m_PropRightSizer - wxVERTICAL - private - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_MODULE_PROPERTIES_EXCHANGE - Change Footprint(s) - - 0 - - - 0 - - 1 - m_buttonExchange - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - ExchangeModule - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_GOTO_MODULE_EDITOR - Footprint Editor - - 0 - - - 0 - - 1 - m_buttonModuleEditor - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - GotoModuleEditor - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - - bSizerAttrib - wxHORIZONTAL - none - - 5 - wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Through hole" "Surface mount" "Virtual" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Placement Type - 1 - - 0 - - - 0 - - 1 - m_AttributsCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Free" "Lock pads" "Lock footprint" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Move and Place - 1 - - 0 - - - 0 - - 1 - m_AutoPlaceCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALL - 0 - - wxID_ANY - Auto Place - - sbSizerAP - wxHORIZONTAL - 1 - none - - - 5 - wxEXPAND - 1 - - - bSizerRotOpt - wxVERTICAL - none - - 5 - wxALIGN_CENTER_HORIZONTAL|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Rotate 90 degrees - - 0 - - - 0 - - 1 - m_staticText11 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - 10 - - 0 - - 0 - - 0 - - 1 - m_CostRot90Ctrl - 1 - - - protected - 1 - - Resizable - 1 - - wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bSizerMoveOpt - wxVERTICAL - none - - 5 - wxALIGN_CENTER_HORIZONTAL|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Rotate 180 degrees - - 0 - - - 0 - - 1 - m_staticText12 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - 10 - - 0 - - 0 - - 0 - - 1 - m_CostRot180Ctrl - 1 - - - protected - 1 - - Resizable - 1 - - wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - wxID_ANY - Local Settings - - sbSizerLocalProperties - wxVERTICAL - 1 - none - - - 5 - wxEXPAND - 0 - - - bSizer11 - wxVERTICAL - none - - 5 - wxEXPAND - 1 - - - bSizer10 - wxHORIZONTAL - none - - 5 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Pad connection to zones: - - 0 - - - 0 - - 1 - m_staticText16 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Use zone setting" "Solid" "Thermal relief" "None" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_ZoneConnectionChoice - 1 - - - protected - 1 - - Resizable - 0 - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - ,90,92,-1,70,0 - 0 - 0 - wxID_ANY - Set clearances to 0 to use global values - - 0 - - - 0 - - 1 - m_staticTextInfo - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - 3 - wxBOTH - 1 - - 0 - - fgSizerClearances - wxFLEX_GROWMODE_SPECIFIED - none - 5 - 0 - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Pad clearance: - - 0 - - - 0 - - 1 - m_staticTextNetClearance - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - This is the local net clearance for all pad of this footprint If 0, the Netclass values are used This value can be superseded by a pad local value. - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_NetClearanceValueCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - unit - - 0 - - - 0 - - 1 - m_NetClearanceUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline1 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline2 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline3 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Solder mask clearance: - - 0 - - - 0 - - 1 - m_MaskClearanceTitle - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - This is the local clearance between pads and the solder mask for this footprint This value can be superseded by a pad local value. If 0, the global value is used - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_SolderMaskMarginCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - unit - - 0 - - - 0 - - 1 - m_SolderMaskMarginUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Solder paste clearance: - - 0 - - - 0 - - 1 - m_staticTextSolderPaste - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - This is the local clearance between pads and the solder paste for this footprint. This value can be superseded by a pad local values. The final clearance value is the sum of this value and the clearance value ratio A negative value means a smaller mask size than pad size - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxLEFT|wxRIGHT - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_SolderPasteMarginCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - unit - - 0 - - - 0 - - 1 - m_SolderPasteMarginUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Solder paste ratio clearance: - - 0 - - - 0 - - 1 - m_staticTextRatio - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - This is the local clearance ratio in per cent between pads and the solder paste for this footprint. A value of 10 means the clearance value is 10 per cent of the pad size This value can be superseded by a pad local value. The final clearance value is the sum of this value and the clearance value A negative value means a smaller mask size than pad size. - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_SolderPasteMarginRatioCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - % - - 0 - - - 0 - - 1 - m_SolderPasteRatioMarginUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 3D Settings - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_Panel3D - 1 - - - protected - 1 - - Resizable - 1 - - - 0 - - - - wxTAB_TRAVERSAL - - - - - - - - - - - - - - - - - - - - - - - - - - bSizerMain3D - wxVERTICAL - protected - - 5 - wxEXPAND - 0 - - wxID_ANY - 3D Shape Name - - sbSizer3 - wxHORIZONTAL - 1 - none - - - 5 - wxEXPAND - 1 - - - bSizer18 - wxVERTICAL - none - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - -1,200 - - 0 - 200,110 - 1 - m_3D_ShapeNameListBox - 1 - - - protected - 1 - - Resizable - 1 - - wxLB_SINGLE - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - On3DShapeNameSelected - Edit3DShapeFilename - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 0 - - - bSizer19 - wxHORIZONTAL - none - - 5 - wxALIGN_CENTER_VERTICAL - 0 - - - bSizer3DButtons - wxVERTICAL - none - - 5 - wxEXPAND|wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_ADD_3D_SHAPE - Add 3D Shape - - 0 - - - 0 - - 1 - m_buttonAdd - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - Add3DShape - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_REMOVE_3D_SHAPE - Remove 3D Shape - - 0 - - - 0 - - 1 - m_buttonRemove - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - Remove3DShape - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Edit Filename - - 0 - - - 0 - - 1 - m_buttonEdit - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - Edit3DShapeFilename - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Configure Paths - - 0 - - - 0 - - 1 - m_button8 - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - Cfg3DPath - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bLowerSizer3D - wxHORIZONTAL - protected - - - - - - - - - 5 - wxALL|wxEXPAND - 0 - - 0 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - - m_sdbSizerStdButtons - protected - - - - - - - - - - - - - - + + + + + + C++ + 1 + source_name + 0 + 0 + res + UTF-8 + connect + dialog_edit_module_for_BoardEditor_base + 1000 + none + 1 + dialog_edit_module_for_BoardEditor_base + + . + + 1 + 1 + 1 + 1 + UI + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + + + 1 + 1 + impl_virtual + + + + 0 + wxID_ANY + + + DIALOG_MODULE_BOARD_EDITOR_BASE + + -1,-1 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Footprint Properties + + + + + + + + + + + + + + + + + + + + OnInitDlg + + + + + + + + + + + + + + + + + + + + + + + m_GeneralBoxSizer + wxVERTICAL + private + + 5 + wxEXPAND | wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_NOTEBOOK + + 0 + + + 0 + + 1 + m_NoteBook + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Properties + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_PanelProperties + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + m_PanelPropertiesBoxSizer + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bSizerLeft + wxVERTICAL + none + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Reference: + + 0 + + + 0 + + 1 + m_staticTextRef + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizerRef + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ReferenceCtrl + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_READONLY + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Edit + + 0 + + + 0 + + 1 + m_button4 + 1 + + + protected + 1 + + Resizable + 1 + + wxBU_EXACTFIT + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnEditReference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Value: + + 0 + + + 0 + + 1 + m_staticTextVal + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizerVal + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ValueCtrl + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_READONLY + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Edit + + 0 + + + 0 + + 1 + m_button5 + 1 + + + protected + 1 + + Resizable + 1 + + wxBU_EXACTFIT + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnEditValue + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Front" "Back" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Board Side + 1 + + 0 + + + 0 + + 1 + m_LayerCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "0.0" "+90.0" "-90.0" "180.0" "Other" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_LISTBOX_ORIENT_SELECT + Rotation + 1 + + 0 + + + 0 + + 1 + m_OrientCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + ModuleOrientEvent + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Rotation (-360 to 360): + + 0 + + + 0 + + 1 + m_staticTextRotation + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_OrientValueCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Position: + + 0 + + + 0 + + 1 + m_staticTextPos + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM + 0 + + 3 + wxHORIZONTAL + 1 + + 0 + + fgSizerPos + wxFLEX_GROWMODE_SPECIFIED + none + 2 + 5 + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + X + + 0 + + + 0 + + 1 + m_XPosLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ModPositionX + 1 + + + protected + 1 + + Resizable + 1 + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + + 0 + + + 0 + + 1 + m_XPosUnit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Y + + 0 + + + 0 + + 1 + m_YPosLabel + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_ModPositionY + 1 + + + protected + 1 + + Resizable + 1 + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + + 0 + + + 0 + + 1 + m_YPosUnit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Sheet path: + + 0 + + + 0 + + 1 + m_TextSheetPath + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_textCtrlSheetPath + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_READONLY + + 0 + An unique ID (a time stamp) to identify the component. This is an alternate identifier to the reference. + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 0 + + + m_PropRightSizer + wxVERTICAL + private + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_MODULE_PROPERTIES_UPDATE + Update Footprint from Library + + 0 + + + 0 + + 1 + m_buttonUpdate + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + UpdateModule + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxALL|wxEXPAND + 1 + + + bSizer17 + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_MODULE_PROPERTIES_EXCHANGE + Change Footprint + + 0 + + + 0 + + 1 + m_buttonExchange + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + ExchangeModule + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_GOTO_MODULE_EDITOR + Footprint Editor + + 0 + + + 0 + + 1 + m_buttonModuleEditor + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + GotoModuleEditor + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizerAttrib + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Through hole" "Surface mount" "Virtual" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Placement Type + 1 + + 0 + + + 0 + + 1 + m_AttributsCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Free" "Lock pads" "Lock footprint" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Move and Place + 1 + + 0 + + + 0 + + 1 + m_AutoPlaceCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxEXPAND|wxALL + 0 + + wxID_ANY + Auto Place + + sbSizerAP + wxHORIZONTAL + 1 + none + + + 5 + wxEXPAND + 1 + + + bSizerRotOpt + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Rotate 90 degrees + + 0 + + + 0 + + 1 + m_staticText11 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 10 + + 0 + + 0 + + 0 + + 1 + m_CostRot90Ctrl + 1 + + + protected + 1 + + Resizable + 1 + + wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bSizerMoveOpt + wxVERTICAL + none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Rotate 180 degrees + + 0 + + + 0 + + 1 + m_staticText12 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + 10 + + 0 + + 0 + + 0 + + 1 + m_CostRot180Ctrl + 1 + + + protected + 1 + + Resizable + 1 + + wxSL_AUTOTICKS|wxSL_HORIZONTAL|wxSL_LABELS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + wxID_ANY + Local Settings + + sbSizerLocalProperties + wxVERTICAL + 1 + none + + + 5 + wxEXPAND + 0 + + + bSizer11 + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + bSizer10 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Pad connection to zones: + + 0 + + + 0 + + 1 + m_staticText16 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Use zone setting" "Solid" "Thermal relief" "None" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_ZoneConnectionChoice + 1 + + + protected + 1 + + Resizable + 0 + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + ,90,92,-1,70,0 + 0 + 0 + wxID_ANY + Set clearances to 0 to use global values + + 0 + + + 0 + + 1 + m_staticTextInfo + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 3 + wxBOTH + 1 + + 0 + + fgSizerClearances + wxFLEX_GROWMODE_SPECIFIED + none + 5 + 0 + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Pad clearance: + + 0 + + + 0 + + 1 + m_staticTextNetClearance + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + This is the local net clearance for all pad of this footprint If 0, the Netclass values are used This value can be superseded by a pad local value. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_NetClearanceValueCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + + 0 + + + 0 + + 1 + m_NetClearanceUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline1 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline2 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline3 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Solder mask clearance: + + 0 + + + 0 + + 1 + m_MaskClearanceTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + This is the local clearance between pads and the solder mask for this footprint This value can be superseded by a pad local value. If 0, the global value is used + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_SolderMaskMarginCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + + 0 + + + 0 + + 1 + m_SolderMaskMarginUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Solder paste clearance: + + 0 + + + 0 + + 1 + m_staticTextSolderPaste + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + This is the local clearance between pads and the solder paste for this footprint. This value can be superseded by a pad local values. The final clearance value is the sum of this value and the clearance value ratio A negative value means a smaller mask size than pad size + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxLEFT|wxRIGHT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_SolderPasteMarginCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + unit + + 0 + + + 0 + + 1 + m_SolderPasteMarginUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Solder paste ratio clearance: + + 0 + + + 0 + + 1 + m_staticTextRatio + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + This is the local clearance ratio in per cent between pads and the solder paste for this footprint. A value of 10 means the clearance value is 10 per cent of the pad size This value can be superseded by a pad local value. The final clearance value is the sum of this value and the clearance value A negative value means a smaller mask size than pad size. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_SolderPasteMarginRatioCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + TEXT_CTRL_EVAL; widgets/text_ctrl_eval.h + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + % + + 0 + + + 0 + + 1 + m_SolderPasteRatioMarginUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 3D Settings + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_Panel3D + 1 + + + protected + 1 + + Resizable + 1 + + + 0 + + + + wxTAB_TRAVERSAL + + + + + + + + + + + + + + + + + + + + + + + + + + bSizerMain3D + wxVERTICAL + protected + + 5 + wxEXPAND + 0 + + wxID_ANY + 3D Shape Name + + sbSizer3 + wxHORIZONTAL + 1 + none + + + 5 + wxEXPAND + 1 + + + bSizer18 + wxVERTICAL + none + + 5 + wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + -1,200 + + 0 + 200,110 + 1 + m_3D_ShapeNameListBox + 1 + + + protected + 1 + + Resizable + 1 + + wxLB_SINGLE + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + On3DShapeNameSelected + Edit3DShapeFilename + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 0 + + + bSizer19 + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL + 0 + + + bSizer3DButtons + wxVERTICAL + none + + 5 + wxEXPAND|wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_ADD_3D_SHAPE + Add 3D Shape + + 0 + + + 0 + + 1 + m_buttonAdd + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + Add3DShape + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_REMOVE_3D_SHAPE + Remove 3D Shape + + 0 + + + 0 + + 1 + m_buttonRemove + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + Remove3DShape + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Edit Filename + + 0 + + + 0 + + 1 + m_buttonEdit + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + Edit3DShapeFilename + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Configure Paths + + 0 + + + 0 + + 1 + m_button8 + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + Cfg3DPath + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bLowerSizer3D + wxHORIZONTAL + protected + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_sdbSizerStdButtons + protected + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.h b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.h index 593f7a67da..8e3063c7a7 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.h +++ b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor_base.h @@ -1,138 +1,141 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jan 12 2018) -// http://www.wxformbuilder.org/ -// -// PLEASE DO *NOT* EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#ifndef __DIALOG_EDIT_MODULE_FOR_BOARDEDITOR_BASE_H__ -#define __DIALOG_EDIT_MODULE_FOR_BOARDEDITOR_BASE_H__ - -#include -#include -#include -class TEXT_CTRL_EVAL; - -#include "dialog_shim.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - -#define ID_NOTEBOOK 1000 -#define ID_LISTBOX_ORIENT_SELECT 1001 -#define ID_MODULE_PROPERTIES_EXCHANGE 1002 -#define ID_GOTO_MODULE_EDITOR 1003 -#define ID_ADD_3D_SHAPE 1004 -#define ID_REMOVE_3D_SHAPE 1005 - -/////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_MODULE_BOARD_EDITOR_BASE -/////////////////////////////////////////////////////////////////////////////// -class DIALOG_MODULE_BOARD_EDITOR_BASE : public DIALOG_SHIM -{ - private: - wxBoxSizer* m_GeneralBoxSizer; - wxBoxSizer* m_PropRightSizer; - - 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; - wxStaticText* m_staticTextPos; - 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_buttonExchange; - wxButton* m_buttonModuleEditor; - wxRadioBox* m_AttributsCtrl; - wxRadioBox* m_AutoPlaceCtrl; - wxStaticText* m_staticText11; - wxSlider* m_CostRot90Ctrl; - wxStaticText* m_staticText12; - wxSlider* m_CostRot180Ctrl; - wxStaticText* m_staticText16; - wxChoice* m_ZoneConnectionChoice; - wxStaticText* m_staticTextInfo; - wxStaticText* m_staticTextNetClearance; - TEXT_CTRL_EVAL* m_NetClearanceValueCtrl; - wxStaticText* m_NetClearanceUnits; - wxStaticLine* m_staticline1; - wxStaticLine* m_staticline2; - wxStaticLine* m_staticline3; - wxStaticText* m_MaskClearanceTitle; - TEXT_CTRL_EVAL* m_SolderMaskMarginCtrl; - wxStaticText* m_SolderMaskMarginUnits; - wxStaticText* m_staticTextSolderPaste; - TEXT_CTRL_EVAL* m_SolderPasteMarginCtrl; - wxStaticText* m_SolderPasteMarginUnits; - wxStaticText* m_staticTextRatio; - TEXT_CTRL_EVAL* m_SolderPasteMarginRatioCtrl; - wxStaticText* m_SolderPasteRatioMarginUnits; - wxPanel* m_Panel3D; - wxBoxSizer* bSizerMain3D; - wxListBox* m_3D_ShapeNameListBox; - wxButton* m_buttonAdd; - wxButton* m_buttonRemove; - wxButton* m_buttonEdit; - wxButton* m_button8; - wxBoxSizer* bLowerSizer3D; - 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 ModuleOrientEvent( 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 Cfg3DPath( wxCommandEvent& event ) { event.Skip(); } - - - public: - - DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Footprint Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DIALOG_MODULE_BOARD_EDITOR_BASE(); - -}; - -#endif //__DIALOG_EDIT_MODULE_FOR_BOARDEDITOR_BASE_H__ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Dec 30 2017) +// http://www.wxformbuilder.org/ +// +// PLEASE DO *NOT* EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DIALOG_EDIT_MODULE_FOR_BOARDEDITOR_BASE_H__ +#define __DIALOG_EDIT_MODULE_FOR_BOARDEDITOR_BASE_H__ + +#include +#include +#include +class TEXT_CTRL_EVAL; + +#include "dialog_shim.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +#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 + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_MODULE_BOARD_EDITOR_BASE +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_MODULE_BOARD_EDITOR_BASE : public DIALOG_SHIM +{ + private: + wxBoxSizer* m_GeneralBoxSizer; + wxBoxSizer* m_PropRightSizer; + + 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; + wxStaticText* m_staticTextPos; + 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; + wxRadioBox* m_AutoPlaceCtrl; + wxStaticText* m_staticText11; + wxSlider* m_CostRot90Ctrl; + wxStaticText* m_staticText12; + wxSlider* m_CostRot180Ctrl; + wxStaticText* m_staticText16; + wxChoice* m_ZoneConnectionChoice; + wxStaticText* m_staticTextInfo; + wxStaticText* m_staticTextNetClearance; + TEXT_CTRL_EVAL* m_NetClearanceValueCtrl; + wxStaticText* m_NetClearanceUnits; + wxStaticLine* m_staticline1; + wxStaticLine* m_staticline2; + wxStaticLine* m_staticline3; + wxStaticText* m_MaskClearanceTitle; + TEXT_CTRL_EVAL* m_SolderMaskMarginCtrl; + wxStaticText* m_SolderMaskMarginUnits; + wxStaticText* m_staticTextSolderPaste; + TEXT_CTRL_EVAL* m_SolderPasteMarginCtrl; + wxStaticText* m_SolderPasteMarginUnits; + wxStaticText* m_staticTextRatio; + TEXT_CTRL_EVAL* m_SolderPasteMarginRatioCtrl; + wxStaticText* m_SolderPasteRatioMarginUnits; + wxPanel* m_Panel3D; + wxBoxSizer* bSizerMain3D; + wxListBox* m_3D_ShapeNameListBox; + wxButton* m_buttonAdd; + wxButton* m_buttonRemove; + wxButton* m_buttonEdit; + wxButton* m_button8; + wxBoxSizer* bLowerSizer3D; + 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 ModuleOrientEvent( wxCommandEvent& 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 Cfg3DPath( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DIALOG_MODULE_BOARD_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Footprint Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_MODULE_BOARD_EDITOR_BASE(); + +}; + +#endif //__DIALOG_EDIT_MODULE_FOR_BOARDEDITOR_BASE_H__ diff --git a/pcbnew/dialogs/dialog_exchange_modules.cpp b/pcbnew/dialogs/dialog_exchange_modules.cpp index 712fac233d..f71eb2977e 100644 --- a/pcbnew/dialogs/dialog_exchange_modules.cpp +++ b/pcbnew/dialogs/dialog_exchange_modules.cpp @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -47,15 +48,21 @@ static bool RecreateCmpFile( BOARD * aBrd, const wxString& aFullCmpFileName ); -int DIALOG_EXCHANGE_MODULE::m_selectionMode = 0; +int DIALOG_EXCHANGE_MODULE::m_matchModeForUpdate = wxID_MATCH_FP_ALL; +int DIALOG_EXCHANGE_MODULE::m_matchModeForExchange = wxID_MATCH_FP_REF; +int DIALOG_EXCHANGE_MODULE::m_matchModeForUpdateSelected = wxID_MATCH_FP_REF; +int DIALOG_EXCHANGE_MODULE::m_matchModeForExchangeSelected = wxID_MATCH_FP_REF; -DIALOG_EXCHANGE_MODULE::DIALOG_EXCHANGE_MODULE( PCB_EDIT_FRAME* parent, MODULE* Module ) : +DIALOG_EXCHANGE_MODULE::DIALOG_EXCHANGE_MODULE( PCB_EDIT_FRAME* parent, MODULE* Module, + bool updateMode ) : DIALOG_EXCHANGE_MODULE_BASE( parent ), m_commit( parent ) { m_parent = parent; m_currentModule = Module; - init(); + m_updateMode = updateMode; + + init( m_updateMode ); GetSizer()->Fit( this ); GetSizer()->SetSizeHints( this ); Center(); @@ -64,66 +71,224 @@ DIALOG_EXCHANGE_MODULE::DIALOG_EXCHANGE_MODULE( PCB_EDIT_FRAME* parent, MODULE* void DIALOG_EXCHANGE_MODULE::OnQuit( wxCommandEvent& event ) { - m_selectionMode = m_Selection->GetSelection(); Show( false ); EndQuasiModal( wxID_CANCEL ); } -void DIALOG_EXCHANGE_MODULE::init() +void DIALOG_EXCHANGE_MODULE::init( bool updateMode ) { SetFocus(); - m_CurrentFootprintFPID->AppendText( FROM_UTF8( m_currentModule->GetFPID().Format().c_str() ) ); - m_NewFootprintFPID->AppendText( FROM_UTF8( m_currentModule->GetFPID().Format().c_str() ) ); - m_CmpValue->AppendText( m_currentModule->GetValue() ); - m_CmpReference->AppendText( m_currentModule->GetReference() ); - m_Selection->SetString( 0, wxString::Format( - _( "Change footprint of \"%s\"" ), - GetChars( m_currentModule->GetReference() ) ) ); - wxString fpname = m_CurrentFootprintFPID->GetValue().AfterLast( ':' ); + // fetch title and mode strings out of the dialog (so they can be easily localized) + wxString title = updateMode ? m_updateModeTitle->GetLabel() : m_exchangeModeTitle->GetLabel(); + wxString verb = updateMode ? m_updateModeVerb->GetLabel() : m_exchangeModeVerb->GetLabel(); + wxString label; + m_localizationSizer->Show( false ); - if( fpname.IsEmpty() ) // Happens for old fp names - fpname = m_CurrentFootprintFPID->GetValue(); + SetTitle( title ); - m_Selection->SetString( 1, wxString::Format( - _( "Change footprints \"%s\"" ), - GetChars( fpname.Left( 12 ) ) ) ); + if( updateMode ) + { + label.Printf( m_matchAll->GetLabel(), verb ); + m_matchAll->SetLabel( label ); - m_Selection->SetSelection( m_selectionMode ); + m_middleSizer->Show( false ); + } + else + { + m_allSizer->Show( false ); - // Enable/disable widgets: + if( m_currentModule ) + m_newID->AppendText( FROM_UTF8( m_currentModule->GetFPID().Format().c_str() ) ); + m_newIDBrowseButton->SetBitmap( KiBitmap( library_browse_xpm ) ); + } + + if( m_currentModule ) + { + m_specifiedRefSizer->Show( false ); + + label.Printf( m_matchCurrentRef->GetLabel(), verb, m_currentModule->GetReference() ); + m_matchCurrentRef->SetLabel( label ); + + m_specifiedValueSizer->Show( false ); + + label.Printf( m_matchCurrentValue->GetLabel(), verb, m_currentModule->GetValue() ); + m_matchCurrentValue->SetLabel( label ); + } + else + { + m_currentRefSizer->Show( false ); + + label.Printf( m_matchSpecifiedRef->GetLabel(), verb ); + m_matchSpecifiedRef->SetLabel( label ); + + m_currentValueSizer->Show( false ); + + label.Printf( m_matchSpecifiedValue->GetLabel(), verb ); + m_matchSpecifiedValue->SetLabel( label ); + } + + label.Printf( m_matchSpecifiedID->GetLabel(), verb ); + m_matchSpecifiedID->SetLabel( label ); + if( m_currentModule ) + m_specifiedID->AppendText( FROM_UTF8( m_currentModule->GetFPID().Format().c_str() ) ); + m_specifiedIDBrowseButton->SetBitmap( KiBitmap( library_browse_xpm ) ); + + // initialize match-mode wxCommandEvent event; - OnSelectionClicked( event ); + switch( getMatchMode() ) + { + case wxID_MATCH_FP_ALL: + if( m_currentModule ) + OnMatchRefClicked( event ); + else + OnMatchAllClicked( event ); + break; + case wxID_MATCH_FP_REF: + OnMatchRefClicked( event ); + break; + case wxID_MATCH_FP_VAL: + OnMatchValueClicked( event ); + break; + case wxID_MATCH_FP_ID: + OnMatchIDClicked( event ); + } +} + + +int DIALOG_EXCHANGE_MODULE::getMatchMode() +{ + if( m_updateMode ) + return( m_currentModule ? m_matchModeForUpdateSelected : m_matchModeForUpdate ); + else + return( m_currentModule ? m_matchModeForExchangeSelected : m_matchModeForExchange ); +} + + +void DIALOG_EXCHANGE_MODULE::setMatchMode( int aMatchMode ) +{ + if( m_updateMode ) + { + if( m_currentModule ) + m_matchModeForUpdateSelected = aMatchMode; + else + m_matchModeForUpdate = aMatchMode; + } + else + { + if( m_currentModule ) + m_matchModeForExchangeSelected = aMatchMode; + else + m_matchModeForExchange = aMatchMode; + } +} + + +bool DIALOG_EXCHANGE_MODULE::isMatch( MODULE* aModule ) +{ + switch( getMatchMode() ) + { + case wxID_MATCH_FP_ALL: + return true; + case wxID_MATCH_FP_REF: + // currentModule case goes through changeCurrentFootprint, so we only have + // to handle specifiedRef case + return aModule->GetReference() == m_specifiedRef->GetValue(); + case wxID_MATCH_FP_VAL: + // currentValue must also check FPID so we don't get accidental matches that + // the user didn't intend + if( m_currentModule ) + return aModule->GetValue() == m_currentModule->GetValue() + && aModule->GetFPID() == m_currentModule->GetFPID(); + else + return aModule->GetValue() == m_specifiedValue->GetValue(); + case wxID_MATCH_FP_ID: + return aModule->GetFPID() == m_specifiedID->GetValue(); + } + return false; // just to quiet compiler warnings.... +} + + +wxRadioButton* DIALOG_EXCHANGE_MODULE::getRadioButtonForMode() +{ + switch( getMatchMode() ) + { + case wxID_MATCH_FP_ALL: + return( m_matchAll ); + case wxID_MATCH_FP_REF: + return( m_matchCurrentRef->IsShown() ? m_matchCurrentRef : m_matchSpecifiedRef ); + case wxID_MATCH_FP_VAL: + return( m_matchCurrentValue->IsShown() ? m_matchCurrentValue : m_matchSpecifiedValue ); + case wxID_MATCH_FP_ID: + return( m_matchSpecifiedID ); + default: + return nullptr; + } +} + + +void DIALOG_EXCHANGE_MODULE::updateMatchModeRadioButtons() +{ + wxRadioButton* button = getRadioButtonForMode(); + + m_matchAll->SetValue( m_matchAll == button ); + m_matchCurrentRef->SetValue( m_matchCurrentRef == button ); + m_matchSpecifiedRef->SetValue( m_matchSpecifiedRef == button ); + m_matchCurrentValue->SetValue( m_matchCurrentValue == button ); + m_matchSpecifiedValue->SetValue( m_matchSpecifiedValue == button ); + m_matchSpecifiedID->SetValue(m_matchSpecifiedID == button ); +} + + +void DIALOG_EXCHANGE_MODULE::OnMatchAllClicked( wxCommandEvent& event ) +{ + setMatchMode( wxID_MATCH_FP_ALL ); + updateMatchModeRadioButtons(); + m_matchAll->SetFocus(); +} + +void DIALOG_EXCHANGE_MODULE::OnMatchRefClicked( wxCommandEvent& event ) +{ + setMatchMode( wxID_MATCH_FP_REF ); + updateMatchModeRadioButtons(); + + if( m_specifiedRef->IsShown() && event.GetEventObject() != m_specifiedRef ) + m_specifiedRef->SetFocus(); +} + + +void DIALOG_EXCHANGE_MODULE::OnMatchValueClicked( wxCommandEvent& event ) +{ + setMatchMode( wxID_MATCH_FP_VAL ); + updateMatchModeRadioButtons(); + + if( m_specifiedValue->IsShown() && event.GetEventObject() != m_specifiedValue ) + m_specifiedValue->SetFocus(); +} + + +void DIALOG_EXCHANGE_MODULE::OnMatchIDClicked( wxCommandEvent& event ) +{ + setMatchMode( wxID_MATCH_FP_ID ); + updateMatchModeRadioButtons(); + + if( m_specifiedID->IsShown() && event.GetEventObject() != m_specifiedID ) + m_specifiedID->SetFocus(); } void DIALOG_EXCHANGE_MODULE::OnOkClick( wxCommandEvent& event ) { - m_selectionMode = m_Selection->GetSelection(); bool result = false; m_MessageWindow->Clear(); m_MessageWindow->Flush(); - switch( m_Selection->GetSelection() ) - { - case 0: + if( getMatchMode() == wxID_MATCH_FP_REF && m_currentModule ) result = changeCurrentFootprint(); - break; - - case 1: - result = changeSameFootprints( false ); - break; - - case 2: - result = changeSameFootprints( true ); - break; - - case 3: - result = changeAllFootprints(); - break; - } + else + result = changeSameFootprints(); if( result ) { @@ -137,27 +302,6 @@ void DIALOG_EXCHANGE_MODULE::OnOkClick( wxCommandEvent& event ) } -void DIALOG_EXCHANGE_MODULE::OnSelectionClicked( wxCommandEvent& event ) -{ - bool enable = true; - - switch( m_Selection->GetSelection() ) - { - case 0: - case 1: - case 2: - break; - - case 3: - enable = false; - break; - } - - m_NewFootprintFPID->Enable( enable ); - m_Browsebutton->Enable( enable ); -} - - void DIALOG_EXCHANGE_MODULE::RebuildCmpList( wxCommandEvent& event ) { wxString msg; @@ -185,52 +329,31 @@ void DIALOG_EXCHANGE_MODULE::RebuildCmpList( wxCommandEvent& event ) bool DIALOG_EXCHANGE_MODULE::changeCurrentFootprint() { - wxString newmodulename = m_NewFootprintFPID->GetValue(); + if( m_updateMode ) + return change_1_Module( m_currentModule, m_currentModule->GetFPID(), true ); - if( newmodulename == wxEmptyString ) + wxString newFPID = m_newID->GetValue(); + + if( newFPID == wxEmptyString ) return false; - return change_1_Module( m_currentModule, newmodulename, true ); + return change_1_Module( m_currentModule, newFPID, true ); } -bool DIALOG_EXCHANGE_MODULE::changeSameFootprints( bool aUseValue ) +bool DIALOG_EXCHANGE_MODULE::changeSameFootprints() { - wxString msg; MODULE* Module; MODULE* PtBack; bool change = false; - wxString newmodulename = m_NewFootprintFPID->GetValue(); + wxString newFPID = m_newID->GetValue(); wxString value; - LIB_ID lib_reference; - bool check_module_value = false; int ShowErr = 3; // Post 3 error messages max. if( m_parent->GetBoard()->m_Modules == NULL ) return false; - if( newmodulename == wxEmptyString ) - return false; - - lib_reference = m_currentModule->GetFPID(); - - if( aUseValue ) - { - check_module_value = true; - value = m_currentModule->GetValue(); - msg.Printf( _( "Change footprint %s -> %s (for value = %s)?" ), - GetChars( FROM_UTF8( m_currentModule->GetFPID().Format().c_str() ) ), - GetChars( newmodulename ), - GetChars( m_currentModule->GetValue() ) ); - } - else - { - msg.Printf( _( "Change footprint %s -> %s ?" ), - GetChars( FROM_UTF8( lib_reference.Format().c_str() ) ), - GetChars( newmodulename ) ); - } - - if( !IsOK( this, msg ) ) + if( !m_updateMode && newFPID == wxEmptyString ) return false; /* The change is done from the last module because @@ -245,50 +368,16 @@ bool DIALOG_EXCHANGE_MODULE::changeSameFootprints( bool aUseValue ) { PtBack = Module->Back(); - if( lib_reference != Module->GetFPID() ) + if( !isMatch( Module ) ) continue; - if( check_module_value ) - { - if( value.CmpNoCase( Module->GetValue() ) != 0 ) - continue; - } + bool result; + if( m_updateMode ) + result = change_1_Module( Module, Module->GetFPID(), ShowErr ); + else + result = change_1_Module( Module, newFPID, ShowErr ); - if( change_1_Module( Module, newmodulename, ShowErr ) ) - change = true; - else if( ShowErr ) - ShowErr--; - } - - return change; -} - - -bool DIALOG_EXCHANGE_MODULE::changeAllFootprints() -{ - MODULE* Module, * PtBack; - bool change = false; - int ShowErr = 3; // Post 3 error max. - - if( m_parent->GetBoard()->m_Modules == NULL ) - return false; - - if( !IsOK( this, _( "Are you sure you want to change all footprints?" ) ) ) - return false; - - /* The change is done from the last module because the function - * change_1_Module () modifies the last module in the list - * - * note: for the first module in chain (the last here), Module->Back() - * points the board or is NULL - */ - Module = m_parent->GetBoard()->m_Modules.GetLast(); - - for( ; Module && ( Module->Type() == PCB_MODULE_T ); Module = PtBack ) - { - PtBack = Module->Back(); - - if( change_1_Module( Module, Module->GetFPID(), ShowErr ) ) + if( result ) change = true; else if( ShowErr ) ShowErr--; @@ -333,6 +422,8 @@ bool DIALOG_EXCHANGE_MODULE::change_1_Module( MODULE* aModule, if( aModule == m_currentModule ) m_currentModule = newModule; + if( aModule == m_parent->GetCurItem() ) + m_parent->SetCurItem( newModule ); msg += ": OK"; reporter.Report( msg, REPORTER::RPT_ACTION ); @@ -382,19 +473,6 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aOldModule, } -// Displays the list of available footprints in library name and select a footprint. -void DIALOG_EXCHANGE_MODULE::BrowseAndSelectFootprint( wxCommandEvent& event ) -{ - wxString newname; - - newname = m_parent->SelectFootprint( m_parent, wxEmptyString, wxEmptyString, wxEmptyString, - Prj().PcbFootprintLibs() ); - - if( newname != wxEmptyString ) - m_NewFootprintFPID->SetValue( newname ); -} - - void DIALOG_EXCHANGE_MODULE::ViewAndSelectFootprint( wxCommandEvent& event ) { wxString newname; @@ -403,7 +481,10 @@ void DIALOG_EXCHANGE_MODULE::ViewAndSelectFootprint( wxCommandEvent& event ) if( frame->ShowModal( &newname, this ) ) { - m_NewFootprintFPID->SetValue( newname ); + if( event.GetEventObject() == m_newIDBrowseButton ) + m_newID->SetValue( newname ); + else + m_specifiedID->SetValue( newname ); } frame->Destroy(); diff --git a/pcbnew/dialogs/dialog_exchange_modules.h b/pcbnew/dialogs/dialog_exchange_modules.h index 7c225791b5..0836617645 100644 --- a/pcbnew/dialogs/dialog_exchange_modules.h +++ b/pcbnew/dialogs/dialog_exchange_modules.h @@ -37,24 +37,37 @@ class DIALOG_EXCHANGE_MODULE : public DIALOG_EXCHANGE_MODULE_BASE private: PCB_EDIT_FRAME* m_parent; MODULE* m_currentModule; - static int m_selectionMode; // Remember the last exchange option + bool m_updateMode; + static int m_matchModeForUpdate; // remember last match-mode + static int m_matchModeForExchange; // remember last match-mode + static int m_matchModeForUpdateSelected; // remember last match-mode + static int m_matchModeForExchangeSelected; // remember last match-mode public: - DIALOG_EXCHANGE_MODULE( PCB_EDIT_FRAME* aParent, MODULE* aModule ); + DIALOG_EXCHANGE_MODULE( PCB_EDIT_FRAME* aParent, MODULE* aModule, bool updateMode ); ~DIALOG_EXCHANGE_MODULE() { }; private: - void OnSelectionClicked( wxCommandEvent& event ) override; + void OnMatchAllClicked( wxCommandEvent& event ) override; + void OnMatchRefClicked( wxCommandEvent& event ) override; + void OnMatchValueClicked( wxCommandEvent& event ) override; + void OnMatchIDClicked( wxCommandEvent& event ) override; void OnOkClick( wxCommandEvent& event ) override; void OnQuit( wxCommandEvent& event ) override; - void BrowseAndSelectFootprint( wxCommandEvent& event ) override; void ViewAndSelectFootprint( wxCommandEvent& event ) override; void RebuildCmpList( wxCommandEvent& event ) override; - void init(); + void init( bool updateMode ); + + int getMatchMode(); + void setMatchMode( int aMatchMode ); + + wxRadioButton* getRadioButtonForMode(); + void updateMatchModeRadioButtons(); + + bool isMatch( MODULE* ); bool changeCurrentFootprint(); - bool changeSameFootprints( bool aUseValue); - bool changeAllFootprints(); + bool changeSameFootprints(); bool change_1_Module( MODULE* aModule, const LIB_ID& aNewFootprintFPID, bool eShowError ); diff --git a/pcbnew/dialogs/dialog_exchange_modules_base.cpp b/pcbnew/dialogs/dialog_exchange_modules_base.cpp index 27d02a6428..d9f03fc99c 100644 --- a/pcbnew/dialogs/dialog_exchange_modules_base.cpp +++ b/pcbnew/dialogs/dialog_exchange_modules_base.cpp @@ -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! @@ -15,118 +15,227 @@ DIALOG_EXCHANGE_MODULE_BASE::DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWi { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - wxBoxSizer* bMainSizer; - bMainSizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* mainSizer; + mainSizer = new wxBoxSizer( wxVERTICAL ); + + m_localizationSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_updateModeTitle = new wxStaticText( this, wxID_ANY, _("Update Footprints from Library"), wxDefaultPosition, wxDefaultSize, 0 ); + m_updateModeTitle->Wrap( -1 ); + m_localizationSizer->Add( m_updateModeTitle, 0, wxALL, 5 ); + + m_exchangeModeTitle = new wxStaticText( this, wxID_ANY, _("Change Footprints"), wxDefaultPosition, wxDefaultSize, 0 ); + m_exchangeModeTitle->Wrap( -1 ); + m_localizationSizer->Add( m_exchangeModeTitle, 0, wxALL, 5 ); + + m_updateModeVerb = new wxStaticText( this, wxID_ANY, _("Update"), wxDefaultPosition, wxDefaultSize, 0 ); + m_updateModeVerb->Wrap( -1 ); + m_localizationSizer->Add( m_updateModeVerb, 0, wxALL, 5 ); + + m_exchangeModeVerb = new wxStaticText( this, wxID_ANY, _("Change"), wxDefaultPosition, wxDefaultSize, 0 ); + m_exchangeModeVerb->Wrap( -1 ); + m_localizationSizer->Add( m_exchangeModeVerb, 0, wxALL, 5 ); + + + mainSizer->Add( m_localizationSizer, 0, 0, 5 ); wxBoxSizer* bUpperSizer; - bUpperSizer = new wxBoxSizer( wxHORIZONTAL ); + bUpperSizer = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bLeftSizer; - bLeftSizer = new wxBoxSizer( wxVERTICAL ); + m_allSizer = new wxBoxSizer( wxHORIZONTAL ); - m_staticTextCmpVal = new wxStaticText( this, wxID_ANY, _("Footprint value"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCmpVal->Wrap( -1 ); - bLeftSizer->Add( m_staticTextCmpVal, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_matchAll = new wxRadioButton( this, wxID_MATCH_FP_ALL, _("%s all footprints on board"), wxDefaultPosition, wxDefaultSize, 0 ); + m_matchAll->SetValue( true ); + m_matchAll->SetMinSize( wxSize( -1,26 ) ); - m_CmpValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); - bLeftSizer->Add( m_CmpValue, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - - m_staticTexCmpRef = new wxStaticText( this, wxID_ANY, _("Footprint reference"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTexCmpRef->Wrap( -1 ); - bLeftSizer->Add( m_staticTexCmpRef, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_CmpReference = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); - bLeftSizer->Add( m_CmpReference, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + m_allSizer->Add( m_matchAll, 0, wxALL, 2 ); - bUpperSizer->Add( bLeftSizer, 1, wxALIGN_CENTER_VERTICAL, 5 ); + bUpperSizer->Add( m_allSizer, 29, wxEXPAND, 5 ); - wxBoxSizer* bMiddleSizer; - bMiddleSizer = new wxBoxSizer( wxVERTICAL ); + m_currentRefSizer = new wxBoxSizer( wxHORIZONTAL ); - wxString m_SelectionChoices[] = { _("Change footprint"), _("Change footprints"), _("Change footprints having same value"), _("Update all footprints of the board") }; - int m_SelectionNChoices = sizeof( m_SelectionChoices ) / sizeof( wxString ); - m_Selection = new wxRadioBox( this, ID_SELECTION_CLICKED, _("Options"), wxDefaultPosition, wxDefaultSize, m_SelectionNChoices, m_SelectionChoices, 1, wxRA_SPECIFY_COLS ); - m_Selection->SetSelection( 1 ); - bMiddleSizer->Add( m_Selection, 0, wxALL, 5 ); + m_matchCurrentRef = new wxRadioButton( this, wxID_MATCH_FP_REF, _("%s current footprint (%s)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_matchCurrentRef->SetMinSize( wxSize( -1,26 ) ); + + m_currentRefSizer->Add( m_matchCurrentRef, 0, wxALL, 2 ); - bUpperSizer->Add( bMiddleSizer, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); + bUpperSizer->Add( m_currentRefSizer, 31, wxEXPAND, 5 ); - wxBoxSizer* bRightSizer; - bRightSizer = new wxBoxSizer( wxVERTICAL ); + m_specifiedRefSizer = new wxBoxSizer( wxHORIZONTAL ); - m_buttonCmpList = new wxButton( this, wxID_ANY, _("Export Footprint Association File"), wxDefaultPosition, wxDefaultSize, 0 ); - bRightSizer->Add( m_buttonCmpList, 0, wxALL|wxEXPAND, 5 ); + m_matchSpecifiedRef = new wxRadioButton( this, wxID_MATCH_FP_REF, _("%s footprint with reference:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_matchSpecifiedRef->SetMinSize( wxSize( -1,26 ) ); - m_Browsebutton = new wxButton( this, wxID_ANY, _("List Footprints"), wxDefaultPosition, wxDefaultSize, 0 ); - bRightSizer->Add( m_Browsebutton, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + m_specifiedRefSizer->Add( m_matchSpecifiedRef, 0, wxALL, 2 ); - m_buttonFPViewer = new wxButton( this, wxID_ANY, _("View Footprints"), wxDefaultPosition, wxDefaultSize, 0 ); - bRightSizer->Add( m_buttonFPViewer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + m_specifiedRef = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_specifiedRef->SetMinSize( wxSize( -1,24 ) ); + m_specifiedRef->SetMaxSize( wxSize( 80,-1 ) ); + + m_specifiedRefSizer->Add( m_specifiedRef, 0, wxALL, 3 ); - bUpperSizer->Add( bRightSizer, 0, wxALIGN_CENTER_VERTICAL, 5 ); + bUpperSizer->Add( m_specifiedRefSizer, 29, wxEXPAND, 5 ); + + m_currentValueSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_matchCurrentValue = new wxRadioButton( this, wxID_MATCH_FP_VAL, _("%s footprints with matching value (%s)"), wxDefaultPosition, wxDefaultSize, 0 ); + m_matchCurrentValue->SetMinSize( wxSize( -1,26 ) ); + + m_currentValueSizer->Add( m_matchCurrentValue, 0, wxALL, 2 ); - bMainSizer->Add( bUpperSizer, 0, wxALL|wxEXPAND, 5 ); + bUpperSizer->Add( m_currentValueSizer, 31, wxEXPAND, 5 ); - m_staticTextCurrFPID = new wxStaticText( this, wxID_ANY, _("Current footprint identifier"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextCurrFPID->Wrap( -1 ); - bMainSizer->Add( m_staticTextCurrFPID, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_specifiedValueSizer = new wxBoxSizer( wxHORIZONTAL ); - m_CurrentFootprintFPID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY ); - bMainSizer->Add( m_CurrentFootprintFPID, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_matchSpecifiedValue = new wxRadioButton( this, wxID_MATCH_FP_VAL, _("%s footprints with value:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_matchSpecifiedValue->SetMinSize( wxSize( -1,26 ) ); - m_staticTextNewFPID = new wxStaticText( this, wxID_ANY, _("New footprint identifier"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextNewFPID->Wrap( -1 ); - bMainSizer->Add( m_staticTextNewFPID, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + m_specifiedValueSizer->Add( m_matchSpecifiedValue, 0, wxALL, 2 ); - m_NewFootprintFPID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bMainSizer->Add( m_NewFootprintFPID, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 ); + m_specifiedValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_specifiedValue->SetMinSize( wxSize( 160,24 ) ); + + m_specifiedValueSizer->Add( m_specifiedValue, 0, wxALL, 3 ); + + + bUpperSizer->Add( m_specifiedValueSizer, 31, wxEXPAND, 5 ); + + m_specifiedIDSizer = new wxBoxSizer( wxVERTICAL ); + + m_matchSpecifiedID = new wxRadioButton( this, wxID_MATCH_FP_ID, _("%s footprints with identifier:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_specifiedIDSizer->Add( m_matchSpecifiedID, 0, wxALL, 2 ); + + wxBoxSizer* specifiedIDSizer; + specifiedIDSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_specifiedID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_specifiedID->SetMinSize( wxSize( 500,24 ) ); + + specifiedIDSizer->Add( m_specifiedID, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2 ); + + m_specifiedIDBrowseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); + specifiedIDSizer->Add( m_specifiedIDBrowseButton, 0, wxALL, 0 ); + + + m_specifiedIDSizer->Add( specifiedIDSizer, 0, wxALIGN_TOP|wxEXPAND, 0 ); + + + bUpperSizer->Add( m_specifiedIDSizer, 45, wxEXPAND, 5 ); + + + mainSizer->Add( bUpperSizer, 0, wxALL|wxEXPAND, 5 ); + + m_middleSizer = new wxBoxSizer( wxVERTICAL ); + + wxStaticLine* staticline1; + staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + m_middleSizer->Add( staticline1, 0, wxEXPAND | wxALL, 0 ); + + wxStaticText* newIdLabel; + newIdLabel = new wxStaticText( this, wxID_ANY, _("New footprint identifier:"), wxDefaultPosition, wxDefaultSize, 0 ); + newIdLabel->Wrap( -1 ); + m_middleSizer->Add( newIdLabel, 0, wxALL, 2 ); + + wxBoxSizer* newIDSizer; + newIDSizer = new wxBoxSizer( wxHORIZONTAL ); + + m_newID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_newID->SetMinSize( wxSize( 500,24 ) ); + + newIDSizer->Add( m_newID, 1, wxALIGN_CENTER_VERTICAL|wxALL, 2 ); + + m_newIDBrowseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW ); + newIDSizer->Add( m_newIDBrowseButton, 0, wxALL, 0 ); + + + m_middleSizer->Add( newIDSizer, 0, wxEXPAND, 0 ); + + + mainSizer->Add( m_middleSizer, 0, wxALL|wxEXPAND, 5 ); m_MessageWindow = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); m_MessageWindow->SetMinSize( wxSize( -1,300 ) ); - bMainSizer->Add( m_MessageWindow, 1, wxEXPAND | wxALL, 5 ); + mainSizer->Add( m_MessageWindow, 1, wxALL|wxEXPAND, 5 ); - m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + wxStaticLine* staticline2; + staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + mainSizer->Add( staticline2, 0, wxEXPAND | wxALL, 5 ); - wxBoxSizer* bSizerButts; - bSizerButts = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bottomSizer; + bottomSizer = new wxBoxSizer( wxHORIZONTAL ); - m_Applybutton = new wxButton( this, wxID_OK, _("Apply"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerButts->Add( m_Applybutton, 0, wxEXPAND|wxALL, 5 ); + m_exportButton = new wxButton( this, wxID_ANY, _("Export Footprint Associations"), wxDefaultPosition, wxDefaultSize, 0 ); + bottomSizer->Add( m_exportButton, 0, wxALL, 5 ); - m_Quitbutton = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizerButts->Add( m_Quitbutton, 0, wxALL|wxEXPAND, 5 ); + wxBoxSizer* paddingSizer; + paddingSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxStaticText* padding1; + padding1 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + padding1->Wrap( -1 ); + paddingSizer->Add( padding1, 1, wxALL, 5 ); - bMainSizer->Add( bSizerButts, 0, wxALIGN_RIGHT, 5 ); + bottomSizer->Add( paddingSizer, 1, 0, 5 ); + + m_applyButton = new wxButton( this, wxID_ANY, _("Apply"), wxDefaultPosition, wxDefaultSize, 0 ); + bottomSizer->Add( m_applyButton, 0, wxALL, 5 ); + + m_closeButton = new wxButton( this, wxID_ANY, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); + bottomSizer->Add( m_closeButton, 0, wxALL, 5 ); - this->SetSizer( bMainSizer ); + mainSizer->Add( bottomSizer, 0, wxEXPAND, 5 ); + + + this->SetSizer( mainSizer ); this->Layout(); - bMainSizer->Fit( this ); + mainSizer->Fit( this ); // Connect Events - m_Selection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnSelectionClicked ), NULL, this ); - m_buttonCmpList->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::RebuildCmpList ), NULL, this ); - m_Browsebutton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::BrowseAndSelectFootprint ), NULL, this ); - m_buttonFPViewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::ViewAndSelectFootprint ), NULL, this ); - m_Applybutton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnOkClick ), NULL, this ); - m_Quitbutton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnQuit ), NULL, this ); + m_matchAll->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchAllClicked ), NULL, this ); + m_matchCurrentRef->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchRefClicked ), NULL, this ); + m_matchSpecifiedRef->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchRefClicked ), NULL, this ); + m_specifiedRef->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchRefClicked ), NULL, this ); + m_specifiedRef->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchRefClicked ), NULL, this ); + m_matchCurrentValue->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchValueClicked ), NULL, this ); + m_matchSpecifiedValue->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchValueClicked ), NULL, this ); + m_specifiedValue->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchValueClicked ), NULL, this ); + m_specifiedValue->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchValueClicked ), NULL, this ); + m_matchSpecifiedID->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchIDClicked ), NULL, this ); + m_specifiedID->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchIDClicked ), NULL, this ); + m_specifiedID->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchIDClicked ), NULL, this ); + m_specifiedIDBrowseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::ViewAndSelectFootprint ), NULL, this ); + m_newIDBrowseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::ViewAndSelectFootprint ), NULL, this ); + m_exportButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::RebuildCmpList ), NULL, this ); + m_applyButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnOkClick ), NULL, this ); + m_closeButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnQuit ), NULL, this ); } DIALOG_EXCHANGE_MODULE_BASE::~DIALOG_EXCHANGE_MODULE_BASE() { // Disconnect Events - m_Selection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnSelectionClicked ), NULL, this ); - m_buttonCmpList->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::RebuildCmpList ), NULL, this ); - m_Browsebutton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::BrowseAndSelectFootprint ), NULL, this ); - m_buttonFPViewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::ViewAndSelectFootprint ), NULL, this ); - m_Applybutton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnOkClick ), NULL, this ); - m_Quitbutton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnQuit ), NULL, this ); + m_matchAll->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchAllClicked ), NULL, this ); + m_matchCurrentRef->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchRefClicked ), NULL, this ); + m_matchSpecifiedRef->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchRefClicked ), NULL, this ); + m_specifiedRef->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchRefClicked ), NULL, this ); + m_specifiedRef->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchRefClicked ), NULL, this ); + m_matchCurrentValue->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchValueClicked ), NULL, this ); + m_matchSpecifiedValue->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchValueClicked ), NULL, this ); + m_specifiedValue->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchValueClicked ), NULL, this ); + m_specifiedValue->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchValueClicked ), NULL, this ); + m_matchSpecifiedID->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchIDClicked ), NULL, this ); + m_specifiedID->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchIDClicked ), NULL, this ); + m_specifiedID->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnMatchIDClicked ), NULL, this ); + m_specifiedIDBrowseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::ViewAndSelectFootprint ), NULL, this ); + m_newIDBrowseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::ViewAndSelectFootprint ), NULL, this ); + m_exportButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::RebuildCmpList ), NULL, this ); + m_applyButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnOkClick ), NULL, this ); + m_closeButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnQuit ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_exchange_modules_base.fbp b/pcbnew/dialogs/dialog_exchange_modules_base.fbp index ab2e081856..b7ad6b3d8e 100644 --- a/pcbnew/dialogs/dialog_exchange_modules_base.fbp +++ b/pcbnew/dialogs/dialog_exchange_modules_base.fbp @@ -12,7 +12,7 @@ UTF-8 connect dialog_exchange_modules_base - 1000 + 4200 none 1 dialog_exchange_modules_base @@ -47,7 +47,7 @@ -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h - Change Footprint + %s @@ -90,9 +90,352 @@ - bMainSizer + mainSizer wxVERTICAL none + + 5 + + 0 + + + m_localizationSizer + wxHORIZONTAL + protected + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Update Footprints from Library + + 0 + + + 0 + + 1 + m_updateModeTitle + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Change Footprints + + 0 + + + 0 + + 1 + m_exchangeModeTitle + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Update + + 0 + + + 0 + + 1 + m_updateModeVerb + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Change + + 0 + + + 0 + + 1 + m_exchangeModeVerb + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 wxALL|wxEXPAND @@ -100,381 +443,22 @@ bUpperSizer - wxHORIZONTAL + wxVERTICAL none 5 - wxALIGN_CENTER_VERTICAL - 1 + wxEXPAND + 29 - bLeftSizer - wxVERTICAL - none - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Footprint value - - 0 - - - 0 - - 1 - m_staticTextCmpVal - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_CmpValue - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_READONLY - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Footprint reference - - 0 - - - 0 - - 1 - m_staticTexCmpRef - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_CmpReference - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_READONLY - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL - 0 - - - bMiddleSizer - wxVERTICAL - none - - 5 + m_allSizer + wxHORIZONTAL + protected + + 2 wxALL 0 - + 1 1 1 @@ -488,7 +472,6 @@ 1 0 - "Change footprint" "Change footprints" "Change footprints having same value" "Update all footprints of the board" 1 1 @@ -502,17 +485,16 @@ 0 0 - ID_SELECTION_CLICKED - Options - 1 + wxID_MATCH_FP_ALL + %s all footprints on board 0 0 - + -1,26 1 - m_Selection + m_matchAll 1 @@ -520,17 +502,17 @@ 1 Resizable - 1 1 - wxRA_SPECIFY_COLS - + + ; forward_declare 0 wxFILTER_NONE wxDefaultValidator + 1 @@ -551,7 +533,7 @@ - OnSelectionClicked + OnMatchAllClicked @@ -564,18 +546,1065 @@ 5 - wxALIGN_CENTER_VERTICAL + wxEXPAND + 31 + + + m_currentRefSizer + wxHORIZONTAL + protected + + 2 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_MATCH_FP_REF + %s current footprint (%s) + + 0 + + + 0 + -1,26 + 1 + m_matchCurrentRef + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + OnMatchRefClicked + + + + + + + + + + + + 5 + wxEXPAND + 29 + + + m_specifiedRefSizer + wxHORIZONTAL + protected + + 2 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_MATCH_FP_REF + %s footprint with reference: + + 0 + + + 0 + -1,26 + 1 + m_matchSpecifiedRef + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + OnMatchRefClicked + + + + + + + + + + 3 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + 80,-1 + + + 0 + -1,24 + 1 + m_specifiedRef + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnMatchRefClicked + OnMatchRefClicked + + + + + + + + + 5 + wxEXPAND + 31 + + + m_currentValueSizer + wxHORIZONTAL + protected + + 2 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_MATCH_FP_VAL + %s footprints with matching value (%s) + + 0 + + + 0 + -1,26 + 1 + m_matchCurrentValue + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + OnMatchValueClicked + + + + + + + + + + + + 5 + wxEXPAND + 31 + + + m_specifiedValueSizer + wxHORIZONTAL + protected + + 2 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_MATCH_FP_VAL + %s footprints with value: + + 0 + + + 0 + -1,26 + 1 + m_matchSpecifiedValue + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + OnMatchValueClicked + + + + + + + + + + 3 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + 160,24 + 1 + m_specifiedValue + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnMatchValueClicked + OnMatchValueClicked + + + + + + + + + 5 + wxEXPAND + 45 + + + m_specifiedIDSizer + wxVERTICAL + protected + + 2 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_MATCH_FP_ID + %s footprints with identifier: + + 0 + + + 0 + -1,-1 + 1 + m_matchSpecifiedID + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + + + + + + + + + + + + + + + OnMatchIDClicked + + + + + + + + + + 0 + wxALIGN_TOP|wxEXPAND + 0 + + + specifiedIDSizer + wxHORIZONTAL + none + + 2 + wxALIGN_CENTER_VERTICAL|wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + 500,24 + 1 + m_specifiedID + 1 + + + protected + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + OnMatchIDClicked + OnMatchIDClicked + + + + + + + 0 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + + wxID_ANY + MyButton + + 0 + + + 0 + + 1 + m_specifiedIDBrowseButton + 1 + + + protected + 1 + + Resizable + + 1 + + wxBU_AUTODRAW + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + ViewAndSelectFootprint + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + + m_middleSizer + wxVERTICAL + protected + + 0 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + staticline1 + 1 + + + none + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 2 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + New footprint identifier: + + 0 + + + 0 + + 1 + newIdLabel + 1 + + + none + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + wxEXPAND 0 - bRightSizer - wxVERTICAL + newIDSizer + wxHORIZONTAL none - 5 - wxALL|wxEXPAND - 0 - + 2 + wxALIGN_CENTER_VERTICAL|wxALL + 1 + 1 1 1 @@ -592,7 +1621,6 @@ 1 1 - 0 0 Dock 0 @@ -604,15 +1632,15 @@ 0 0 wxID_ANY - Export Footprint Association File 0 + 0 - + 500,24 1 - m_buttonCmpList + m_newID 1 @@ -623,17 +1651,17 @@ 1 - + ; forward_declare 0 wxFILTER_NONE wxDefaultValidator + - RebuildCmpList @@ -656,14 +1684,18 @@ + + + + - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 0 + wxALL 0 - + 1 1 1 @@ -674,6 +1706,7 @@ + 1 0 @@ -682,17 +1715,20 @@ 1 0 0 + Dock 0 Left 1 1 + 0 0 + wxID_ANY - List Footprints + MyButton 0 @@ -700,7 +1736,7 @@ 0 1 - m_Browsebutton + m_newIDBrowseButton 1 @@ -708,98 +1744,11 @@ 1 Resizable + 1 - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - BrowseAndSelectFootprint - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - View Footprints - - 0 - - - 0 - - 1 - m_buttonFPViewer - 1 - - - protected - 1 - - Resizable - 1 - - - + wxBU_AUTODRAW + ; forward_declare 0 @@ -841,355 +1790,7 @@ 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Current footprint identifier - - 0 - - - 0 - - 1 - m_staticTextCurrFPID - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_CurrentFootprintFPID - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_READONLY - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - New footprint identifier - - 0 - - - 0 - - 1 - m_staticTextNewFPID - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_NewFootprintFPID - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND | wxALL + wxALL|wxEXPAND 1 1 @@ -1306,11 +1907,11 @@ 0 1 - m_staticline1 + staticline2 1 - protected + none 1 Resizable @@ -1350,16 +1951,16 @@ 5 - wxALIGN_RIGHT + wxEXPAND 0 - bSizerButts + bottomSizer wxHORIZONTAL none 5 - wxEXPAND|wxALL + wxALL 0 1 @@ -1389,8 +1990,8 @@ 0 0 - wxID_OK - Apply + wxID_ANY + Export Footprint Associations 0 @@ -1398,7 +1999,7 @@ 0 1 - m_Applybutton + m_exportButton 1 @@ -1409,7 +2010,189 @@ 1 - + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + RebuildCmpList + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + + 1 + + + paddingSizer + wxHORIZONTAL + none + + 5 + wxALL + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + + 0 + + + 0 + + 1 + padding1 + 1 + + + none + 1 + + Resizable + 1 + + + ; forward_declare + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Apply + + 0 + + + 0 + + 1 + m_applyButton + 1 + + + private + 1 + + Resizable + 1 + + + ; forward_declare 0 @@ -1447,7 +2230,7 @@ 5 - wxALL|wxEXPAND + wxALL 0 1 @@ -1477,7 +2260,7 @@ 0 0 - wxID_CANCEL + wxID_ANY Close 0 @@ -1486,18 +2269,18 @@ 0 1 - m_Quitbutton + m_closeButton 1 - protected + private 1 Resizable 1 - + ; forward_declare 0 diff --git a/pcbnew/dialogs/dialog_exchange_modules_base.h b/pcbnew/dialogs/dialog_exchange_modules_base.h index 34275d5313..473a8837c8 100644 --- a/pcbnew/dialogs/dialog_exchange_modules_base.h +++ b/pcbnew/dialogs/dialog_exchange_modules_base.h @@ -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! @@ -20,17 +20,24 @@ class WX_HTML_REPORT_PANEL; #include #include #include -#include #include -#include +#include +#include +#include +#include +#include +#include #include -#include #include +#include #include /////////////////////////////////////////////////////////////////////////// -#define ID_SELECTION_CLICKED 1000 +#define wxID_MATCH_FP_ALL 4200 +#define wxID_MATCH_FP_REF 4201 +#define wxID_MATCH_FP_VAL 4202 +#define wxID_MATCH_FP_ID 4203 /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_EXCHANGE_MODULE_BASE @@ -38,37 +45,51 @@ class WX_HTML_REPORT_PANEL; class DIALOG_EXCHANGE_MODULE_BASE : public DIALOG_SHIM { private: + wxButton* m_applyButton; + wxButton* m_closeButton; protected: - wxStaticText* m_staticTextCmpVal; - wxTextCtrl* m_CmpValue; - wxStaticText* m_staticTexCmpRef; - wxTextCtrl* m_CmpReference; - wxRadioBox* m_Selection; - wxButton* m_buttonCmpList; - wxButton* m_Browsebutton; - wxButton* m_buttonFPViewer; - wxStaticText* m_staticTextCurrFPID; - wxTextCtrl* m_CurrentFootprintFPID; - wxStaticText* m_staticTextNewFPID; - wxTextCtrl* m_NewFootprintFPID; + wxBoxSizer* m_localizationSizer; + wxStaticText* m_updateModeTitle; + wxStaticText* m_exchangeModeTitle; + wxStaticText* m_updateModeVerb; + wxStaticText* m_exchangeModeVerb; + wxBoxSizer* m_allSizer; + wxRadioButton* m_matchAll; + wxBoxSizer* m_currentRefSizer; + wxRadioButton* m_matchCurrentRef; + wxBoxSizer* m_specifiedRefSizer; + wxRadioButton* m_matchSpecifiedRef; + wxTextCtrl* m_specifiedRef; + wxBoxSizer* m_currentValueSizer; + wxRadioButton* m_matchCurrentValue; + wxBoxSizer* m_specifiedValueSizer; + wxRadioButton* m_matchSpecifiedValue; + wxTextCtrl* m_specifiedValue; + wxBoxSizer* m_specifiedIDSizer; + wxRadioButton* m_matchSpecifiedID; + wxTextCtrl* m_specifiedID; + wxBitmapButton* m_specifiedIDBrowseButton; + wxBoxSizer* m_middleSizer; + wxTextCtrl* m_newID; + wxBitmapButton* m_newIDBrowseButton; WX_HTML_REPORT_PANEL* m_MessageWindow; - wxStaticLine* m_staticline1; - wxButton* m_Applybutton; - wxButton* m_Quitbutton; + wxButton* m_exportButton; // Virtual event handlers, overide them in your derived class - virtual void OnSelectionClicked( wxCommandEvent& event ) { event.Skip(); } - virtual void RebuildCmpList( wxCommandEvent& event ) { event.Skip(); } - virtual void BrowseAndSelectFootprint( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMatchAllClicked( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMatchRefClicked( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMatchValueClicked( wxCommandEvent& event ) { event.Skip(); } + virtual void OnMatchIDClicked( wxCommandEvent& event ) { event.Skip(); } virtual void ViewAndSelectFootprint( wxCommandEvent& event ) { event.Skip(); } + virtual void RebuildCmpList( wxCommandEvent& event ) { event.Skip(); } virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnQuit( wxCommandEvent& event ) { event.Skip(); } public: - DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Change Footprint"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("%s"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_EXCHANGE_MODULE_BASE(); }; diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 3177df8c5a..c0220364eb 100644 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -852,13 +852,19 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) Change_Side_Module( (MODULE*) GetCurItem(), &dc ); break; - case ID_POPUP_PCB_EXCHANGE_FOOTPRINTS: - if( !GetCurItem() || GetCurItem()->Type() != PCB_MODULE_T ) + case ID_POPUP_PCB_UPDATE_FOOTPRINTS: + if( GetCurItem() && GetCurItem()->Type() != PCB_MODULE_T ) break; - InstallExchangeModuleFrame( (MODULE*) GetCurItem() ); - // Warning: the current item can be deleted by exchange module - SetCurItem( NULL ); + InstallExchangeModuleFrame( (MODULE*) GetCurItem(), true ); + m_canvas->MoveCursorToCrossHair(); + break; + + case ID_POPUP_PCB_EXCHANGE_FOOTPRINTS: + if( GetCurItem() && GetCurItem()->Type() != PCB_MODULE_T ) + break; + + InstallExchangeModuleFrame( (MODULE*) GetCurItem(), false ); m_canvas->MoveCursorToCrossHair(); break; @@ -1236,6 +1242,14 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) Clean_Pcb(); break; + case ID_MENU_PCB_UPDATE_FOOTPRINTS: + InstallExchangeModuleFrame( (MODULE*) nullptr, true ); + break; + + case ID_MENU_PCB_EXCHANGE_FOOTPRINTS: + InstallExchangeModuleFrame( (MODULE*) nullptr, false ); + break; + case ID_MENU_PCB_SWAP_LAYERS: Swap_Layers( event ); break; diff --git a/pcbnew/editmod.cpp b/pcbnew/editmod.cpp index 8f0dfbb735..db432e66e3 100644 --- a/pcbnew/editmod.cpp +++ b/pcbnew/editmod.cpp @@ -87,11 +87,14 @@ void PCB_EDIT_FRAME::InstallModuleOptionsFrame( MODULE* Module, wxDC* DC ) editor->Raise(); // Iconize( false ); } + if( retvalue == DIALOG_MODULE_BOARD_EDITOR::PRM_EDITOR_WANT_UPDATE_FP ) + { + InstallExchangeModuleFrame( Module, true ); + } + if( retvalue == DIALOG_MODULE_BOARD_EDITOR::PRM_EDITOR_WANT_EXCHANGE_FP ) { - InstallExchangeModuleFrame( Module ); - // Warning: the current item can be deleted by exchange module - SetCurItem( NULL ); + InstallExchangeModuleFrame( Module, false ); } } diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index b262f56749..36032d9ab1 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -488,6 +488,16 @@ void prepareEditMenu( wxMenu* aParentMenu, bool aUseGal ) _( "Set text size and width of footprint fields" ), KiBitmap( reset_text_xpm ) ); + AddMenuItem( aParentMenu, ID_MENU_PCB_UPDATE_FOOTPRINTS, + _( "Update Footprints from Library" ), + _( "Update footprints to include any changes from the library" ), + KiBitmap( reload_xpm ) ); + + AddMenuItem( aParentMenu, ID_MENU_PCB_EXCHANGE_FOOTPRINTS, + _( "Change Footprints" ), + _( "Assign different footprints from the library" ), + KiBitmap( exchange_xpm ) ); + AddMenuItem( aParentMenu, ID_MENU_PCB_SWAP_LAYERS, _( "&Swap Layers" ), _( "Swap tracks on copper layers or drawings on other layers" ), diff --git a/pcbnew/onrightclick.cpp b/pcbnew/onrightclick.cpp index d39a67cd48..cbc47ff747 100644 --- a/pcbnew/onrightclick.cpp +++ b/pcbnew/onrightclick.cpp @@ -850,6 +850,9 @@ void PCB_EDIT_FRAME::createPopUpMenuForFootprints( MODULE* aModule, wxMenu* menu AddMenuItem( sub_menu_footprint, ID_POPUP_PCB_CREATE_ARRAY, msg, KiBitmap( array_xpm ) ); + AddMenuItem( sub_menu_footprint, ID_POPUP_PCB_UPDATE_FOOTPRINTS, + _( "Update Footprint" ), KiBitmap( reload_xpm ) ); + AddMenuItem( sub_menu_footprint, ID_POPUP_PCB_EXCHANGE_FOOTPRINTS, _( "Change Footprint" ), KiBitmap( exchange_xpm ) ); } diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 2675ff9f2a..fc229482f5 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -173,6 +173,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_MENU( ID_PCB_EDIT_ALL_VIAS_AND_TRACK_SIZE, PCB_EDIT_FRAME::Process_Special_Functions ) EVT_MENU( ID_PCB_GLOBAL_DELETE, PCB_EDIT_FRAME::Process_Special_Functions ) EVT_MENU( ID_MENU_PCB_CLEAN, PCB_EDIT_FRAME::Process_Special_Functions ) + EVT_MENU( ID_MENU_PCB_UPDATE_FOOTPRINTS, PCB_EDIT_FRAME::Process_Special_Functions ) + EVT_MENU( ID_MENU_PCB_EXCHANGE_FOOTPRINTS, PCB_EDIT_FRAME::Process_Special_Functions ) EVT_MENU( ID_MENU_PCB_SWAP_LAYERS, PCB_EDIT_FRAME::Process_Special_Functions ) EVT_MENU( ID_MENU_PCB_RESET_TEXTMODULE_FIELDS_SIZES, PCB_EDIT_FRAME::OnResetModuleTextSizes ) @@ -1278,9 +1280,9 @@ void PCB_EDIT_FRAME::PythonPluginsReload() } -int PCB_EDIT_FRAME::InstallExchangeModuleFrame( MODULE* Module ) +int PCB_EDIT_FRAME::InstallExchangeModuleFrame( MODULE* Module, bool updateMode ) { - DIALOG_EXCHANGE_MODULE dialog( this, Module ); + DIALOG_EXCHANGE_MODULE dialog( this, Module, updateMode ); return dialog.ShowQuasiModal(); } diff --git a/pcbnew/pcbnew_id.h b/pcbnew/pcbnew_id.h index 41184794ee..02d35e49e5 100644 --- a/pcbnew/pcbnew_id.h +++ b/pcbnew/pcbnew_id.h @@ -67,6 +67,7 @@ enum pcbnew_ids ID_POPUP_PCB_DELETE_MODULE, ID_POPUP_PCB_ROTATE_MODULE_CLOCKWISE, ID_POPUP_PCB_ROTATE_MODULE_COUNTERCLOCKWISE, + ID_POPUP_PCB_UPDATE_FOOTPRINTS, ID_POPUP_PCB_EXCHANGE_FOOTPRINTS, ID_POPUP_PCB_EDIT_PAD, @@ -266,6 +267,8 @@ enum pcbnew_ids ID_MENU_LIST_NETS, ID_PCB_EDIT_ALL_VIAS_AND_TRACK_SIZE, ID_MENU_PCB_CLEAN, + ID_MENU_PCB_UPDATE_FOOTPRINTS, + ID_MENU_PCB_EXCHANGE_FOOTPRINTS, ID_MENU_PCB_SWAP_LAYERS, ID_MENU_PCB_RESET_TEXTMODULE_FIELDS_SIZES, diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 5575c651b3..d6dae64428 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -146,9 +146,14 @@ TOOL_ACTION PCB_ACTIONS::removeAlt( "pcbnew.InteractiveEdit.removeAlt", _( "Delete (Alternative)" ), _( "Deletes selected item(s)" ), delete_xpm, AF_NONE, (void*) REMOVE_FLAGS::ALT ); +TOOL_ACTION PCB_ACTIONS::updateFootprints( "pcbnew.InteractiveEdit.updateFootprints", + AS_GLOBAL, 0, + _( "Update Footprint" ), _( "Update the footprint from the library" ), + reload_xpm ); + TOOL_ACTION PCB_ACTIONS::exchangeFootprints( "pcbnew.InteractiveEdit.ExchangeFootprints", AS_GLOBAL, 0, - _( "Exchange Footprint" ), _( "Change the footprint used for modules" ), + _( "Change Footprint" ), _( "Assign a different footprint from the library" ), exchange_xpm ); TOOL_ACTION PCB_ACTIONS::properties( "pcbnew.InteractiveEdit.properties", @@ -313,10 +318,9 @@ bool EDIT_TOOL::Init() menu.AddItem( PCB_ACTIONS::explodePadToShapes, editingModuleCondition && SELECTION_CONDITIONS::NotEmpty ); // Footprint actions - menu.AddItem( PCB_ACTIONS::editFootprintInFpEditor, - singleModuleCondition ); - menu.AddItem( PCB_ACTIONS::exchangeFootprints, - singleModuleCondition ); + menu.AddItem( PCB_ACTIONS::editFootprintInFpEditor, singleModuleCondition ); + menu.AddItem( PCB_ACTIONS::updateFootprints, singleModuleCondition ); + menu.AddItem( PCB_ACTIONS::exchangeFootprints, singleModuleCondition ); return true; } @@ -1100,13 +1104,9 @@ int EDIT_TOOL::ExchangeFootprints( const TOOL_EVENT& aEvent ) { const auto& selection = m_selectionTool->RequestSelection( 0, FootprintFilter ); - if( selection.Empty() ) - return 0; + bool updateMode = aEvent.IsAction( &PCB_ACTIONS::updateFootprints ); - MODULE* mod = selection.FirstOfKind (); - - if( !mod ) - return 0; + MODULE* mod = (selection.Empty() ? nullptr : selection.FirstOfKind () ); frame()->SetCurItem( mod ); @@ -1116,14 +1116,10 @@ int EDIT_TOOL::ExchangeFootprints( const TOOL_EVENT& aEvent ) // invoke the exchange dialog process { - DIALOG_EXCHANGE_MODULE dialog( frame(), mod ); + DIALOG_EXCHANGE_MODULE dialog( frame(), mod, updateMode ); dialog.ShowQuasiModal(); } - // The current item can be deleted by exchange module, and the - // selection is emptied, so remove current item from frame info area - frame()->SetCurItem( nullptr ); - return 0; } @@ -1240,6 +1236,7 @@ void EDIT_TOOL::setTransitions() Go( &EDIT_TOOL::Mirror, PCB_ACTIONS::mirror.MakeEvent() ); Go( &EDIT_TOOL::editFootprintInFpEditor, PCB_ACTIONS::editFootprintInFpEditor.MakeEvent() ); + Go( &EDIT_TOOL::ExchangeFootprints, PCB_ACTIONS::updateFootprints.MakeEvent() ); Go( &EDIT_TOOL::ExchangeFootprints, PCB_ACTIONS::exchangeFootprints.MakeEvent() ); Go( &EDIT_TOOL::MeasureTool, PCB_ACTIONS::measureTool.MakeEvent() ); Go( &EDIT_TOOL::copyToClipboard, PCB_ACTIONS::copyToClipboard.MakeEvent() ); diff --git a/pcbnew/tools/edit_tool.h b/pcbnew/tools/edit_tool.h index 3a4cd7a20f..ee3a15e850 100644 --- a/pcbnew/tools/edit_tool.h +++ b/pcbnew/tools/edit_tool.h @@ -128,8 +128,8 @@ public: /** * Function ExchangeFootprints() * - * Invoke the dialog used to change the footprints used for modules - * and update module footprints based on result + * Invoke the dialog used to update or exchange the footprints used for + * modules. The mode depends on the PCB_ACTIONS held by the TOOL_EVENT. */ int ExchangeFootprints( const TOOL_EVENT& aEvent ); diff --git a/pcbnew/tools/pcb_actions.h b/pcbnew/tools/pcb_actions.h index 8926b82320..ce16016325 100644 --- a/pcbnew/tools/pcb_actions.h +++ b/pcbnew/tools/pcb_actions.h @@ -116,6 +116,9 @@ public: /// Activation of the duplication tool with incrementing (e.g. pad number) static TOOL_ACTION duplicateIncrement; + /// Update footprints to reflect any changes in the library + static TOOL_ACTION updateFootprints; + /// Exchange footprints of modules static TOOL_ACTION exchangeFootprints; diff --git a/pcbnew/wxPcbStruct.h b/pcbnew/wxPcbStruct.h index 41a2ee0234..e05b35a3ca 100644 --- a/pcbnew/wxPcbStruct.h +++ b/pcbnew/wxPcbStruct.h @@ -1134,7 +1134,7 @@ public: */ void Change_Side_Module( MODULE* Module, wxDC* DC ); - int InstallExchangeModuleFrame( MODULE* ExchangeModuleModule ); + int InstallExchangeModuleFrame( MODULE* ExchangeModuleModule, bool updateMode ); /** * Function Exchange_Module