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 );
18 wxBoxSizer* bMainSizer;
19 bMainSizer =
new wxBoxSizer( wxVERTICAL );
21 wxBoxSizer* bupperSizer;
22 bupperSizer =
new wxBoxSizer( wxHORIZONTAL );
24 staticTextOutputDir =
new wxStaticText(
this, wxID_ANY,
_(
"Output folder:"), wxDefaultPosition, wxDefaultSize, 0 );
28 m_outputDirectoryName =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
35 bMainSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
37 wxBoxSizer* bmiddlerSizer;
38 bmiddlerSizer =
new wxBoxSizer( wxHORIZONTAL );
40 wxBoxSizer* bMiddleSizer;
41 bMiddleSizer =
new wxBoxSizer( wxVERTICAL );
43 wxStaticBoxSizer* sbSizer6;
44 sbSizer6 =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Drill File Format") ), wxVERTICAL );
46 m_rbExcellon =
new wxRadioButton( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"Excellon"), wxDefaultPosition, wxDefaultSize, 0 );
49 wxBoxSizer* bSizerExcellonOptions;
50 bSizerExcellonOptions =
new wxBoxSizer( wxVERTICAL );
52 m_Check_Mirror =
new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"Mirror Y axis"), wxDefaultPosition, wxDefaultSize, 0 );
53 m_Check_Mirror->SetToolTip(
_(
"Not recommended.\nUsed mostly by users who make the boards themselves.") );
57 m_Check_Minimal =
new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"Minimal header"), wxDefaultPosition, wxDefaultSize, 0 );
58 m_Check_Minimal->SetToolTip(
_(
"Not recommended.\nOnly use it for board houses which do not accept fully featured headers.") );
62 m_Check_Merge_PTH_NPTH =
new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"PTH and NPTH in single file"), wxDefaultPosition, wxDefaultSize, 0 );
63 m_Check_Merge_PTH_NPTH->SetToolTip(
_(
"Not recommended.\nOnly use for board houses which ask for merged PTH and NPTH into a single file.") );
67 wxString m_radioBoxOvalHoleModeChoices[] = {
_(
"Use route command (recommended)"),
_(
"Use alternate drill mode") };
68 int m_radioBoxOvalHoleModeNChoices =
sizeof( m_radioBoxOvalHoleModeChoices ) /
sizeof( wxString );
69 m_radioBoxOvalHoleMode =
new wxRadioBox( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"Oval Holes Drill Mode"), wxDefaultPosition, wxDefaultSize, m_radioBoxOvalHoleModeNChoices, m_radioBoxOvalHoleModeChoices, 1, wxRA_SPECIFY_COLS );
71 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)") );
76 sbSizer6->Add( bSizerExcellonOptions, 1, wxEXPAND|wxLEFT, 12 );
78 m_rbGerberX2 =
new wxRadioButton( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"Gerber X2"), wxDefaultPosition, wxDefaultSize, 0 );
79 sbSizer6->Add(
m_rbGerberX2, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
82 bMiddleSizer->Add( sbSizer6, 1, wxEXPAND|wxALL, 5 );
84 wxString m_Choice_Drill_MapChoices[] = {
_(
"PostScript"),
_(
"Gerber X2"),
_(
"DXF"),
_(
"SVG"),
_(
"PDF") };
85 int m_Choice_Drill_MapNChoices =
sizeof( m_Choice_Drill_MapChoices ) /
sizeof( wxString );
86 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 );
93 bmiddlerSizer->Add( bMiddleSizer, 1, wxEXPAND, 5 );
95 wxBoxSizer* bLeftSizer;
96 bLeftSizer =
new wxBoxSizer( wxVERTICAL );
98 wxString m_Choice_Drill_OffsetChoices[] = {
_(
"Absolute"),
_(
"Drill/place file origin") };
99 int m_Choice_Drill_OffsetNChoices =
sizeof( m_Choice_Drill_OffsetChoices ) /
sizeof( wxString );
100 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 );
102 m_Choice_Drill_Offset->SetToolTip(
_(
"Choose the coordinate origin: absolute or relative to the drill/place file origin") );
106 wxString m_Choice_UnitChoices[] = {
_(
"Millimeters"),
_(
"Inches") };
107 int m_Choice_UnitNChoices =
sizeof( m_Choice_UnitChoices ) /
sizeof( wxString );
108 m_Choice_Unit =
new wxRadioBox(
this, wxID_ANY,
_(
"Drill Units"), wxDefaultPosition, wxDefaultSize, m_Choice_UnitNChoices, m_Choice_UnitChoices, 1, wxRA_SPECIFY_COLS );
112 wxString m_Choice_Zeros_FormatChoices[] = {
_(
"Decimal format (recommended)"),
_(
"Suppress leading zeros"),
_(
"Suppress trailing zeros"),
_(
"Keep zeros") };
113 int m_Choice_Zeros_FormatNChoices =
sizeof( m_Choice_Zeros_FormatChoices ) /
sizeof( wxString );
114 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 );
120 wxFlexGridSizer* fgSizer1;
121 fgSizer1 =
new wxFlexGridSizer( 0, 2, 0, 0 );
122 fgSizer1->AddGrowableCol( 1 );
123 fgSizer1->SetFlexibleDirection( wxBOTH );
124 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
126 m_staticTextTitle =
new wxStaticText(
this, wxID_ANY,
_(
"Precision:"), wxDefaultPosition, wxDefaultSize, 0 );
130 m_staticTextPrecision =
new wxStaticText(
this, wxID_ANY,
_(
"Precision"), wxDefaultPosition, wxDefaultSize, 0 );
135 bLeftSizer->Add( fgSizer1, 0, wxEXPAND, 5 );
138 bmiddlerSizer->Add( bLeftSizer, 0, wxEXPAND, 5 );
140 wxBoxSizer* bRightBoxSizer;
141 bRightBoxSizer =
new wxBoxSizer( wxVERTICAL );
143 wxStaticBoxSizer* sbSizerHoles;
144 sbSizerHoles =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Hole Counts") ), wxVERTICAL );
146 wxFlexGridSizer* fgSizer2;
147 fgSizer2 =
new wxFlexGridSizer( 0, 2, 0, 0 );
148 fgSizer2->SetFlexibleDirection( wxBOTH );
149 fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
151 staticTextPlatedPads =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"Plated pads:"), wxDefaultPosition, wxDefaultSize, 0 );
155 m_PlatedPadsCountInfoMsg =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
159 staticTextNonPlatedPads =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"Non-plated pads:"), wxDefaultPosition, wxDefaultSize, 0 );
167 staticTextThroughVias =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"Through vias:"), wxDefaultPosition, wxDefaultSize, 0 );
171 m_ThroughViasInfoMsg =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
175 staticTextMicroVias =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"Micro vias:"), wxDefaultPosition, wxDefaultSize, 0 );
179 m_MicroViasInfoMsg =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
183 staticTextBuriedVias =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"Buried vias:"), wxDefaultPosition, wxDefaultSize, 0 );
187 m_BuriedViasInfoMsg =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
192 sbSizerHoles->Add( fgSizer2, 1, wxEXPAND, 5 );
195 bRightBoxSizer->Add( sbSizerHoles, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
198 bmiddlerSizer->Add( bRightBoxSizer, 0, wxEXPAND|wxTOP, 5 );
201 bMainSizer->Add( bmiddlerSizer, 0, wxEXPAND|wxTOP, 8 );
203 wxStaticBoxSizer* bMsgSizer;
204 bMsgSizer =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Messages") ), wxVERTICAL );
206 m_messagesBox =
new wxTextCtrl( bMsgSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
212 bMainSizer->Add( bMsgSizer, 1, wxALL|wxEXPAND, 5 );
216 m_buttonReport =
new wxButton(
this, wxID_ANY,
_(
"Generate Report File..."), wxDefaultPosition, wxDefaultSize, 0 );
234 this->SetSizer( bMainSizer );
236 bMainSizer->Fit(
this );
238 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
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...