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