33#include <wx/radiobox.h>
35#define NB_PCB_LAYERS PCB_LAYER_ID_COUNT
36#define FIRST_COPPER_LAYER 0
37#define LAST_COPPER_LAYER 31
54 wxString aGerberName );
79 const wxString& aGerberName )
91 int aCopperLayerCount, wxString aGerberName )
93 wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER )
97 wxArrayString layerList;
112 if( aDefaultLayer == ii )
113 selected = layerCount;
128 if( aDefaultLayer == ii )
129 selected = layerCount;
135 layerList.Add(
_(
"Hole data" ) );
138 selected = layerCount;
143 layerList.Add(
_(
"Do not export" ) );
146 selected = layerCount;
152 wxDefaultSize, layerList, std::min( layerCount, 12 ),
158 wxBoxSizer* mainSizer =
new wxBoxSizer( wxHORIZONTAL );
159 SetSizer( mainSizer );
160 mainSizer->Add(
m_layerRadioBox, 1, wxEXPAND | wxALIGN_TOP | wxALL, 5 );
161 wxBoxSizer* buttonsSizer =
new wxBoxSizer( wxVERTICAL );
162 mainSizer->Add( buttonsSizer, 0, wxALIGN_BOTTOM | wxALL, 5 );
164 button =
new wxButton(
this, wxID_OK,
_(
"OK" ) );
165 button->SetDefault();
166 buttonsSizer->Add( button, 0, wxGROW | wxALL, 5 );
168 button =
new wxButton(
this, wxID_CANCEL,
_(
"Cancel" ) );
169 buttonsSizer->Add( button, 0, wxGROW | wxALL, 5 );
177 GetSizer()->SetSizeHints(
this );
185 wxPostEvent(
this, wxCommandEvent( wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK ) );
191 if( !wxDialog::TransferDataFromWindow() )
209 case F_Cu: txt = wxT(
"F.Cu" );
break;
210 case In1_Cu: txt = wxT(
"In1.Cu" );
break;
211 case In2_Cu: txt = wxT(
"In2.Cu" );
break;
212 case In3_Cu: txt = wxT(
"In3.Cu" );
break;
213 case In4_Cu: txt = wxT(
"In4.Cu" );
break;
214 case In5_Cu: txt = wxT(
"In5.Cu" );
break;
215 case In6_Cu: txt = wxT(
"In6.Cu" );
break;
216 case In7_Cu: txt = wxT(
"In7.Cu" );
break;
217 case In8_Cu: txt = wxT(
"In8.Cu" );
break;
218 case In9_Cu: txt = wxT(
"In9.Cu" );
break;
219 case In10_Cu: txt = wxT(
"In10.Cu" );
break;
220 case In11_Cu: txt = wxT(
"In11.Cu" );
break;
221 case In12_Cu: txt = wxT(
"In12.Cu" );
break;
222 case In13_Cu: txt = wxT(
"In13.Cu" );
break;
223 case In14_Cu: txt = wxT(
"In14.Cu" );
break;
224 case In15_Cu: txt = wxT(
"In15.Cu" );
break;
225 case In16_Cu: txt = wxT(
"In16.Cu" );
break;
226 case In17_Cu: txt = wxT(
"In17.Cu" );
break;
227 case In18_Cu: txt = wxT(
"In18.Cu" );
break;
228 case In19_Cu: txt = wxT(
"In19.Cu" );
break;
229 case In20_Cu: txt = wxT(
"In20.Cu" );
break;
230 case In21_Cu: txt = wxT(
"In21.Cu" );
break;
231 case In22_Cu: txt = wxT(
"In22.Cu" );
break;
232 case In23_Cu: txt = wxT(
"In23.Cu" );
break;
233 case In24_Cu: txt = wxT(
"In24.Cu" );
break;
234 case In25_Cu: txt = wxT(
"In25.Cu" );
break;
235 case In26_Cu: txt = wxT(
"In26.Cu" );
break;
236 case In27_Cu: txt = wxT(
"In27.Cu" );
break;
237 case In28_Cu: txt = wxT(
"In28.Cu" );
break;
238 case In29_Cu: txt = wxT(
"In29.Cu" );
break;
239 case In30_Cu: txt = wxT(
"In30.Cu" );
break;
240 case B_Cu: txt = wxT(
"B.Cu" );
break;
243 case B_Adhes: txt = wxT(
"B.Adhes" );
break;
244 case F_Adhes: txt = wxT(
"F.Adhes" );
break;
245 case B_Paste: txt = wxT(
"B.Paste" );
break;
246 case F_Paste: txt = wxT(
"F.Paste" );
break;
247 case B_SilkS: txt = wxT(
"B.SilkS" );
break;
248 case F_SilkS: txt = wxT(
"F.SilkS" );
break;
249 case B_Mask: txt = wxT(
"B.Mask" );
break;
250 case F_Mask: txt = wxT(
"F.Mask" );
break;
253 case Dwgs_User: txt = wxT(
"Dwgs.User" );
break;
254 case Cmts_User: txt = wxT(
"Cmts.User" );
break;
255 case Eco1_User: txt = wxT(
"Eco1.User" );
break;
256 case Eco2_User: txt = wxT(
"Eco2.User" );
break;
257 case Edge_Cuts: txt = wxT(
"Edge.Cuts" );
break;
262 txt = wxT(
"" );
break;
265 return wxString( txt );
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
bool TransferDataFromWindow() override
std::vector< int > m_layerId
void OnLayerSelected(wxCommandEvent &event)
wxRadioBox * m_layerRadioBox
SELECT_LAYER_DIALOG(GERBVIEW_FRAME *parent, int aDefaultLayer, int aCopperLayerCount, wxString aGerberName)
const wxString GetPCBDefaultLayerName(int aLayerId)
#define LAST_COPPER_LAYER
#define FIRST_COPPER_LAYER
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.