2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2021-07-21 21:37:49 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version 3.9.0 Jun 18 2020)
|
2013-05-26 04:36:44 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
2019-07-26 23:52:17 +00:00
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "dialog_find_base.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
DIALOG_FIND_BASE::DIALOG_FIND_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 );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
|
|
|
wxBoxSizer* bSizer10;
|
|
|
|
bSizer10 = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
2019-11-30 01:00:16 +00:00
|
|
|
wxBoxSizer* topSizer;
|
|
|
|
topSizer = new wxBoxSizer( wxHORIZONTAL );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
2019-11-30 01:00:16 +00:00
|
|
|
wxBoxSizer* leftSizer;
|
|
|
|
leftSizer = new wxBoxSizer( wxVERTICAL );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
2019-11-28 00:18:20 +00:00
|
|
|
wxBoxSizer* bSizer8;
|
|
|
|
bSizer8 = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
2020-11-05 18:44:09 +00:00
|
|
|
searchStringLabel = new wxStaticText( this, wxID_ANY, _("Search for:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2019-11-30 01:00:16 +00:00
|
|
|
searchStringLabel->Wrap( -1 );
|
|
|
|
bSizer8->Add( searchStringLabel, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
2019-11-30 01:00:16 +00:00
|
|
|
m_searchCombo = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN|wxTE_PROCESS_ENTER );
|
2020-11-05 18:44:09 +00:00
|
|
|
m_searchCombo->SetToolTip( _("Text with optional wildcards") );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
2019-11-28 00:18:20 +00:00
|
|
|
bSizer8->Add( m_searchCombo, 1, wxALL|wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
2019-11-30 01:00:16 +00:00
|
|
|
leftSizer->Add( bSizer8, 1, wxEXPAND, 5 );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
|
|
|
wxBoxSizer* sizerOptions;
|
|
|
|
sizerOptions = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
2020-11-05 18:44:09 +00:00
|
|
|
m_matchCase = new wxCheckBox( this, wxID_ANY, _("Match case"), wxDefaultPosition, wxDefaultSize, 0 );
|
2019-11-26 19:46:07 +00:00
|
|
|
sizerOptions->Add( m_matchCase, 0, wxALL, 5 );
|
|
|
|
|
2020-11-05 18:44:09 +00:00
|
|
|
m_matchWords = new wxCheckBox( this, wxID_ANY, _("Words"), wxDefaultPosition, wxDefaultSize, 0 );
|
2019-11-26 19:46:07 +00:00
|
|
|
sizerOptions->Add( m_matchWords, 0, wxALL, 5 );
|
|
|
|
|
2020-11-05 18:44:09 +00:00
|
|
|
m_wildcards = new wxCheckBox( this, wxID_ANY, _("Wildcards"), wxDefaultPosition, wxDefaultSize, 0 );
|
2019-11-26 19:46:07 +00:00
|
|
|
sizerOptions->Add( m_wildcards, 0, wxALL, 5 );
|
|
|
|
|
2020-11-05 18:44:09 +00:00
|
|
|
m_wrap = new wxCheckBox( this, wxID_ANY, _("Wrap"), wxDefaultPosition, wxDefaultSize, 0 );
|
2019-11-26 19:46:07 +00:00
|
|
|
m_wrap->SetValue(true);
|
|
|
|
sizerOptions->Add( m_wrap, 0, wxALL, 5 );
|
|
|
|
|
|
|
|
|
2019-11-30 01:00:16 +00:00
|
|
|
leftSizer->Add( sizerOptions, 1, wxALL|wxEXPAND, 0 );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
|
|
|
wxBoxSizer* sizerInclude;
|
2019-11-28 00:18:20 +00:00
|
|
|
sizerInclude = new wxBoxSizer( wxVERTICAL );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
2020-11-05 18:44:09 +00:00
|
|
|
m_includeReferences = new wxCheckBox( this, wxID_ANY, _("Search footprint reference designators"), wxDefaultPosition, wxDefaultSize, 0 );
|
2020-03-17 16:08:29 +00:00
|
|
|
m_includeReferences->SetValue(true);
|
|
|
|
sizerInclude->Add( m_includeReferences, 0, wxALL, 5 );
|
|
|
|
|
2020-11-05 18:44:09 +00:00
|
|
|
m_includeValues = new wxCheckBox( this, wxID_ANY, _("Search footprint values"), wxDefaultPosition, wxDefaultSize, 0 );
|
2019-11-26 19:46:07 +00:00
|
|
|
m_includeValues->SetValue(true);
|
|
|
|
sizerInclude->Add( m_includeValues, 0, wxALL, 5 );
|
|
|
|
|
2020-11-05 18:44:09 +00:00
|
|
|
m_includeTexts = new wxCheckBox( this, wxID_ANY, _("Search other text items"), wxDefaultPosition, wxDefaultSize, 0 );
|
2019-11-30 01:00:16 +00:00
|
|
|
m_includeTexts->SetValue(true);
|
|
|
|
sizerInclude->Add( m_includeTexts, 0, wxALL, 5 );
|
|
|
|
|
2020-11-05 18:44:09 +00:00
|
|
|
m_includeMarkers = new wxCheckBox( this, wxID_ANY, _("Search DRC markers"), wxDefaultPosition, wxDefaultSize, 0 );
|
2019-11-28 00:18:20 +00:00
|
|
|
m_includeMarkers->SetValue(true);
|
|
|
|
sizerInclude->Add( m_includeMarkers, 0, wxALL, 5 );
|
|
|
|
|
2020-11-05 18:44:09 +00:00
|
|
|
m_includeVias = new wxCheckBox( this, wxID_ANY, _("Vias"), wxDefaultPosition, wxDefaultSize, 0 );
|
2019-11-26 19:46:07 +00:00
|
|
|
m_includeVias->SetValue(true);
|
|
|
|
m_includeVias->Hide();
|
|
|
|
|
|
|
|
sizerInclude->Add( m_includeVias, 0, wxALL, 5 );
|
|
|
|
|
|
|
|
|
2019-11-30 01:00:16 +00:00
|
|
|
leftSizer->Add( sizerInclude, 0, wxEXPAND, 5 );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
|
|
|
|
2019-11-30 01:00:16 +00:00
|
|
|
topSizer->Add( leftSizer, 1, wxEXPAND, 5 );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
2019-11-30 01:00:16 +00:00
|
|
|
wxBoxSizer* buttonSizer;
|
|
|
|
buttonSizer = new wxBoxSizer( wxVERTICAL );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
2020-11-05 18:44:09 +00:00
|
|
|
m_findNext = new wxButton( this, wxID_ANY, _("Find Next"), wxDefaultPosition, wxDefaultSize, 0 );
|
2019-11-30 01:00:16 +00:00
|
|
|
|
|
|
|
m_findNext->SetDefault();
|
|
|
|
buttonSizer->Add( m_findNext, 0, wxALIGN_TOP|wxALL|wxEXPAND, 5 );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
2020-11-05 18:44:09 +00:00
|
|
|
m_findPrevious = new wxButton( this, wxID_ANY, _("Find Previous"), wxDefaultPosition, wxDefaultSize, 0 );
|
2019-11-30 01:00:16 +00:00
|
|
|
buttonSizer->Add( m_findPrevious, 0, wxALIGN_LEFT|wxALL|wxEXPAND, 5 );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
2020-11-05 18:44:09 +00:00
|
|
|
m_searchAgain = new wxButton( this, wxID_ANY, _("Restart Search"), wxDefaultPosition, wxDefaultSize, 0 );
|
2020-08-22 15:51:56 +00:00
|
|
|
buttonSizer->Add( m_searchAgain, 0, wxALL|wxEXPAND, 5 );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
2020-11-05 18:44:09 +00:00
|
|
|
m_closeButton = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
|
2019-11-30 01:00:16 +00:00
|
|
|
buttonSizer->Add( m_closeButton, 0, wxALL|wxEXPAND, 5 );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
|
|
|
|
2020-08-22 15:51:56 +00:00
|
|
|
topSizer->Add( buttonSizer, 0, 0, 5 );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
2019-11-30 01:00:16 +00:00
|
|
|
|
|
|
|
bSizer10->Add( topSizer, 0, wxEXPAND, 5 );
|
|
|
|
|
2020-11-05 18:44:09 +00:00
|
|
|
wxStaticLine* staticline;
|
|
|
|
staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
|
|
|
|
bSizer10->Add( staticline, 0, wxEXPAND | wxALL, 5 );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
|
|
|
wxBoxSizer* sizerStatus;
|
|
|
|
sizerStatus = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
2020-11-05 18:44:09 +00:00
|
|
|
m_status = new wxStaticText( this, wxID_ANY, _("Status"), wxDefaultPosition, wxDefaultSize, 0 );
|
2019-11-29 21:38:18 +00:00
|
|
|
m_status->Wrap( -1 );
|
2019-11-30 01:00:16 +00:00
|
|
|
sizerStatus->Add( m_status, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
|
|
|
|
|
|
|
bSizer10->Add( sizerStatus, 0, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
this->SetSizer( bSizer10 );
|
2013-05-26 04:36:44 +00:00
|
|
|
this->Layout();
|
2019-11-30 01:00:16 +00:00
|
|
|
bSizer10->Fit( this );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
this->Centre( wxBOTH );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Connect Events
|
2021-07-21 21:37:49 +00:00
|
|
|
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FIND_BASE::OnClose ) );
|
2019-11-26 19:46:07 +00:00
|
|
|
m_searchCombo->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_FIND_BASE::onTextEnter ), NULL, this );
|
|
|
|
m_findNext->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onFindNextClick ), NULL, this );
|
|
|
|
m_findPrevious->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onFindPreviousClick ), NULL, this );
|
|
|
|
m_searchAgain->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onSearchAgainClick ), NULL, this );
|
2021-07-21 21:37:49 +00:00
|
|
|
m_closeButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::OnCloseButtonClick ), NULL, this );
|
2013-05-26 04:36:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DIALOG_FIND_BASE::~DIALOG_FIND_BASE()
|
|
|
|
{
|
|
|
|
// Disconnect Events
|
2021-07-21 21:37:49 +00:00
|
|
|
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FIND_BASE::OnClose ) );
|
2019-11-26 19:46:07 +00:00
|
|
|
m_searchCombo->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_FIND_BASE::onTextEnter ), NULL, this );
|
|
|
|
m_findNext->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onFindNextClick ), NULL, this );
|
|
|
|
m_findPrevious->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onFindPreviousClick ), NULL, this );
|
|
|
|
m_searchAgain->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::onSearchAgainClick ), NULL, this );
|
2021-07-21 21:37:49 +00:00
|
|
|
m_closeButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FIND_BASE::OnCloseButtonClick ), NULL, this );
|
2019-11-26 19:46:07 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
}
|