14DIALOG_GENDRILL_BASE::DIALOG_GENDRILL_BASE( wxWindow* parent, wxWindowID
id,
const wxString& title,
const wxPoint& pos,
const wxSize& size,
long style ) :
DIALOG_SHIM( parent, id, title, pos, size, style )
16 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
20 wxBoxSizer* bupperSizer;
21 bupperSizer =
new wxBoxSizer( wxHORIZONTAL );
23 staticTextOutputDir =
new wxStaticText(
this, wxID_ANY,
_(
"Output folder:"), wxDefaultPosition, wxDefaultSize, 0 );
27 m_outputDirectoryName =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
34 bMainSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
36 wxBoxSizer* bmiddlerSizer;
37 bmiddlerSizer =
new wxBoxSizer( wxHORIZONTAL );
40 bLeftCol =
new wxBoxSizer( wxVERTICAL );
42 m_formatLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Format"), wxDefaultPosition, wxDefaultSize, 0 );
46 m_staticline1 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
47 bLeftCol->Add(
m_staticline1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
49 wxBoxSizer* bSizerMargins;
50 bSizerMargins =
new wxBoxSizer( wxVERTICAL );
52 m_rbExcellon =
new wxRadioButton(
this, wxID_ANY,
_(
"Excellon"), wxDefaultPosition, wxDefaultSize, 0 );
56 wxFlexGridSizer* fgSizerExcellonOptions;
57 fgSizerExcellonOptions =
new wxFlexGridSizer( 4, 1, 3, 0 );
58 fgSizerExcellonOptions->SetFlexibleDirection( wxBOTH );
59 fgSizerExcellonOptions->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
61 m_Check_Mirror =
new wxCheckBox(
this, wxID_ANY,
_(
"Mirror Y axis"), wxDefaultPosition, wxDefaultSize, 0 );
62 m_Check_Mirror->SetToolTip(
_(
"Not recommended.\nUsed mostly by users who make the boards themselves.") );
66 m_Check_Minimal =
new wxCheckBox(
this, wxID_ANY,
_(
"Minimal header"), wxDefaultPosition, wxDefaultSize, 0 );
67 m_Check_Minimal->SetToolTip(
_(
"Not recommended.\nOnly use it for board houses which do not accept fully featured headers.") );
71 m_Check_Merge_PTH_NPTH =
new wxCheckBox(
this, wxID_ANY,
_(
"PTH and NPTH in single file"), wxDefaultPosition, wxDefaultSize, 0 );
72 m_Check_Merge_PTH_NPTH->SetToolTip(
_(
"Not recommended.\nOnly use for board houses which ask for merged PTH and NPTH into a single file.") );
76 m_altDrillMode =
new wxCheckBox(
this, wxID_ANY,
_(
"Use alternate drill mode for oval holes"), wxDefaultPosition, wxDefaultSize, 0 );
77 fgSizerExcellonOptions->Add(
m_altDrillMode, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
80 bSizerMargins->Add( fgSizerExcellonOptions, 0, wxEXPAND|wxLEFT, 20 );
83 bSizerMargins->Add( 0, 3, 1, wxEXPAND, 5 );
85 m_rbGerberX2 =
new wxRadioButton(
this, wxID_ANY,
_(
"Gerber X2"), wxDefaultPosition, wxDefaultSize, 0 );
86 bSizerMargins->Add(
m_rbGerberX2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
88 wxFlexGridSizer* fgSizerGerberX2Options;
89 fgSizerGerberX2Options =
new wxFlexGridSizer( 4, 1, 3, 0 );
90 fgSizerGerberX2Options->SetFlexibleDirection( wxBOTH );
91 fgSizerGerberX2Options->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
93 m_generateTentingLayers =
new wxCheckBox(
this, wxID_ANY,
_(
"Generate tenting layers"), wxDefaultPosition, wxDefaultSize, 0 );
99 bSizerMargins->Add( fgSizerGerberX2Options, 1, wxEXPAND|wxLEFT, 20 );
102 bSizerMargins->Add( 0, 6, 0, wxEXPAND, 5 );
105 bSizer9 =
new wxBoxSizer( wxHORIZONTAL );
107 m_cbGenerateMap =
new wxCheckBox(
this, wxID_ANY,
_(
"Generate map:"), wxDefaultPosition, wxDefaultSize, 0 );
108 bSizer9->Add(
m_cbGenerateMap, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
110 wxString m_choiceDrillMapChoices[] = {
_(
"Postscript"),
_(
"Gerber X2"),
_(
"DXF"),
_(
"SVG"),
_(
"PDF") };
111 int m_choiceDrillMapNChoices =
sizeof( m_choiceDrillMapChoices ) /
sizeof( wxString );
112 m_choiceDrillMap =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceDrillMapNChoices, m_choiceDrillMapChoices, 0 );
117 bSizerMargins->Add( bSizer9, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
120 bLeftCol->Add( bSizerMargins, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
123 bmiddlerSizer->Add( bLeftCol, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
126 bmiddlerSizer->Add( 15, 0, 0, 0, 5 );
128 wxBoxSizer* bRightCol;
129 bRightCol =
new wxBoxSizer( wxVERTICAL );
131 m_optionsLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Options"), wxDefaultPosition, wxDefaultSize, 0 );
135 m_staticline2 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
136 bRightCol->Add(
m_staticline2, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
138 wxFlexGridSizer* fgSizer1;
139 fgSizer1 =
new wxFlexGridSizer( 0, 2, 5, 5 );
140 fgSizer1->AddGrowableCol( 1 );
141 fgSizer1->SetFlexibleDirection( wxBOTH );
142 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
144 m_originLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Origin:"), wxDefaultPosition, wxDefaultSize, 0 );
146 fgSizer1->Add(
m_originLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
148 wxString m_originChoices[] = {
_(
"Absolute"),
_(
"Drill/place file origin") };
149 int m_originNChoices =
sizeof( m_originChoices ) /
sizeof( wxString );
150 m_origin =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_originNChoices, m_originChoices, 0 );
152 fgSizer1->Add(
m_origin, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
154 m_unitsLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Units:"), wxDefaultPosition, wxDefaultSize, 0 );
156 fgSizer1->Add(
m_unitsLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
158 wxString m_unitsChoices[] = {
_(
"Millimeters"),
_(
"Inches") };
159 int m_unitsNChoices =
sizeof( m_unitsChoices ) /
sizeof( wxString );
160 m_units =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitsNChoices, m_unitsChoices, 0 );
162 fgSizer1->Add(
m_units, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
164 m_zerosLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Zeros:"), wxDefaultPosition, wxDefaultSize, 0 );
166 fgSizer1->Add(
m_zerosLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
168 wxString m_zerosChoices[] = {
_(
"Decimal format (recommended)"),
_(
"Suppress leading zeros"),
_(
"Suppress trailing zeros"),
_(
"Keep zeros") };
169 int m_zerosNChoices =
sizeof( m_zerosChoices ) /
sizeof( wxString );
170 m_zeros =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_zerosNChoices, m_zerosChoices, 0 );
172 fgSizer1->Add(
m_zeros, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
175 fgSizer1->Add( 0, 8, 1, wxEXPAND, 5 );
178 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
180 m_precisionLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Precision:"), wxDefaultPosition, wxDefaultSize, 0 );
184 m_staticTextPrecision =
new wxStaticText(
this, wxID_ANY,
_(
"Precision"), wxDefaultPosition, wxDefaultSize, 0 );
189 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
192 bRightCol->Add( fgSizer1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
195 bmiddlerSizer->Add( bRightCol, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
198 bMainSizer->Add( bmiddlerSizer, 0, wxEXPAND|wxTOP, 8 );
200 bMsgSizer =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Messages") ), wxVERTICAL );
202 m_messagesBox =
new wxTextCtrl(
bMsgSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
212 m_buttonReport =
new wxButton(
this, wxID_ANY,
_(
"Generate Report File..."), wxDefaultPosition, wxDefaultSize, 0 );
232 this->Centre( wxBOTH );
wxRadioButton * m_rbExcellon
virtual void onSelDrillUnitsSelected(wxCommandEvent &event)
wxStaticText * m_staticTextPrecision
wxBoxSizer * m_buttonsSizer
STD_BITMAP_BUTTON * m_browseButton
wxStdDialogButtonSizer * m_sdbSizer
wxStaticBoxSizer * bMsgSizer
wxStaticLine * m_staticline2
wxCheckBox * m_altDrillMode
wxStaticText * m_formatLabel
wxStaticText * m_unitsLabel
wxButton * m_sdbSizerCancel
wxStaticText * m_optionsLabel
wxChoice * m_choiceDrillMap
wxStaticText * m_originLabel
wxRadioButton * m_rbGerberX2
wxCheckBox * m_Check_Mirror
DIALOG_GENDRILL_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Generate Drill Files"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxCheckBox * m_Check_Merge_PTH_NPTH
wxStaticText * m_zerosLabel
virtual void onGenReportFile(wxCommandEvent &event)
wxStaticText * staticTextOutputDir
wxTextCtrl * m_outputDirectoryName
virtual void onFileFormatSelection(wxCommandEvent &event)
virtual void onSelZerosFmtSelected(wxCommandEvent &event)
wxStaticLine * m_staticline1
wxCheckBox * m_cbGenerateMap
wxTextCtrl * m_messagesBox
wxCheckBox * m_generateTentingLayers
virtual void onOutputDirectoryBrowseClicked(wxCommandEvent &event)
wxStaticText * m_precisionLabel
wxButton * m_buttonReport
virtual void onCloseDlg(wxCloseEvent &event)
wxCheckBox * m_Check_Minimal
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...