16DIALOG_LIB_EDIT_PIN_TABLE_BASE::DIALOG_LIB_EDIT_PIN_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 )
18 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
20 wxBoxSizer* top_sizer;
21 top_sizer =
new wxBoxSizer( wxVERTICAL );
24 bSizer6 =
new wxBoxSizer( wxHORIZONTAL );
26 wxBoxSizer* bLeftGridSizer;
27 bLeftGridSizer =
new wxBoxSizer( wxVERTICAL );
29 wxBoxSizer* bSummarySizer;
30 bSummarySizer =
new wxBoxSizer( wxHORIZONTAL );
32 m_staticTextPinNumbers =
new wxStaticText(
this, wxID_ANY,
_(
"Pin numbers:"), wxDefaultPosition, wxDefaultSize, 0 );
41 bSummarySizer->Add( 0, 0, 1, wxEXPAND, 5 );
43 m_staticTextPinCount =
new wxStaticText(
this, wxID_ANY,
_(
"Pin count:"), wxDefaultPosition, wxDefaultSize, 0 );
47 m_pin_count =
new wxStaticText(
this, wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
49 bSummarySizer->Add(
m_pin_count, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
52 bSummarySizer->Add( 0, 0, 1, wxEXPAND, 5 );
58 m_duplicate_pins =
new wxStaticText(
this, wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
60 bSummarySizer->Add(
m_duplicate_pins, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
63 bLeftGridSizer->Add( bSummarySizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
65 wxBoxSizer* bGridMarginsSizer;
66 bGridMarginsSizer =
new wxBoxSizer( wxVERTICAL );
68 m_grid =
new WX_GRID(
this, wxID_ANY, wxDefaultPosition, wxSize( 800,400 ), 0 );
71 m_grid->CreateGrid( 5, 14 );
72 m_grid->EnableEditing(
true );
73 m_grid->EnableGridLines(
true );
74 m_grid->EnableDragGridSize(
false );
75 m_grid->SetMargins( 0, 0 );
78 m_grid->SetColSize( 0, 60 );
79 m_grid->SetColSize( 1, 66 );
80 m_grid->SetColSize( 2, 84 );
81 m_grid->SetColSize( 3, 140 );
82 m_grid->SetColSize( 4, 140 );
83 m_grid->SetColSize( 5, 100 );
84 m_grid->SetColSize( 6, 110 );
85 m_grid->SetColSize( 7, 110 );
86 m_grid->SetColSize( 8, 84 );
87 m_grid->SetColSize( 9, 84 );
88 m_grid->SetColSize( 10, 84 );
89 m_grid->SetColSize( 11, 84 );
90 m_grid->SetColSize( 12, 100 );
91 m_grid->SetColSize( 13, 100 );
92 m_grid->EnableDragColMove(
false );
93 m_grid->EnableDragColSize(
true );
94 m_grid->SetColLabelValue( 0,
_(
"Count") );
95 m_grid->SetColLabelValue( 1,
_(
"Number") );
96 m_grid->SetColLabelValue( 2,
_(
"Name") );
97 m_grid->SetColLabelValue( 3,
_(
"Electrical Type") );
98 m_grid->SetColLabelValue( 4,
_(
"Graphic Style") );
99 m_grid->SetColLabelValue( 5,
_(
"Orientation") );
100 m_grid->SetColLabelValue( 6,
_(
"Number Text Size") );
101 m_grid->SetColLabelValue( 7,
_(
"Name Text Size") );
102 m_grid->SetColLabelValue( 8,
_(
"Length") );
103 m_grid->SetColLabelValue( 9,
_(
"X Position") );
104 m_grid->SetColLabelValue( 10,
_(
"Y Position") );
105 m_grid->SetColLabelValue( 11,
_(
"Visible") );
106 m_grid->SetColLabelValue( 12,
_(
"Unit") );
107 m_grid->SetColLabelValue( 13,
_(
"Body Style") );
108 m_grid->SetColLabelSize( 24 );
109 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
112 m_grid->EnableDragRowSize(
false );
113 m_grid->SetRowLabelSize( 0 );
114 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
119 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
120 m_grid->SetMinSize( wxSize( 690,200 ) );
122 bGridMarginsSizer->Add(
m_grid, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 10 );
125 bLeftGridSizer->Add( bGridMarginsSizer, 1, wxEXPAND|wxLEFT, 5 );
128 bSizer6->Add( bLeftGridSizer, 1, wxEXPAND, 5 );
130 wxBoxSizer* bRightPaneSizer;
131 bRightPaneSizer =
new wxBoxSizer( wxVERTICAL );
133 wxStaticBoxSizer* sbSizer1;
134 sbSizer1 =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Filter Pin Table") ), wxVERTICAL );
136 wxGridBagSizer* gbSizer1;
137 gbSizer1 =
new wxGridBagSizer( 5, 0 );
138 gbSizer1->SetFlexibleDirection( wxBOTH );
139 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
141 m_cbFilterByUnit =
new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY,
_(
"Filter by unit:"), wxDefaultPosition, wxDefaultSize, 0 );
142 gbSizer1->Add(
m_cbFilterByUnit, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
144 wxArrayString m_unitFilterChoices;
145 m_unitFilter =
new wxChoice( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitFilterChoices, 0 );
147 gbSizer1->Add(
m_unitFilter, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
149 m_cbFilterByBodyStyle =
new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY,
_(
"Filter by body style:"), wxDefaultPosition, wxDefaultSize, 0 );
150 gbSizer1->Add(
m_cbFilterByBodyStyle, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
152 wxArrayString m_bodyStyleFilterChoices;
153 m_bodyStyleFilter =
new wxChoice( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_bodyStyleFilterChoices, 0 );
155 gbSizer1->Add(
m_bodyStyleFilter, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
157 m_cbFilterSelected =
new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY,
_(
"Filter by selection"), wxDefaultPosition, wxDefaultSize, 0 );
158 gbSizer1->Add(
m_cbFilterSelected, wxGBPosition( 2, 0 ), wxGBSpan( 1, 2 ), wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
161 sbSizer1->Add( gbSizer1, 1, wxEXPAND, 5 );
164 bRightPaneSizer->Add( sbSizer1, 0, wxEXPAND|wxALL, 5 );
167 bRightPaneSizer->Add( 0, 20, 1, wxEXPAND, 5 );
169 wxStaticBoxSizer* sbSizer3;
170 sbSizer3 =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Export") ), wxVERTICAL );
172 wxBoxSizer* bExportSizer;
173 bExportSizer =
new wxBoxSizer( wxVERTICAL );
175 m_rbExportAllPins =
new wxRadioButton( sbSizer3->GetStaticBox(), wxID_ANY,
_(
"Export all pins"), wxDefaultPosition, wxDefaultSize, 0 );
178 m_rbExportOnlyShownPins =
new wxRadioButton( sbSizer3->GetStaticBox(), wxID_ANY,
_(
"Export only shown pins"), wxDefaultPosition, wxDefaultSize, 0 );
181 wxBoxSizer* bExportBtnSizer;
182 bExportBtnSizer =
new wxBoxSizer( wxHORIZONTAL );
184 m_btnExportToFile =
new wxButton( sbSizer3->GetStaticBox(), wxID_ANY,
_(
"To File..."), wxDefaultPosition, wxDefaultSize, 0 );
188 bExportBtnSizer->Add( 5, 0, 0, wxEXPAND, 5 );
190 m_btnExportToClipboard =
new wxButton( sbSizer3->GetStaticBox(), wxID_ANY,
_(
"To Clipboard"), wxDefaultPosition, wxDefaultSize, 0 );
194 bExportSizer->Add( bExportBtnSizer, 0, wxEXPAND, 5 );
197 sbSizer3->Add( bExportSizer, 1, wxEXPAND, 5 );
200 bRightPaneSizer->Add( sbSizer3, 0, wxEXPAND|wxALL, 5 );
202 wxStaticBoxSizer* sbSizer2;
203 sbSizer2 =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Import") ), wxVERTICAL );
205 wxBoxSizer* bImportSizer;
206 bImportSizer =
new wxBoxSizer( wxVERTICAL );
208 m_rbReplaceAll =
new wxRadioButton( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"Replace all existing pins"), wxDefaultPosition, wxDefaultSize, 0 );
211 m_radioBtn1 =
new wxRadioButton( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"Append to existing pins"), wxDefaultPosition, wxDefaultSize, 0 );
212 bImportSizer->Add(
m_radioBtn1, 0, wxBOTTOM|wxLEFT, 5 );
215 sbSizer2->Add( bImportSizer, 1, wxEXPAND, 5 );
217 wxBoxSizer* bImportBtnSizer;
218 bImportBtnSizer =
new wxBoxSizer( wxHORIZONTAL );
220 m_btnImportFromFile =
new wxButton( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"From File..."), wxDefaultPosition, wxDefaultSize, 0 );
224 bImportBtnSizer->Add( 5, 0, 0, wxEXPAND, 5 );
226 m_btnImportFromClipboard =
new wxButton( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"From Clipboard"), wxDefaultPosition, wxDefaultSize, 0 );
230 sbSizer2->Add( bImportBtnSizer, 0, wxEXPAND, 5 );
233 bRightPaneSizer->Add( sbSizer2, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
236 bSizer6->Add( bRightPaneSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
239 top_sizer->Add( bSizer6, 1, wxEXPAND, 5 );
241 wxBoxSizer* bBottomSizer;
242 bBottomSizer =
new wxBoxSizer( wxHORIZONTAL );
245 bSizer5 =
new wxBoxSizer( wxHORIZONTAL );
248 bSizer5->Add(
m_addButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
251 bSizer5->Add(
m_deleteButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 10 );
253 m_divider1 =
new BITMAP_BUTTON(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
256 bSizer5->Add(
m_divider1, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 4 );
258 m_cbGroup =
new wxCheckBox(
this, wxID_ANY,
_(
"Group by name"), wxDefaultPosition, wxDefaultSize, 0 );
259 bSizer5->Add(
m_cbGroup, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
261 m_groupSelected =
new wxButton(
this, wxID_ANY,
_(
"Group Selected"), wxDefaultPosition, wxDefaultSize, 0 );
265 bSizer5->Add(
m_refreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
268 bBottomSizer->Add( bSizer5, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
271 bBottomSizer->Add( 30, 0, 1, wxEXPAND, 5 );
273 m_Buttons =
new wxStdDialogButtonSizer();
280 bBottomSizer->Add(
m_Buttons, 0, wxEXPAND|wxALL, 5 );
283 top_sizer->Add( bBottomSizer, 0, wxLEFT|wxEXPAND, 10 );
286 this->SetSizer( top_sizer );
288 top_sizer->Fit(
this );
290 this->Centre( wxBOTH );