KiCad PCB EDA Suite
dialog_gendrill_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 30 2017)
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  m_outputDirectoryName->SetMinSize( wxSize( -1,22 ) );
28 
29  bupperSizer->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxTOP, 0 );
30 
31  m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW );
32  m_browseButton->SetMinSize( wxSize( 30,28 ) );
33 
34  bupperSizer->Add( m_browseButton, 0, wxRIGHT, 7 );
35 
36 
37  bMainSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP, 10 );
38 
39  wxBoxSizer* bmiddlerSizer;
40  bmiddlerSizer = new wxBoxSizer( wxHORIZONTAL );
41 
42  wxBoxSizer* bMiddleSizer;
43  bMiddleSizer = new wxBoxSizer( wxVERTICAL );
44 
45  wxStaticBoxSizer* sbSizer6;
46  sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Drill File Format") ), wxVERTICAL );
47 
48  m_rbExcellon = new wxRadioButton( sbSizer6->GetStaticBox(), wxID_ANY, _("Excellon"), wxDefaultPosition, wxDefaultSize, 0 );
49  sbSizer6->Add( m_rbExcellon, 0, wxBOTTOM|wxRIGHT, 5 );
50 
51  wxBoxSizer* bSizerExcellonOptions;
52  bSizerExcellonOptions = new wxBoxSizer( wxVERTICAL );
53 
54  m_Check_Mirror = new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY, _("Mirror Y axis"), wxDefaultPosition, wxDefaultSize, 0 );
55  m_Check_Mirror->SetToolTip( _("Not recommended.\nUsed mostly by users who make the boards themselves.") );
56 
57  bSizerExcellonOptions->Add( m_Check_Mirror, 0, wxLEFT, 5 );
58 
59  m_Check_Minimal = new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY, _("Minimal header"), wxDefaultPosition, wxDefaultSize, 0 );
60  m_Check_Minimal->SetToolTip( _("Not recommended.\nOnly use it for board houses which do not accept fully featured headers.") );
61 
62  bSizerExcellonOptions->Add( m_Check_Minimal, 0, wxRIGHT|wxLEFT, 5 );
63 
64  m_Check_Merge_PTH_NPTH = new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY, _("PTH and NPTH in single file"), wxDefaultPosition, wxDefaultSize, 0 );
65  m_Check_Merge_PTH_NPTH->SetToolTip( _("Not recommended.\nOnly use for board houses which ask for merged PTH and NPTH into a single file.") );
66 
67  bSizerExcellonOptions->Add( m_Check_Merge_PTH_NPTH, 0, wxBOTTOM|wxLEFT, 5 );
68 
69 
70  sbSizer6->Add( bSizerExcellonOptions, 1, wxEXPAND|wxLEFT, 12 );
71 
72  m_rbGerberX2 = new wxRadioButton( sbSizer6->GetStaticBox(), wxID_ANY, _("Gerber X2 (experimental)"), wxDefaultPosition, wxDefaultSize, 0 );
73  sbSizer6->Add( m_rbGerberX2, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
74 
75 
76  bMiddleSizer->Add( sbSizer6, 1, wxEXPAND|wxALL, 5 );
77 
78  wxString m_Choice_Drill_MapChoices[] = { _("HPGL"), _("PostScript"), _("Gerber"), _("DXF"), _("SVG"), _("PDF") };
79  int m_Choice_Drill_MapNChoices = sizeof( m_Choice_Drill_MapChoices ) / sizeof( wxString );
80  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 );
81  m_Choice_Drill_Map->SetSelection( 1 );
82  m_Choice_Drill_Map->SetToolTip( _("Creates a drill map in PS, HPGL or other formats") );
83 
84  bMiddleSizer->Add( m_Choice_Drill_Map, 0, wxALL|wxEXPAND, 5 );
85 
86 
87  bmiddlerSizer->Add( bMiddleSizer, 1, wxEXPAND, 5 );
88 
89  wxBoxSizer* bLeftSizer;
90  bLeftSizer = new wxBoxSizer( wxVERTICAL );
91 
92  wxString m_Choice_Drill_OffsetChoices[] = { _("Absolute"), _("Auxiliary axis") };
93  int m_Choice_Drill_OffsetNChoices = sizeof( m_Choice_Drill_OffsetChoices ) / sizeof( wxString );
94  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 );
95  m_Choice_Drill_Offset->SetSelection( 0 );
96  m_Choice_Drill_Offset->SetToolTip( _("Choose the coordinate origin: absolute or relative to the auxiliray axis") );
97 
98  bLeftSizer->Add( m_Choice_Drill_Offset, 0, wxALL|wxEXPAND, 5 );
99 
100  wxString m_Choice_UnitChoices[] = { _("Millimeters"), _("Inches") };
101  int m_Choice_UnitNChoices = sizeof( m_Choice_UnitChoices ) / sizeof( wxString );
102  m_Choice_Unit = new wxRadioBox( this, wxID_ANY, _("Drill Units"), wxDefaultPosition, wxDefaultSize, m_Choice_UnitNChoices, m_Choice_UnitChoices, 1, wxRA_SPECIFY_COLS );
103  m_Choice_Unit->SetSelection( 1 );
104  bLeftSizer->Add( m_Choice_Unit, 0, wxALL|wxEXPAND, 5 );
105 
106  wxString m_Choice_Zeros_FormatChoices[] = { _("Decimal format"), _("Suppress leading zeros"), _("Suppress trailing zeros"), _("Keep zeros") };
107  int m_Choice_Zeros_FormatNChoices = sizeof( m_Choice_Zeros_FormatChoices ) / sizeof( wxString );
108  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 );
109  m_Choice_Zeros_Format->SetSelection( 0 );
110  m_Choice_Zeros_Format->SetToolTip( _("Choose EXCELLON numbers notation") );
111 
112  bLeftSizer->Add( m_Choice_Zeros_Format, 0, wxALL|wxEXPAND, 5 );
113 
114  wxFlexGridSizer* fgSizer1;
115  fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
116  fgSizer1->AddGrowableCol( 1 );
117  fgSizer1->SetFlexibleDirection( wxBOTH );
118  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
119 
120  m_staticTextTitle = new wxStaticText( this, wxID_ANY, _("Precision:"), wxDefaultPosition, wxDefaultSize, 0 );
121  m_staticTextTitle->Wrap( -1 );
122  fgSizer1->Add( m_staticTextTitle, 0, wxALL, 10 );
123 
124  m_staticTextPrecision = new wxStaticText( this, wxID_ANY, _("Precision"), wxDefaultPosition, wxDefaultSize, 0 );
125  m_staticTextPrecision->Wrap( -1 );
126  fgSizer1->Add( m_staticTextPrecision, 0, wxALL, 10 );
127 
128 
129  bLeftSizer->Add( fgSizer1, 0, wxEXPAND, 5 );
130 
131 
132  bmiddlerSizer->Add( bLeftSizer, 1, wxEXPAND, 5 );
133 
134  wxBoxSizer* bRightBoxSizer;
135  bRightBoxSizer = new wxBoxSizer( wxVERTICAL );
136 
137  wxStaticBoxSizer* sbSizerHoles;
138  sbSizerHoles = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Hole Counts") ), wxVERTICAL );
139 
140  wxFlexGridSizer* fgSizer2;
141  fgSizer2 = new wxFlexGridSizer( 0, 2, 0, 0 );
142  fgSizer2->SetFlexibleDirection( wxBOTH );
143  fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
144 
145  staticTextPlatedPads = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Plated pads:"), wxDefaultPosition, wxDefaultSize, 0 );
146  staticTextPlatedPads->Wrap( -1 );
147  fgSizer2->Add( staticTextPlatedPads, 0, wxLEFT|wxRIGHT, 5 );
148 
149  m_PlatedPadsCountInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
150  m_PlatedPadsCountInfoMsg->Wrap( -1 );
151  fgSizer2->Add( m_PlatedPadsCountInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
152 
153  staticTextNonPlatedPads = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Non-plated pads:"), wxDefaultPosition, wxDefaultSize, 0 );
154  staticTextNonPlatedPads->Wrap( -1 );
155  fgSizer2->Add( staticTextNonPlatedPads, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
156 
157  m_NotPlatedPadsCountInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
158  m_NotPlatedPadsCountInfoMsg->Wrap( -1 );
159  fgSizer2->Add( m_NotPlatedPadsCountInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxTOP, 5 );
160 
161  staticTextThroughVias = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Through vias:"), wxDefaultPosition, wxDefaultSize, 0 );
162  staticTextThroughVias->Wrap( -1 );
163  fgSizer2->Add( staticTextThroughVias, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
164 
165  m_ThroughViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
166  m_ThroughViasInfoMsg->Wrap( -1 );
167  fgSizer2->Add( m_ThroughViasInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxTOP, 5 );
168 
169  staticTextMicroVias = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Micro vias:"), wxDefaultPosition, wxDefaultSize, 0 );
170  staticTextMicroVias->Wrap( -1 );
171  fgSizer2->Add( staticTextMicroVias, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
172 
173  m_MicroViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
174  m_MicroViasInfoMsg->Wrap( -1 );
175  fgSizer2->Add( m_MicroViasInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxTOP, 5 );
176 
177  staticTextBuriedVias = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Buried vias:"), wxDefaultPosition, wxDefaultSize, 0 );
178  staticTextBuriedVias->Wrap( -1 );
179  fgSizer2->Add( staticTextBuriedVias, 0, wxALL, 5 );
180 
181  m_BuriedViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
182  m_BuriedViasInfoMsg->Wrap( -1 );
183  fgSizer2->Add( m_BuriedViasInfoMsg, 0, wxALIGN_RIGHT|wxALL, 5 );
184 
185 
186  sbSizerHoles->Add( fgSizer2, 1, wxEXPAND, 5 );
187 
188 
189  bRightBoxSizer->Add( sbSizerHoles, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
190 
191 
192  bmiddlerSizer->Add( bRightBoxSizer, 1, wxEXPAND|wxTOP, 5 );
193 
194 
195  bMainSizer->Add( bmiddlerSizer, 0, wxEXPAND|wxTOP, 2 );
196 
197  wxStaticBoxSizer* bMsgSizer;
198  bMsgSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages") ), wxVERTICAL );
199 
200  m_messagesBox = new wxTextCtrl( bMsgSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
201  m_messagesBox->SetMinSize( wxSize( -1,90 ) );
202 
203  bMsgSizer->Add( m_messagesBox, 1, wxALL|wxEXPAND, 5 );
204 
205 
206  bMainSizer->Add( bMsgSizer, 1, wxALL|wxEXPAND, 5 );
207 
208  m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
209 
210  m_buttonReport = new wxButton( this, wxID_ANY, _("Generate Report File"), wxDefaultPosition, wxDefaultSize, 0 );
211  m_buttonsSizer->Add( m_buttonReport, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
212 
213  m_sdbSizer1 = new wxStdDialogButtonSizer();
214  m_sdbSizer1OK = new wxButton( this, wxID_OK );
215  m_sdbSizer1->AddButton( m_sdbSizer1OK );
216  m_sdbSizer1Apply = new wxButton( this, wxID_APPLY );
217  m_sdbSizer1->AddButton( m_sdbSizer1Apply );
218  m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
219  m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
220  m_sdbSizer1->Realize();
221 
222  m_buttonsSizer->Add( m_sdbSizer1, 1, wxEXPAND, 5 );
223 
224 
225  bMainSizer->Add( m_buttonsSizer, 0, wxALL|wxEXPAND, 5 );
226 
227 
228  this->SetSizer( bMainSizer );
229  this->Layout();
230  bMainSizer->Fit( this );
231 
232  this->Centre( wxBOTH );
233 
234  // Connect Events
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_Choice_Unit->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelDrillUnitsSelected ), NULL, this );
239  m_Choice_Zeros_Format->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelZerosFmtSelected ), NULL, this );
240  m_buttonReport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenReportFile ), NULL, this );
241  m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenMapFile ), NULL, this );
242  m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenDrillFile ), NULL, this );
243 }
244 
246 {
247  // Disconnect Events
248  m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
249  m_rbExcellon->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
250  m_rbGerberX2->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
251  m_Choice_Unit->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelDrillUnitsSelected ), NULL, this );
252  m_Choice_Zeros_Format->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelZerosFmtSelected ), NULL, this );
253  m_buttonReport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenReportFile ), NULL, this );
254  m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenMapFile ), NULL, this );
255  m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenDrillFile ), NULL, this );
256 
257 }
wxStaticText * m_PlatedPadsCountInfoMsg
wxStdDialogButtonSizer * m_sdbSizer1
virtual void OnGenDrillFile(wxCommandEvent &event)
wxRadioBox * m_Choice_Drill_Offset
wxCheckBox * m_Check_Merge_PTH_NPTH
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:82
wxStaticText * m_NotPlatedPadsCountInfoMsg
wxStaticText * staticTextBuriedVias
wxStaticText * m_MicroViasInfoMsg
wxRadioButton * m_rbExcellon
wxStaticText * m_BuriedViasInfoMsg
wxStaticText * m_ThroughViasInfoMsg
wxStaticText * staticTextNonPlatedPads
wxTextCtrl * m_outputDirectoryName
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
virtual void OnGenReportFile(wxCommandEvent &event)
virtual void OnSelZerosFmtSelected(wxCommandEvent &event)
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)