15DIALOG_FP_EDIT_PAD_TABLE_BASE::DIALOG_FP_EDIT_PAD_TABLE_BASE( wxWindow* parent, wxWindowID
id,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style ) :
DIALOG_SHIM( parent, id, title, pos, size, style )
17 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
20 topSizer =
new wxBoxSizer( wxVERTICAL );
22 wxBoxSizer* m_contentSizer;
23 m_contentSizer =
new wxBoxSizer( wxHORIZONTAL );
25 wxBoxSizer* m_dataSizer;
26 m_dataSizer =
new wxBoxSizer( wxVERTICAL );
28 wxBoxSizer* bSummarySizer;
29 bSummarySizer =
new wxBoxSizer( wxHORIZONTAL );
31 m_staticTextPinNumbers =
new wxStaticText(
this, wxID_ANY,
_(
"Pad numbers:"), wxDefaultPosition, wxDefaultSize, 0 );
35 m_pin_numbers_summary =
new wxStaticText(
this, wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_END );
40 bSummarySizer->Add( 0, 0, 1, wxEXPAND, 5 );
42 m_staticTextPinCount =
new wxStaticText(
this, wxID_ANY,
_(
"Pad count:"), wxDefaultPosition, wxDefaultSize, 0 );
46 m_pin_count =
new wxStaticText(
this, wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
48 bSummarySizer->Add(
m_pin_count, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
51 bSummarySizer->Add( 0, 0, 1, wxEXPAND, 5 );
57 m_duplicate_pins =
new wxStaticText(
this, wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_END );
59 bSummarySizer->Add(
m_duplicate_pins, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
62 m_dataSizer->Add( bSummarySizer, 0, wxTOP|wxBOTTOM|wxEXPAND, 5 );
64 m_grid =
new WX_GRID(
this, wxID_ANY, wxDefaultPosition, wxSize( 800,400 ), 0 );
67 m_grid->CreateGrid( 1, 11 );
68 m_grid->EnableEditing(
true );
69 m_grid->EnableGridLines(
true );
70 m_grid->EnableDragGridSize(
false );
71 m_grid->SetMargins( 0, 0 );
74 m_grid->SetColSize( 0, 60 );
75 m_grid->SetColSize( 1, 110 );
76 m_grid->SetColSize( 2, 140 );
77 m_grid->SetColSize( 3, 84 );
78 m_grid->SetColSize( 4, 84 );
79 m_grid->SetColSize( 5, 84 );
80 m_grid->SetColSize( 6, 84 );
81 m_grid->SetColSize( 7, 84 );
82 m_grid->SetColSize( 8, 84 );
83 m_grid->SetColSize( 9, 110 );
84 m_grid->SetColSize( 10, 110 );
85 m_grid->EnableDragColMove(
false );
86 m_grid->EnableDragColSize(
true );
87 m_grid->SetColLabelValue( 0,
_(
"Number") );
88 m_grid->SetColLabelValue( 1,
_(
"Type") );
89 m_grid->SetColLabelValue( 2,
_(
"Shape") );
90 m_grid->SetColLabelValue( 3,
_(
"X Position") );
91 m_grid->SetColLabelValue( 4,
_(
"Y Position") );
92 m_grid->SetColLabelValue( 5,
_(
"Size X") );
93 m_grid->SetColLabelValue( 6,
_(
"Size Y") );
94 m_grid->SetColLabelValue( 7,
_(
"Drill X") );
95 m_grid->SetColLabelValue( 8,
_(
"Drill Y") );
96 m_grid->SetColLabelValue( 9,
_(
"Pad->Die Length") );
97 m_grid->SetColLabelValue( 10,
_(
"Pad->Die Delay") );
98 m_grid->SetColLabelSize( 24 );
99 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
102 m_grid->EnableDragRowSize(
false );
103 m_grid->SetRowLabelSize( 0 );
104 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
109 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
110 m_dataSizer->Add(
m_grid, 1, wxEXPAND|wxALL, 5 );
113 m_contentSizer->Add( m_dataSizer, 1, wxEXPAND, 5 );
115 wxBoxSizer* m_sideBarSizer;
116 m_sideBarSizer =
new wxBoxSizer( wxVERTICAL );
119 m_sideBarSizer->Add( 0, 0, 1, wxEXPAND, 5 );
121 wxStaticBoxSizer* m_exportSizer;
122 m_exportSizer =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Export") ), wxVERTICAL );
124 wxBoxSizer* m_exportBtnSizer;
125 m_exportBtnSizer =
new wxBoxSizer( wxHORIZONTAL );
127 m_btnExportToFile =
new wxButton( m_exportSizer->GetStaticBox(), wxID_ANY,
_(
"To File..."), wxDefaultPosition, wxDefaultSize, 0 );
131 m_exportBtnSizer->Add( 5, 0, 0, wxEXPAND, 5 );
133 m_btnExportToClipboard =
new wxButton( m_exportSizer->GetStaticBox(), wxID_ANY,
_(
"To Clipboard"), wxDefaultPosition, wxDefaultSize, 0 );
137 m_exportSizer->Add( m_exportBtnSizer, 1, wxEXPAND, 5 );
140 m_sideBarSizer->Add( m_exportSizer, 0, wxALL|wxEXPAND, 5 );
142 wxStaticBoxSizer* m_importSizer;
143 m_importSizer =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Import") ), wxVERTICAL );
145 m_rbReplaceExisting =
new wxRadioButton( m_importSizer->GetStaticBox(), wxID_ANY,
_(
"Replace all existing pads"), wxDefaultPosition, wxDefaultSize, 0 );
148 m_rbAppendToExisiting =
new wxRadioButton( m_importSizer->GetStaticBox(), wxID_ANY,
_(
"Append to existing pads"), wxDefaultPosition, wxDefaultSize, 0 );
151 wxBoxSizer* m_importBtnSizer;
152 m_importBtnSizer =
new wxBoxSizer( wxHORIZONTAL );
154 m_btnImportFromFile =
new wxButton( m_importSizer->GetStaticBox(), wxID_ANY,
_(
"From File..."), wxDefaultPosition, wxDefaultSize, 0 );
158 m_importBtnSizer->Add( 5, 0, 0, wxEXPAND, 5 );
160 m_btnImportFromClipboard =
new wxButton( m_importSizer->GetStaticBox(), wxID_ANY,
_(
"From Clipboard"), wxDefaultPosition, wxDefaultSize, 0 );
164 m_importSizer->Add( m_importBtnSizer, 1, wxEXPAND|wxBOTTOM, 5 );
167 m_sideBarSizer->Add( m_importSizer, 0, wxALL|wxEXPAND, 5 );
170 m_contentSizer->Add( m_sideBarSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
173 topSizer->Add( m_contentSizer, 1, wxEXPAND, 5 );
176 bSizer9 =
new wxBoxSizer( wxHORIZONTAL );
178 wxBoxSizer* bSizer91;
179 bSizer91 =
new wxBoxSizer( wxHORIZONTAL );
182 bSizer91->Add(
m_buttonAdd, 0, wxRIGHT|wxLEFT, 2 );
188 bSizer9->Add( bSizer91, 0, wxEXPAND|wxBOTTOM|wxLEFT, 5 );
191 bSizer9->Add( 0, 0, 1, wxEXPAND, 5 );
203 topSizer->Add( bSizer9, 0, wxEXPAND, 5 );
206 this->SetSizer( topSizer );
208 topSizer->Fit(
this );
210 this->Centre( wxBOTH );