Add Insert/Delete button to Tracks and Via setup panel

GRID_TRICKS cannot handle row label events at the moment, so I disabled them.

Fixes: lp:1788877
* https://bugs.launchpad.net/kicad/+bug/1788877
This commit is contained in:
Thomas Pointhuber 2018-08-27 21:38:39 +02:00 committed by Jeff Young
parent 95a08d0dbc
commit 2b59c976f2
5 changed files with 945 additions and 49 deletions

View File

@ -27,11 +27,31 @@
#include <base_units.h>
#include <pcb_edit_frame.h>
#include <board_design_settings.h>
#include <bitmaps.h>
#include <widgets/wx_grid.h>
#include <panel_setup_tracks_and_vias.h>
enum TRACK_VAR_GRID_COLUMNS
{
TR_WIDTH_COL = 0
};
enum VIA_VAR_GRID_COLUMNS
{
VIA_SIZE_COL = 0,
VIA_DRILL_COL
};
enum DIFF_VAR_GRID_COLUMNS
{
DP_WIDTH_COL = 0,
DP_GAP_COL,
DP_VIA_GAP_COL
};
PANEL_SETUP_TRACKS_AND_VIAS::PANEL_SETUP_TRACKS_AND_VIAS(
PAGED_DIALOG* aParent, PCB_EDIT_FRAME* aFrame,
PANEL_SETUP_FEATURE_CONSTRAINTS* aConstraintsPanel ) :
@ -43,48 +63,66 @@ PANEL_SETUP_TRACKS_AND_VIAS::PANEL_SETUP_TRACKS_AND_VIAS(
m_BrdSettings = &m_Pcb->GetDesignSettings();
m_ConstraintsPanel = aConstraintsPanel;
m_trackWidthsAddButton->SetBitmap( KiBitmap( small_plus_xpm ) );
m_trackWidthsRemoveButton->SetBitmap( KiBitmap( trash_xpm ) );
m_viaSizesAddButton->SetBitmap( KiBitmap( small_plus_xpm ) );
m_viaSizesRemoveButton->SetBitmap( KiBitmap( trash_xpm ) );
m_diffPairsAddButton->SetBitmap( KiBitmap( small_plus_xpm ) );
m_diffPairsRemoveButton->SetBitmap( KiBitmap( trash_xpm ) );
// Membership combobox editors require a bit more room, so increase the row size of
// all our grids for consistency
m_trackWidthsGrid->SetDefaultRowSize( m_trackWidthsGrid->GetDefaultRowSize() + 4 );
m_viaSizesGrid->SetDefaultRowSize( m_viaSizesGrid->GetDefaultRowSize() + 4 );
m_diffPairsGrid->SetDefaultRowSize( m_diffPairsGrid->GetDefaultRowSize() + 4 );
m_trackWidthsGrid->PushEventHandler( new GRID_TRICKS( m_trackWidthsGrid ) );
m_viaSizesGrid->PushEventHandler( new GRID_TRICKS( m_viaSizesGrid ) );
m_diffPairsGrid->PushEventHandler( new GRID_TRICKS( m_diffPairsGrid ) );
m_trackWidthsGrid->SetSelectionMode( wxGrid::wxGridSelectionModes::wxGridSelectRows );
m_viaSizesGrid->SetSelectionMode( wxGrid::wxGridSelectionModes::wxGridSelectRows );
m_diffPairsGrid->SetSelectionMode( wxGrid::wxGridSelectionModes::wxGridSelectRows );
}
PANEL_SETUP_TRACKS_AND_VIAS::~PANEL_SETUP_TRACKS_AND_VIAS()
{
// Delete the GRID_TRICKS.
m_trackWidthsGrid->PopEventHandler( true );
m_viaSizesGrid->PopEventHandler( true );
m_diffPairsGrid->PopEventHandler( true );
}
bool PANEL_SETUP_TRACKS_AND_VIAS::TransferDataToWindow()
{
#define SETCELL( grid, row, col, val ) \
grid->SetCellValue( row, col, StringFromValue( m_Frame->GetUserUnits(), val, true, true ) )
if( m_trackWidthsGrid->GetNumberRows() > 0 )
m_trackWidthsGrid->DeleteRows( 0, m_trackWidthsGrid->GetNumberRows() );
m_trackWidthsGrid->ClearGrid();
m_viaSizesGrid->ClearGrid();
m_diffPairsGrid->ClearGrid();
if( m_viaSizesGrid->GetNumberRows() > 0 )
m_viaSizesGrid->DeleteRows( 0, m_viaSizesGrid->GetNumberRows() );
if( m_diffPairsGrid->GetNumberRows() > 0 )
m_diffPairsGrid->DeleteRows( 0, m_diffPairsGrid->GetNumberRows() );
// Skip the first item, which is the current netclass value
for( unsigned ii = 1; ii < m_BrdSettings->m_TrackWidthList.size(); ii++ )
{
SETCELL( m_trackWidthsGrid, ii-1, 0, m_BrdSettings->m_TrackWidthList[ii] );
AppendTrackWidth( m_BrdSettings->m_TrackWidthList[ii] );
}
// Skip the first item, which is the current netclass value
for( unsigned ii = 1; ii < m_BrdSettings->m_ViasDimensionsList.size(); ii++ )
{
SETCELL( m_viaSizesGrid, ii-1, 0, m_BrdSettings->m_ViasDimensionsList[ii].m_Diameter );
if( m_BrdSettings->m_ViasDimensionsList[ii].m_Drill > 0 )
SETCELL( m_viaSizesGrid, ii-1, 1, m_BrdSettings->m_ViasDimensionsList[ii].m_Drill );
AppendViaSize( m_BrdSettings->m_ViasDimensionsList[ii].m_Diameter,
m_BrdSettings->m_ViasDimensionsList[ii].m_Drill );
}
// Skip the first item, which is the current netclass value
for( unsigned ii = 1; ii < m_BrdSettings->m_DiffPairDimensionsList.size(); ii++ )
{
SETCELL( m_diffPairsGrid, ii-1, 0, m_BrdSettings->m_DiffPairDimensionsList[ii].m_Width );
if( m_BrdSettings->m_DiffPairDimensionsList[ii].m_Gap > 0 )
SETCELL( m_diffPairsGrid, ii-1, 1, m_BrdSettings->m_DiffPairDimensionsList[ii].m_Gap );
if( m_BrdSettings->m_DiffPairDimensionsList[ii].m_ViaGap > 0 )
SETCELL( m_diffPairsGrid, ii-1, 2, m_BrdSettings->m_DiffPairDimensionsList[ii].m_ViaGap );
AppendDiffPairs( m_BrdSettings->m_DiffPairDimensionsList[ii].m_Width,
m_BrdSettings->m_DiffPairDimensionsList[ii].m_Gap,
m_BrdSettings->m_DiffPairDimensionsList[ii].m_ViaGap );
}
return true;
@ -101,9 +139,16 @@ bool PANEL_SETUP_TRACKS_AND_VIAS::TransferDataFromWindow()
std::vector<VIA_DIMENSION> vias;
std::vector<DIFF_PAIR_DIMENSION> diffPairs;
if( !m_trackWidthsGrid->CommitPendingChanges()
|| !m_viaSizesGrid->CommitPendingChanges()
|| !m_diffPairsGrid->CommitPendingChanges() )
{
return false;
}
for( int row = 0; row < m_trackWidthsGrid->GetNumberRows(); ++row )
{
msg = m_trackWidthsGrid->GetCellValue( row, 0 );
msg = m_trackWidthsGrid->GetCellValue( row, TR_WIDTH_COL );
if( !msg.IsEmpty() )
trackWidths.push_back( ValueFromString( m_Frame->GetUserUnits(), msg, true ) );
@ -111,14 +156,14 @@ bool PANEL_SETUP_TRACKS_AND_VIAS::TransferDataFromWindow()
for( int row = 0; row < m_viaSizesGrid->GetNumberRows(); ++row )
{
msg = m_viaSizesGrid->GetCellValue( row, 0 );
msg = m_viaSizesGrid->GetCellValue( row, VIA_SIZE_COL );
if( !msg.IsEmpty() )
{
VIA_DIMENSION via_dim;
via_dim.m_Diameter = ValueFromString( m_Frame->GetUserUnits(), msg, true );
msg = m_viaSizesGrid->GetCellValue( row, 1 );
msg = m_viaSizesGrid->GetCellValue( row, VIA_DRILL_COL );
if( !msg.IsEmpty() )
via_dim.m_Drill = ValueFromString( m_Frame->GetUserUnits(), msg, true );
@ -127,19 +172,19 @@ bool PANEL_SETUP_TRACKS_AND_VIAS::TransferDataFromWindow()
}
}
for( int row = 0; row < m_viaSizesGrid->GetNumberRows(); ++row )
for( int row = 0; row < m_diffPairsGrid->GetNumberRows(); ++row )
{
msg = m_diffPairsGrid->GetCellValue( row, 0 );
msg = m_diffPairsGrid->GetCellValue( row, DP_WIDTH_COL );
if( !msg.IsEmpty() )
{
DIFF_PAIR_DIMENSION diffPair_dim;
diffPair_dim.m_Width = ValueFromString( m_Frame->GetUserUnits(), msg, true );
msg = m_diffPairsGrid->GetCellValue( row, 1 );
msg = m_diffPairsGrid->GetCellValue( row, DP_GAP_COL );
diffPair_dim.m_Gap = ValueFromString( m_Frame->GetUserUnits(), msg, true );
msg = m_diffPairsGrid->GetCellValue( row, 2 );
msg = m_diffPairsGrid->GetCellValue( row, DP_VIA_GAP_COL );
if( !msg.IsEmpty() )
diffPair_dim.m_ViaGap = ValueFromString( m_Frame->GetUserUnits(), msg, true );
@ -171,7 +216,9 @@ bool PANEL_SETUP_TRACKS_AND_VIAS::validateData()
if( !m_trackWidthsGrid->CommitPendingChanges()
|| !m_viaSizesGrid->CommitPendingChanges()
|| !m_diffPairsGrid->CommitPendingChanges() )
{
return false;
}
wxString msg;
int minViaDia = m_ConstraintsPanel->m_viaMinSize.GetValue();
@ -181,7 +228,7 @@ bool PANEL_SETUP_TRACKS_AND_VIAS::validateData()
// Test tracks
for( int row = 0; row < m_trackWidthsGrid->GetNumberRows(); ++row )
{
wxString tvalue = m_trackWidthsGrid->GetCellValue( row, 0 );
wxString tvalue = m_trackWidthsGrid->GetCellValue( row, TR_WIDTH_COL );
if( tvalue.IsEmpty() )
continue;
@ -190,7 +237,7 @@ bool PANEL_SETUP_TRACKS_AND_VIAS::validateData()
{
msg.Printf( _( "Track width less than minimum track width (%s)." ),
StringFromValue( m_Frame->GetUserUnits(), minTrackWidth, true, true ) );
m_Parent->SetError( msg, this, m_trackWidthsGrid, row, 0 );
m_Parent->SetError( msg, this, m_trackWidthsGrid, row, TR_WIDTH_COL );
return false;
}
}
@ -198,7 +245,7 @@ bool PANEL_SETUP_TRACKS_AND_VIAS::validateData()
// Test vias
for( int row = 0; row < m_viaSizesGrid->GetNumberRows(); ++row )
{
wxString viaDia = m_viaSizesGrid->GetCellValue( row, 0 );
wxString viaDia = m_viaSizesGrid->GetCellValue( row, VIA_SIZE_COL );
if( viaDia.IsEmpty() )
continue;
@ -207,16 +254,16 @@ bool PANEL_SETUP_TRACKS_AND_VIAS::validateData()
{
msg.Printf( _( "Via diameter less than minimum via diameter (%s)." ),
StringFromValue( m_Frame->GetUserUnits(), minViaDia, true, true ) );
m_Parent->SetError( msg, this, m_viaSizesGrid, row, 0 );
m_Parent->SetError( msg, this, m_viaSizesGrid, row, VIA_SIZE_COL );
return false;
}
wxString viaDrill = m_viaSizesGrid->GetCellValue( row, 1 );
wxString viaDrill = m_viaSizesGrid->GetCellValue( row, VIA_DRILL_COL );
if( viaDrill.IsEmpty() )
{
msg = _( "No via drill defined." );
m_Parent->SetError( msg, this, m_viaSizesGrid, row, 1 );
m_Parent->SetError( msg, this, m_viaSizesGrid, row, VIA_DRILL_COL );
return false;
}
@ -224,7 +271,7 @@ bool PANEL_SETUP_TRACKS_AND_VIAS::validateData()
{
msg.Printf( _( "Via drill less than minimum via drill (%s)." ),
StringFromValue( m_Frame->GetUserUnits(), minViaDrill, true, true ) );
m_Parent->SetError( msg, this, m_viaSizesGrid, row, 1 );
m_Parent->SetError( msg, this, m_viaSizesGrid, row, VIA_DRILL_COL );
return false;
}
@ -232,7 +279,7 @@ bool PANEL_SETUP_TRACKS_AND_VIAS::validateData()
>= ValueFromString( m_Frame->GetUserUnits(), viaDia ) )
{
msg = _( "Via drill larger than via diameter." );
m_Parent->SetError( msg, this, m_viaSizesGrid, row, 1 );
m_Parent->SetError( msg, this, m_viaSizesGrid, row, VIA_DRILL_COL );
return false;
}
}
@ -304,4 +351,126 @@ void PANEL_SETUP_TRACKS_AND_VIAS::ImportSettingsFrom( BOARD* aBoard )
m_BrdSettings = savedSettings;
}
void PANEL_SETUP_TRACKS_AND_VIAS::AppendTrackWidth( const int aWidth )
{
int i = m_trackWidthsGrid->GetNumberRows();
m_trackWidthsGrid->AppendRows( 1 );
wxString val = StringFromValue( m_Frame->GetUserUnits(), aWidth, true, true );
m_trackWidthsGrid->SetCellValue( i, TR_WIDTH_COL, val );
}
void PANEL_SETUP_TRACKS_AND_VIAS::AppendViaSize( const int aSize, const int aDrill )
{
int i = m_viaSizesGrid->GetNumberRows();
m_viaSizesGrid->AppendRows( 1 );
wxString val = StringFromValue( m_Frame->GetUserUnits(), aSize, true, true );
m_viaSizesGrid->SetCellValue( i, VIA_SIZE_COL, val );
if( aDrill > 0 )
{
val = StringFromValue( m_Frame->GetUserUnits(), aDrill, true, true );
m_viaSizesGrid->SetCellValue( i, VIA_DRILL_COL, val );
}
}
void PANEL_SETUP_TRACKS_AND_VIAS::AppendDiffPairs( const int aWidth, const int aGap,
const int aViaGap )
{
int i = m_diffPairsGrid->GetNumberRows();
m_diffPairsGrid->AppendRows( 1 );
wxString val = StringFromValue( m_Frame->GetUserUnits(), aWidth, true, true );
m_diffPairsGrid->SetCellValue( i, DP_WIDTH_COL, val );
if( aGap > 0 )
{
val = StringFromValue( m_Frame->GetUserUnits(), aGap, true, true );
m_diffPairsGrid->SetCellValue( i, DP_GAP_COL, val );
}
if( aViaGap > 0 )
{
val = StringFromValue( m_Frame->GetUserUnits(), aViaGap, true, true );
m_diffPairsGrid->SetCellValue( i, DP_VIA_GAP_COL, val );
}
}
void PANEL_SETUP_TRACKS_AND_VIAS::OnAddTrackWidthsClick( wxCommandEvent& aEvent )
{
AppendTrackWidth( 0 );
m_trackWidthsGrid->MakeCellVisible( m_trackWidthsGrid->GetNumberRows() - 1, TR_WIDTH_COL );
m_trackWidthsGrid->SetGridCursor( m_trackWidthsGrid->GetNumberRows() - 1, TR_WIDTH_COL );
m_trackWidthsGrid->EnableCellEditControl( true );
m_trackWidthsGrid->ShowCellEditControl();
}
void PANEL_SETUP_TRACKS_AND_VIAS::OnRemoveTrackWidthsClick( wxCommandEvent& event )
{
int curRow = m_trackWidthsGrid->GetGridCursorRow();
if( curRow < 0 || m_trackWidthsGrid->GetNumberRows() <= curRow )
return;
m_trackWidthsGrid->DeleteRows( curRow, 1 );
curRow = std::max( 0, curRow - 1 );
m_trackWidthsGrid->MakeCellVisible( curRow, m_trackWidthsGrid->GetGridCursorCol() );
m_trackWidthsGrid->SetGridCursor( curRow, m_trackWidthsGrid->GetGridCursorCol() );
}
void PANEL_SETUP_TRACKS_AND_VIAS::OnAddViaSizesClick( wxCommandEvent& event )
{
AppendViaSize( 0, 0 );
m_viaSizesGrid->MakeCellVisible( m_viaSizesGrid->GetNumberRows() - 1, VIA_SIZE_COL );
m_viaSizesGrid->SetGridCursor( m_viaSizesGrid->GetNumberRows() - 1, VIA_SIZE_COL );
m_viaSizesGrid->EnableCellEditControl( true );
m_viaSizesGrid->ShowCellEditControl();
}
void PANEL_SETUP_TRACKS_AND_VIAS::OnRemoveViaSizesClick( wxCommandEvent& event )
{
int curRow = m_viaSizesGrid->GetGridCursorRow();
if( curRow < 0 || m_viaSizesGrid->GetNumberRows() <= curRow )
return;
m_viaSizesGrid->DeleteRows( curRow, 1 );
curRow = std::max( 0, curRow - 1 );
m_viaSizesGrid->MakeCellVisible( curRow, m_viaSizesGrid->GetGridCursorCol() );
m_viaSizesGrid->SetGridCursor( curRow, m_viaSizesGrid->GetGridCursorCol() );
}
void PANEL_SETUP_TRACKS_AND_VIAS::OnAddDiffPairsClick( wxCommandEvent& event )
{
AppendDiffPairs( 0, 0, 0 );
m_diffPairsGrid->MakeCellVisible( m_diffPairsGrid->GetNumberRows() - 1, DP_WIDTH_COL );
m_diffPairsGrid->SetGridCursor( m_diffPairsGrid->GetNumberRows() - 1, DP_WIDTH_COL );
m_diffPairsGrid->EnableCellEditControl( true );
m_diffPairsGrid->ShowCellEditControl();
}
void PANEL_SETUP_TRACKS_AND_VIAS::OnRemoveDiffPairsClick( wxCommandEvent& event )
{
int curRow = m_diffPairsGrid->GetGridCursorRow();
if( curRow < 0 || m_diffPairsGrid->GetNumberRows() <= curRow )
return;
m_diffPairsGrid->DeleteRows( curRow, 1 );
curRow = std::max( 0, curRow - 1 );
m_diffPairsGrid->MakeCellVisible( curRow, m_diffPairsGrid->GetGridCursorCol() );
m_diffPairsGrid->SetGridCursor( curRow, m_diffPairsGrid->GetGridCursorCol() );
}

View File

@ -50,9 +50,22 @@ private:
bool validateData();
protected:
void OnAddTrackWidthsClick( wxCommandEvent& event ) override;
void OnRemoveTrackWidthsClick( wxCommandEvent& event ) override;
void OnAddViaSizesClick( wxCommandEvent& event ) override;
void OnRemoveViaSizesClick( wxCommandEvent& event ) override;
void OnAddDiffPairsClick( wxCommandEvent& event ) override;
void OnRemoveDiffPairsClick( wxCommandEvent& event ) override;
void AppendTrackWidth( const int aWidth );
void AppendViaSize( const int aSize, const int aDrill );
void AppendDiffPairs( const int aWidth, const int aGap, const int aViaGap );
public:
PANEL_SETUP_TRACKS_AND_VIAS( PAGED_DIALOG* aParent, PCB_EDIT_FRAME* aFrame,
PANEL_SETUP_FEATURE_CONSTRAINTS* aConstraintsPanel );
~PANEL_SETUP_TRACKS_AND_VIAS() override;
bool TransferDataToWindow() override;
bool TransferDataFromWindow() override;

View File

@ -36,7 +36,7 @@ PANEL_SETUP_TRACKS_AND_VIAS_BASE::PANEL_SETUP_TRACKS_AND_VIAS_BASE( wxWindow* pa
m_trackWidthsGrid->SetMargins( 0, 0 );
// Columns
m_trackWidthsGrid->SetColSize( 0, 100 );
m_trackWidthsGrid->SetColSize( 0, 125 );
m_trackWidthsGrid->EnableDragColMove( false );
m_trackWidthsGrid->EnableDragColSize( false );
m_trackWidthsGrid->SetColLabelSize( 22 );
@ -45,7 +45,7 @@ PANEL_SETUP_TRACKS_AND_VIAS_BASE::PANEL_SETUP_TRACKS_AND_VIAS_BASE( wxWindow* pa
// Rows
m_trackWidthsGrid->EnableDragRowSize( false );
m_trackWidthsGrid->SetRowLabelSize( 30 );
m_trackWidthsGrid->SetRowLabelSize( 0 );
m_trackWidthsGrid->SetRowLabelValue( 0, _("1") );
m_trackWidthsGrid->SetRowLabelValue( 1, _("2") );
m_trackWidthsGrid->SetRowLabelValue( 2, _("3") );
@ -62,6 +62,25 @@ PANEL_SETUP_TRACKS_AND_VIAS_BASE::PANEL_SETUP_TRACKS_AND_VIAS_BASE( wxWindow* pa
m_trackWidthsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
sbSizer4->Add( m_trackWidthsGrid, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizer3;
bSizer3 = new wxBoxSizer( wxHORIZONTAL );
m_trackWidthsAddButton = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
m_trackWidthsAddButton->SetMinSize( wxSize( 30,30 ) );
bSizer3->Add( m_trackWidthsAddButton, 0, wxLEFT|wxRIGHT, 5 );
bSizer3->Add( 0, 0, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_trackWidthsRemoveButton = new wxBitmapButton( sbSizer4->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
m_trackWidthsRemoveButton->SetMinSize( wxSize( 30,30 ) );
bSizer3->Add( m_trackWidthsRemoveButton, 0, wxLEFT|wxRIGHT, 5 );
sbSizer4->Add( bSizer3, 0, wxEXPAND|wxTOP, 2 );
bSizerLower->Add( sbSizer4, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
@ -78,8 +97,8 @@ PANEL_SETUP_TRACKS_AND_VIAS_BASE::PANEL_SETUP_TRACKS_AND_VIAS_BASE( wxWindow* pa
m_viaSizesGrid->SetMargins( 0, 0 );
// Columns
m_viaSizesGrid->SetColSize( 0, 100 );
m_viaSizesGrid->SetColSize( 1, 100 );
m_viaSizesGrid->SetColSize( 0, 110 );
m_viaSizesGrid->SetColSize( 1, 110 );
m_viaSizesGrid->EnableDragColMove( false );
m_viaSizesGrid->EnableDragColSize( false );
m_viaSizesGrid->SetColLabelSize( 22 );
@ -89,7 +108,7 @@ PANEL_SETUP_TRACKS_AND_VIAS_BASE::PANEL_SETUP_TRACKS_AND_VIAS_BASE( wxWindow* pa
// Rows
m_viaSizesGrid->EnableDragRowSize( false );
m_viaSizesGrid->SetRowLabelSize( 30 );
m_viaSizesGrid->SetRowLabelSize( 0 );
m_viaSizesGrid->SetRowLabelValue( 0, _("1") );
m_viaSizesGrid->SetRowLabelValue( 1, _("2") );
m_viaSizesGrid->SetRowLabelValue( 2, _("3") );
@ -106,8 +125,27 @@ PANEL_SETUP_TRACKS_AND_VIAS_BASE::PANEL_SETUP_TRACKS_AND_VIAS_BASE( wxWindow* pa
m_viaSizesGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
sbSizer5->Add( m_viaSizesGrid, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizer4;
bSizer4 = new wxBoxSizer( wxHORIZONTAL );
bSizerLower->Add( sbSizer5, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_viaSizesAddButton = new wxBitmapButton( sbSizer5->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
m_viaSizesAddButton->SetMinSize( wxSize( 30,30 ) );
bSizer4->Add( m_viaSizesAddButton, 0, wxLEFT|wxRIGHT, 5 );
bSizer4->Add( 0, 0, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_viaSizesRemoveButton = new wxBitmapButton( sbSizer5->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
m_viaSizesRemoveButton->SetMinSize( wxSize( 30,30 ) );
bSizer4->Add( m_viaSizesRemoveButton, 0, wxLEFT|wxRIGHT, 5 );
sbSizer5->Add( bSizer4, 0, wxEXPAND|wxTOP, 2 );
bSizerLower->Add( sbSizer5, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
wxStaticBoxSizer* sbSizer6;
sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Differential Pairs") ), wxVERTICAL );
@ -122,9 +160,9 @@ PANEL_SETUP_TRACKS_AND_VIAS_BASE::PANEL_SETUP_TRACKS_AND_VIAS_BASE( wxWindow* pa
m_diffPairsGrid->SetMargins( 0, 0 );
// Columns
m_diffPairsGrid->SetColSize( 0, 100 );
m_diffPairsGrid->SetColSize( 1, 100 );
m_diffPairsGrid->SetColSize( 2, 100 );
m_diffPairsGrid->SetColSize( 0, 110 );
m_diffPairsGrid->SetColSize( 1, 110 );
m_diffPairsGrid->SetColSize( 2, 110 );
m_diffPairsGrid->EnableDragColMove( false );
m_diffPairsGrid->EnableDragColSize( true );
m_diffPairsGrid->SetColLabelSize( 22 );
@ -135,7 +173,7 @@ PANEL_SETUP_TRACKS_AND_VIAS_BASE::PANEL_SETUP_TRACKS_AND_VIAS_BASE( wxWindow* pa
// Rows
m_diffPairsGrid->EnableDragRowSize( true );
m_diffPairsGrid->SetRowLabelSize( 30 );
m_diffPairsGrid->SetRowLabelSize( 0 );
m_diffPairsGrid->SetRowLabelValue( 0, _("1") );
m_diffPairsGrid->SetRowLabelValue( 1, _("2") );
m_diffPairsGrid->SetRowLabelValue( 2, _("3") );
@ -153,6 +191,25 @@ PANEL_SETUP_TRACKS_AND_VIAS_BASE::PANEL_SETUP_TRACKS_AND_VIAS_BASE( wxWindow* pa
m_diffPairsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
sbSizer6->Add( m_diffPairsGrid, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
wxBoxSizer* bSizer5;
bSizer5 = new wxBoxSizer( wxHORIZONTAL );
m_diffPairsAddButton = new wxBitmapButton( sbSizer6->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
m_diffPairsAddButton->SetMinSize( wxSize( 30,30 ) );
bSizer5->Add( m_diffPairsAddButton, 0, wxLEFT|wxRIGHT, 5 );
bSizer5->Add( 0, 0, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
m_diffPairsRemoveButton = new wxBitmapButton( sbSizer6->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
m_diffPairsRemoveButton->SetMinSize( wxSize( 30,30 ) );
bSizer5->Add( m_diffPairsRemoveButton, 0, wxLEFT|wxRIGHT, 5 );
sbSizer6->Add( bSizer5, 0, wxEXPAND|wxTOP, 2 );
bSizerLower->Add( sbSizer6, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
@ -163,8 +220,24 @@ PANEL_SETUP_TRACKS_AND_VIAS_BASE::PANEL_SETUP_TRACKS_AND_VIAS_BASE( wxWindow* pa
this->SetSizer( bMainSizer );
this->Layout();
bMainSizer->Fit( this );
// Connect Events
m_trackWidthsAddButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddTrackWidthsClick ), NULL, this );
m_trackWidthsRemoveButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveTrackWidthsClick ), NULL, this );
m_viaSizesAddButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddViaSizesClick ), NULL, this );
m_viaSizesRemoveButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveViaSizesClick ), NULL, this );
m_diffPairsAddButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddDiffPairsClick ), NULL, this );
m_diffPairsRemoveButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveDiffPairsClick ), NULL, this );
}
PANEL_SETUP_TRACKS_AND_VIAS_BASE::~PANEL_SETUP_TRACKS_AND_VIAS_BASE()
{
// Disconnect Events
m_trackWidthsAddButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddTrackWidthsClick ), NULL, this );
m_trackWidthsRemoveButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveTrackWidthsClick ), NULL, this );
m_viaSizesAddButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddViaSizesClick ), NULL, this );
m_viaSizesRemoveButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveViaSizesClick ), NULL, this );
m_diffPairsAddButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnAddDiffPairsClick ), NULL, this );
m_diffPairsRemoveButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_TRACKS_AND_VIAS_BASE::OnRemoveDiffPairsClick ), NULL, this );
}

View File

@ -219,7 +219,7 @@
<property name="col_label_values">&quot;Width&quot;</property>
<property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
<property name="cols">1</property>
<property name="column_sizes">100</property>
<property name="column_sizes">125</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
@ -261,7 +261,7 @@
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
<property name="row_label_size">30</property>
<property name="row_label_size">0</property>
<property name="row_label_values">&quot;1&quot; &quot;2&quot; &quot;3&quot; &quot;4&quot; &quot;5&quot; &quot;6&quot; &quot;7&quot; &quot;8&quot;</property>
<property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
<property name="row_sizes"></property>
@ -331,10 +331,217 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">2</property>
<property name="flag">wxEXPAND|wxTOP</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer3</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxBitmapButton" 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="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="hover"></property>
<property name="id">wxID_ANY</property>
<property name="label">MyButton</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">30,30</property>
<property name="moveable">1</property>
<property name="name">m_trackWidthsAddButton</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="resize">Resizable</property>
<property name="selected"></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">OnAddTrackWidthsClick</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxBitmapButton" 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="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="hover"></property>
<property name="id">wxID_ANY</property>
<property name="label">MyButton</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">30,30</property>
<property name="moveable">1</property>
<property name="name">m_trackWidthsRemoveButton</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="resize">Resizable</property>
<property name="selected"></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">OnRemoveTrackWidthsClick</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="border">10</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1">
@ -377,7 +584,7 @@
<property name="col_label_values">&quot;Size&quot; &quot;Drill&quot;</property>
<property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
<property name="cols">2</property>
<property name="column_sizes">100,100</property>
<property name="column_sizes">110,110</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
@ -419,7 +626,7 @@
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
<property name="row_label_size">30</property>
<property name="row_label_size">0</property>
<property name="row_label_values">&quot;1&quot; &quot;2&quot; &quot;3&quot; &quot;4&quot; &quot;5&quot; &quot;6&quot; &quot;7&quot; &quot;8&quot;</property>
<property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
<property name="row_sizes"></property>
@ -489,6 +696,213 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">2</property>
<property name="flag">wxEXPAND|wxTOP</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">bSizer4</property>
<property name="orient">wxHORIZONTAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxBitmapButton" 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="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="hover"></property>
<property name="id">wxID_ANY</property>
<property name="label">MyButton</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">30,30</property>
<property name="moveable">1</property>
<property name="name">m_viaSizesAddButton</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="resize">Resizable</property>
<property name="selected"></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">OnAddViaSizesClick</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxBitmapButton" 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="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="hover"></property>
<property name="id">wxID_ANY</property>
<property name="label">MyButton</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">30,30</property>
<property name="moveable">1</property>
<property name="name">m_viaSizesRemoveButton</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="resize">Resizable</property>
<property name="selected"></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">OnRemoveViaSizesClick</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
<object class="sizeritem" expanded="1">
@ -535,7 +949,7 @@
<property name="col_label_values">&quot;Width&quot; &quot;Gap&quot; &quot;Via Gap&quot;</property>
<property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
<property name="cols">3</property>
<property name="column_sizes">100,100,100</property>
<property name="column_sizes">110,110,110</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
@ -577,7 +991,7 @@
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
<property name="row_label_size">30</property>
<property name="row_label_size">0</property>
<property name="row_label_values">&quot;1&quot; &quot;2&quot; &quot;3&quot; &quot;4&quot; &quot;5&quot; &quot;6&quot; &quot;7&quot; &quot;8&quot;</property>
<property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
<property name="row_sizes"></property>
@ -647,6 +1061,213 @@
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">2</property>
<property name="flag">wxEXPAND|wxTOP</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="1">
<property name="border">5</property>
<property name="flag">wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxBitmapButton" 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="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="hover"></property>
<property name="id">wxID_ANY</property>
<property name="label">MyButton</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">30,30</property>
<property name="moveable">1</property>
<property name="name">m_diffPairsAddButton</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="resize">Resizable</property>
<property name="selected"></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">OnAddDiffPairsClick</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">0</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxLEFT|wxRIGHT</property>
<property name="proportion">0</property>
<object class="wxBitmapButton" 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="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="hover"></property>
<property name="id">wxID_ANY</property>
<property name="label">MyButton</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">30,30</property>
<property name="moveable">1</property>
<property name="name">m_diffPairsRemoveButton</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="resize">Resizable</property>
<property name="selected"></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">OnRemoveDiffPairsClick</event>
<event name="OnChar"></event>
<event name="OnEnterWindow"></event>
<event name="OnEraseBackground"></event>
<event name="OnKeyDown"></event>
<event name="OnKeyUp"></event>
<event name="OnKillFocus"></event>
<event name="OnLeaveWindow"></event>
<event name="OnLeftDClick"></event>
<event name="OnLeftDown"></event>
<event name="OnLeftUp"></event>
<event name="OnMiddleDClick"></event>
<event name="OnMiddleDown"></event>
<event name="OnMiddleUp"></event>
<event name="OnMotion"></event>
<event name="OnMouseEvents"></event>
<event name="OnMouseWheel"></event>
<event name="OnPaint"></event>
<event name="OnRightDClick"></event>
<event name="OnRightDown"></event>
<event name="OnRightUp"></event>
<event name="OnSetFocus"></event>
<event name="OnSize"></event>
<event name="OnUpdateUI"></event>
</object>
</object>
</object>
</object>
</object>
</object>
</object>

View File

@ -20,6 +20,11 @@ class WX_GRID;
#include <wx/colour.h>
#include <wx/settings.h>
#include <wx/grid.h>
#include <wx/bitmap.h>
#include <wx/image.h>
#include <wx/icon.h>
#include <wx/bmpbuttn.h>
#include <wx/button.h>
#include <wx/sizer.h>
#include <wx/statbox.h>
#include <wx/panel.h>
@ -36,8 +41,23 @@ class PANEL_SETUP_TRACKS_AND_VIAS_BASE : public wxPanel
protected:
wxStaticText* m_label;
WX_GRID* m_trackWidthsGrid;
wxBitmapButton* m_trackWidthsAddButton;
wxBitmapButton* m_trackWidthsRemoveButton;
WX_GRID* m_viaSizesGrid;
wxBitmapButton* m_viaSizesAddButton;
wxBitmapButton* m_viaSizesRemoveButton;
WX_GRID* m_diffPairsGrid;
wxBitmapButton* m_diffPairsAddButton;
wxBitmapButton* m_diffPairsRemoveButton;
// Virtual event handlers, overide them in your derived class
virtual void OnAddTrackWidthsClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRemoveTrackWidthsClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnAddViaSizesClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRemoveViaSizesClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnAddDiffPairsClick( wxCommandEvent& event ) { event.Skip(); }
virtual void OnRemoveDiffPairsClick( wxCommandEvent& event ) { event.Skip(); }
public: