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 );
55 wxFlexGridSizer* fgSizerExcellonOptions;
56 fgSizerExcellonOptions =
new wxFlexGridSizer( 4, 1, 3, 0 );
57 fgSizerExcellonOptions->SetFlexibleDirection( wxBOTH );
58 fgSizerExcellonOptions->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
60 m_Check_Mirror =
new wxCheckBox(
this, wxID_ANY,
_(
"Mirror Y axis"), wxDefaultPosition, wxDefaultSize, 0 );
61 m_Check_Mirror->SetToolTip(
_(
"Not recommended.\nUsed mostly by users who make the boards themselves.") );
65 m_Check_Minimal =
new wxCheckBox(
this, wxID_ANY,
_(
"Minimal header"), wxDefaultPosition, wxDefaultSize, 0 );
66 m_Check_Minimal->SetToolTip(
_(
"Not recommended.\nOnly use it for board houses which do not accept fully featured headers.") );
70 m_Check_Merge_PTH_NPTH =
new wxCheckBox(
this, wxID_ANY,
_(
"PTH and NPTH in single file"), wxDefaultPosition, wxDefaultSize, 0 );
71 m_Check_Merge_PTH_NPTH->SetToolTip(
_(
"Not recommended.\nOnly use for board houses which ask for merged PTH and NPTH into a single file.") );
75 m_altDrillMode =
new wxCheckBox(
this, wxID_ANY,
_(
"Use alternate drill mode for oval holes"), wxDefaultPosition, wxDefaultSize, 0 );
76 fgSizerExcellonOptions->Add(
m_altDrillMode, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
79 bSizerMargins->Add( fgSizerExcellonOptions, 0, wxEXPAND|wxLEFT, 20 );
82 bSizerMargins->Add( 0, 3, 1, wxEXPAND, 5 );
84 m_rbGerberX2 =
new wxRadioButton(
this, wxID_ANY,
_(
"Gerber X2"), wxDefaultPosition, wxDefaultSize, 0 );
85 bSizerMargins->Add(
m_rbGerberX2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
88 bSizerMargins->Add( 0, 6, 0, wxEXPAND, 5 );
91 bSizer9 =
new wxBoxSizer( wxHORIZONTAL );
93 m_cbGenerateMap =
new wxCheckBox(
this, wxID_ANY,
_(
"Generate map:"), wxDefaultPosition, wxDefaultSize, 0 );
94 bSizer9->Add(
m_cbGenerateMap, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
96 wxString m_choiceDrillMapChoices[] = {
_(
"Postscript"),
_(
"Gerber X2"),
_(
"DXF"),
_(
"SVG"),
_(
"PDF") };
97 int m_choiceDrillMapNChoices =
sizeof( m_choiceDrillMapChoices ) /
sizeof( wxString );
98 m_choiceDrillMap =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceDrillMapNChoices, m_choiceDrillMapChoices, 0 );
103 bSizerMargins->Add( bSizer9, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
106 bLeftCol->Add( bSizerMargins, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
109 bmiddlerSizer->Add( bLeftCol, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
112 bmiddlerSizer->Add( 15, 0, 0, 0, 5 );
114 wxBoxSizer* bRightCol;
115 bRightCol =
new wxBoxSizer( wxVERTICAL );
117 m_optionsLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Options"), wxDefaultPosition, wxDefaultSize, 0 );
121 m_staticline2 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
122 bRightCol->Add(
m_staticline2, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
124 wxFlexGridSizer* fgSizer1;
125 fgSizer1 =
new wxFlexGridSizer( 0, 2, 5, 5 );
126 fgSizer1->AddGrowableCol( 1 );
127 fgSizer1->SetFlexibleDirection( wxBOTH );
128 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
130 m_originLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Origin:"), wxDefaultPosition, wxDefaultSize, 0 );
132 fgSizer1->Add(
m_originLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
134 wxString m_originChoices[] = {
_(
"Absolute"),
_(
"Drill/place file origin") };
135 int m_originNChoices =
sizeof( m_originChoices ) /
sizeof( wxString );
136 m_origin =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_originNChoices, m_originChoices, 0 );
138 fgSizer1->Add(
m_origin, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
140 m_unitsLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Units:"), wxDefaultPosition, wxDefaultSize, 0 );
142 fgSizer1->Add(
m_unitsLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
144 wxString m_unitsChoices[] = {
_(
"Millimeters"),
_(
"Inches") };
145 int m_unitsNChoices =
sizeof( m_unitsChoices ) /
sizeof( wxString );
146 m_units =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitsNChoices, m_unitsChoices, 0 );
148 fgSizer1->Add(
m_units, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
150 m_zerosLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Zeros:"), wxDefaultPosition, wxDefaultSize, 0 );
152 fgSizer1->Add(
m_zerosLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
154 wxString m_zerosChoices[] = {
_(
"Decimal format (recommended)"),
_(
"Suppress leading zeros"),
_(
"Suppress trailing zeros"),
_(
"Keep zeros") };
155 int m_zerosNChoices =
sizeof( m_zerosChoices ) /
sizeof( wxString );
156 m_zeros =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_zerosNChoices, m_zerosChoices, 0 );
158 fgSizer1->Add(
m_zeros, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
161 fgSizer1->Add( 0, 8, 1, wxEXPAND, 5 );
164 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
166 m_precisionLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Precision:"), wxDefaultPosition, wxDefaultSize, 0 );
170 m_staticTextPrecision =
new wxStaticText(
this, wxID_ANY,
_(
"Precision"), wxDefaultPosition, wxDefaultSize, 0 );
175 bRightCol->Add( fgSizer1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
178 bmiddlerSizer->Add( bRightCol, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
181 bMainSizer->Add( bmiddlerSizer, 0, wxEXPAND|wxTOP, 8 );
183 bMsgSizer =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Messages") ), wxVERTICAL );
185 m_messagesBox =
new wxTextCtrl(
bMsgSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
195 m_buttonReport =
new wxButton(
this, wxID_ANY,
_(
"Generate Report File..."), wxDefaultPosition, wxDefaultSize, 0 );
215 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
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...