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 );
39 wxBoxSizer* bMiddleSizer;
40 bMiddleSizer =
new wxBoxSizer( wxVERTICAL );
42 wxStaticBoxSizer* sbSizer6;
43 sbSizer6 =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Drill File Format") ), wxVERTICAL );
45 m_rbExcellon =
new wxRadioButton( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"Excellon"), wxDefaultPosition, wxDefaultSize, 0 );
48 wxBoxSizer* bSizerExcellonOptions;
49 bSizerExcellonOptions =
new wxBoxSizer( wxVERTICAL );
51 m_Check_Mirror =
new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"Mirror Y axis"), wxDefaultPosition, wxDefaultSize, 0 );
52 m_Check_Mirror->SetToolTip(
_(
"Not recommended.\nUsed mostly by users who make the boards themselves.") );
56 m_Check_Minimal =
new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"Minimal header"), wxDefaultPosition, wxDefaultSize, 0 );
57 m_Check_Minimal->SetToolTip(
_(
"Not recommended.\nOnly use it for board houses which do not accept fully featured headers.") );
61 m_Check_Merge_PTH_NPTH =
new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"PTH and NPTH in single file"), wxDefaultPosition, wxDefaultSize, 0 );
62 m_Check_Merge_PTH_NPTH->SetToolTip(
_(
"Not recommended.\nOnly use for board houses which ask for merged PTH and NPTH into a single file.") );
66 wxString m_radioBoxOvalHoleModeChoices[] = {
_(
"Use route command (recommended)"),
_(
"Use alternate drill mode") };
67 int m_radioBoxOvalHoleModeNChoices =
sizeof( m_radioBoxOvalHoleModeChoices ) /
sizeof( wxString );
68 m_radioBoxOvalHoleMode =
new wxRadioBox( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"Oval Holes Drill Mode"), wxDefaultPosition, wxDefaultSize, m_radioBoxOvalHoleModeNChoices, m_radioBoxOvalHoleModeChoices, 1, wxRA_SPECIFY_COLS );
70 m_radioBoxOvalHoleMode->SetToolTip(
_(
"Oval holes frequently create problems for board houses.\n\"Use route command\" uses the usual G00 route command (recommended)\n \"Use alternate mode\" uses another drill/ route command (G85)\n(Use it only if the recommended command does not work)") );
75 sbSizer6->Add( bSizerExcellonOptions, 1, wxEXPAND|wxLEFT, 12 );
77 m_rbGerberX2 =
new wxRadioButton( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"Gerber X2"), wxDefaultPosition, wxDefaultSize, 0 );
78 sbSizer6->Add(
m_rbGerberX2, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
81 bMiddleSizer->Add( sbSizer6, 1, wxEXPAND|wxALL, 5 );
83 wxString m_Choice_Drill_MapChoices[] = {
_(
"PostScript"),
_(
"Gerber X2"),
_(
"DXF"),
_(
"SVG"),
_(
"PDF") };
84 int m_Choice_Drill_MapNChoices =
sizeof( m_Choice_Drill_MapChoices ) /
sizeof( wxString );
85 m_Choice_Drill_Map =
new wxRadioBox(
this, wxID_ANY,
_(
"Map File Format"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_MapNChoices, m_Choice_Drill_MapChoices, 1, wxRA_SPECIFY_COLS );
92 bmiddlerSizer->Add( bMiddleSizer, 1, wxEXPAND, 5 );
94 wxBoxSizer* bLeftSizer;
95 bLeftSizer =
new wxBoxSizer( wxVERTICAL );
97 wxString m_Choice_Drill_OffsetChoices[] = {
_(
"Absolute"),
_(
"Drill/place file origin") };
98 int m_Choice_Drill_OffsetNChoices =
sizeof( m_Choice_Drill_OffsetChoices ) /
sizeof( wxString );
99 m_Choice_Drill_Offset =
new wxRadioBox(
this, wxID_ANY,
_(
"Drill Origin"), wxDefaultPosition, wxDefaultSize, m_Choice_Drill_OffsetNChoices, m_Choice_Drill_OffsetChoices, 1, wxRA_SPECIFY_COLS );
101 m_Choice_Drill_Offset->SetToolTip(
_(
"Choose the coordinate origin: absolute or relative to the drill/place file origin") );
105 wxString m_Choice_UnitChoices[] = {
_(
"Millimeters"),
_(
"Inches") };
106 int m_Choice_UnitNChoices =
sizeof( m_Choice_UnitChoices ) /
sizeof( wxString );
107 m_Choice_Unit =
new wxRadioBox(
this, wxID_ANY,
_(
"Drill Units"), wxDefaultPosition, wxDefaultSize, m_Choice_UnitNChoices, m_Choice_UnitChoices, 1, wxRA_SPECIFY_COLS );
111 wxString m_Choice_Zeros_FormatChoices[] = {
_(
"Decimal format (recommended)"),
_(
"Suppress leading zeros"),
_(
"Suppress trailing zeros"),
_(
"Keep zeros") };
112 int m_Choice_Zeros_FormatNChoices =
sizeof( m_Choice_Zeros_FormatChoices ) /
sizeof( wxString );
113 m_Choice_Zeros_Format =
new wxRadioBox(
this, wxID_ANY,
_(
"Zeros Format"), wxDefaultPosition, wxDefaultSize, m_Choice_Zeros_FormatNChoices, m_Choice_Zeros_FormatChoices, 1, wxRA_SPECIFY_COLS );
119 wxFlexGridSizer* fgSizer1;
120 fgSizer1 =
new wxFlexGridSizer( 0, 2, 0, 0 );
121 fgSizer1->AddGrowableCol( 1 );
122 fgSizer1->SetFlexibleDirection( wxBOTH );
123 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
125 m_staticTextTitle =
new wxStaticText(
this, wxID_ANY,
_(
"Precision:"), wxDefaultPosition, wxDefaultSize, 0 );
129 m_staticTextPrecision =
new wxStaticText(
this, wxID_ANY,
_(
"Precision"), wxDefaultPosition, wxDefaultSize, 0 );
134 bLeftSizer->Add( fgSizer1, 0, wxEXPAND, 5 );
137 bmiddlerSizer->Add( bLeftSizer, 0, wxEXPAND, 5 );
139 wxBoxSizer* bRightBoxSizer;
140 bRightBoxSizer =
new wxBoxSizer( wxVERTICAL );
142 wxStaticBoxSizer* sbSizerHoles;
143 sbSizerHoles =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Hole Counts") ), wxVERTICAL );
145 wxFlexGridSizer* fgSizer2;
146 fgSizer2 =
new wxFlexGridSizer( 0, 2, 0, 0 );
147 fgSizer2->SetFlexibleDirection( wxBOTH );
148 fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
150 staticTextPlatedPads =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"Plated pads:"), wxDefaultPosition, wxDefaultSize, 0 );
154 m_PlatedPadsCountInfoMsg =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
158 staticTextNonPlatedPads =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"Non-plated pads:"), wxDefaultPosition, wxDefaultSize, 0 );
166 staticTextThroughVias =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"Through vias:"), wxDefaultPosition, wxDefaultSize, 0 );
170 m_ThroughViasInfoMsg =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
174 staticTextMicroVias =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"Micro vias:"), wxDefaultPosition, wxDefaultSize, 0 );
178 m_MicroViasInfoMsg =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
182 staticTextBuriedVias =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"Buried vias:"), wxDefaultPosition, wxDefaultSize, 0 );
186 m_BuriedViasInfoMsg =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
191 sbSizerHoles->Add( fgSizer2, 1, wxEXPAND, 5 );
194 bRightBoxSizer->Add( sbSizerHoles, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
197 bmiddlerSizer->Add( bRightBoxSizer, 0, wxEXPAND|wxTOP, 5 );
200 bMainSizer->Add( bmiddlerSizer, 0, wxEXPAND|wxTOP, 8 );
202 bMsgSizer =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Messages") ), wxVERTICAL );
204 m_messagesBox =
new wxTextCtrl(
bMsgSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
214 m_buttonReport =
new wxButton(
this, wxID_ANY,
_(
"Generate Report File..."), wxDefaultPosition, wxDefaultSize, 0 );
236 this->Centre( wxBOTH );
wxRadioButton * m_rbExcellon
wxStaticText * staticTextPlatedPads
wxStaticText * staticTextNonPlatedPads
wxRadioBox * m_Choice_Drill_Offset
virtual void OnSelZerosFmtSelected(wxCommandEvent &event)
wxStaticText * m_staticTextPrecision
wxBoxSizer * m_buttonsSizer
virtual void OnGenDrillFile(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_browseButton
wxStdDialogButtonSizer * m_sdbSizer
wxStaticBoxSizer * bMsgSizer
wxStaticText * m_MicroViasInfoMsg
wxButton * m_sdbSizerCancel
virtual void onQuitDlg(wxCommandEvent &event)
virtual void OnGenReportFile(wxCommandEvent &event)
wxRadioButton * m_rbGerberX2
wxStaticText * m_staticTextTitle
wxStaticText * m_PlatedPadsCountInfoMsg
virtual void OnOutputDirectoryBrowseClicked(wxCommandEvent &event)
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
wxButton * m_sdbSizerApply
wxStaticText * m_ThroughViasInfoMsg
wxRadioBox * m_Choice_Drill_Map
wxStaticText * staticTextMicroVias
wxRadioBox * m_Choice_Unit
wxStaticText * m_BuriedViasInfoMsg
wxStaticText * staticTextThroughVias
wxStaticText * staticTextBuriedVias
wxStaticText * m_NotPlatedPadsCountInfoMsg
wxRadioBox * m_radioBoxOvalHoleMode
wxStaticText * staticTextOutputDir
wxTextCtrl * m_outputDirectoryName
virtual void OnSelDrillUnitsSelected(wxCommandEvent &event)
virtual void onFileFormatSelection(wxCommandEvent &event)
wxRadioBox * m_Choice_Zeros_Format
wxTextCtrl * m_messagesBox
wxButton * m_buttonReport
virtual void onCloseDlg(wxCloseEvent &event)
wxCheckBox * m_Check_Minimal
virtual void OnGenMapFile(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...