KiCad PCB EDA Suite
dialog_gendrill_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Oct 26 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
8 #include "dialog_gendrill_base.h"
9 
11 
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 )
13 {
14  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15 
16  wxBoxSizer* bMainSizer;
17  bMainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bupperSizer;
20  bupperSizer = new wxBoxSizer( wxHORIZONTAL );
21 
22  staticTextOutputDir = new wxStaticText( this, wxID_ANY, _("Output folder:"), wxDefaultPosition, wxDefaultSize, 0 );
23  staticTextOutputDir->Wrap( -1 );
24  bupperSizer->Add( staticTextOutputDir, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 10 );
25 
26  m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
27  bupperSizer->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 0 );
28 
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 );
31 
32 
33  bMainSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP, 10 );
34 
35  wxBoxSizer* bmiddlerSizer;
36  bmiddlerSizer = new wxBoxSizer( wxHORIZONTAL );
37 
38  wxBoxSizer* bMiddleSizer;
39  bMiddleSizer = new wxBoxSizer( wxVERTICAL );
40 
41  wxStaticBoxSizer* sbSizer6;
42  sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Drill File Format") ), wxVERTICAL );
43 
44  m_rbExcellon = new wxRadioButton( sbSizer6->GetStaticBox(), wxID_ANY, _("Excellon"), wxDefaultPosition, wxDefaultSize, 0 );
45  sbSizer6->Add( m_rbExcellon, 0, wxBOTTOM|wxRIGHT, 5 );
46 
47  wxBoxSizer* bSizerExcellonOptions;
48  bSizerExcellonOptions = new wxBoxSizer( wxVERTICAL );
49 
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.") );
52 
53  bSizerExcellonOptions->Add( m_Check_Mirror, 0, wxLEFT, 5 );
54 
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.") );
57 
58  bSizerExcellonOptions->Add( m_Check_Minimal, 0, wxRIGHT|wxLEFT, 5 );
59 
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.") );
62 
63  bSizerExcellonOptions->Add( m_Check_Merge_PTH_NPTH, 0, wxLEFT, 5 );
64 
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 );
68  m_radioBoxOvalHoleMode->SetSelection( 0 );
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)") );
70 
71  bSizerExcellonOptions->Add( m_radioBoxOvalHoleMode, 0, wxALL|wxEXPAND, 5 );
72 
73 
74  sbSizer6->Add( bSizerExcellonOptions, 1, wxEXPAND|wxLEFT, 12 );
75 
76  m_rbGerberX2 = new wxRadioButton( sbSizer6->GetStaticBox(), wxID_ANY, _("Gerber X2"), wxDefaultPosition, wxDefaultSize, 0 );
77  sbSizer6->Add( m_rbGerberX2, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
78 
79 
80  bMiddleSizer->Add( sbSizer6, 1, wxEXPAND|wxALL, 5 );
81 
82  wxString m_Choice_Drill_MapChoices[] = { _("HPGL"), _("PostScript"), _("Gerber"), _("DXF"), _("SVG"), _("PDF") };
83  int m_Choice_Drill_MapNChoices = sizeof( m_Choice_Drill_MapChoices ) / sizeof( wxString );
84  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 );
85  m_Choice_Drill_Map->SetSelection( 1 );
86  m_Choice_Drill_Map->SetToolTip( _("Creates a drill map in PS, HPGL or other formats") );
87 
88  bMiddleSizer->Add( m_Choice_Drill_Map, 0, wxALL|wxEXPAND, 5 );
89 
90 
91  bmiddlerSizer->Add( bMiddleSizer, 1, wxEXPAND, 5 );
92 
93  wxBoxSizer* bLeftSizer;
94  bLeftSizer = new wxBoxSizer( wxVERTICAL );
95 
96  wxString m_Choice_Drill_OffsetChoices[] = { _("Absolute"), _("Drill/place file origin") };
97  int m_Choice_Drill_OffsetNChoices = sizeof( m_Choice_Drill_OffsetChoices ) / sizeof( wxString );
98  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 );
99  m_Choice_Drill_Offset->SetSelection( 0 );
100  m_Choice_Drill_Offset->SetToolTip( _("Choose the coordinate origin: absolute or relative to the drill/place file origin") );
101 
102  bLeftSizer->Add( m_Choice_Drill_Offset, 0, wxALL|wxEXPAND, 5 );
103 
104  wxString m_Choice_UnitChoices[] = { _("Millimeters"), _("Inches") };
105  int m_Choice_UnitNChoices = sizeof( m_Choice_UnitChoices ) / sizeof( wxString );
106  m_Choice_Unit = new wxRadioBox( this, wxID_ANY, _("Drill Units"), wxDefaultPosition, wxDefaultSize, m_Choice_UnitNChoices, m_Choice_UnitChoices, 1, wxRA_SPECIFY_COLS );
107  m_Choice_Unit->SetSelection( 0 );
108  bLeftSizer->Add( m_Choice_Unit, 0, wxALL|wxEXPAND, 5 );
109 
110  wxString m_Choice_Zeros_FormatChoices[] = { _("Decimal format (recommended)"), _("Suppress leading zeros"), _("Suppress trailing zeros"), _("Keep zeros") };
111  int m_Choice_Zeros_FormatNChoices = sizeof( m_Choice_Zeros_FormatChoices ) / sizeof( wxString );
112  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 );
113  m_Choice_Zeros_Format->SetSelection( 0 );
114  m_Choice_Zeros_Format->SetToolTip( _("Choose EXCELLON numbers notation") );
115 
116  bLeftSizer->Add( m_Choice_Zeros_Format, 0, wxALL|wxEXPAND, 5 );
117 
118  wxFlexGridSizer* fgSizer1;
119  fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
120  fgSizer1->AddGrowableCol( 1 );
121  fgSizer1->SetFlexibleDirection( wxBOTH );
122  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
123 
124  m_staticTextTitle = new wxStaticText( this, wxID_ANY, _("Precision:"), wxDefaultPosition, wxDefaultSize, 0 );
125  m_staticTextTitle->Wrap( -1 );
126  fgSizer1->Add( m_staticTextTitle, 0, wxALL, 10 );
127 
128  m_staticTextPrecision = new wxStaticText( this, wxID_ANY, _("Precision"), wxDefaultPosition, wxDefaultSize, 0 );
129  m_staticTextPrecision->Wrap( -1 );
130  fgSizer1->Add( m_staticTextPrecision, 0, wxALL, 10 );
131 
132 
133  bLeftSizer->Add( fgSizer1, 0, wxEXPAND, 5 );
134 
135 
136  bmiddlerSizer->Add( bLeftSizer, 1, wxEXPAND, 5 );
137 
138  wxBoxSizer* bRightBoxSizer;
139  bRightBoxSizer = new wxBoxSizer( wxVERTICAL );
140 
141  wxStaticBoxSizer* sbSizerHoles;
142  sbSizerHoles = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Hole Counts") ), wxVERTICAL );
143 
144  wxFlexGridSizer* fgSizer2;
145  fgSizer2 = new wxFlexGridSizer( 0, 2, 0, 0 );
146  fgSizer2->SetFlexibleDirection( wxBOTH );
147  fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
148 
149  staticTextPlatedPads = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Plated pads:"), wxDefaultPosition, wxDefaultSize, 0 );
150  staticTextPlatedPads->Wrap( -1 );
151  fgSizer2->Add( staticTextPlatedPads, 0, wxLEFT|wxRIGHT, 5 );
152 
153  m_PlatedPadsCountInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
154  m_PlatedPadsCountInfoMsg->Wrap( -1 );
155  fgSizer2->Add( m_PlatedPadsCountInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
156 
157  staticTextNonPlatedPads = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Non-plated pads:"), wxDefaultPosition, wxDefaultSize, 0 );
158  staticTextNonPlatedPads->Wrap( -1 );
159  fgSizer2->Add( staticTextNonPlatedPads, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
160 
161  m_NotPlatedPadsCountInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
162  m_NotPlatedPadsCountInfoMsg->Wrap( -1 );
163  fgSizer2->Add( m_NotPlatedPadsCountInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxTOP, 5 );
164 
165  staticTextThroughVias = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Through vias:"), wxDefaultPosition, wxDefaultSize, 0 );
166  staticTextThroughVias->Wrap( -1 );
167  fgSizer2->Add( staticTextThroughVias, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
168 
169  m_ThroughViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
170  m_ThroughViasInfoMsg->Wrap( -1 );
171  fgSizer2->Add( m_ThroughViasInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxTOP, 5 );
172 
173  staticTextMicroVias = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Micro vias:"), wxDefaultPosition, wxDefaultSize, 0 );
174  staticTextMicroVias->Wrap( -1 );
175  fgSizer2->Add( staticTextMicroVias, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
176 
177  m_MicroViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
178  m_MicroViasInfoMsg->Wrap( -1 );
179  fgSizer2->Add( m_MicroViasInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxTOP, 5 );
180 
181  staticTextBuriedVias = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Buried vias:"), wxDefaultPosition, wxDefaultSize, 0 );
182  staticTextBuriedVias->Wrap( -1 );
183  fgSizer2->Add( staticTextBuriedVias, 0, wxALL, 5 );
184 
185  m_BuriedViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
186  m_BuriedViasInfoMsg->Wrap( -1 );
187  fgSizer2->Add( m_BuriedViasInfoMsg, 0, wxALIGN_RIGHT|wxALL, 5 );
188 
189 
190  sbSizerHoles->Add( fgSizer2, 1, wxEXPAND, 5 );
191 
192 
193  bRightBoxSizer->Add( sbSizerHoles, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
194 
195 
196  bmiddlerSizer->Add( bRightBoxSizer, 1, wxEXPAND|wxTOP, 5 );
197 
198 
199  bMainSizer->Add( bmiddlerSizer, 0, wxEXPAND|wxTOP, 2 );
200 
201  wxStaticBoxSizer* bMsgSizer;
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 }
wxStaticText * m_PlatedPadsCountInfoMsg
virtual void OnGenDrillFile(wxCommandEvent &event)
wxRadioBox * m_Choice_Drill_Offset
wxCheckBox * m_Check_Merge_PTH_NPTH
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:82
virtual void onCloseDlg(wxCloseEvent &event)
wxStaticText * m_NotPlatedPadsCountInfoMsg
wxStaticText * staticTextBuriedVias
wxRadioBox * m_radioBoxOvalHoleMode
wxStaticText * m_MicroViasInfoMsg
wxRadioButton * m_rbExcellon
wxStaticText * m_BuriedViasInfoMsg
wxStaticText * m_ThroughViasInfoMsg
wxStaticText * staticTextNonPlatedPads
wxTextCtrl * m_outputDirectoryName
virtual void onQuitDlg(wxCommandEvent &event)
wxRadioBox * m_Choice_Zeros_Format
#define _(s)
virtual void OnOutputDirectoryBrowseClicked(wxCommandEvent &event)
wxStaticText * staticTextThroughVias
wxStaticText * m_staticTextTitle
virtual void OnGenMapFile(wxCommandEvent &event)
wxBitmapButton * m_browseButton
wxStaticText * staticTextPlatedPads
virtual void OnGenReportFile(wxCommandEvent &event)
virtual void OnSelZerosFmtSelected(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer
wxStaticText * staticTextOutputDir
wxStaticText * staticTextMicroVias
wxStaticText * m_staticTextPrecision
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)
wxRadioButton * m_rbGerberX2
virtual void onFileFormatSelection(wxCommandEvent &event)
virtual void OnSelDrillUnitsSelected(wxCommandEvent &event)