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, 5 );
32
33
34 bMainSizer->Add( bupperSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
35
36 wxBoxSizer* bmiddlerSizer;
37 bmiddlerSizer = new wxBoxSizer( wxHORIZONTAL );
38
39 wxBoxSizer* bLeftCol;
40 bLeftCol = new wxBoxSizer( wxVERTICAL );
41
42 m_formatLabel = new wxStaticText( this, wxID_ANY, _("Format"), wxDefaultPosition, wxDefaultSize, 0 );
43 m_formatLabel->Wrap( -1 );
44 bLeftCol->Add( m_formatLabel, 0, wxRIGHT|wxLEFT, 13 );
45
46 m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
47 bLeftCol->Add( m_staticline1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
48
49 wxBoxSizer* bSizerMargins;
50 bSizerMargins = new wxBoxSizer( wxVERTICAL );
51
52 m_rbExcellon = new wxRadioButton( this, wxID_ANY, _("Excellon"), wxDefaultPosition, wxDefaultSize, 0 );
53 bSizerMargins->Add( m_rbExcellon, 0, wxALL, 5 );
54
55 wxFlexGridSizer* fgSizerExcellonOptions;
56 fgSizerExcellonOptions = new wxFlexGridSizer( 4, 1, 3, 0 );
57 fgSizerExcellonOptions->SetFlexibleDirection( wxBOTH );
58 fgSizerExcellonOptions->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
59
60 m_Check_Mirror = new wxCheckBox( this, wxID_ANY, _("Mirror Y axis"), wxDefaultPosition, wxDefaultSize, 0 );
61 m_Check_Mirror->SetToolTip( _("Not recommended.\nUsed mostly by users who make the boards themselves.") );
62
63 fgSizerExcellonOptions->Add( m_Check_Mirror, 0, wxLEFT, 5 );
64
65 m_Check_Minimal = new wxCheckBox( this, wxID_ANY, _("Minimal header"), wxDefaultPosition, wxDefaultSize, 0 );
66 m_Check_Minimal->SetToolTip( _("Not recommended.\nOnly use it for board houses which do not accept fully featured headers.") );
67
68 fgSizerExcellonOptions->Add( m_Check_Minimal, 0, wxRIGHT|wxLEFT, 5 );
69
70 m_Check_Merge_PTH_NPTH = new wxCheckBox( this, wxID_ANY, _("PTH and NPTH in single file"), wxDefaultPosition, wxDefaultSize, 0 );
71 m_Check_Merge_PTH_NPTH->SetToolTip( _("Not recommended.\nOnly use for board houses which ask for merged PTH and NPTH into a single file.") );
72
73 fgSizerExcellonOptions->Add( m_Check_Merge_PTH_NPTH, 0, wxLEFT, 5 );
74
75 m_altDrillMode = new wxCheckBox( this, wxID_ANY, _("Use alternate drill mode for oval holes"), wxDefaultPosition, wxDefaultSize, 0 );
76 fgSizerExcellonOptions->Add( m_altDrillMode, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
77
78
79 bSizerMargins->Add( fgSizerExcellonOptions, 0, wxEXPAND|wxLEFT, 20 );
80
81
82 bSizerMargins->Add( 0, 3, 1, wxEXPAND, 5 );
83
84 m_rbGerberX2 = new wxRadioButton( this, wxID_ANY, _("Gerber X2"), wxDefaultPosition, wxDefaultSize, 0 );
85 bSizerMargins->Add( m_rbGerberX2, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
86
87
88 bSizerMargins->Add( 0, 6, 0, wxEXPAND, 5 );
89
90 wxBoxSizer* bSizer9;
91 bSizer9 = new wxBoxSizer( wxHORIZONTAL );
92
93 m_cbGenerateMap = new wxCheckBox( this, wxID_ANY, _("Generate map:"), wxDefaultPosition, wxDefaultSize, 0 );
94 bSizer9->Add( m_cbGenerateMap, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
95
96 wxString m_choiceDrillMapChoices[] = { _("Postscript"), _("Gerber X2"), _("DXF"), _("SVG"), _("PDF") };
97 int m_choiceDrillMapNChoices = sizeof( m_choiceDrillMapChoices ) / sizeof( wxString );
98 m_choiceDrillMap = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceDrillMapNChoices, m_choiceDrillMapChoices, 0 );
99 m_choiceDrillMap->SetSelection( 0 );
100 bSizer9->Add( m_choiceDrillMap, 1, wxALL, 5 );
101
102
103 bSizerMargins->Add( bSizer9, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
104
105
106 bLeftCol->Add( bSizerMargins, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
107
108
109 bmiddlerSizer->Add( bLeftCol, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
110
111
112 bmiddlerSizer->Add( 15, 0, 0, 0, 5 );
113
114 wxBoxSizer* bRightCol;
115 bRightCol = new wxBoxSizer( wxVERTICAL );
116
117 m_optionsLabel = new wxStaticText( this, wxID_ANY, _("Options"), wxDefaultPosition, wxDefaultSize, 0 );
118 m_optionsLabel->Wrap( -1 );
119 bRightCol->Add( m_optionsLabel, 0, wxRIGHT|wxLEFT, 13 );
120
121 m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
122 bRightCol->Add( m_staticline2, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
123
124 wxFlexGridSizer* fgSizer1;
125 fgSizer1 = new wxFlexGridSizer( 0, 2, 5, 5 );
126 fgSizer1->AddGrowableCol( 1 );
127 fgSizer1->SetFlexibleDirection( wxBOTH );
128 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
129
130 m_originLabel = new wxStaticText( this, wxID_ANY, _("Origin:"), wxDefaultPosition, wxDefaultSize, 0 );
131 m_originLabel->Wrap( -1 );
132 fgSizer1->Add( m_originLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
133
134 wxString m_originChoices[] = { _("Absolute"), _("Drill/place file origin") };
135 int m_originNChoices = sizeof( m_originChoices ) / sizeof( wxString );
136 m_origin = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_originNChoices, m_originChoices, 0 );
137 m_origin->SetSelection( 0 );
138 fgSizer1->Add( m_origin, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
139
140 m_unitsLabel = new wxStaticText( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, 0 );
141 m_unitsLabel->Wrap( -1 );
142 fgSizer1->Add( m_unitsLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
143
144 wxString m_unitsChoices[] = { _("Millimeters"), _("Inches") };
145 int m_unitsNChoices = sizeof( m_unitsChoices ) / sizeof( wxString );
146 m_units = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitsNChoices, m_unitsChoices, 0 );
147 m_units->SetSelection( 0 );
148 fgSizer1->Add( m_units, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
149
150 m_zerosLabel = new wxStaticText( this, wxID_ANY, _("Zeros:"), wxDefaultPosition, wxDefaultSize, 0 );
151 m_zerosLabel->Wrap( -1 );
152 fgSizer1->Add( m_zerosLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
153
154 wxString m_zerosChoices[] = { _("Decimal format (recommended)"), _("Suppress leading zeros"), _("Suppress trailing zeros"), _("Keep zeros") };
155 int m_zerosNChoices = sizeof( m_zerosChoices ) / sizeof( wxString );
156 m_zeros = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_zerosNChoices, m_zerosChoices, 0 );
157 m_zeros->SetSelection( 0 );
158 fgSizer1->Add( m_zeros, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
159
160
161 fgSizer1->Add( 0, 8, 1, wxEXPAND, 5 );
162
163
164 fgSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
165
166 m_precisionLabel = new wxStaticText( this, wxID_ANY, _("Precision:"), wxDefaultPosition, wxDefaultSize, 0 );
167 m_precisionLabel->Wrap( -1 );
168 fgSizer1->Add( m_precisionLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
169
170 m_staticTextPrecision = new wxStaticText( this, wxID_ANY, _("Precision"), wxDefaultPosition, wxDefaultSize, 0 );
171 m_staticTextPrecision->Wrap( -1 );
172 fgSizer1->Add( m_staticTextPrecision, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
173
174
175 bRightCol->Add( fgSizer1, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
176
177
178 bmiddlerSizer->Add( bRightCol, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
179
180
181 bMainSizer->Add( bmiddlerSizer, 0, wxEXPAND|wxTOP, 8 );
182
183 bMsgSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages") ), wxVERTICAL );
184
185 m_messagesBox = new wxTextCtrl( bMsgSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
186 m_messagesBox->SetMinSize( wxSize( -1,90 ) );
187
188 bMsgSizer->Add( m_messagesBox, 1, wxEXPAND, 5 );
189
190
191 bMainSizer->Add( bMsgSizer, 1, wxALL|wxEXPAND, 10 );
192
193 m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
194
195 m_buttonReport = new wxButton( this, wxID_ANY, _("Generate Report File..."), wxDefaultPosition, wxDefaultSize, 0 );
196 m_buttonsSizer->Add( m_buttonReport, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
197
198 m_sdbSizer = new wxStdDialogButtonSizer();
199 m_sdbSizerOK = new wxButton( this, wxID_OK );
200 m_sdbSizer->AddButton( m_sdbSizerOK );
201 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
202 m_sdbSizer->AddButton( m_sdbSizerCancel );
203 m_sdbSizer->Realize();
204
205 m_buttonsSizer->Add( m_sdbSizer, 1, wxEXPAND, 5 );
206
207
208 bMainSizer->Add( m_buttonsSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
209
210
211 this->SetSizer( bMainSizer );
212 this->Layout();
213 bMainSizer->Fit( this );
214
215 this->Centre( wxBOTH );
216
217 // Connect Events
218 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GENDRILL_BASE::onCloseDlg ) );
219 m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onOutputDirectoryBrowseClicked ), NULL, this );
220 m_rbExcellon->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
221 m_rbGerberX2->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
222 m_units->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onSelDrillUnitsSelected ), NULL, this );
223 m_zeros->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onSelZerosFmtSelected ), NULL, this );
224 m_buttonReport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onGenReportFile ), NULL, this );
225}
226
228{
229 // Disconnect Events
230 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_GENDRILL_BASE::onCloseDlg ) );
231 m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onOutputDirectoryBrowseClicked ), NULL, this );
232 m_rbExcellon->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
233 m_rbGerberX2->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onFileFormatSelection ), NULL, this );
234 m_units->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onSelDrillUnitsSelected ), NULL, this );
235 m_zeros->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onSelZerosFmtSelected ), NULL, this );
236 m_buttonReport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::onGenReportFile ), NULL, this );
237
238}
wxRadioButton * m_rbExcellon
virtual void onSelDrillUnitsSelected(wxCommandEvent &event)
wxStaticText * m_staticTextPrecision
STD_BITMAP_BUTTON * m_browseButton
wxStdDialogButtonSizer * m_sdbSizer
wxStaticBoxSizer * bMsgSizer
wxStaticLine * m_staticline2
wxStaticText * m_formatLabel
wxStaticText * m_optionsLabel
wxStaticText * m_originLabel
wxRadioButton * m_rbGerberX2
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
virtual void onGenReportFile(wxCommandEvent &event)
wxStaticText * staticTextOutputDir
wxTextCtrl * m_outputDirectoryName
virtual void onFileFormatSelection(wxCommandEvent &event)
virtual void onSelZerosFmtSelected(wxCommandEvent &event)
wxStaticLine * m_staticline1
virtual void onOutputDirectoryBrowseClicked(wxCommandEvent &event)
wxStaticText * m_precisionLabel
virtual void onCloseDlg(wxCloseEvent &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)