KiCad PCB EDA Suite
dialog_gendrill_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Jun 17 2015)
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( wxVERTICAL );
21 
22  wxStaticBoxSizer* bdirnameSizer;
23  bdirnameSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Output directory:") ), wxHORIZONTAL );
24 
25  m_outputDirectoryName = new wxTextCtrl( bdirnameSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
26  m_outputDirectoryName->SetMaxLength( 0 );
27  bdirnameSizer->Add( m_outputDirectoryName, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
28 
29  m_buttonBrowse = new wxButton( bdirnameSizer->GetStaticBox(), wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
30  bdirnameSizer->Add( m_buttonBrowse, 0, wxBOTTOM|wxLEFT, 5 );
31 
32 
33  bupperSizer->Add( bdirnameSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
34 
35 
36  bMainSizer->Add( bupperSizer, 0, wxEXPAND, 5 );
37 
38  wxBoxSizer* bmiddlerSizer;
39  bmiddlerSizer = new wxBoxSizer( wxHORIZONTAL );
40 
41  wxBoxSizer* m_LeftBoxSizer;
42  m_LeftBoxSizer = new wxBoxSizer( wxVERTICAL );
43 
44  wxString m_Choice_UnitChoices[] = { _("Millimeters"), _("Inches") };
45  int m_Choice_UnitNChoices = sizeof( m_Choice_UnitChoices ) / sizeof( wxString );
46  m_Choice_Unit = new wxRadioBox( this, wxID_ANY, _("Drill Units:"), wxDefaultPosition, wxDefaultSize, m_Choice_UnitNChoices, m_Choice_UnitChoices, 1, wxRA_SPECIFY_COLS );
47  m_Choice_Unit->SetSelection( 1 );
48  m_LeftBoxSizer->Add( m_Choice_Unit, 0, wxALL|wxEXPAND, 5 );
49 
50  wxString m_Choice_Zeros_FormatChoices[] = { _("Decimal format"), _("Suppress leading zeros"), _("Suppress trailing zeros"), _("Keep zeros") };
51  int m_Choice_Zeros_FormatNChoices = sizeof( m_Choice_Zeros_FormatChoices ) / sizeof( wxString );
52  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 );
53  m_Choice_Zeros_Format->SetSelection( 0 );
54  m_Choice_Zeros_Format->SetToolTip( _("Choose EXCELLON numbers notation") );
55 
56  m_LeftBoxSizer->Add( m_Choice_Zeros_Format, 0, wxALL|wxEXPAND, 5 );
57 
58  wxStaticBoxSizer* sbSizerPrecision;
59  sbSizerPrecision = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Precision") ), wxVERTICAL );
60 
61  m_staticTextPrecision = new wxStaticText( sbSizerPrecision->GetStaticBox(), wxID_ANY, _("Precision"), wxDefaultPosition, wxDefaultSize, 0 );
62  m_staticTextPrecision->Wrap( -1 );
63  sbSizerPrecision->Add( m_staticTextPrecision, 0, wxALL, 5 );
64 
65 
66  m_LeftBoxSizer->Add( sbSizerPrecision, 0, wxEXPAND, 5 );
67 
68 
69  bmiddlerSizer->Add( m_LeftBoxSizer, 0, wxEXPAND, 5 );
70 
71  wxBoxSizer* bMiddleBoxSizer;
72  bMiddleBoxSizer = new wxBoxSizer( wxVERTICAL );
73 
74  wxString m_Choice_Drill_MapChoices[] = { _("HPGL"), _("PostScript"), _("Gerber"), _("DXF"), _("SVG"), _("PDF") };
75  int m_Choice_Drill_MapNChoices = sizeof( m_Choice_Drill_MapChoices ) / sizeof( wxString );
76  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 );
77  m_Choice_Drill_Map->SetSelection( 1 );
78  m_Choice_Drill_Map->SetToolTip( _("Creates a drill map in PS, HPGL or other formats") );
79 
80  bMiddleBoxSizer->Add( m_Choice_Drill_Map, 0, wxALL|wxEXPAND, 5 );
81 
82  wxStaticBoxSizer* sbOptSizer;
83  sbOptSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Drill File Options:") ), wxVERTICAL );
84 
85  m_Check_Mirror = new wxCheckBox( sbOptSizer->GetStaticBox(), wxID_ANY, _("Mirror y axis"), wxDefaultPosition, wxDefaultSize, 0 );
86  m_Check_Mirror->SetToolTip( _("Not recommended.\nUsed mostly by users who make the boards themselves.") );
87 
88  sbOptSizer->Add( m_Check_Mirror, 0, wxRIGHT|wxLEFT, 5 );
89 
90  m_Check_Minimal = new wxCheckBox( sbOptSizer->GetStaticBox(), wxID_ANY, _("Minimal header"), wxDefaultPosition, wxDefaultSize, 0 );
91  m_Check_Minimal->SetToolTip( _("Not recommended.\nOnly use for board houses which do not accept fully featured headers.") );
92 
93  sbOptSizer->Add( m_Check_Minimal, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
94 
95  m_Check_Merge_PTH_NPTH = new wxCheckBox( sbOptSizer->GetStaticBox(), wxID_ANY, _("Merge PTH and NPTH holes into one file"), wxDefaultPosition, wxDefaultSize, 0 );
96  m_Check_Merge_PTH_NPTH->SetToolTip( _("Not recommended.\nOnly use for board houses which ask for merged PTH and NPTH into a single file.") );
97 
98  sbOptSizer->Add( m_Check_Merge_PTH_NPTH, 0, wxALL, 5 );
99 
100 
101  bMiddleBoxSizer->Add( sbOptSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
102 
103  wxString m_Choice_Drill_OffsetChoices[] = { _("Absolute"), _("Auxiliary axis") };
104  int m_Choice_Drill_OffsetNChoices = sizeof( m_Choice_Drill_OffsetChoices ) / sizeof( wxString );
105  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 );
106  m_Choice_Drill_Offset->SetSelection( 0 );
107  m_Choice_Drill_Offset->SetToolTip( _("Choose the coordinate origin: absolute or relative to the auxiliray axis") );
108 
109  bMiddleBoxSizer->Add( m_Choice_Drill_Offset, 0, wxALL|wxEXPAND, 5 );
110 
111 
112  bmiddlerSizer->Add( bMiddleBoxSizer, 0, wxEXPAND, 5 );
113 
114  wxBoxSizer* bRightBoxSizer;
115  bRightBoxSizer = new wxBoxSizer( wxVERTICAL );
116 
117  wxStaticBoxSizer* sbSizerInfo;
118  sbSizerInfo = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Info:") ), wxVERTICAL );
119 
120  m_DefaultViasDrillSizer = new wxStaticBoxSizer( new wxStaticBox( sbSizerInfo->GetStaticBox(), wxID_ANY, _("Default Vias Drill:") ), wxVERTICAL );
121 
122  m_ViaDrillValue = new wxStaticText( m_DefaultViasDrillSizer->GetStaticBox(), wxID_ANY, _("Via Drill Value"), wxDefaultPosition, wxDefaultSize, 0 );
123  m_ViaDrillValue->Wrap( -1 );
124  m_DefaultViasDrillSizer->Add( m_ViaDrillValue, 0, wxALL, 5 );
125 
126 
127  sbSizerInfo->Add( m_DefaultViasDrillSizer, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
128 
129  m_MicroViasDrillSizer = new wxStaticBoxSizer( new wxStaticBox( sbSizerInfo->GetStaticBox(), wxID_ANY, _("Micro Vias Drill:") ), wxVERTICAL );
130 
131  m_MicroViaDrillValue = new wxStaticText( m_MicroViasDrillSizer->GetStaticBox(), wxID_ANY, _("Micro Via Drill Value"), wxDefaultPosition, wxDefaultSize, 0 );
132  m_MicroViaDrillValue->Wrap( -1 );
133  m_MicroViasDrillSizer->Add( m_MicroViaDrillValue, 0, wxALL, 5 );
134 
135 
136  sbSizerInfo->Add( m_MicroViasDrillSizer, 0, wxEXPAND|wxBOTTOM, 5 );
137 
138  wxStaticBoxSizer* sbSizerHoles;
139  sbSizerHoles = new wxStaticBoxSizer( new wxStaticBox( sbSizerInfo->GetStaticBox(), wxID_ANY, _("Holes Count:") ), wxVERTICAL );
140 
141  m_PlatedPadsCountInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Plated Pads:"), wxDefaultPosition, wxDefaultSize, 0 );
142  m_PlatedPadsCountInfoMsg->Wrap( -1 );
143  sbSizerHoles->Add( m_PlatedPadsCountInfoMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
144 
145  m_NotPlatedPadsCountInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Not Plated Pads:"), wxDefaultPosition, wxDefaultSize, 0 );
146  m_NotPlatedPadsCountInfoMsg->Wrap( -1 );
147  sbSizerHoles->Add( m_NotPlatedPadsCountInfoMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
148 
149  m_ThroughViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Through Vias:"), wxDefaultPosition, wxDefaultSize, 0 );
150  m_ThroughViasInfoMsg->Wrap( -1 );
151  sbSizerHoles->Add( m_ThroughViasInfoMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
152 
153  m_MicroViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Micro Vias:"), wxDefaultPosition, wxDefaultSize, 0 );
154  m_MicroViasInfoMsg->Wrap( -1 );
155  sbSizerHoles->Add( m_MicroViasInfoMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
156 
157  m_BuriedViasInfoMsg = new wxStaticText( sbSizerHoles->GetStaticBox(), wxID_ANY, _("Buried Vias:"), wxDefaultPosition, wxDefaultSize, 0 );
158  m_BuriedViasInfoMsg->Wrap( -1 );
159  sbSizerHoles->Add( m_BuriedViasInfoMsg, 0, wxALL, 5 );
160 
161 
162  sbSizerInfo->Add( sbSizerHoles, 1, wxEXPAND|wxBOTTOM, 5 );
163 
164 
165  bRightBoxSizer->Add( sbSizerInfo, 0, wxEXPAND|wxTOP, 5 );
166 
167 
168  bmiddlerSizer->Add( bRightBoxSizer, 0, wxEXPAND, 5 );
169 
170  wxBoxSizer* bSizerButtons;
171  bSizerButtons = new wxBoxSizer( wxVERTICAL );
172 
173 
174  bSizerButtons->Add( 10, 20, 0, 0, 5 );
175 
176  m_buttonDrill = new wxButton( this, ID_GEN_DRILL_FILE, _("Drill File"), wxDefaultPosition, wxDefaultSize, 0 );
177  m_buttonDrill->SetDefault();
178  bSizerButtons->Add( m_buttonDrill, 0, wxALL|wxEXPAND, 5 );
179 
180  m_buttonMap = new wxButton( this, wxID_ANY, _("Map File"), wxDefaultPosition, wxDefaultSize, 0 );
181  bSizerButtons->Add( m_buttonMap, 0, wxALL|wxEXPAND, 5 );
182 
183  m_buttonReport = new wxButton( this, wxID_ANY, _("Report File"), wxDefaultPosition, wxDefaultSize, 0 );
184  bSizerButtons->Add( m_buttonReport, 0, wxALL|wxEXPAND, 5 );
185 
186  m_CancelButton = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
187  bSizerButtons->Add( m_CancelButton, 0, wxALL|wxEXPAND, 5 );
188 
189 
190  bmiddlerSizer->Add( bSizerButtons, 1, wxEXPAND, 5 );
191 
192 
193  bMainSizer->Add( bmiddlerSizer, 0, wxEXPAND, 5 );
194 
195  wxStaticBoxSizer* bmsgSizer;
196  bmsgSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Messages:") ), wxVERTICAL );
197 
198  m_messagesBox = new wxTextCtrl( bmsgSizer->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
199  m_messagesBox->SetMinSize( wxSize( -1,90 ) );
200 
201  bmsgSizer->Add( m_messagesBox, 1, wxALL|wxEXPAND, 5 );
202 
203 
204  bMainSizer->Add( bmsgSizer, 1, wxEXPAND, 5 );
205 
206 
207  this->SetSizer( bMainSizer );
208  this->Layout();
209 
210  this->Centre( wxBOTH );
211 
212  // Connect Events
213  m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
214  m_Choice_Unit->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelDrillUnitsSelected ), NULL, this );
215  m_Choice_Zeros_Format->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelZerosFmtSelected ), NULL, this );
216  m_buttonDrill->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenDrillFile ), NULL, this );
217  m_buttonMap->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenMapFile ), NULL, this );
218  m_buttonReport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenReportFile ), NULL, this );
219  m_CancelButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnCancelClick ), NULL, this );
220 }
221 
223 {
224  // Disconnect Events
225  m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
226  m_Choice_Unit->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelDrillUnitsSelected ), NULL, this );
227  m_Choice_Zeros_Format->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnSelZerosFmtSelected ), NULL, this );
228  m_buttonDrill->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenDrillFile ), NULL, this );
229  m_buttonMap->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenMapFile ), NULL, this );
230  m_buttonReport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnGenReportFile ), NULL, this );
231  m_CancelButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GENDRILL_BASE::OnCancelClick ), NULL, this );
232 
233 }
wxStaticText * m_PlatedPadsCountInfoMsg
wxStaticBoxSizer * m_MicroViasDrillSizer
virtual void OnGenDrillFile(wxCommandEvent &event)
wxRadioBox * m_Choice_Drill_Offset
wxCheckBox * m_Check_Merge_PTH_NPTH
#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:60
wxStaticText * m_NotPlatedPadsCountInfoMsg
wxStaticBoxSizer * m_DefaultViasDrillSizer
wxStaticText * m_ViaDrillValue
wxStaticText * m_MicroViasInfoMsg
wxStaticText * m_BuriedViasInfoMsg
wxStaticText * m_ThroughViasInfoMsg
wxTextCtrl * m_outputDirectoryName
wxRadioBox * m_Choice_Zeros_Format
virtual void OnOutputDirectoryBrowseClicked(wxCommandEvent &event)
virtual void OnGenMapFile(wxCommandEvent &event)
wxStaticText * m_MicroViaDrillValue
virtual void OnGenReportFile(wxCommandEvent &event)
virtual void OnSelZerosFmtSelected(wxCommandEvent &event)
DIALOG_GENDRILL_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Drill Files Generation"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(506, 473), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxStaticText * m_staticTextPrecision
virtual void OnCancelClick(wxCommandEvent &event)
virtual void OnSelDrillUnitsSelected(wxCommandEvent &event)