ADDED grouping of selected pins in Pin Table.

Fixes https://gitlab.com/kicad/code/kicad/issues/4956
This commit is contained in:
Jeff Young 2022-03-26 19:54:57 +00:00
parent a54457386c
commit 48dd810cd1
5 changed files with 745 additions and 589 deletions

View File

@ -44,6 +44,38 @@
#define DEMORGAN_STD _( "Standard" ) #define DEMORGAN_STD _( "Standard" )
#define DEMORGAN_ALT _( "Alternate" ) #define DEMORGAN_ALT _( "Alternate" )
void getSelectedArea( WX_GRID* aGrid, int* aRowStart, int* aRowCount )
{
wxGridCellCoordsArray topLeft = aGrid->GetSelectionBlockTopLeft();
wxGridCellCoordsArray botRight = aGrid->GetSelectionBlockBottomRight();
wxArrayInt cols = aGrid->GetSelectedCols();
wxArrayInt rows = aGrid->GetSelectedRows();
if( topLeft.Count() && botRight.Count() )
{
*aRowStart = topLeft[0].GetRow();
*aRowCount = botRight[0].GetRow() - *aRowStart + 1;
}
else if( cols.Count() )
{
*aRowStart = 0;
*aRowCount = aGrid->GetNumberRows();
}
else if( rows.Count() )
{
*aRowStart = rows[0];
*aRowCount = rows.Count();
}
else
{
*aRowStart = aGrid->GetGridCursorRow();
*aRowCount = *aRowStart >= 0 ? 1 : 0;
}
}
class PIN_TABLE_DATA_MODEL : public wxGridTableBase class PIN_TABLE_DATA_MODEL : public wxGridTableBase
{ {
public: public:
@ -438,13 +470,31 @@ public:
return res; return res;
} }
void RebuildRows( const LIB_PINS& aPins, bool groupByName ) void RebuildRows( const LIB_PINS& aPins, bool groupByName, bool groupBySelection )
{ {
if ( GetView() ) WX_GRID* grid = dynamic_cast<WX_GRID*>( GetView() );
if( grid )
{ {
if( groupBySelection )
{
for( LIB_PIN* pin : aPins )
pin->ClearTempFlags();
int firstSelectedRow;
int selectedRowCount;
getSelectedArea( grid, &firstSelectedRow, &selectedRowCount );
for( int ii = 0; ii < selectedRowCount; ++ii )
{
for( LIB_PIN* pin : m_rows[ firstSelectedRow + ii ] )
pin->SetFlags( TEMP_SELECTED );
}
}
// Commit any pending in-place edits before the row gets moved out from under // Commit any pending in-place edits before the row gets moved out from under
// the editor. // the editor.
if( WX_GRID* grid = dynamic_cast<WX_GRID*>( GetView() ) )
grid->CommitPendingChanges( true ); grid->CommitPendingChanges( true );
wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 0, m_rows.size() ); wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_DELETED, 0, m_rows.size() );
@ -453,6 +503,9 @@ public:
m_rows.clear(); m_rows.clear();
if( groupBySelection )
m_rows.emplace_back( LIB_PINS() );
for( LIB_PIN* pin : aPins ) for( LIB_PIN* pin : aPins )
{ {
if( m_unitFilter == -1 || pin->GetUnit() == 0 || pin->GetUnit() == m_unitFilter ) if( m_unitFilter == -1 || pin->GetUnit() == 0 || pin->GetUnit() == m_unitFilter )
@ -461,6 +514,8 @@ public:
if( groupByName ) if( groupByName )
rowIndex = findRow( m_rows, pin->GetName() ); rowIndex = findRow( m_rows, pin->GetName() );
else if( groupBySelection && pin->GetFlags() & TEMP_SELECTED )
rowIndex = 0;
if( rowIndex < 0 ) if( rowIndex < 0 )
{ {
@ -484,12 +539,16 @@ public:
for( LIB_PINS& row : m_rows ) for( LIB_PINS& row : m_rows )
SortPins( row ); SortPins( row );
if( !groupBySelection )
SortRows( sortCol, ascending ); SortRows( sortCol, ascending );
if ( GetView() ) if ( GetView() )
{ {
wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, m_rows.size() ); wxGridTableMessage msg( this, wxGRIDTABLE_NOTIFY_ROWS_APPENDED, m_rows.size() );
GetView()->ProcessTableMessage( msg ); GetView()->ProcessTableMessage( msg );
if( groupBySelection )
GetView()->SelectRow( 0 );
} }
} }
@ -747,7 +806,7 @@ bool DIALOG_LIB_EDIT_PIN_TABLE::TransferDataToWindow()
for( LIB_PIN* pin = m_part->GetNextPin( nullptr ); pin; pin = m_part->GetNextPin( pin ) ) for( LIB_PIN* pin = m_part->GetNextPin( nullptr ); pin; pin = m_part->GetNextPin( pin ) )
m_pins.push_back( new LIB_PIN( *pin ) ); m_pins.push_back( new LIB_PIN( *pin ) );
m_dataModel->RebuildRows( m_pins, m_cbGroup->GetValue() ); m_dataModel->RebuildRows( m_pins, m_cbGroup->GetValue(), false );
if( m_part->IsMulti() ) if( m_part->IsMulti() )
m_grid->ShowCol( COL_UNIT ); m_grid->ShowCol( COL_UNIT );
@ -759,11 +818,6 @@ bool DIALOG_LIB_EDIT_PIN_TABLE::TransferDataToWindow()
else else
m_grid->HideCol( COL_DEMORGAN ); m_grid->HideCol( COL_DEMORGAN );
if( m_cbGroup->GetValue() )
m_grid->ShowCol( COL_PIN_COUNT );
else
m_grid->HideCol( COL_PIN_COUNT );
updateSummary(); updateSummary();
return true; return true;
@ -909,22 +963,31 @@ bool DIALOG_LIB_EDIT_PIN_TABLE::IsDisplayGrouped()
} }
void DIALOG_LIB_EDIT_PIN_TABLE::OnGroupSelected( wxCommandEvent& event )
{
m_cbGroup->SetValue( false );
m_dataModel->RebuildRows( m_pins, false, true );
m_grid->ShowCol( COL_PIN_COUNT );
m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
adjustGridColumns();
}
void DIALOG_LIB_EDIT_PIN_TABLE::OnRebuildRows( wxCommandEvent& ) void DIALOG_LIB_EDIT_PIN_TABLE::OnRebuildRows( wxCommandEvent& )
{ {
if( !m_grid->CommitPendingChanges() ) if( !m_grid->CommitPendingChanges() )
return; return;
m_dataModel->RebuildRows( m_pins, m_cbGroup->GetValue() ); m_dataModel->RebuildRows( m_pins, m_cbGroup->GetValue(), false );
if( m_cbGroup->GetValue() ) if( m_cbGroup->GetValue() )
{ {
m_grid->ShowCol( COL_PIN_COUNT ); m_grid->ShowCol( COL_PIN_COUNT );
m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
} }
else
{
m_grid->HideCol( COL_PIN_COUNT );
}
adjustGridColumns(); adjustGridColumns();
} }
@ -1016,6 +1079,14 @@ void DIALOG_LIB_EDIT_PIN_TABLE::OnUpdateUI( wxUpdateUIEvent& event )
if( !m_grid->IsCellEditControlShown() ) if( !m_grid->IsCellEditControlShown() )
adjustGridColumns(); adjustGridColumns();
} }
int firstSelectedRow;
int selectedRowCount;
getSelectedArea( m_grid, &firstSelectedRow, &selectedRowCount );
if( selectedRowCount > 1 != m_groupSelected->IsEnabled() )
m_groupSelected->Enable( selectedRowCount > 1 );
} }

View File

@ -66,6 +66,7 @@ public:
void OnSize( wxSizeEvent& event ) override; void OnSize( wxSizeEvent& event ) override;
void OnCellEdited( wxGridEvent& event ) override; void OnCellEdited( wxGridEvent& event ) override;
void OnRebuildRows( wxCommandEvent& event ) override; void OnRebuildRows( wxCommandEvent& event ) override;
void OnGroupSelected( wxCommandEvent& event ) override;
void OnFilterCheckBox( wxCommandEvent& event ) override; void OnFilterCheckBox( wxCommandEvent& event ) override;
void OnFilterChoice( wxCommandEvent& event ) override; void OnFilterChoice( wxCommandEvent& event ) override;
void OnUpdateUI( wxUpdateUIEvent& event ) override; void OnUpdateUI( wxUpdateUIEvent& event ) override;

View File

@ -119,38 +119,44 @@ DIALOG_LIB_EDIT_PIN_TABLE_BASE::DIALOG_LIB_EDIT_PIN_TABLE_BASE( wxWindow* parent
wxBoxSizer* bBottomSizer; wxBoxSizer* bBottomSizer;
bBottomSizer = new wxBoxSizer( wxHORIZONTAL ); bBottomSizer = new wxBoxSizer( wxHORIZONTAL );
wxBoxSizer* bSizer5;
bSizer5 = new wxBoxSizer( wxHORIZONTAL );
m_addButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_addButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
bBottomSizer->Add( m_addButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); bSizer5->Add( m_addButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
bBottomSizer->Add( 20, 0, 0, wxEXPAND, 5 );
m_deleteButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_deleteButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
bBottomSizer->Add( m_deleteButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 ); bSizer5->Add( m_deleteButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
m_divider1 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_divider1 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
m_divider1->Enable( false ); m_divider1->Enable( false );
bBottomSizer->Add( m_divider1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 ); bSizer5->Add( m_divider1, 0, wxEXPAND|wxALL, 4 );
m_cbGroup = new wxCheckBox( this, wxID_ANY, _("Group by name"), wxDefaultPosition, wxDefaultSize, 0 ); m_cbGroup = new wxCheckBox( this, wxID_ANY, _("Group by name"), wxDefaultPosition, wxDefaultSize, 0 );
bBottomSizer->Add( m_cbGroup, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 ); bSizer5->Add( m_cbGroup, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
m_groupSelected = new wxButton( this, wxID_ANY, _("Group Selected"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer5->Add( m_groupSelected, 0, wxALL|wxALIGN_CENTER_VERTICAL, 7 );
m_refreshButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_refreshButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
bBottomSizer->Add( m_refreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 10 ); bSizer5->Add( m_refreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
m_divider2 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_divider2 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
m_divider2->Enable( false ); m_divider2->Enable( false );
bBottomSizer->Add( m_divider2, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 ); bSizer5->Add( m_divider2, 0, wxEXPAND|wxALL, 4 );
m_cbFilterByUnit = new wxCheckBox( this, wxID_ANY, _("Filter by unit:"), wxDefaultPosition, wxDefaultSize, 0 ); m_cbFilterByUnit = new wxCheckBox( this, wxID_ANY, _("Filter by unit:"), wxDefaultPosition, wxDefaultSize, 0 );
bBottomSizer->Add( m_cbFilterByUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); bSizer5->Add( m_cbFilterByUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
wxArrayString m_unitFilterChoices; wxArrayString m_unitFilterChoices;
m_unitFilter = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitFilterChoices, 0 ); m_unitFilter = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitFilterChoices, 0 );
m_unitFilter->SetSelection( 0 ); m_unitFilter->SetSelection( 0 );
bBottomSizer->Add( m_unitFilter, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 ); bSizer5->Add( m_unitFilter, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
bBottomSizer->Add( bSizer5, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
bBottomSizer->Add( 30, 0, 1, wxEXPAND, 5 ); bBottomSizer->Add( 30, 0, 1, wxEXPAND, 5 );
@ -182,6 +188,7 @@ DIALOG_LIB_EDIT_PIN_TABLE_BASE::DIALOG_LIB_EDIT_PIN_TABLE_BASE( wxWindow* parent
m_addButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnAddRow ), NULL, this ); m_addButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnAddRow ), NULL, this );
m_deleteButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnDeleteRow ), NULL, this ); m_deleteButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnDeleteRow ), NULL, this );
m_cbGroup->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnRebuildRows ), NULL, this ); m_cbGroup->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnRebuildRows ), NULL, this );
m_groupSelected->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnGroupSelected ), NULL, this );
m_refreshButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnRebuildRows ), NULL, this ); m_refreshButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnRebuildRows ), NULL, this );
m_cbFilterByUnit->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnFilterCheckBox ), NULL, this ); m_cbFilterByUnit->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnFilterCheckBox ), NULL, this );
m_unitFilter->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnFilterChoice ), NULL, this ); m_unitFilter->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnFilterChoice ), NULL, this );
@ -198,6 +205,7 @@ DIALOG_LIB_EDIT_PIN_TABLE_BASE::~DIALOG_LIB_EDIT_PIN_TABLE_BASE()
m_addButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnAddRow ), NULL, this ); m_addButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnAddRow ), NULL, this );
m_deleteButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnDeleteRow ), NULL, this ); m_deleteButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnDeleteRow ), NULL, this );
m_cbGroup->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnRebuildRows ), NULL, this ); m_cbGroup->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnRebuildRows ), NULL, this );
m_groupSelected->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnGroupSelected ), NULL, this );
m_refreshButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnRebuildRows ), NULL, this ); m_refreshButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnRebuildRows ), NULL, this );
m_cbFilterByUnit->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnFilterCheckBox ), NULL, this ); m_cbFilterByUnit->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnFilterCheckBox ), NULL, this );
m_unitFilter->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnFilterChoice ), NULL, this ); m_unitFilter->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnFilterChoice ), NULL, this );

View File

@ -567,9 +567,18 @@
<property name="name">bBottomSizer</property> <property name="name">bBottomSizer</property>
<property name="orient">wxHORIZONTAL</property> <property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer5</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBitmapButton" expanded="0"> <object class="wxBitmapButton" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -640,19 +649,9 @@
<event name="OnButtonClick">OnAddRow</event> <event name="OnButtonClick">OnAddRow</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="0">
<property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="spacer" expanded="0">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">20</property>
</object>
</object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">10</property> <property name="border">10</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBitmapButton" expanded="0"> <object class="wxBitmapButton" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -724,8 +723,8 @@
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">10</property> <property name="border">4</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBitmapButton" expanded="1"> <object class="wxBitmapButton" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -768,7 +767,7 @@
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size">-1,-1</property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_divider1</property> <property name="name">m_divider1</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
@ -796,8 +795,8 @@
</object> </object>
</object> </object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">10</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="0"> <object class="wxCheckBox" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -860,9 +859,82 @@
<event name="OnCheckBox">OnRebuildRows</event> <event name="OnCheckBox">OnRebuildRows</event>
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1">
<property name="border">7</property>
<property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="bitmap"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="current"></property>
<property name="default">0</property>
<property name="default_pane">0</property>
<property name="disabled"></property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="focus"></property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Group Selected</property>
<property name="margins"></property>
<property name="markup">0</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_groupSelected</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="position"></property>
<property name="pressed"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip"></property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnButtonClick">OnGroupSelected</event>
</object>
</object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">10</property> <property name="border">10</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBitmapButton" expanded="0"> <object class="wxBitmapButton" expanded="0">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -934,8 +1006,8 @@
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">10</property> <property name="border">4</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBitmapButton" expanded="1"> <object class="wxBitmapButton" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -978,7 +1050,7 @@
<property name="maximum_size"></property> <property name="maximum_size"></property>
<property name="min_size"></property> <property name="min_size"></property>
<property name="minimize_button">0</property> <property name="minimize_button">0</property>
<property name="minimum_size"></property> <property name="minimum_size">-1,-1</property>
<property name="moveable">1</property> <property name="moveable">1</property>
<property name="name">m_divider2</property> <property name="name">m_divider2</property>
<property name="pane_border">1</property> <property name="pane_border">1</property>
@ -1007,7 +1079,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxCheckBox" expanded="1"> <object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property> <property name="BottomDockable">1</property>
@ -1135,6 +1207,8 @@
<event name="OnChoice">OnFilterChoice</event> <event name="OnChoice">OnFilterChoice</event>
</object> </object>
</object> </object>
</object>
</object>
<object class="sizeritem" expanded="0"> <object class="sizeritem" expanded="0">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>

View File

@ -53,6 +53,7 @@ class DIALOG_LIB_EDIT_PIN_TABLE_BASE : public DIALOG_SHIM
wxBitmapButton* m_deleteButton; wxBitmapButton* m_deleteButton;
BITMAP_BUTTON* m_divider1; BITMAP_BUTTON* m_divider1;
wxCheckBox* m_cbGroup; wxCheckBox* m_cbGroup;
wxButton* m_groupSelected;
wxBitmapButton* m_refreshButton; wxBitmapButton* m_refreshButton;
BITMAP_BUTTON* m_divider2; BITMAP_BUTTON* m_divider2;
wxCheckBox* m_cbFilterByUnit; wxCheckBox* m_cbFilterByUnit;
@ -69,6 +70,7 @@ class DIALOG_LIB_EDIT_PIN_TABLE_BASE : public DIALOG_SHIM
virtual void OnAddRow( wxCommandEvent& event ) = 0; virtual void OnAddRow( wxCommandEvent& event ) = 0;
virtual void OnDeleteRow( wxCommandEvent& event ) = 0; virtual void OnDeleteRow( wxCommandEvent& event ) = 0;
virtual void OnRebuildRows( wxCommandEvent& event ) = 0; virtual void OnRebuildRows( wxCommandEvent& event ) = 0;
virtual void OnGroupSelected( wxCommandEvent& event ) = 0;
virtual void OnFilterCheckBox( wxCommandEvent& event ) = 0; virtual void OnFilterCheckBox( wxCommandEvent& event ) = 0;
virtual void OnFilterChoice( wxCommandEvent& event ) = 0; virtual void OnFilterChoice( wxCommandEvent& event ) = 0;
virtual void OnCancel( wxCommandEvent& event ) = 0; virtual void OnCancel( wxCommandEvent& event ) = 0;