2013-05-25 23:36:44 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2025-01-08 16:58:15 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
|
2013-05-25 23:36:44 -05:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
2018-02-17 16:27:59 +00:00
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
2013-05-25 23:36:44 -05:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2022-12-13 20:47:28 +00:00
|
|
|
#include "widgets/std_bitmap_button.h"
|
2022-09-03 19:29:02 +01:00
|
|
|
#include "widgets/wx_html_report_panel.h"
|
2015-06-16 14:20:42 +02:00
|
|
|
|
2018-02-16 17:52:19 +01:00
|
|
|
#include "dialog_gen_footprint_position_file_base.h"
|
2013-05-25 23:36:44 -05:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-02-16 20:26:55 +01:00
|
|
|
DIALOG_GEN_FOOTPRINT_POSITION_BASE::DIALOG_GEN_FOOTPRINT_POSITION_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
|
2013-05-25 23:36:44 -05:00
|
|
|
{
|
|
|
|
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2013-05-25 23:36:44 -05:00
|
|
|
m_MainSizer = new wxBoxSizer( wxVERTICAL );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2013-05-25 23:36:44 -05:00
|
|
|
wxBoxSizer* bUpperSizer;
|
|
|
|
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
wxBoxSizer* bSizerdirBrowse;
|
|
|
|
bSizerdirBrowse = new wxBoxSizer( wxHORIZONTAL );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2013-05-25 23:36:44 -05:00
|
|
|
m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_staticTextDir->Wrap( -1 );
|
2019-04-05 16:15:16 -04:00
|
|
|
bSizerdirBrowse->Add( m_staticTextDir, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
|
|
|
|
2013-05-25 23:36:44 -05:00
|
|
|
m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the board file location.") );
|
|
|
|
m_outputDirectoryName->SetMinSize( wxSize( 350,-1 ) );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2020-04-05 22:17:26 +01:00
|
|
|
bSizerdirBrowse->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL, 5 );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2022-12-13 20:47:28 +00:00
|
|
|
m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
|
|
|
bSizerdirBrowse->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
|
|
|
|
2020-04-05 22:17:26 +01:00
|
|
|
bUpperSizer->Add( bSizerdirBrowse, 1, wxEXPAND|wxALL, 10 );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
m_MainSizer->Add( bUpperSizer, 0, wxEXPAND, 2 );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2019-06-30 13:54:35 +02:00
|
|
|
wxBoxSizer* bSizerMiddle;
|
|
|
|
bSizerMiddle = new wxBoxSizer( wxHORIZONTAL );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2025-01-08 16:58:15 +00:00
|
|
|
wxFlexGridSizer* fgSizer1;
|
|
|
|
fgSizer1 = new wxFlexGridSizer( 0, 2, 5, 5 );
|
|
|
|
fgSizer1->AddGrowableCol( 1 );
|
|
|
|
fgSizer1->SetFlexibleDirection( wxBOTH );
|
|
|
|
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2025-01-08 16:58:15 +00:00
|
|
|
m_formatLabel = new wxStaticText( this, wxID_ANY, _("Format:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_formatLabel->Wrap( -1 );
|
|
|
|
fgSizer1->Add( m_formatLabel, 0, wxRIGHT, 5 );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2025-01-08 17:13:37 +00:00
|
|
|
wxString m_formatCtrlChoices[] = { _("ASCII"), _("CSV"), _("Gerber X3") };
|
|
|
|
int m_formatCtrlNChoices = sizeof( m_formatCtrlChoices ) / sizeof( wxString );
|
|
|
|
m_formatCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_formatCtrlNChoices, m_formatCtrlChoices, 0 );
|
|
|
|
m_formatCtrl->SetSelection( 0 );
|
|
|
|
fgSizer1->Add( m_formatCtrl, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2025-01-08 16:58:15 +00:00
|
|
|
m_unitsLabel = new wxStaticText( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_unitsLabel->Wrap( -1 );
|
|
|
|
fgSizer1->Add( m_unitsLabel, 0, wxRIGHT, 5 );
|
|
|
|
|
2025-01-08 17:13:37 +00:00
|
|
|
wxString m_unitsCtrlChoices[] = { _("Inches"), _("Millimeters") };
|
|
|
|
int m_unitsCtrlNChoices = sizeof( m_unitsCtrlChoices ) / sizeof( wxString );
|
|
|
|
m_unitsCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitsCtrlNChoices, m_unitsCtrlChoices, 0 );
|
2025-08-08 22:31:09 +01:00
|
|
|
m_unitsCtrl->SetSelection( 1 );
|
2025-01-08 17:13:37 +00:00
|
|
|
fgSizer1->Add( m_unitsCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
2025-01-08 16:58:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
bSizerMiddle->Add( fgSizer1, 1, wxEXPAND|wxBOTTOM|wxLEFT, 5 );
|
|
|
|
|
|
|
|
wxBoxSizer* bSizer6;
|
|
|
|
bSizer6 = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
|
|
|
|
bSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
bSizerMiddle->Add( bSizer6, 1, wxEXPAND, 5 );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
|
|
|
|
2019-11-01 13:35:42 +01:00
|
|
|
m_MainSizer->Add( bSizerMiddle, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2019-06-30 13:54:35 +02:00
|
|
|
wxBoxSizer* bSizerLower;
|
|
|
|
bSizerLower = new wxBoxSizer( wxVERTICAL );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2021-07-20 10:23:21 +02:00
|
|
|
m_onlySMD = new wxCheckBox( this, wxID_ANY, _("Include only SMD footprints"), wxDefaultPosition, wxDefaultSize, 0 );
|
2023-05-08 10:57:33 +01:00
|
|
|
bSizerLower->Add( m_onlySMD, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2021-07-20 10:23:21 +02:00
|
|
|
|
2020-08-26 22:43:38 +01:00
|
|
|
m_excludeTH = new wxCheckBox( this, wxID_ANY, _("Exclude all footprints with through hole pads"), wxDefaultPosition, wxDefaultSize, 0 );
|
2021-08-21 10:52:51 +02:00
|
|
|
bSizerLower->Add( m_excludeTH, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2023-08-04 11:02:10 -07:00
|
|
|
m_excludeDNP = new wxCheckBox( this, wxID_ANY, _("Exclude all footprints with the Do Not Populate flag set"), wxDefaultPosition, wxDefaultSize, 0 );
|
2025-01-08 16:58:15 +00:00
|
|
|
bSizerLower->Add( m_excludeDNP, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2023-08-04 11:02:10 -07:00
|
|
|
|
2019-11-01 13:35:42 +01:00
|
|
|
m_cbIncludeBoardEdge = new wxCheckBox( this, wxID_ANY, _("Include board edge layer"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSizerLower->Add( m_cbIncludeBoardEdge, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
2021-06-27 17:39:09 +01:00
|
|
|
m_useDrillPlaceOrigin = new wxCheckBox( this, wxID_ANY, _("Use drill/place file origin"), wxDefaultPosition, wxDefaultSize, 0 );
|
2025-08-08 22:31:09 +01:00
|
|
|
m_useDrillPlaceOrigin->SetValue(true);
|
2021-06-27 17:39:09 +01:00
|
|
|
bSizerLower->Add( m_useDrillPlaceOrigin, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
2022-08-02 11:22:12 +02:00
|
|
|
m_negateXcb = new wxCheckBox( this, wxID_ANY, _("Use negative X coordinates for footprints on bottom layer"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSizerLower->Add( m_negateXcb, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
2025-01-08 17:13:37 +00:00
|
|
|
m_singleFile = new wxCheckBox( this, wxID_ANY, _("Generate single file with both front and back positions"), wxDefaultPosition, wxDefaultSize, 0 );
|
2025-08-08 22:31:09 +01:00
|
|
|
m_singleFile->SetValue(true);
|
2025-01-08 17:13:37 +00:00
|
|
|
bSizerLower->Add( m_singleFile, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2025-01-08 16:58:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
bSizerLower->Add( 0, 5, 0, wxEXPAND, 5 );
|
|
|
|
|
2015-06-16 14:20:42 +02:00
|
|
|
m_messagesPanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
2025-01-08 16:58:15 +00:00
|
|
|
m_messagesPanel->SetMinSize( wxSize( 350,120 ) );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2023-05-08 10:57:33 +01:00
|
|
|
bSizerLower->Add( m_messagesPanel, 1, wxEXPAND|wxTOP, 10 );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
|
|
|
|
2025-01-08 16:58:15 +00:00
|
|
|
m_MainSizer->Add( bSizerLower, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2019-06-30 13:54:35 +02:00
|
|
|
m_sdbSizer = new wxStdDialogButtonSizer();
|
|
|
|
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
|
|
|
m_sdbSizer->AddButton( m_sdbSizerOK );
|
|
|
|
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
|
|
|
|
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
|
|
|
m_sdbSizer->Realize();
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2019-06-30 13:54:35 +02:00
|
|
|
m_MainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
|
|
|
|
2013-05-25 23:36:44 -05:00
|
|
|
this->SetSizer( m_MainSizer );
|
|
|
|
this->Layout();
|
2020-11-11 10:58:12 -05:00
|
|
|
m_MainSizer->Fit( this );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2013-05-25 23:36:44 -05:00
|
|
|
this->Centre( wxBOTH );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2013-05-25 23:36:44 -05:00
|
|
|
// Connect Events
|
2025-01-08 16:58:15 +00:00
|
|
|
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onOutputDirectoryBrowseClicked ), NULL, this );
|
2025-01-08 17:13:37 +00:00
|
|
|
m_formatCtrl->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIFileOpt ), NULL, this );
|
|
|
|
m_unitsCtrl->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIUnits ), NULL, this );
|
2021-07-20 10:23:21 +02:00
|
|
|
m_onlySMD->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIOnlySMD ), NULL, this );
|
2020-08-26 22:43:38 +01:00
|
|
|
m_excludeTH->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
|
2023-08-04 11:02:10 -07:00
|
|
|
m_excludeDNP->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
|
2019-11-01 13:35:42 +01:00
|
|
|
m_cbIncludeBoardEdge->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIincludeBoardEdge ), NULL, this );
|
2022-08-02 11:22:12 +02:00
|
|
|
m_negateXcb->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUInegXcoord ), NULL, this );
|
2025-01-08 17:13:37 +00:00
|
|
|
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onGenerate ), NULL, this );
|
2013-05-25 23:36:44 -05:00
|
|
|
}
|
|
|
|
|
2018-02-16 20:26:55 +01:00
|
|
|
DIALOG_GEN_FOOTPRINT_POSITION_BASE::~DIALOG_GEN_FOOTPRINT_POSITION_BASE()
|
2013-05-25 23:36:44 -05:00
|
|
|
{
|
|
|
|
// Disconnect Events
|
2025-01-08 16:58:15 +00:00
|
|
|
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onOutputDirectoryBrowseClicked ), NULL, this );
|
2025-01-08 17:13:37 +00:00
|
|
|
m_formatCtrl->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIFileOpt ), NULL, this );
|
|
|
|
m_unitsCtrl->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIUnits ), NULL, this );
|
2021-07-20 10:23:21 +02:00
|
|
|
m_onlySMD->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIOnlySMD ), NULL, this );
|
2020-08-26 22:43:38 +01:00
|
|
|
m_excludeTH->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
|
2023-08-04 11:02:10 -07:00
|
|
|
m_excludeDNP->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
|
2019-11-01 13:35:42 +01:00
|
|
|
m_cbIncludeBoardEdge->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIincludeBoardEdge ), NULL, this );
|
2022-08-02 11:22:12 +02:00
|
|
|
m_negateXcb->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUInegXcoord ), NULL, this );
|
2025-01-08 17:13:37 +00:00
|
|
|
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onGenerate ), NULL, this );
|
2019-04-05 16:15:16 -04:00
|
|
|
|
2013-05-25 23:36:44 -05:00
|
|
|
}
|