KiCad PCB EDA Suite
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
dialog_gendrill_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6-dirty)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
13
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 )
15{
16 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
17
18 bMainSizer = new wxBoxSizer( wxVERTICAL );
19
20 wxBoxSizer* bupperSizer;
21 bupperSizer = new wxBoxSizer( wxHORIZONTAL );
22
23 staticTextOutputDir = new wxStaticText( this, wxID_ANY, _("Output folder:"), wxDefaultPosition, wxDefaultSize, 0 );
24 staticTextOutputDir->Wrap( -1 );
25 bupperSizer->Add( staticTextOutputDir, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 );
26
27 m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
28 bupperSizer->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 0 );
29
30 m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
31 bupperSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL, 5 );
32
33
34 bMainSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
35
36 wxBoxSizer* bmiddlerSizer;
37 bmiddlerSizer = new wxBoxSizer( wxHORIZONTAL );
38
39 wxBoxSizer* bLeftCol;
40 bLeftCol = new wxBoxSizer( wxVERTICAL );
41
42 m_formatLabel = new wxStaticText( this, wxID_ANY, _("Format"), wxDefaultPosition, wxDefaultSize, 0 );
43 m_formatLabel->Wrap( -1 );
44 bLeftCol->Add( m_formatLabel, 0, wxRIGHT|wxLEFT, 13 );
45
46 m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
47 bLeftCol->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
48
49 wxBoxSizer* bSizerMargins;
50 bSizerMargins = new wxBoxSizer( wxVERTICAL );
51
52 m_rbExcellon = new wxRadioButton( this, wxID_ANY, _("Excellon"), wxDefaultPosition, wxDefaultSize, 0 );
53 bSizerMargins->Add( m_rbExcellon, 0, wxALL, 5 );
54
55 wxFlexGridSizer* fgSizerExcellonOptions;
56 fgSizerExcellonOptions = new wxFlexGridSizer( 4, 1, 3, 0 );
57 fgSizerExcellonOptions->SetFlexibleDirection( wxBOTH );
58 fgSizerExcellonOptions->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
59
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.") );
62
63 fgSizerExcellonOptions->Add( m_Check_Mirror, 0, wxLEFT, 5 );
64
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.") );
67
68 fgSizerExcellonOptions->Add( m_Check_Minimal, 0, wxRIGHT|wxLEFT, 5 );
69
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.") );
72
73 fgSizerExcellonOptions->Add( m_Check_Merge_PTH_NPTH, 0, wxLEFT, 5 );
74
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 );
77
78
79 bSizerMargins->Add( fgSizerExcellonOptions, 0, wxEXPAND|wxLEFT, 20 );
80
81
82 bSizerMargins->Add( 0, 3, 1, wxEXPAND, 5 );
83
84 m_rbGerberX2 = new wxRadioButton( this, wxID_ANY, _("Gerber X2"), wxDefaultPosition, wxDefaultSize, 0 );
85 bSizerMargins->Add( m_rbGerberX2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
86
87 wxFlexGridSizer* fgSizerGerberX2Options;
88 fgSizerGerberX2Options = new wxFlexGridSizer( 4, 1, 3, 0 );
89 fgSizerGerberX2Options->SetFlexibleDirection( wxBOTH );
90 fgSizerGerberX2Options->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
91
92 m_generateTentingLayers = new wxCheckBox( this, wxID_ANY, _("Generate tenting layers"), wxDefaultPosition, wxDefaultSize, 0 );
93 m_generateTentingLayers->Enable( false );
94
95 fgSizerGerberX2Options->Add( m_generateTentingLayers, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
96
97
98 bSizerMargins->Add( fgSizerGerberX2Options, 1, wxEXPAND|wxLEFT, 20 );
99
100
101 bSizerMargins->Add( 0, 6, 0, wxEXPAND, 5 );
102
103 wxBoxSizer* bSizer9;
104 bSizer9 = new wxBoxSizer( wxHORIZONTAL );
105
106 m_cbGenerateMap = new wxCheckBox( this, wxID_ANY, _("Generate map:"), wxDefaultPosition, wxDefaultSize, 0 );
107 bSizer9->Add( m_cbGenerateMap, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
108
109 wxString m_choiceDrillMapChoices[] = { _("Postscript"), _("Gerber X2"), _("DXF"), _("SVG"), _("PDF") };
110 int m_choiceDrillMapNChoices = sizeof( m_choiceDrillMapChoices ) / sizeof( wxString );
111 m_choiceDrillMap = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceDrillMapNChoices, m_choiceDrillMapChoices, 0 );
112 m_choiceDrillMap->SetSelection( 0 );
113 bSizer9->Add( m_choiceDrillMap, 1, wxALL, 5 );
114
115
116 bSizerMargins->Add( bSizer9, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
117
118
119 bLeftCol->Add( bSizerMargins, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
120
121
122 bmiddlerSizer->Add( bLeftCol, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
123
124
125 bmiddlerSizer->Add( 15, 0, 0, 0, 5 );
126
127 wxBoxSizer* bRightCol;
128 bRightCol = new wxBoxSizer( wxVERTICAL );
129
130 m_optionsLabel = new wxStaticText( this, wxID_ANY, _("Options"), wxDefaultPosition, wxDefaultSize, 0 );
131 m_optionsLabel->Wrap( -1 );
132 bRightCol->Add( m_optionsLabel, 0, wxRIGHT|wxLEFT, 13 );
133
134 m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
135 bRightCol->Add( m_staticline2, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
136
137 wxFlexGridSizer* fgSizer1;
138 fgSizer1 = new wxFlexGridSizer( 0, 2, 5, 5 );
139 fgSizer1->AddGrowableCol( 1 );
140 fgSizer1->SetFlexibleDirection( wxBOTH );
141 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
142
143 m_originLabel = new wxStaticText( this, wxID_ANY, _("Origin:"), wxDefaultPosition, wxDefaultSize, 0 );
144 m_originLabel->Wrap( -1 );
145 fgSizer1->Add( m_originLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
146
147 wxString m_originChoices[] = { _("Absolute"), _("Drill/place file origin") };
148 int m_originNChoices = sizeof( m_originChoices ) / sizeof( wxString );
149 m_origin = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_originNChoices, m_originChoices, 0 );
150 m_origin->SetSelection( 0 );
151 fgSizer1->Add( m_origin, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
152
153 m_unitsLabel = new wxStaticText( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, 0 );
154 m_unitsLabel->Wrap( -1 );
155 fgSizer1->Add( m_unitsLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
156
157 wxString m_unitsChoices[] = { _("Millimeters"), _("Inches") };
158 int m_unitsNChoices = sizeof( m_unitsChoices ) / sizeof( wxString );
159 m_units = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitsNChoices, m_unitsChoices, 0 );
160 m_units->SetSelection( 0 );
161 fgSizer1->Add( m_units, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
162
163 m_zerosLabel = new wxStaticText( this, wxID_ANY, _("Zeros:"), wxDefaultPosition, wxDefaultSize, 0 );
164 m_zerosLabel->Wrap( -1 );
165 fgSizer1->Add( m_zerosLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
166
167 wxString m_zerosChoices[] = { _("Decimal format (recommended)"), _("Suppress leading zeros"), _("Suppress trailing zeros"), _("Keep zeros") };
168 int m_zerosNChoices = sizeof( m_zerosChoices ) / sizeof( wxString );
169 m_zeros = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_zerosNChoices, m_zerosChoices, 0 );
170 m_zeros->SetSelection( 0 );
171 fgSizer1->Add( m_zeros, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
172
173
174 fgSizer1->Add( 0, 8, 1, wxEXPAND, 5 );
175
176
177 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
178
179 m_precisionLabel = new wxStaticText( this, wxID_ANY, _("Precision:"), wxDefaultPosition, wxDefaultSize, 0 );
180 m_precisionLabel->Wrap( -1 );
181 fgSizer1->Add( m_precisionLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
182
183 m_staticTextPrecision = new wxStaticText( this, wxID_ANY, _("Precision"), wxDefaultPosition, wxDefaultSize, 0 );
184 m_staticTextPrecision->Wrap( -1 );
185 fgSizer1->Add( m_staticTextPrecision, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
186
187
188 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
189
190
191 bRightCol->Add( fgSizer1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
192
193
194 bmiddlerSizer->Add( bRightCol, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
195
196
197 bMainSizer->Add( bmiddlerSizer, 0, wxEXPAND|wxTOP, 8 );
198
199 bMsgSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages") ), wxVERTICAL );
200
201 m_messagesBox = new wxTextCtrl( bMsgSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
202 m_messagesBox->SetMinSize( wxSize( -1,90 ) );
203
204 bMsgSizer->Add( m_messagesBox, 1, wxEXPAND, 5 );
205
206
207 bMainSizer->Add( bMsgSizer, 1, wxALL|wxEXPAND, 10 );
208
209 m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
210
211 m_buttonReport = new wxButton( this, wxID_ANY, _("Generate Report File..."), wxDefaultPosition, wxDefaultSize, 0 );
212 m_buttonsSizer->Add( m_buttonReport, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
213
214 m_sdbSizer = new wxStdDialogButtonSizer();
215 m_sdbSizerOK = new wxButton( this, wxID_OK );
216 m_sdbSizer->AddButton( m_sdbSizerOK );
217 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
218 m_sdbSizer->AddButton( m_sdbSizerCancel );
219 m_sdbSizer->Realize();
220
221 m_buttonsSizer->Add( m_sdbSizer, 1, wxEXPAND, 5 );
222
223
224 bMainSizer->Add( m_buttonsSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
225
226
227 this->SetSizer( bMainSizer );
228 this->Layout();
229 bMainSizer->Fit( this );
230
231 this->Centre( wxBOTH );
232
233 // Connect Events
234 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GENDRILL_BASE::onCloseDlg ) );
235 m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onOutputDirectoryBrowseClicked ), NULL, this );
236 m_rbExcellon->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
237 m_rbGerberX2->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
238 m_units->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onSelDrillUnitsSelected ), NULL, this );
239 m_zeros->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onSelZerosFmtSelected ), NULL, this );
240 m_buttonReport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onGenReportFile ), NULL, this );
241}
242
244{
245 // Disconnect Events
246 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GENDRILL_BASE::onCloseDlg ) );
247 m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onOutputDirectoryBrowseClicked ), NULL, this );
248 m_rbExcellon->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
249 m_rbGerberX2->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
250 m_units->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onSelDrillUnitsSelected ), NULL, this );
251 m_zeros->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onSelZerosFmtSelected ), NULL, this );
252 m_buttonReport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onGenReportFile ), NULL, this );
253
254}
wxRadioButton * m_rbExcellon
virtual void onSelDrillUnitsSelected(wxCommandEvent &event)
wxStaticText * m_staticTextPrecision
STD_BITMAP_BUTTON * m_browseButton
wxStdDialogButtonSizer * m_sdbSizer
wxStaticBoxSizer * bMsgSizer
wxStaticLine * m_staticline2
wxStaticText * m_formatLabel
wxStaticText * m_optionsLabel
wxStaticText * m_originLabel
wxRadioButton * m_rbGerberX2
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
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_generateTentingLayers
virtual void onOutputDirectoryBrowseClicked(wxCommandEvent &event)
wxStaticText * m_precisionLabel
virtual void onCloseDlg(wxCloseEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:52
A bitmap button widget that behaves like a standard dialog button except with an icon.
#define _(s)