Use wxSearchCtrl in the footprint viewer/picker.
This commit is contained in:
parent
d2aeddc6cb
commit
a92d337905
|
@ -57,6 +57,7 @@
|
|||
#include <tools/pcb_selection_tool.h>
|
||||
#include <wildcards_and_files_ext.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/srchctrl.h>
|
||||
#include <wx/tokenzr.h>
|
||||
|
||||
using namespace std::placeholders;
|
||||
|
@ -137,9 +138,9 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
|
|||
wxPanel* libPanel = new wxPanel( this );
|
||||
wxSizer* libSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_libFilter = new wxTextCtrl( libPanel, ID_MODVIEW_LIB_FILTER, wxEmptyString,
|
||||
m_libFilter = new wxSearchCtrl( libPanel, ID_MODVIEW_LIB_FILTER, wxEmptyString,
|
||||
wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
||||
m_libFilter->SetHint( _( "Filter" ) );
|
||||
m_libFilter->SetDescriptiveText( _( "Filter" ) );
|
||||
libSizer->Add( m_libFilter, 0, wxEXPAND, 5 );
|
||||
|
||||
m_libList = new wxListBox( libPanel, ID_MODVIEW_LIB_LIST, wxDefaultPosition, wxDefaultSize,
|
||||
|
@ -152,9 +153,9 @@ FOOTPRINT_VIEWER_FRAME::FOOTPRINT_VIEWER_FRAME( KIWAY* aKiway, wxWindow* aParent
|
|||
wxPanel* fpPanel = new wxPanel( this );
|
||||
wxSizer* fpSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
m_fpFilter = new wxTextCtrl( fpPanel, ID_MODVIEW_FOOTPRINT_FILTER, wxEmptyString,
|
||||
m_fpFilter = new wxSearchCtrl( fpPanel, ID_MODVIEW_FOOTPRINT_FILTER, wxEmptyString,
|
||||
wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
|
||||
m_fpFilter->SetHint( _( "Filter" ) );
|
||||
m_fpFilter->SetDescriptiveText( _( "Filter" ) );
|
||||
m_fpFilter->SetToolTip(
|
||||
_( "Filter on footprint name, keywords, description and pad count.\n"
|
||||
"Search terms are separated by spaces. All search terms must match.\n"
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
class wxSashLayoutWindow;
|
||||
class wxListBox;
|
||||
class wxSearchCtrl;
|
||||
class FP_LIB_TABLE;
|
||||
class BOARD_ITEM;
|
||||
class SELECTION;
|
||||
|
@ -166,9 +167,9 @@ private:
|
|||
|
||||
friend struct PCB::IFACE; // constructor called from here only
|
||||
|
||||
wxTextCtrl* m_libFilter;
|
||||
wxSearchCtrl* m_libFilter;
|
||||
wxListBox* m_libList; // The list of library names.
|
||||
wxTextCtrl* m_fpFilter;
|
||||
wxSearchCtrl* m_fpFilter;
|
||||
wxListBox* m_fpList; // The list of footprint names.
|
||||
|
||||
bool m_autoZoom;
|
||||
|
|
Loading…
Reference in New Issue