2013-02-22 13:47:35 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2018-02-16 16:52:19 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version Aug 4 2017)
|
2013-02-22 13:47:35 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
2018-02-06 09:54:11 +00:00
|
|
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
2013-02-22 13:47:35 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2017-08-18 18:26:45 +00:00
|
|
|
#include "wx_html_report_panel.h"
|
|
|
|
|
2018-02-16 16:52:19 +00:00
|
|
|
#include "dialog_exchange_footprints_base.h"
|
2013-02-22 13:47:35 +00:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
DIALOG_EXCHANGE_MODULE_BASE::DIALOG_EXCHANGE_MODULE_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 );
|
|
|
|
|
2018-01-28 18:44:52 +00:00
|
|
|
m_mainSizer = new wxBoxSizer( wxVERTICAL );
|
2018-01-12 19:36:15 +00:00
|
|
|
|
2018-01-28 18:44:52 +00:00
|
|
|
m_upperSizer = new wxGridBagSizer( 0, 0 );
|
|
|
|
m_upperSizer->SetFlexibleDirection( wxBOTH );
|
|
|
|
m_upperSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
2018-01-12 19:36:15 +00:00
|
|
|
|
2018-02-10 16:07:02 +00:00
|
|
|
m_matchAll = new wxRadioButton( this, wxID_ANY, _("%s all footprints on board"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_upperSizer->Add( m_matchAll, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALL, 5 );
|
2018-01-12 19:36:15 +00:00
|
|
|
|
2018-02-10 16:07:02 +00:00
|
|
|
m_matchCurrentRef = new wxRadioButton( this, wxID_ANY, _("%s current footprint (%s)"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_upperSizer->Add( m_matchCurrentRef, wxGBPosition( 1, 0 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALL, 5 );
|
2018-01-12 19:36:15 +00:00
|
|
|
|
2018-02-10 16:07:02 +00:00
|
|
|
m_matchSpecifiedRef = new wxRadioButton( this, wxID_ANY, _("%s footprint with reference:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2018-01-28 18:44:52 +00:00
|
|
|
m_upperSizer->Add( m_matchSpecifiedRef, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
|
2018-01-12 19:36:15 +00:00
|
|
|
|
|
|
|
m_specifiedRef = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2018-01-28 18:44:52 +00:00
|
|
|
m_upperSizer->Add( m_specifiedRef, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxBOTTOM|wxRIGHT|wxTOP|wxEXPAND, 5 );
|
2013-02-22 13:47:35 +00:00
|
|
|
|
2018-02-10 16:07:02 +00:00
|
|
|
m_matchCurrentValue = new wxRadioButton( this, wxID_ANY, _("%s footprints with matching value (%s)"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_upperSizer->Add( m_matchCurrentValue, wxGBPosition( 3, 0 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALL, 5 );
|
2013-02-22 13:47:35 +00:00
|
|
|
|
2018-02-10 16:07:02 +00:00
|
|
|
m_matchSpecifiedValue = new wxRadioButton( this, wxID_ANY, _("%s footprints with value:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_upperSizer->Add( m_matchSpecifiedValue, wxGBPosition( 4, 0 ), wxGBSpan( 1, 1 ), wxEXPAND|wxALL, 5 );
|
2013-02-22 13:47:35 +00:00
|
|
|
|
2018-01-12 19:36:15 +00:00
|
|
|
m_specifiedValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2018-02-10 16:07:02 +00:00
|
|
|
m_upperSizer->Add( m_specifiedValue, wxGBPosition( 4, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
2013-02-22 13:47:35 +00:00
|
|
|
|
2018-02-10 16:07:02 +00:00
|
|
|
m_matchSpecifiedID = new wxRadioButton( this, wxID_ANY, _("%s footprints with identifier:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2018-01-28 18:44:52 +00:00
|
|
|
m_upperSizer->Add( m_matchSpecifiedID, wxGBPosition( 5, 0 ), wxGBSpan( 1, 2 ), wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 5 );
|
2013-02-22 13:47:35 +00:00
|
|
|
|
2018-01-28 18:44:52 +00:00
|
|
|
wxFlexGridSizer* fgSizer1;
|
|
|
|
fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
|
|
|
|
fgSizer1->AddGrowableCol( 0 );
|
|
|
|
fgSizer1->SetFlexibleDirection( wxBOTH );
|
|
|
|
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
2013-02-22 13:47:35 +00:00
|
|
|
|
2018-01-12 19:36:15 +00:00
|
|
|
m_specifiedID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2018-01-28 18:44:52 +00:00
|
|
|
m_specifiedID->SetMinSize( wxSize( 500,22 ) );
|
2015-08-20 18:13:18 +00:00
|
|
|
|
2018-02-10 16:07:02 +00:00
|
|
|
fgSizer1->Add( m_specifiedID, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 3 );
|
2015-08-20 18:13:18 +00:00
|
|
|
|
2018-01-28 18:44:52 +00:00
|
|
|
m_specifiedIDBrowseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
|
2018-02-10 16:07:02 +00:00
|
|
|
fgSizer1->Add( m_specifiedIDBrowseButton, 0, wxALL|wxALIGN_CENTER_VERTICAL, 0 );
|
2015-08-20 18:13:18 +00:00
|
|
|
|
2018-01-12 19:36:15 +00:00
|
|
|
|
2018-01-28 18:44:52 +00:00
|
|
|
m_upperSizer->Add( fgSizer1, wxGBPosition( 6, 0 ), wxGBSpan( 1, 2 ), wxEXPAND, 0 );
|
2018-01-12 19:36:15 +00:00
|
|
|
|
|
|
|
|
2018-01-28 18:44:52 +00:00
|
|
|
m_upperSizer->AddGrowableCol( 1 );
|
2018-01-12 19:36:15 +00:00
|
|
|
|
2018-01-28 18:44:52 +00:00
|
|
|
m_mainSizer->Add( m_upperSizer, 0, wxALL|wxEXPAND, 5 );
|
2018-01-12 19:36:15 +00:00
|
|
|
|
|
|
|
m_middleSizer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
wxStaticLine* staticline1;
|
|
|
|
staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
2018-01-28 18:44:52 +00:00
|
|
|
m_middleSizer->Add( staticline1, 0, wxBOTTOM|wxEXPAND, 2 );
|
2018-01-12 19:36:15 +00:00
|
|
|
|
|
|
|
wxStaticText* newIdLabel;
|
|
|
|
newIdLabel = new wxStaticText( this, wxID_ANY, _("New footprint identifier:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
newIdLabel->Wrap( -1 );
|
2018-01-28 18:44:52 +00:00
|
|
|
m_middleSizer->Add( newIdLabel, 0, wxLEFT|wxRIGHT|wxTOP|wxEXPAND, 5 );
|
2018-01-12 19:36:15 +00:00
|
|
|
|
2018-01-28 18:44:52 +00:00
|
|
|
wxFlexGridSizer* fgSizer2;
|
|
|
|
fgSizer2 = new wxFlexGridSizer( 0, 2, 0, 0 );
|
|
|
|
fgSizer2->AddGrowableCol( 0 );
|
|
|
|
fgSizer2->SetFlexibleDirection( wxBOTH );
|
|
|
|
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
2018-01-12 19:36:15 +00:00
|
|
|
|
|
|
|
m_newID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
|
2018-01-28 18:44:52 +00:00
|
|
|
m_newID->SetMinSize( wxSize( 500,22 ) );
|
|
|
|
|
2018-02-10 16:07:02 +00:00
|
|
|
fgSizer2->Add( m_newID, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 3 );
|
2018-01-12 19:36:15 +00:00
|
|
|
|
|
|
|
m_newIDBrowseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
|
2018-02-10 16:07:02 +00:00
|
|
|
fgSizer2->Add( m_newIDBrowseButton, 0, wxALL|wxALIGN_CENTER_VERTICAL, 0 );
|
2018-01-12 19:36:15 +00:00
|
|
|
|
|
|
|
|
2018-01-28 18:44:52 +00:00
|
|
|
m_middleSizer->Add( fgSizer2, 0, wxEXPAND, 0 );
|
2018-01-12 19:36:15 +00:00
|
|
|
|
|
|
|
|
2018-01-28 18:44:52 +00:00
|
|
|
m_mainSizer->Add( m_middleSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
2015-08-20 18:13:18 +00:00
|
|
|
|
2017-08-18 18:26:45 +00:00
|
|
|
m_MessageWindow = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
2017-12-27 17:09:27 +00:00
|
|
|
m_MessageWindow->SetMinSize( wxSize( -1,300 ) );
|
2013-02-22 13:47:35 +00:00
|
|
|
|
2018-01-28 18:44:52 +00:00
|
|
|
m_mainSizer->Add( m_MessageWindow, 5, wxALL|wxEXPAND, 5 );
|
2018-01-12 19:36:15 +00:00
|
|
|
|
|
|
|
wxStaticLine* staticline2;
|
|
|
|
staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
2018-01-28 18:44:52 +00:00
|
|
|
m_mainSizer->Add( staticline2, 0, wxEXPAND | wxALL, 5 );
|
2018-01-12 19:36:15 +00:00
|
|
|
|
|
|
|
wxBoxSizer* bottomSizer;
|
|
|
|
bottomSizer = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
|
|
|
m_exportButton = new wxButton( this, wxID_ANY, _("Export Footprint Associations"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bottomSizer->Add( m_exportButton, 0, wxALL, 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 );
|
2013-02-22 13:47:35 +00:00
|
|
|
|
2015-08-20 18:13:18 +00:00
|
|
|
|
2018-01-12 19:36:15 +00:00
|
|
|
bottomSizer->Add( paddingSizer, 1, 0, 5 );
|
2015-08-20 18:13:18 +00:00
|
|
|
|
2018-01-12 19:36:15 +00:00
|
|
|
m_applyButton = new wxButton( this, wxID_ANY, _("Apply"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bottomSizer->Add( m_applyButton, 0, wxALL, 5 );
|
2015-08-20 18:13:18 +00:00
|
|
|
|
2018-02-10 16:07:02 +00:00
|
|
|
m_closeButton = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
|
2018-01-12 19:36:15 +00:00
|
|
|
bottomSizer->Add( m_closeButton, 0, wxALL, 5 );
|
2015-08-20 18:13:18 +00:00
|
|
|
|
|
|
|
|
2018-01-28 18:44:52 +00:00
|
|
|
m_mainSizer->Add( bottomSizer, 0, wxEXPAND, 5 );
|
2015-08-20 18:13:18 +00:00
|
|
|
|
2013-02-22 13:47:35 +00:00
|
|
|
|
2018-01-28 18:44:52 +00:00
|
|
|
this->SetSizer( m_mainSizer );
|
2013-02-22 13:47:35 +00:00
|
|
|
this->Layout();
|
2018-01-28 18:44:52 +00:00
|
|
|
m_mainSizer->Fit( this );
|
2013-02-22 13:47:35 +00:00
|
|
|
|
|
|
|
// Connect Events
|
2018-01-28 18:44:52 +00:00
|
|
|
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXCHANGE_MODULE_BASE::updateMatchModeRadioButtons ) );
|
2018-01-12 19:36:15 +00:00
|
|
|
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_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 );
|
2018-02-10 16:07:02 +00:00
|
|
|
m_applyButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnApplyClick ), NULL, this );
|
2018-01-12 19:36:15 +00:00
|
|
|
m_closeButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnQuit ), NULL, this );
|
2013-02-22 13:47:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DIALOG_EXCHANGE_MODULE_BASE::~DIALOG_EXCHANGE_MODULE_BASE()
|
|
|
|
{
|
|
|
|
// Disconnect Events
|
2018-01-28 18:44:52 +00:00
|
|
|
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXCHANGE_MODULE_BASE::updateMatchModeRadioButtons ) );
|
2018-01-12 19:36:15 +00:00
|
|
|
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_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 );
|
2018-02-10 16:07:02 +00:00
|
|
|
m_applyButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnApplyClick ), NULL, this );
|
2018-01-12 19:36:15 +00:00
|
|
|
m_closeButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnQuit ), NULL, this );
|
2013-02-22 13:47:35 +00:00
|
|
|
|
|
|
|
}
|