KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_gendrill_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
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, 7 );
32
33
34 bMainSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
35
36 wxBoxSizer* bmiddlerSizer;
37 bmiddlerSizer = new wxBoxSizer( wxHORIZONTAL );
38
39 wxBoxSizer* bMiddleSizer;
40 bMiddleSizer = new wxBoxSizer( wxVERTICAL );
41
42 wxStaticBoxSizer* sbSizer6;
43 sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Drill File Format") ), wxVERTICAL );
44
45 m_rbExcellon = new wxRadioButton( sbSizer6->GetStaticBox(), wxID_ANY, _("Excellon"), wxDefaultPosition, wxDefaultSize, 0 );
46 sbSizer6->Add( m_rbExcellon, 0, wxBOTTOM|wxRIGHT, 5 );
47
48 wxBoxSizer* bSizerExcellonOptions;
49 bSizerExcellonOptions = new wxBoxSizer( wxVERTICAL );
50
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.") );
53
54 bSizerExcellonOptions->Add( m_Check_Mirror, 0, wxLEFT, 5 );
55
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.") );
58
59 bSizerExcellonOptions->Add( m_Check_Minimal, 0, wxRIGHT|wxLEFT, 5 );
60
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.") );
63
64 bSizerExcellonOptions->Add( m_Check_Merge_PTH_NPTH, 0, wxLEFT, 5 );
65
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 );
69 m_radioBoxOvalHoleMode->SetSelection( 0 );
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)") );
71
72 bSizerExcellonOptions->Add( m_radioBoxOvalHoleMode, 0, wxALL|wxEXPAND, 5 );
73
74
75 sbSizer6->Add( bSizerExcellonOptions, 1, wxEXPAND|wxLEFT, 12 );
76
77 m_rbGerberX2 = new wxRadioButton( sbSizer6->GetStaticBox(), wxID_ANY, _("Gerber X2"), wxDefaultPosition, wxDefaultSize, 0 );
78 sbSizer6->Add( m_rbGerberX2, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
79
80
81 bMiddleSizer->Add( sbSizer6, 1, wxEXPAND|wxALL, 5 );
82
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 );
86 m_Choice_Drill_Map->SetSelection( 4 );
87 m_Choice_Drill_Map->SetToolTip( _("Creates a drill map in PDF or other formats") );
88
89 bMiddleSizer->Add( m_Choice_Drill_Map, 0, wxALL|wxEXPAND, 5 );
90
91
92 bmiddlerSizer->Add( bMiddleSizer, 1, wxEXPAND, 5 );
93
94 wxBoxSizer* bLeftSizer;
95 bLeftSizer = new wxBoxSizer( wxVERTICAL );
96
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 );
100 m_Choice_Drill_Offset->SetSelection( 0 );
101 m_Choice_Drill_Offset->SetToolTip( _("Choose the coordinate origin: absolute or relative to the drill/place file origin") );
102
103 bLeftSizer->Add( m_Choice_Drill_Offset, 0, wxALL|wxEXPAND, 5 );
104
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 );
108 m_Choice_Unit->SetSelection( 0 );
109 bLeftSizer->Add( m_Choice_Unit, 0, wxALL|wxEXPAND, 5 );
110
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 );
114 m_Choice_Zeros_Format->SetSelection( 0 );
115 m_Choice_Zeros_Format->SetToolTip( _("Choose EXCELLON numbers notation") );
116
117 bLeftSizer->Add( m_Choice_Zeros_Format, 0, wxALL|wxEXPAND, 5 );
118
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 );
124
125 m_staticTextTitle = new wxStaticText( this, wxID_ANY, _("Precision:"), wxDefaultPosition, wxDefaultSize, 0 );
126 m_staticTextTitle->Wrap( -1 );
127 fgSizer1->Add( m_staticTextTitle, 0, wxALL, 10 );
128
129 m_staticTextPrecision = new wxStaticText( this, wxID_ANY, _("Precision"), wxDefaultPosition, wxDefaultSize, 0 );
130 m_staticTextPrecision->Wrap( -1 );
131 fgSizer1->Add( m_staticTextPrecision, 0, wxALL, 10 );
132
133
134 bLeftSizer->Add( fgSizer1, 0, wxEXPAND, 5 );
135
136
137 bmiddlerSizer->Add( bLeftSizer, 0, wxEXPAND, 5 );
138
139 wxBoxSizer* bRightBoxSizer;
140 bRightBoxSizer = new wxBoxSizer( wxVERTICAL );
141
142 wxStaticBoxSizer* sbSizerHoles;
143 sbSizerHoles = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Hole Counts") ), wxVERTICAL );
144
145 wxFlexGridSizer* fgSizer2;
146 fgSizer2 = new wxFlexGridSizer( 0, 2, 0, 0 );
147 fgSizer2->SetFlexibleDirection( wxBOTH );
148 fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
149
150 staticTextPlatedPads = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Plated pads:"), wxDefaultPosition, wxDefaultSize, 0 );
151 staticTextPlatedPads->Wrap( -1 );
152 fgSizer2->Add( staticTextPlatedPads, 0, wxLEFT|wxRIGHT, 5 );
153
154 m_PlatedPadsCountInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
155 m_PlatedPadsCountInfoMsg->Wrap( -1 );
156 fgSizer2->Add( m_PlatedPadsCountInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
157
158 staticTextNonPlatedPads = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Non-plated pads:"), wxDefaultPosition, wxDefaultSize, 0 );
159 staticTextNonPlatedPads->Wrap( -1 );
160 fgSizer2->Add( staticTextNonPlatedPads, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
161
162 m_NotPlatedPadsCountInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
163 m_NotPlatedPadsCountInfoMsg->Wrap( -1 );
164 fgSizer2->Add( m_NotPlatedPadsCountInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxTOP, 5 );
165
166 staticTextThroughVias = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Through vias:"), wxDefaultPosition, wxDefaultSize, 0 );
167 staticTextThroughVias->Wrap( -1 );
168 fgSizer2->Add( staticTextThroughVias, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_BOTTOM, 4 );
169
170 m_ThroughViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
171 m_ThroughViasInfoMsg->Wrap( -1 );
172 fgSizer2->Add( m_ThroughViasInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxTOP, 5 );
173
174 staticTextMicroVias = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Micro vias:"), wxDefaultPosition, wxDefaultSize, 0 );
175 staticTextMicroVias->Wrap( -1 );
176 fgSizer2->Add( staticTextMicroVias, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
177
178 m_MicroViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
179 m_MicroViasInfoMsg->Wrap( -1 );
180 fgSizer2->Add( m_MicroViasInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxTOP, 5 );
181
182 staticTextBuriedVias = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Buried vias:"), wxDefaultPosition, wxDefaultSize, 0 );
183 staticTextBuriedVias->Wrap( -1 );
184 fgSizer2->Add( staticTextBuriedVias, 0, wxALL, 5 );
185
186 m_BuriedViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
187 m_BuriedViasInfoMsg->Wrap( -1 );
188 fgSizer2->Add( m_BuriedViasInfoMsg, 0, wxALIGN_RIGHT|wxALL, 5 );
189
190
191 sbSizerHoles->Add( fgSizer2, 1, wxEXPAND, 5 );
192
193
194 bRightBoxSizer->Add( sbSizerHoles, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
195
196
197 bmiddlerSizer->Add( bRightBoxSizer, 0, wxEXPAND|wxTOP, 5 );
198
199
200 bMainSizer->Add( bmiddlerSizer, 0, wxEXPAND|wxTOP, 8 );
201
202 bMsgSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages") ), wxVERTICAL );
203
204 m_messagesBox = new wxTextCtrl( bMsgSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
205 m_messagesBox->SetMinSize( wxSize( -1,90 ) );
206
207 bMsgSizer->Add( m_messagesBox, 1, wxALL|wxEXPAND, 5 );
208
209
210 bMainSizer->Add( bMsgSizer, 1, wxALL|wxEXPAND, 5 );
211
212 m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
213
214 m_buttonReport = new wxButton( this, wxID_ANY, _("Generate Report File..."), wxDefaultPosition, wxDefaultSize, 0 );
215 m_buttonsSizer->Add( m_buttonReport, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
216
217 m_sdbSizer = new wxStdDialogButtonSizer();
218 m_sdbSizerOK = new wxButton( this, wxID_OK );
219 m_sdbSizer->AddButton( m_sdbSizerOK );
220 m_sdbSizerApply = new wxButton( this, wxID_APPLY );
221 m_sdbSizer->AddButton( m_sdbSizerApply );
222 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
223 m_sdbSizer->AddButton( m_sdbSizerCancel );
224 m_sdbSizer->Realize();
225
226 m_buttonsSizer->Add( m_sdbSizer, 1, wxEXPAND, 5 );
227
228
229 bMainSizer->Add( m_buttonsSizer, 0, wxALL|wxEXPAND, 5 );
230
231
232 this->SetSizer( bMainSizer );
233 this->Layout();
234 bMainSizer->Fit( this );
235
236 this->Centre( wxBOTH );
237
238 // Connect Events
239 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GENDRILL_BASE::onCloseDlg ) );
240 m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
241 m_rbExcellon->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
242 m_rbGerberX2->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
243 m_Choice_Unit->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelDrillUnitsSelected ), NULL, this );
244 m_Choice_Zeros_Format->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelZerosFmtSelected ), NULL, this );
245 m_buttonReport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenReportFile ), NULL, this );
246 m_sdbSizerApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenMapFile ), NULL, this );
247 m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onQuitDlg ), NULL, this );
248 m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenDrillFile ), NULL, this );
249}
250
252{
253 // Disconnect Events
254 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GENDRILL_BASE::onCloseDlg ) );
255 m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
256 m_rbExcellon->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
257 m_rbGerberX2->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
258 m_Choice_Unit->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelDrillUnitsSelected ), NULL, this );
259 m_Choice_Zeros_Format->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelZerosFmtSelected ), NULL, this );
260 m_buttonReport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenReportFile ), NULL, this );
261 m_sdbSizerApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenMapFile ), NULL, this );
262 m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onQuitDlg ), NULL, this );
263 m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenDrillFile ), NULL, this );
264
265}
wxRadioButton * m_rbExcellon
wxStaticText * staticTextPlatedPads
wxStaticText * staticTextNonPlatedPads
wxRadioBox * m_Choice_Drill_Offset
virtual void OnSelZerosFmtSelected(wxCommandEvent &event)
wxStaticText * m_staticTextPrecision
virtual void OnGenDrillFile(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_browseButton
wxStdDialogButtonSizer * m_sdbSizer
wxStaticBoxSizer * bMsgSizer
wxStaticText * m_MicroViasInfoMsg
virtual void onQuitDlg(wxCommandEvent &event)
virtual void OnGenReportFile(wxCommandEvent &event)
wxRadioButton * m_rbGerberX2
wxStaticText * m_staticTextTitle
wxStaticText * m_PlatedPadsCountInfoMsg
virtual void OnOutputDirectoryBrowseClicked(wxCommandEvent &event)
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_ThroughViasInfoMsg
wxStaticText * staticTextMicroVias
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
virtual void onCloseDlg(wxCloseEvent &event)
virtual void OnGenMapFile(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
A bitmap button widget that behaves like a standard dialog button except with an icon.
#define _(s)