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 3.10.1-0-g8feb16b)
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 wxBoxSizer* bMainSizer;
19 bMainSizer = new wxBoxSizer( wxVERTICAL );
20
21 wxBoxSizer* bupperSizer;
22 bupperSizer = new wxBoxSizer( wxHORIZONTAL );
23
24 staticTextOutputDir = new wxStaticText( this, wxID_ANY, _("Output folder:"), wxDefaultPosition, wxDefaultSize, 0 );
25 staticTextOutputDir->Wrap( -1 );
26 bupperSizer->Add( staticTextOutputDir, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 10 );
27
28 m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
29 bupperSizer->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 0 );
30
31 m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
32 bupperSizer->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL, 7 );
33
34
35 bMainSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
36
37 wxBoxSizer* bmiddlerSizer;
38 bmiddlerSizer = new wxBoxSizer( wxHORIZONTAL );
39
40 wxBoxSizer* bMiddleSizer;
41 bMiddleSizer = new wxBoxSizer( wxVERTICAL );
42
43 wxStaticBoxSizer* sbSizer6;
44 sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Drill File Format") ), wxVERTICAL );
45
46 m_rbExcellon = new wxRadioButton( sbSizer6->GetStaticBox(), wxID_ANY, _("Excellon"), wxDefaultPosition, wxDefaultSize, 0 );
47 sbSizer6->Add( m_rbExcellon, 0, wxBOTTOM|wxRIGHT, 5 );
48
49 wxBoxSizer* bSizerExcellonOptions;
50 bSizerExcellonOptions = new wxBoxSizer( wxVERTICAL );
51
52 m_Check_Mirror = new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY, _("Mirror Y axis"), wxDefaultPosition, wxDefaultSize, 0 );
53 m_Check_Mirror->SetToolTip( _("Not recommended.\nUsed mostly by users who make the boards themselves.") );
54
55 bSizerExcellonOptions->Add( m_Check_Mirror, 0, wxLEFT, 5 );
56
57 m_Check_Minimal = new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY, _("Minimal header"), wxDefaultPosition, wxDefaultSize, 0 );
58 m_Check_Minimal->SetToolTip( _("Not recommended.\nOnly use it for board houses which do not accept fully featured headers.") );
59
60 bSizerExcellonOptions->Add( m_Check_Minimal, 0, wxRIGHT|wxLEFT, 5 );
61
62 m_Check_Merge_PTH_NPTH = new wxCheckBox( sbSizer6->GetStaticBox(), wxID_ANY, _("PTH and NPTH in single file"), wxDefaultPosition, wxDefaultSize, 0 );
63 m_Check_Merge_PTH_NPTH->SetToolTip( _("Not recommended.\nOnly use for board houses which ask for merged PTH and NPTH into a single file.") );
64
65 bSizerExcellonOptions->Add( m_Check_Merge_PTH_NPTH, 0, wxLEFT, 5 );
66
67 wxString m_radioBoxOvalHoleModeChoices[] = { _("Use route command (recommended)"), _("Use alternate drill mode") };
68 int m_radioBoxOvalHoleModeNChoices = sizeof( m_radioBoxOvalHoleModeChoices ) / sizeof( wxString );
69 m_radioBoxOvalHoleMode = new wxRadioBox( sbSizer6->GetStaticBox(), wxID_ANY, _("Oval Holes Drill Mode"), wxDefaultPosition, wxDefaultSize, m_radioBoxOvalHoleModeNChoices, m_radioBoxOvalHoleModeChoices, 1, wxRA_SPECIFY_COLS );
70 m_radioBoxOvalHoleMode->SetSelection( 0 );
71 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)") );
72
73 bSizerExcellonOptions->Add( m_radioBoxOvalHoleMode, 0, wxALL|wxEXPAND, 5 );
74
75
76 sbSizer6->Add( bSizerExcellonOptions, 1, wxEXPAND|wxLEFT, 12 );
77
78 m_rbGerberX2 = new wxRadioButton( sbSizer6->GetStaticBox(), wxID_ANY, _("Gerber X2"), wxDefaultPosition, wxDefaultSize, 0 );
79 sbSizer6->Add( m_rbGerberX2, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
80
81
82 bMiddleSizer->Add( sbSizer6, 1, wxEXPAND|wxALL, 5 );
83
84 wxString m_Choice_Drill_MapChoices[] = { _("PostScript"), _("Gerber X2"), _("DXF"), _("SVG"), _("PDF") };
85 int m_Choice_Drill_MapNChoices = sizeof( m_Choice_Drill_MapChoices ) / sizeof( wxString );
86 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 );
87 m_Choice_Drill_Map->SetSelection( 4 );
88 m_Choice_Drill_Map->SetToolTip( _("Creates a drill map in PDF or other formats") );
89
90 bMiddleSizer->Add( m_Choice_Drill_Map, 0, wxALL|wxEXPAND, 5 );
91
92
93 bmiddlerSizer->Add( bMiddleSizer, 1, wxEXPAND, 5 );
94
95 wxBoxSizer* bLeftSizer;
96 bLeftSizer = new wxBoxSizer( wxVERTICAL );
97
98 wxString m_Choice_Drill_OffsetChoices[] = { _("Absolute"), _("Drill/place file origin") };
99 int m_Choice_Drill_OffsetNChoices = sizeof( m_Choice_Drill_OffsetChoices ) / sizeof( wxString );
100 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 );
101 m_Choice_Drill_Offset->SetSelection( 0 );
102 m_Choice_Drill_Offset->SetToolTip( _("Choose the coordinate origin: absolute or relative to the drill/place file origin") );
103
104 bLeftSizer->Add( m_Choice_Drill_Offset, 0, wxALL|wxEXPAND, 5 );
105
106 wxString m_Choice_UnitChoices[] = { _("Millimeters"), _("Inches") };
107 int m_Choice_UnitNChoices = sizeof( m_Choice_UnitChoices ) / sizeof( wxString );
108 m_Choice_Unit = new wxRadioBox( this, wxID_ANY, _("Drill Units"), wxDefaultPosition, wxDefaultSize, m_Choice_UnitNChoices, m_Choice_UnitChoices, 1, wxRA_SPECIFY_COLS );
109 m_Choice_Unit->SetSelection( 0 );
110 bLeftSizer->Add( m_Choice_Unit, 0, wxALL|wxEXPAND, 5 );
111
112 wxString m_Choice_Zeros_FormatChoices[] = { _("Decimal format (recommended)"), _("Suppress leading zeros"), _("Suppress trailing zeros"), _("Keep zeros") };
113 int m_Choice_Zeros_FormatNChoices = sizeof( m_Choice_Zeros_FormatChoices ) / sizeof( wxString );
114 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 );
115 m_Choice_Zeros_Format->SetSelection( 0 );
116 m_Choice_Zeros_Format->SetToolTip( _("Choose EXCELLON numbers notation") );
117
118 bLeftSizer->Add( m_Choice_Zeros_Format, 0, wxALL|wxEXPAND, 5 );
119
120 wxFlexGridSizer* fgSizer1;
121 fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
122 fgSizer1->AddGrowableCol( 1 );
123 fgSizer1->SetFlexibleDirection( wxBOTH );
124 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
125
126 m_staticTextTitle = new wxStaticText( this, wxID_ANY, _("Precision:"), wxDefaultPosition, wxDefaultSize, 0 );
127 m_staticTextTitle->Wrap( -1 );
128 fgSizer1->Add( m_staticTextTitle, 0, wxALL, 10 );
129
130 m_staticTextPrecision = new wxStaticText( this, wxID_ANY, _("Precision"), wxDefaultPosition, wxDefaultSize, 0 );
131 m_staticTextPrecision->Wrap( -1 );
132 fgSizer1->Add( m_staticTextPrecision, 0, wxALL, 10 );
133
134
135 bLeftSizer->Add( fgSizer1, 0, wxEXPAND, 5 );
136
137
138 bmiddlerSizer->Add( bLeftSizer, 0, wxEXPAND, 5 );
139
140 wxBoxSizer* bRightBoxSizer;
141 bRightBoxSizer = new wxBoxSizer( wxVERTICAL );
142
143 wxStaticBoxSizer* sbSizerHoles;
144 sbSizerHoles = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Hole Counts") ), wxVERTICAL );
145
146 wxFlexGridSizer* fgSizer2;
147 fgSizer2 = new wxFlexGridSizer( 0, 2, 0, 0 );
148 fgSizer2->SetFlexibleDirection( wxBOTH );
149 fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
150
151 staticTextPlatedPads = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Plated pads:"), wxDefaultPosition, wxDefaultSize, 0 );
152 staticTextPlatedPads->Wrap( -1 );
153 fgSizer2->Add( staticTextPlatedPads, 0, wxLEFT|wxRIGHT, 5 );
154
155 m_PlatedPadsCountInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
156 m_PlatedPadsCountInfoMsg->Wrap( -1 );
157 fgSizer2->Add( m_PlatedPadsCountInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT, 5 );
158
159 staticTextNonPlatedPads = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Non-plated pads:"), wxDefaultPosition, wxDefaultSize, 0 );
160 staticTextNonPlatedPads->Wrap( -1 );
161 fgSizer2->Add( staticTextNonPlatedPads, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
162
163 m_NotPlatedPadsCountInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
164 m_NotPlatedPadsCountInfoMsg->Wrap( -1 );
165 fgSizer2->Add( m_NotPlatedPadsCountInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxTOP, 5 );
166
167 staticTextThroughVias = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Through vias:"), wxDefaultPosition, wxDefaultSize, 0 );
168 staticTextThroughVias->Wrap( -1 );
169 fgSizer2->Add( staticTextThroughVias, 0, wxLEFT|wxRIGHT|wxTOP|wxALIGN_BOTTOM, 4 );
170
171 m_ThroughViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
172 m_ThroughViasInfoMsg->Wrap( -1 );
173 fgSizer2->Add( m_ThroughViasInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxTOP, 5 );
174
175 staticTextMicroVias = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Micro vias:"), wxDefaultPosition, wxDefaultSize, 0 );
176 staticTextMicroVias->Wrap( -1 );
177 fgSizer2->Add( staticTextMicroVias, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
178
179 m_MicroViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
180 m_MicroViasInfoMsg->Wrap( -1 );
181 fgSizer2->Add( m_MicroViasInfoMsg, 0, wxALIGN_RIGHT|wxLEFT|wxRIGHT|wxTOP, 5 );
182
183 staticTextBuriedVias = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Buried vias:"), wxDefaultPosition, wxDefaultSize, 0 );
184 staticTextBuriedVias->Wrap( -1 );
185 fgSizer2->Add( staticTextBuriedVias, 0, wxALL, 5 );
186
187 m_BuriedViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
188 m_BuriedViasInfoMsg->Wrap( -1 );
189 fgSizer2->Add( m_BuriedViasInfoMsg, 0, wxALIGN_RIGHT|wxALL, 5 );
190
191
192 sbSizerHoles->Add( fgSizer2, 1, wxEXPAND, 5 );
193
194
195 bRightBoxSizer->Add( sbSizerHoles, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
196
197
198 bmiddlerSizer->Add( bRightBoxSizer, 0, wxEXPAND|wxTOP, 5 );
199
200
201 bMainSizer->Add( bmiddlerSizer, 0, wxEXPAND|wxTOP, 8 );
202
203 wxStaticBoxSizer* bMsgSizer;
204 bMsgSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages") ), wxVERTICAL );
205
206 m_messagesBox = new wxTextCtrl( bMsgSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
207 m_messagesBox->SetMinSize( wxSize( -1,90 ) );
208
209 bMsgSizer->Add( m_messagesBox, 1, wxALL|wxEXPAND, 5 );
210
211
212 bMainSizer->Add( bMsgSizer, 1, wxALL|wxEXPAND, 5 );
213
214 m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
215
216 m_buttonReport = new wxButton( this, wxID_ANY, _("Generate Report File..."), wxDefaultPosition, wxDefaultSize, 0 );
217 m_buttonsSizer->Add( m_buttonReport, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
218
219 m_sdbSizer = new wxStdDialogButtonSizer();
220 m_sdbSizerOK = new wxButton( this, wxID_OK );
221 m_sdbSizer->AddButton( m_sdbSizerOK );
222 m_sdbSizerApply = new wxButton( this, wxID_APPLY );
223 m_sdbSizer->AddButton( m_sdbSizerApply );
224 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
225 m_sdbSizer->AddButton( m_sdbSizerCancel );
226 m_sdbSizer->Realize();
227
228 m_buttonsSizer->Add( m_sdbSizer, 1, wxEXPAND, 5 );
229
230
231 bMainSizer->Add( m_buttonsSizer, 0, wxALL|wxEXPAND, 5 );
232
233
234 this->SetSizer( bMainSizer );
235 this->Layout();
236 bMainSizer->Fit( this );
237
238 this->Centre( wxBOTH );
239
240 // Connect Events
241 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GENDRILL_BASE::onCloseDlg ) );
242 m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
243 m_rbExcellon->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
244 m_rbGerberX2->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
245 m_Choice_Unit->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelDrillUnitsSelected ), NULL, this );
246 m_Choice_Zeros_Format->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelZerosFmtSelected ), NULL, this );
247 m_buttonReport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenReportFile ), NULL, this );
248 m_sdbSizerApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenMapFile ), NULL, this );
249 m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onQuitDlg ), NULL, this );
250 m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenDrillFile ), NULL, this );
251}
252
254{
255 // Disconnect Events
256 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GENDRILL_BASE::onCloseDlg ) );
257 m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
258 m_rbExcellon->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
259 m_rbGerberX2->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
260 m_Choice_Unit->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelDrillUnitsSelected ), NULL, this );
261 m_Choice_Zeros_Format->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelZerosFmtSelected ), NULL, this );
262 m_buttonReport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenReportFile ), NULL, this );
263 m_sdbSizerApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenMapFile ), NULL, this );
264 m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onQuitDlg ), NULL, this );
265 m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenDrillFile ), NULL, this );
266
267}
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
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:84
A bitmap button widget that behaves like a standard dialog button except with an icon.
#define _(s)