diff --git a/eeschema/dialogs/dialog_symbol_fields_table.cpp b/eeschema/dialogs/dialog_symbol_fields_table.cpp index afa7b2eaf2..e1418f8542 100644 --- a/eeschema/dialogs/dialog_symbol_fields_table.cpp +++ b/eeschema/dialogs/dialog_symbol_fields_table.cpp @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -469,9 +470,10 @@ public: return matchFound; } - void RebuildRows( wxCheckBox* aGroupSymbolsBox, wxDataViewListCtrl* aFieldsCtrl ) + void RebuildRows( wxSearchCtrl* aFilter, wxCheckBox* aGroupSymbolsBox, + wxDataViewListCtrl* aFieldsCtrl ) { - if ( GetView() ) + if( GetView() ) { // Commit any pending in-place edits before the row gets moved out from under // the editor. @@ -486,7 +488,14 @@ public: for( unsigned i = 0; i < m_symbolsList.GetCount(); ++i ) { SCH_REFERENCE ref = m_symbolsList[ i ]; - bool matchFound = false; + + if( !aFilter->GetValue().IsEmpty() + && !WildCompareString( aFilter->GetValue(), ref.GetRef(), false ) ) + { + continue; + } + + bool matchFound = false; // See if we already have a row which this symbol fits into for( DATA_MODEL_ROW& row : m_rows ) @@ -709,6 +718,8 @@ DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE( SCH_EDIT_FRAME* parent ) // Get all symbols from the list of schematic sheets m_parent->Schematic().GetSheets().GetSymbols( m_symbolsList, false ); + m_separator1->SetIsSeparator(); + m_separator2->SetIsSeparator(); m_bRefresh->SetBitmap( KiBitmap( BITMAPS::small_refresh ) ); m_fieldsCtrl->AppendTextColumn( _( "Field" ), wxDATAVIEW_CELL_INERT, 0, wxALIGN_LEFT, 0 ); @@ -735,6 +746,8 @@ DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE( SCH_EDIT_FRAME* parent ) // expander buttons... but it doesn't. Fix by forcing the indent to 0. m_fieldsCtrl->SetIndent( 0 ); + m_filter->SetDescriptiveText( _( "Filter" ) ); + m_dataModel = new FIELDS_EDITOR_GRID_DATA_MODEL( m_parent, m_symbolsList ); LoadFieldNames(); // loads rows into m_fieldsCtrl and columns into m_dataModel @@ -759,7 +772,7 @@ DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE( SCH_EDIT_FRAME* parent ) m_splitterMainWindow->SetMinimumPaneSize( fieldsMinWidth ); m_splitterMainWindow->SetSashPosition( fieldsMinWidth + 40 ); - m_dataModel->RebuildRows( m_groupSymbolsBox, m_fieldsCtrl ); + m_dataModel->RebuildRows( m_filter, m_groupSymbolsBox, m_fieldsCtrl ); m_dataModel->Sort( 0, true ); // wxGrid's column moving is buggy with native headers and this is one dialog where you'd @@ -1100,6 +1113,29 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnRemoveField( wxCommandEvent& event ) } +void DIALOG_SYMBOL_FIELDS_TABLE::OnFilterText( wxCommandEvent& aEvent ) +{ + m_dataModel->RebuildRows( m_filter, m_groupSymbolsBox, m_fieldsCtrl ); + m_dataModel->Sort( m_grid->GetSortingColumn(), m_grid->IsSortOrderAscending() ); + m_grid->ForceRefresh(); +} + + +void DIALOG_SYMBOL_FIELDS_TABLE::OnFilterMouseMoved( wxMouseEvent& aEvent ) +{ + wxPoint pos = aEvent.GetPosition(); + wxRect ctrlRect = m_filter->GetScreenRect(); + int buttonWidth = ctrlRect.GetHeight(); // Presume buttons are square + + if( m_filter->IsSearchButtonVisible() && pos.x < buttonWidth ) + SetCursor( wxCURSOR_ARROW ); + else if( m_filter->IsCancelButtonVisible() && pos.x > ctrlRect.GetWidth() - buttonWidth ) + SetCursor( wxCURSOR_ARROW ); + else + SetCursor( wxCURSOR_IBEAM ); +} + + void DIALOG_SYMBOL_FIELDS_TABLE::OnColumnItemToggled( wxDataViewEvent& event ) { EESCHEMA_SETTINGS* cfg = static_cast( Kiface().KifaceSettings() ); @@ -1139,7 +1175,7 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnColumnItemToggled( wxDataViewEvent& event ) std::string fieldName( m_fieldsCtrl->GetTextValue( row, CANONICAL_NAME_COLUMN ).ToUTF8() ); cfg->m_FieldEditorPanel.fields_group_by[fieldName] = value; - m_dataModel->RebuildRows( m_groupSymbolsBox, m_fieldsCtrl ); + m_dataModel->RebuildRows( m_filter, m_groupSymbolsBox, m_fieldsCtrl ); m_dataModel->Sort( m_grid->GetSortingColumn(), m_grid->IsSortOrderAscending() ); m_grid->ForceRefresh(); break; @@ -1153,7 +1189,7 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnColumnItemToggled( wxDataViewEvent& event ) void DIALOG_SYMBOL_FIELDS_TABLE::OnGroupSymbolsToggled( wxCommandEvent& event ) { - m_dataModel->RebuildRows( m_groupSymbolsBox, m_fieldsCtrl ); + m_dataModel->RebuildRows( m_filter, m_groupSymbolsBox, m_fieldsCtrl ); m_dataModel->Sort( m_grid->GetSortingColumn(), m_grid->IsSortOrderAscending() ); m_grid->ForceRefresh(); } @@ -1203,7 +1239,7 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnTableColSize( wxGridSizeEvent& aEvent ) void DIALOG_SYMBOL_FIELDS_TABLE::OnRegroupSymbols( wxCommandEvent& aEvent ) { - m_dataModel->RebuildRows( m_groupSymbolsBox, m_fieldsCtrl ); + m_dataModel->RebuildRows( m_filter, m_groupSymbolsBox, m_fieldsCtrl ); m_dataModel->Sort( m_grid->GetSortingColumn(), m_grid->IsSortOrderAscending() ); m_grid->ForceRefresh(); } diff --git a/eeschema/dialogs/dialog_symbol_fields_table.h b/eeschema/dialogs/dialog_symbol_fields_table.h index 7d0c4b5521..b0759ad5d8 100644 --- a/eeschema/dialogs/dialog_symbol_fields_table.h +++ b/eeschema/dialogs/dialog_symbol_fields_table.h @@ -66,8 +66,10 @@ private: void OnAddField( wxCommandEvent& event ) override; void OnRemoveField( wxCommandEvent& event ) override; void OnSaveAndContinue( wxCommandEvent& aEvent ) override; - void OnCancel( wxCommandEvent& event ) override; - void OnClose( wxCloseEvent& event ) override; + void OnCancel( wxCommandEvent& aEvent ) override; + void OnClose( wxCloseEvent& aEvent ) override; + void OnFilterText( wxCommandEvent& aEvent ) override; + void OnFilterMouseMoved( wxMouseEvent& event ) override; SCH_EDIT_FRAME* m_parent; int m_showColWidth; diff --git a/eeschema/dialogs/dialog_symbol_fields_table_base.cpp b/eeschema/dialogs/dialog_symbol_fields_table_base.cpp index cca03aa72d..ef766dccda 100644 --- a/eeschema/dialogs/dialog_symbol_fields_table_base.cpp +++ b/eeschema/dialogs/dialog_symbol_fields_table_base.cpp @@ -5,6 +5,7 @@ // PLEASE DO *NOT* EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// +#include "widgets/bitmap_button.h" #include "widgets/wx_grid.h" #include "dialog_symbol_fields_table_base.h" @@ -25,26 +26,6 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* pare wxBoxSizer* bLeftSizer; bLeftSizer = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bGroupSizer; - bGroupSizer = new wxBoxSizer( wxHORIZONTAL ); - - m_groupSymbolsBox = new wxCheckBox( m_leftPanel, OPT_GROUP_COMPONENTS, _("Group symbols"), wxDefaultPosition, wxDefaultSize, 0 ); - m_groupSymbolsBox->SetValue(true); - m_groupSymbolsBox->SetToolTip( _("Group symbols together based on common properties") ); - - bGroupSizer->Add( m_groupSymbolsBox, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 ); - - - bGroupSizer->Add( 0, 0, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 ); - - m_bRefresh = new wxBitmapButton( m_leftPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - m_bRefresh->SetMinSize( wxSize( 30,30 ) ); - - bGroupSizer->Add( m_bRefresh, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); - - - bLeftSizer->Add( bGroupSizer, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 2 ); - m_fieldsCtrl = new wxDataViewListCtrl( m_leftPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); m_fieldsCtrl->SetMinSize( wxSize( -1,220 ) ); @@ -64,6 +45,42 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* pare wxBoxSizer* bRightSizer; bRightSizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bControls; + bControls = new wxBoxSizer( wxHORIZONTAL ); + + m_filter = new wxSearchCtrl( m_rightPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + #ifndef __WXMAC__ + m_filter->ShowSearchButton( true ); + #endif + m_filter->ShowCancelButton( true ); + m_filter->SetMinSize( wxSize( 140,-1 ) ); + + bControls->Add( m_filter, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + m_separator1 = new BITMAP_BUTTON( m_rightPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE ); + m_separator1->Enable( false ); + + bControls->Add( m_separator1, 0, wxALL, 5 ); + + m_groupSymbolsBox = new wxCheckBox( m_rightPanel, OPT_GROUP_COMPONENTS, _("Group symbols"), wxDefaultPosition, wxDefaultSize, 0 ); + m_groupSymbolsBox->SetValue(true); + m_groupSymbolsBox->SetToolTip( _("Group symbols together based on common properties") ); + + bControls->Add( m_groupSymbolsBox, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + + m_separator2 = new BITMAP_BUTTON( m_rightPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 21,21 ), wxBU_AUTODRAW|wxBORDER_NONE ); + m_separator2->Enable( false ); + + bControls->Add( m_separator2, 0, wxALL, 5 ); + + m_bRefresh = new wxBitmapButton( m_rightPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); + m_bRefresh->SetMinSize( wxSize( 30,30 ) ); + + bControls->Add( m_bRefresh, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 ); + + + bRightSizer->Add( bControls, 0, wxEXPAND, 5 ); + m_grid = new WX_GRID( m_rightPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 ); // Grid @@ -88,7 +105,7 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* pare // Cell Defaults m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP ); - m_grid->SetMinSize( wxSize( 400,240 ) ); + m_grid->SetMinSize( wxSize( 600,240 ) ); bRightSizer->Add( m_grid, 1, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 ); @@ -129,12 +146,15 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::DIALOG_SYMBOL_FIELDS_TABLE_BASE( wxWindow* pare // Connect Events this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnClose ) ); - m_groupSymbolsBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnGroupSymbolsToggled ), NULL, this ); - m_bRefresh->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnRegroupSymbols ), NULL, this ); m_fieldsCtrl->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnColumnItemToggled ), NULL, this ); m_fieldsCtrl->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnSizeFieldList ), NULL, this ); m_addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnAddField ), NULL, this ); m_removeFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnRemoveField ), NULL, this ); + m_filter->Connect( wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnFilterText ), NULL, this ); + m_filter->Connect( wxEVT_MOTION, wxMouseEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnFilterMouseMoved ), NULL, this ); + m_filter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnFilterText ), NULL, this ); + m_groupSymbolsBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnGroupSymbolsToggled ), NULL, this ); + m_bRefresh->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnRegroupSymbols ), NULL, this ); m_grid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnTableValueChanged ), NULL, this ); m_grid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnTableCellClick ), NULL, this ); m_grid->Connect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnTableCellClick ), NULL, this ); @@ -148,12 +168,15 @@ DIALOG_SYMBOL_FIELDS_TABLE_BASE::~DIALOG_SYMBOL_FIELDS_TABLE_BASE() { // Disconnect Events this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnClose ) ); - m_groupSymbolsBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnGroupSymbolsToggled ), NULL, this ); - m_bRefresh->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnRegroupSymbols ), NULL, this ); m_fieldsCtrl->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnColumnItemToggled ), NULL, this ); m_fieldsCtrl->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnSizeFieldList ), NULL, this ); m_addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnAddField ), NULL, this ); m_removeFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnRemoveField ), NULL, this ); + m_filter->Disconnect( wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnFilterText ), NULL, this ); + m_filter->Disconnect( wxEVT_MOTION, wxMouseEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnFilterMouseMoved ), NULL, this ); + m_filter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnFilterText ), NULL, this ); + m_groupSymbolsBox->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnGroupSymbolsToggled ), NULL, this ); + m_bRefresh->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnRegroupSymbols ), NULL, this ); m_grid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnTableValueChanged ), NULL, this ); m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnTableCellClick ), NULL, this ); m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_DCLICK, wxGridEventHandler( DIALOG_SYMBOL_FIELDS_TABLE_BASE::OnTableCellClick ), NULL, this ); diff --git a/eeschema/dialogs/dialog_symbol_fields_table_base.fbp b/eeschema/dialogs/dialog_symbol_fields_table_base.fbp index 45a465236a..7ce6e9cdb6 100644 --- a/eeschema/dialogs/dialog_symbol_fields_table_base.fbp +++ b/eeschema/dialogs/dialog_symbol_fields_table_base.fbp @@ -177,165 +177,6 @@ bLeftSizer wxVERTICAL none - - 2 - wxEXPAND|wxTOP|wxBOTTOM|wxLEFT - 0 - - - bGroupSizer - wxHORIZONTAL - none - - 5 - wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - OPT_GROUP_COMPONENTS - Group symbols - - 0 - - - 0 - - 1 - m_groupSymbolsBox - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Group symbols together based on common properties - - wxFILTER_NONE - wxDefaultValidator - - - - - OnGroupSymbolsToggled - - - - 10 - wxEXPAND|wxRIGHT|wxLEFT - 1 - - 0 - protected - 0 - - - - 5 - wxALIGN_CENTER_VERTICAL|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 1 - - 1 - - - 0 - 0 - wxID_ANY - Refresh Grouping - - 0 - - 0 - - - 0 - 30,30 - 1 - m_bRefresh - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnRegroupSymbols - - - - 5 wxEXPAND|wxTOP|wxBOTTOM|wxLEFT @@ -571,6 +412,367 @@ bRightSizer wxVERTICAL none + + 5 + wxEXPAND + 0 + + + bControls + wxHORIZONTAL + none + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 1 + + 1 + 1 + 1 + 1 + + + + + + + 1 + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + 140,-1 + 1 + m_filter + 1 + + + protected + 1 + + Resizable + 1 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnFilterText + OnFilterMouseMoved + OnFilterText + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + + 1 + + + 0 + 0 + wxID_ANY + + + 0 + + 0 + + + 0 + + 1 + m_separator1 + 1 + + + protected + 1 + + + + Resizable + 1 + 21,21 + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + OPT_GROUP_COMPONENTS + Group symbols + + 0 + + + 0 + + 1 + m_groupSymbolsBox + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Group symbols together based on common properties + + wxFILTER_NONE + wxDefaultValidator + + + + + OnGroupSymbolsToggled + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 0 + + 1 + + + 0 + 0 + wxID_ANY + + + 0 + + 0 + + + 0 + + 1 + m_separator2 + 1 + + + protected + 1 + + + + Resizable + 1 + 21,21 + wxBORDER_NONE + BITMAP_BUTTON; widgets/bitmap_button.h; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + Refresh Grouping + + 0 + + 0 + + + 0 + 30,30 + 1 + m_bRefresh + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnRegroupSymbols + + + + 5 wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT @@ -633,7 +835,7 @@ 0 - 400,240 + 600,240 1 m_grid 1 diff --git a/eeschema/dialogs/dialog_symbol_fields_table_base.h b/eeschema/dialogs/dialog_symbol_fields_table_base.h index 1ff50f7a47..ec4a7907cb 100644 --- a/eeschema/dialogs/dialog_symbol_fields_table_base.h +++ b/eeschema/dialogs/dialog_symbol_fields_table_base.h @@ -10,23 +10,25 @@ #include #include #include +class BITMAP_BUTTON; class WX_GRID; #include "dialog_shim.h" -#include -#include +#include #include #include #include #include -#include +#include #include #include #include #include #include -#include #include +#include +#include +#include #include #include #include @@ -45,12 +47,15 @@ class DIALOG_SYMBOL_FIELDS_TABLE_BASE : public DIALOG_SHIM protected: wxSplitterWindow* m_splitterMainWindow; wxPanel* m_leftPanel; - wxCheckBox* m_groupSymbolsBox; - wxBitmapButton* m_bRefresh; wxDataViewListCtrl* m_fieldsCtrl; wxButton* m_addFieldButton; wxButton* m_removeFieldButton; wxPanel* m_rightPanel; + wxSearchCtrl* m_filter; + BITMAP_BUTTON* m_separator1; + wxCheckBox* m_groupSymbolsBox; + BITMAP_BUTTON* m_separator2; + wxBitmapButton* m_bRefresh; WX_GRID* m_grid; wxButton* m_buttonApply; wxStdDialogButtonSizer* m_sdbSizer; @@ -59,12 +64,14 @@ class DIALOG_SYMBOL_FIELDS_TABLE_BASE : public DIALOG_SHIM // Virtual event handlers, overide them in your derived class virtual void OnClose( wxCloseEvent& event ) { event.Skip(); } - virtual void OnGroupSymbolsToggled( wxCommandEvent& event ) { event.Skip(); } - virtual void OnRegroupSymbols( wxCommandEvent& event ) { event.Skip(); } virtual void OnColumnItemToggled( wxDataViewEvent& event ) { event.Skip(); } virtual void OnSizeFieldList( wxSizeEvent& event ) { event.Skip(); } virtual void OnAddField( wxCommandEvent& event ) { event.Skip(); } virtual void OnRemoveField( wxCommandEvent& event ) { event.Skip(); } + virtual void OnFilterText( wxCommandEvent& event ) { event.Skip(); } + virtual void OnFilterMouseMoved( wxMouseEvent& event ) { event.Skip(); } + virtual void OnGroupSymbolsToggled( wxCommandEvent& event ) { event.Skip(); } + virtual void OnRegroupSymbols( wxCommandEvent& event ) { event.Skip(); } virtual void OnTableValueChanged( wxGridEvent& event ) { event.Skip(); } virtual void OnTableCellClick( wxGridEvent& event ) { event.Skip(); } virtual void OnTableItemContextMenu( wxGridEvent& event ) { event.Skip(); }