12 DIALOG_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 )
14 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
16 wxBoxSizer* bMainSizer;
17 bMainSizer =
new wxBoxSizer( wxVERTICAL );
19 wxBoxSizer* bupperSizer;
20 bupperSizer =
new wxBoxSizer( wxHORIZONTAL );
22 staticTextOutputDir =
new wxStaticText(
this, wxID_ANY,
_(
"Output folder:"), wxDefaultPosition, wxDefaultSize, 0 );
26 m_outputDirectoryName =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
29 m_browseButton =
new wxBitmapButton(
this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
30 bupperSizer->Add(
m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 7 );
33 bMainSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP, 10 );
35 wxBoxSizer* bmiddlerSizer;
36 bmiddlerSizer =
new wxBoxSizer( wxHORIZONTAL );
38 wxBoxSizer* bMiddleSizer;
39 bMiddleSizer =
new wxBoxSizer( wxVERTICAL );
41 wxStaticBoxSizer* sbSizer6;
42 sbSizer6 =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Drill File Format") ), wxVERTICAL );
44 m_rbExcellon =
new wxRadioButton( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"Excellon"), wxDefaultPosition, wxDefaultSize, 0 );
47 wxBoxSizer* bSizerExcellonOptions;
48 bSizerExcellonOptions =
new wxBoxSizer( wxVERTICAL );
50 m_Check_Mirror =
new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"Mirror Y axis"), wxDefaultPosition, wxDefaultSize, 0 );
51 m_Check_Mirror->SetToolTip(
_(
"Not recommended.\nUsed mostly by users who make the boards themselves.") );
55 m_Check_Minimal =
new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"Minimal header"), wxDefaultPosition, wxDefaultSize, 0 );
56 m_Check_Minimal->SetToolTip(
_(
"Not recommended.\nOnly use it for board houses which do not accept fully featured headers.") );
60 m_Check_Merge_PTH_NPTH =
new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"PTH and NPTH in single file"), wxDefaultPosition, wxDefaultSize, 0 );
61 m_Check_Merge_PTH_NPTH->SetToolTip(
_(
"Not recommended.\nOnly use for board houses which ask for merged PTH and NPTH into a single file.") );
65 wxString m_radioBoxOvalHoleModeChoices[] = {
_(
"Use route command (recommended)"),
_(
"Use alternate drill mode") };
66 int m_radioBoxOvalHoleModeNChoices =
sizeof( m_radioBoxOvalHoleModeChoices ) /
sizeof( wxString );
67 m_radioBoxOvalHoleMode =
new wxRadioBox( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"Oval Holes Drill Mode"), wxDefaultPosition, wxDefaultSize, m_radioBoxOvalHoleModeNChoices, m_radioBoxOvalHoleModeChoices, 1, wxRA_SPECIFY_COLS );
69 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)") );
74 sbSizer6->Add( bSizerExcellonOptions, 1, wxEXPAND|wxLEFT, 12 );
76 m_rbGerberX2 =
new wxRadioButton( sbSizer6->GetStaticBox(), wxID_ANY,
_(
"Gerber X2"), wxDefaultPosition, wxDefaultSize, 0 );
77 sbSizer6->Add(
m_rbGerberX2, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
80 bMiddleSizer->Add( sbSizer6, 1, wxEXPAND|wxALL, 5 );
82 m_staticTextInfo1 =
new wxStaticText(
this, wxID_ANY,
_(
"Note:"), wxDefaultPosition, wxDefaultSize, 0 );
86 m_staticTextInfo =
new wxStaticText(
this, wxID_ANY,
_(
"A drill map is a doc. file, not a fab. file"), wxDefaultPosition, wxDefaultSize, 0 );
90 wxString m_Choice_Drill_MapChoices[] = {
_(
"PostScript"),
_(
"Gerber X2"),
_(
"DXF"),
_(
"SVG"),
_(
"PDF") };
91 int m_Choice_Drill_MapNChoices =
sizeof( m_Choice_Drill_MapChoices ) /
sizeof( wxString );
92 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 );
99 bmiddlerSizer->Add( bMiddleSizer, 1, wxEXPAND, 5 );
101 wxBoxSizer* bLeftSizer;
102 bLeftSizer =
new wxBoxSizer( wxVERTICAL );
104 wxString m_Choice_Drill_OffsetChoices[] = {
_(
"Absolute"),
_(
"Drill/place file origin") };
105 int m_Choice_Drill_OffsetNChoices =
sizeof( m_Choice_Drill_OffsetChoices ) /
sizeof( wxString );
106 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 );
108 m_Choice_Drill_Offset->SetToolTip(
_(
"Choose the coordinate origin: absolute or relative to the drill/place file origin") );
112 wxString m_Choice_UnitChoices[] = {
_(
"Millimeters"),
_(
"Inches") };
113 int m_Choice_UnitNChoices =
sizeof( m_Choice_UnitChoices ) /
sizeof( wxString );
114 m_Choice_Unit =
new wxRadioBox(
this, wxID_ANY,
_(
"Drill Units"), wxDefaultPosition, wxDefaultSize, m_Choice_UnitNChoices, m_Choice_UnitChoices, 1, wxRA_SPECIFY_COLS );
118 wxString m_Choice_Zeros_FormatChoices[] = {
_(
"Decimal format (recommended)"),
_(
"Suppress leading zeros"),
_(
"Suppress trailing zeros"),
_(
"Keep zeros") };
119 int m_Choice_Zeros_FormatNChoices =
sizeof( m_Choice_Zeros_FormatChoices ) /
sizeof( wxString );
120 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 );
126 wxFlexGridSizer* fgSizer1;
127 fgSizer1 =
new wxFlexGridSizer( 0, 2, 0, 0 );
128 fgSizer1->AddGrowableCol( 1 );
129 fgSizer1->SetFlexibleDirection( wxBOTH );
130 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
132 m_staticTextTitle =
new wxStaticText(
this, wxID_ANY,
_(
"Precision:"), wxDefaultPosition, wxDefaultSize, 0 );
136 m_staticTextPrecision =
new wxStaticText(
this, wxID_ANY,
_(
"Precision"), wxDefaultPosition, wxDefaultSize, 0 );
141 bLeftSizer->Add( fgSizer1, 0, wxEXPAND, 5 );
144 bmiddlerSizer->Add( bLeftSizer, 0, wxEXPAND, 5 );
146 wxBoxSizer* bRightBoxSizer;
147 bRightBoxSizer =
new wxBoxSizer( wxVERTICAL );
149 wxStaticBoxSizer* sbSizerHoles;
150 sbSizerHoles =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Hole Counts") ), wxVERTICAL );
152 wxFlexGridSizer* fgSizer2;
153 fgSizer2 =
new wxFlexGridSizer( 0, 2, 0, 0 );
154 fgSizer2->SetFlexibleDirection( wxBOTH );
155 fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
157 staticTextPlatedPads =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"Plated pads:"), wxDefaultPosition, wxDefaultSize, 0 );
161 m_PlatedPadsCountInfoMsg =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
165 staticTextNonPlatedPads =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"Non-plated pads:"), wxDefaultPosition, wxDefaultSize, 0 );
173 staticTextThroughVias =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"Through vias:"), wxDefaultPosition, wxDefaultSize, 0 );
177 m_ThroughViasInfoMsg =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
181 staticTextMicroVias =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"Micro vias:"), wxDefaultPosition, wxDefaultSize, 0 );
185 m_MicroViasInfoMsg =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
189 staticTextBuriedVias =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"Buried vias:"), wxDefaultPosition, wxDefaultSize, 0 );
193 m_BuriedViasInfoMsg =
new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY,
_(
"0"), wxDefaultPosition, wxDefaultSize, 0 );
198 sbSizerHoles->Add( fgSizer2, 1, wxEXPAND, 5 );
201 bRightBoxSizer->Add( sbSizerHoles, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
204 bmiddlerSizer->Add( bRightBoxSizer, 0, wxEXPAND|wxTOP, 5 );
207 bMainSizer->Add( bmiddlerSizer, 0, wxEXPAND|wxTOP, 2 );
209 wxStaticBoxSizer* bMsgSizer;
210 bMsgSizer =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Messages") ), wxVERTICAL );
212 m_messagesBox =
new wxTextCtrl( bMsgSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
218 bMainSizer->Add( bMsgSizer, 1, wxALL|wxEXPAND, 5 );
222 m_buttonReport =
new wxButton(
this, wxID_ANY,
_(
"Generate Report File..."), wxDefaultPosition, wxDefaultSize, 0 );
240 this->SetSizer( bMainSizer );
243 this->Centre( wxBOTH );
wxRadioBox * m_Choice_Drill_Map
wxStaticText * m_PlatedPadsCountInfoMsg
virtual void OnGenDrillFile(wxCommandEvent &event)
wxRadioBox * m_Choice_Drill_Offset
DIALOG_GENDRILL_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Generate Drill Files"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(643, 558), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxCheckBox * m_Check_Merge_PTH_NPTH
wxCheckBox * m_Check_Mirror
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
virtual void onCloseDlg(wxCloseEvent &event)
wxStaticText * m_NotPlatedPadsCountInfoMsg
wxStaticText * staticTextBuriedVias
wxRadioBox * m_Choice_Unit
wxRadioBox * m_radioBoxOvalHoleMode
wxStaticText * m_MicroViasInfoMsg
wxRadioButton * m_rbExcellon
wxStaticText * m_BuriedViasInfoMsg
wxStaticText * m_ThroughViasInfoMsg
wxStaticText * staticTextNonPlatedPads
wxTextCtrl * m_outputDirectoryName
wxTextCtrl * m_messagesBox
virtual void onQuitDlg(wxCommandEvent &event)
wxRadioBox * m_Choice_Zeros_Format
virtual void OnOutputDirectoryBrowseClicked(wxCommandEvent &event)
wxStaticText * staticTextThroughVias
wxStaticText * m_staticTextTitle
virtual void OnGenMapFile(wxCommandEvent &event)
wxBitmapButton * m_browseButton
wxStaticText * staticTextPlatedPads
wxCheckBox * m_Check_Minimal
wxButton * m_sdbSizerCancel
wxBoxSizer * m_buttonsSizer
wxButton * m_buttonReport
wxStaticText * m_staticTextInfo1
wxButton * m_sdbSizerApply
virtual void OnGenReportFile(wxCommandEvent &event)
virtual void OnSelZerosFmtSelected(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer
wxStaticText * staticTextOutputDir
wxStaticText * staticTextMicroVias
wxStaticText * m_staticTextPrecision
wxRadioButton * m_rbGerberX2
virtual void onFileFormatSelection(wxCommandEvent &event)
virtual void OnSelDrillUnitsSelected(wxCommandEvent &event)
wxStaticText * m_staticTextInfo