2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2021-01-28 17:32:43 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
2013-05-26 04:36:44 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
2018-02-17 16:27:59 +00:00
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2015-06-16 12:20:42 +00:00
|
|
|
#include "wx_html_report_panel.h"
|
|
|
|
|
2018-02-16 16:52:19 +00:00
|
|
|
#include "dialog_gen_footprint_position_file_base.h"
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-02-16 19:26:55 +00: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-26 04:36:44 +00:00
|
|
|
{
|
|
|
|
this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
m_MainSizer = new wxBoxSizer( wxVERTICAL );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
wxBoxSizer* bUpperSizer;
|
|
|
|
bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
wxBoxSizer* bSizerdirBrowse;
|
|
|
|
bSizerdirBrowse = new wxBoxSizer( wxHORIZONTAL );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_staticTextDir->Wrap( -1 );
|
2019-04-05 20:15:16 +00:00
|
|
|
bSizerdirBrowse->Add( m_staticTextDir, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
|
|
|
|
|
2013-05-26 04:36:44 +00: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 20:15:16 +00:00
|
|
|
|
2020-04-05 21:17:26 +00:00
|
|
|
bSizerdirBrowse->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL, 5 );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
|
|
|
m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
|
|
|
bSizerdirBrowse->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
|
|
|
|
|
|
|
|
|
2020-04-05 21:17:26 +00:00
|
|
|
bUpperSizer->Add( bSizerdirBrowse, 1, wxEXPAND|wxALL, 10 );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
|
|
|
|
2018-02-28 09:44:22 +00:00
|
|
|
m_MainSizer->Add( bUpperSizer, 0, wxEXPAND, 2 );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2019-06-30 11:54:35 +00:00
|
|
|
wxBoxSizer* bSizerMiddle;
|
|
|
|
bSizerMiddle = new wxBoxSizer( wxHORIZONTAL );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2019-09-15 15:08:57 +00:00
|
|
|
wxString m_rbFormatChoices[] = { _("ASCII"), _("CSV"), _("Gerber (very experimental)") };
|
2016-04-26 12:16:16 +00:00
|
|
|
int m_rbFormatNChoices = sizeof( m_rbFormatChoices ) / sizeof( wxString );
|
2018-02-28 09:44:22 +00:00
|
|
|
m_rbFormat = new wxRadioBox( this, wxID_ANY, _("Format"), wxDefaultPosition, wxDefaultSize, m_rbFormatNChoices, m_rbFormatChoices, 1, wxRA_SPECIFY_COLS );
|
2019-11-01 12:35:42 +00:00
|
|
|
m_rbFormat->SetSelection( 2 );
|
2020-04-05 21:17:26 +00:00
|
|
|
bSizerMiddle->Add( m_rbFormat, 1, wxALL|wxEXPAND, 5 );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2018-07-07 16:46:23 +00:00
|
|
|
wxString m_radioBoxUnitsChoices[] = { _("Inches"), _("Millimeters") };
|
2013-05-26 04:36:44 +00:00
|
|
|
int m_radioBoxUnitsNChoices = sizeof( m_radioBoxUnitsChoices ) / sizeof( wxString );
|
2018-02-28 09:44:22 +00:00
|
|
|
m_radioBoxUnits = new wxRadioBox( this, wxID_ANY, _("Units"), wxDefaultPosition, wxDefaultSize, m_radioBoxUnitsNChoices, m_radioBoxUnitsChoices, 1, wxRA_SPECIFY_COLS );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_radioBoxUnits->SetSelection( 0 );
|
2020-04-05 21:17:26 +00:00
|
|
|
bSizerMiddle->Add( m_radioBoxUnits, 1, wxALL|wxEXPAND, 5 );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2020-04-05 21:17:26 +00:00
|
|
|
wxString m_radioBoxFilesCountChoices[] = { _("Separate files for front, back"), _("Single file for board") };
|
2013-05-26 04:36:44 +00:00
|
|
|
int m_radioBoxFilesCountNChoices = sizeof( m_radioBoxFilesCountChoices ) / sizeof( wxString );
|
2018-02-28 09:44:22 +00:00
|
|
|
m_radioBoxFilesCount = new wxRadioBox( this, wxID_ANY, _("Files"), wxDefaultPosition, wxDefaultSize, m_radioBoxFilesCountNChoices, m_radioBoxFilesCountChoices, 1, wxRA_SPECIFY_COLS );
|
2018-07-07 16:46:23 +00:00
|
|
|
m_radioBoxFilesCount->SetSelection( 0 );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_radioBoxFilesCount->SetToolTip( _("Creates 2 files: one for each board side or\nCreates only one file containing all footprints to place\n") );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2020-04-05 21:17:26 +00:00
|
|
|
bSizerMiddle->Add( m_radioBoxFilesCount, 1, wxALL|wxEXPAND, 5 );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
|
|
|
|
2019-11-01 12:35:42 +00:00
|
|
|
m_MainSizer->Add( bSizerMiddle, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2019-06-30 11:54:35 +00:00
|
|
|
wxBoxSizer* bSizerLower;
|
|
|
|
bSizerLower = new wxBoxSizer( wxVERTICAL );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2020-08-26 21:43:38 +00:00
|
|
|
m_excludeTH = new wxCheckBox( this, wxID_ANY, _("Exclude all footprints with through hole pads"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSizerLower->Add( m_excludeTH, 0, wxALL, 5 );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2019-11-01 12:35:42 +00:00
|
|
|
m_cbIncludeBoardEdge = new wxCheckBox( this, wxID_ANY, _("Include board edge layer"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSizerLower->Add( m_cbIncludeBoardEdge, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
2015-06-16 12:20:42 +00:00
|
|
|
m_messagesPanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
2019-06-30 11:54:35 +00:00
|
|
|
m_messagesPanel->SetMinSize( wxSize( 350,300 ) );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2019-06-30 11:54:35 +00:00
|
|
|
bSizerLower->Add( m_messagesPanel, 1, wxEXPAND | wxALL, 5 );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
|
|
|
|
2019-06-30 11:54:35 +00:00
|
|
|
m_MainSizer->Add( bSizerLower, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2019-11-01 12:35:42 +00:00
|
|
|
m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
|
|
|
m_MainSizer->Add( m_staticline, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
2019-06-30 11:54:35 +00: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 20:15:16 +00:00
|
|
|
|
2019-06-30 11:54:35 +00:00
|
|
|
m_MainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
this->SetSizer( m_MainSizer );
|
|
|
|
this->Layout();
|
2020-11-11 15:58:12 +00:00
|
|
|
m_MainSizer->Fit( this );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
this->Centre( wxBOTH );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Connect Events
|
2018-02-16 19:26:55 +00:00
|
|
|
m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
|
2019-09-15 15:08:57 +00:00
|
|
|
m_rbFormat->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onSelectFormat ), NULL, this );
|
|
|
|
m_radioBoxUnits->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIUnits ), NULL, this );
|
|
|
|
m_radioBoxFilesCount->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIFileOpt ), NULL, this );
|
2020-08-26 21:43:38 +00:00
|
|
|
m_excludeTH->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
|
2019-11-01 12:35:42 +00:00
|
|
|
m_cbIncludeBoardEdge->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIincludeBoardEdge ), NULL, this );
|
2019-06-30 11:54:35 +00:00
|
|
|
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnGenerate ), NULL, this );
|
2013-05-26 04:36:44 +00:00
|
|
|
}
|
|
|
|
|
2018-02-16 19:26:55 +00:00
|
|
|
DIALOG_GEN_FOOTPRINT_POSITION_BASE::~DIALOG_GEN_FOOTPRINT_POSITION_BASE()
|
2013-05-26 04:36:44 +00:00
|
|
|
{
|
|
|
|
// Disconnect Events
|
2018-02-16 19:26:55 +00:00
|
|
|
m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
|
2019-09-15 15:08:57 +00:00
|
|
|
m_rbFormat->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onSelectFormat ), NULL, this );
|
|
|
|
m_radioBoxUnits->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIUnits ), NULL, this );
|
|
|
|
m_radioBoxFilesCount->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIFileOpt ), NULL, this );
|
2020-08-26 21:43:38 +00:00
|
|
|
m_excludeTH->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
|
2019-11-01 12:35:42 +00:00
|
|
|
m_cbIncludeBoardEdge->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIincludeBoardEdge ), NULL, this );
|
2019-06-30 11:54:35 +00:00
|
|
|
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnGenerate ), NULL, this );
|
2019-04-05 20:15:16 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
}
|