KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_export_step_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
10
12
14
15DIALOG_EXPORT_STEP_BASE::DIALOG_EXPORT_STEP_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
16{
17 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
18
19 bSizerSTEPFile = new wxBoxSizer( wxVERTICAL );
20
21 bSizerTop = new wxBoxSizer( wxHORIZONTAL );
22
23 m_txtBrdFile = new wxStaticText( this, wxID_ANY, _("File:"), wxDefaultPosition, wxDefaultSize, 0 );
24 m_txtBrdFile->Wrap( -1 );
25 bSizerTop->Add( m_txtBrdFile, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
26
27 m_outputFileName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
28 m_outputFileName->SetToolTip( _("Enter a filename if you do not want to use default file names\nCan be used only when printing the current sheet") );
29 m_outputFileName->SetMinSize( wxSize( 450,-1 ) );
30
31 bSizerTop->Add( m_outputFileName, 1, wxALIGN_CENTER_VERTICAL, 5 );
32
33 m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
34 bSizerTop->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
35
36
37 bSizerSTEPFile->Add( bSizerTop, 0, wxEXPAND|wxALL, 10 );
38
39 wxBoxSizer* bSizer2;
40 bSizer2 = new wxBoxSizer( wxHORIZONTAL );
41
42 wxStaticBoxSizer* sbCoordinates;
43 sbCoordinates = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Coordinates") ), wxVERTICAL );
44
45 m_rbDrillAndPlotOrigin = new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY, _("Drill/place file origin"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
46 sbCoordinates->Add( m_rbDrillAndPlotOrigin, 0, wxBOTTOM|wxRIGHT, 5 );
47
48 m_rbGridOrigin = new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY, _("Grid origin"), wxDefaultPosition, wxDefaultSize, 0 );
49 sbCoordinates->Add( m_rbGridOrigin, 0, wxBOTTOM|wxRIGHT, 5 );
50
51 m_rbUserDefinedOrigin = new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY, _("User defined origin"), wxDefaultPosition, wxDefaultSize, 0 );
52 sbCoordinates->Add( m_rbUserDefinedOrigin, 0, wxBOTTOM|wxRIGHT, 5 );
53
54 m_rbBoardCenterOrigin = new wxRadioButton( sbCoordinates->GetStaticBox(), wxID_ANY, _("Board center origin"), wxDefaultPosition, wxDefaultSize, 0 );
55 sbCoordinates->Add( m_rbBoardCenterOrigin, 0, wxBOTTOM|wxRIGHT, 5 );
56
57
58 bSizer2->Add( sbCoordinates, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
59
60 wxStaticBoxSizer* sbUserDefinedOrigin;
61 sbUserDefinedOrigin = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("User Defined Origin") ), wxVERTICAL );
62
63 wxFlexGridSizer* fgSizer1;
64 fgSizer1 = new wxFlexGridSizer( 0, 2, 5, 0 );
65 fgSizer1->SetFlexibleDirection( wxBOTH );
66 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
67
68 m_staticTextUnits = new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, 0 );
69 m_staticTextUnits->Wrap( -1 );
70 fgSizer1->Add( m_staticTextUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
71
72 wxString m_STEP_OrgUnitChoiceChoices[] = { _("mm"), _("inch") };
73 int m_STEP_OrgUnitChoiceNChoices = sizeof( m_STEP_OrgUnitChoiceChoices ) / sizeof( wxString );
74 m_STEP_OrgUnitChoice = new wxChoice( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_STEP_OrgUnitChoiceNChoices, m_STEP_OrgUnitChoiceChoices, 0 );
75 m_STEP_OrgUnitChoice->SetSelection( 0 );
76 fgSizer1->Add( m_STEP_OrgUnitChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
77
78 m_staticTextXpos = new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY, _("X position:"), wxDefaultPosition, wxDefaultSize, 0 );
79 m_staticTextXpos->Wrap( -1 );
80 fgSizer1->Add( m_staticTextXpos, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
81
82 m_STEP_Xorg = new TEXT_CTRL_EVAL( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
83 #ifdef __WXGTK__
84 if ( !m_STEP_Xorg->HasFlag( wxTE_MULTILINE ) )
85 {
86 m_STEP_Xorg->SetMaxLength( 8 );
87 }
88 #else
89 m_STEP_Xorg->SetMaxLength( 8 );
90 #endif
91 fgSizer1->Add( m_STEP_Xorg, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
92
93 m_staticTextYpos = new wxStaticText( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY, _("Y position:"), wxDefaultPosition, wxDefaultSize, 0 );
94 m_staticTextYpos->Wrap( -1 );
95 fgSizer1->Add( m_staticTextYpos, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
96
97 m_STEP_Yorg = new TEXT_CTRL_EVAL( sbUserDefinedOrigin->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
98 #ifdef __WXGTK__
99 if ( !m_STEP_Yorg->HasFlag( wxTE_MULTILINE ) )
100 {
101 m_STEP_Yorg->SetMaxLength( 8 );
102 }
103 #else
104 m_STEP_Yorg->SetMaxLength( 8 );
105 #endif
106 fgSizer1->Add( m_STEP_Yorg, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxRIGHT|wxLEFT, 5 );
107
108
109 sbUserDefinedOrigin->Add( fgSizer1, 1, wxEXPAND, 5 );
110
111
112 bSizer2->Add( sbUserDefinedOrigin, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
113
114 wxStaticBoxSizer* sbOtherOptions;
115 sbOtherOptions = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Other Options") ), wxVERTICAL );
116
117 m_cbRemoveDNP = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Ignore 'Do not populate' components"), wxDefaultPosition, wxDefaultSize, 0 );
118 m_cbRemoveDNP->SetToolTip( _("Do not show components marked 'Do not populate'") );
119
120 sbOtherOptions->Add( m_cbRemoveDNP, 0, wxBOTTOM|wxRIGHT, 5 );
121
122 m_cbRemoveUnspecified = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Ignore 'Unspecified' components"), wxDefaultPosition, wxDefaultSize, 0 );
123 m_cbRemoveUnspecified->SetToolTip( _("Do not show components with Footprint Type 'Unspecified'") );
124
125 sbOtherOptions->Add( m_cbRemoveUnspecified, 0, wxBOTTOM|wxRIGHT, 5 );
126
127 m_cbSubstModels = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Substitute similarly named models"), wxDefaultPosition, wxDefaultSize, 0 );
128 m_cbSubstModels->SetToolTip( _("Replace VRML models with STEP models of the same name") );
129
130 sbOtherOptions->Add( m_cbSubstModels, 0, wxBOTTOM|wxRIGHT, 5 );
131
132 m_cbOverwriteFile = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Overwrite old file"), wxDefaultPosition, wxDefaultSize, 0 );
133 sbOtherOptions->Add( m_cbOverwriteFile, 0, wxBOTTOM|wxRIGHT, 5 );
134
135 m_staticline11_hidden = new wxStaticLine( sbOtherOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
136 m_staticline11_hidden->Hide();
137
138 sbOtherOptions->Add( m_staticline11_hidden, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
139
140 m_cbOptimizeStep = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Optimize STEP file"), wxDefaultPosition, wxDefaultSize, 0 );
141 m_cbOptimizeStep->SetToolTip( _("Disables writing parametric curves. Optimizes file size and write/read times, but may reduce compatibility with other software.") );
142
143 sbOtherOptions->Add( m_cbOptimizeStep, 0, wxBOTTOM|wxRIGHT, 5 );
144
145 m_cbExportCompound_hidden = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Export as Compound shape"), wxDefaultPosition, wxDefaultSize, 0 );
147 m_cbExportCompound_hidden->SetToolTip( _("Merges all shapes into a single Compound shape. Useful for external software that does de-duplication based on shape names.") );
148
149 sbOtherOptions->Add( m_cbExportCompound_hidden, 0, wxBOTTOM|wxRIGHT, 5 );
150
151 m_staticline1 = new wxStaticLine( sbOtherOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
152 sbOtherOptions->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
153
154 m_cbExportBody = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Export board body"), wxDefaultPosition, wxDefaultSize, 0 );
155 sbOtherOptions->Add( m_cbExportBody, 0, wxBOTTOM|wxRIGHT, 5 );
156
157 m_cbExportComponents = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Export components"), wxDefaultPosition, wxDefaultSize, 0 );
158 sbOtherOptions->Add( m_cbExportComponents, 0, wxBOTTOM|wxRIGHT, 5 );
159
160 m_cbExportTracks = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Export tracks, pads and vias"), wxDefaultPosition, wxDefaultSize, 0 );
161 m_cbExportTracks->SetToolTip( _("Export tracks, pads and vias on external copper layers.") );
162
163 sbOtherOptions->Add( m_cbExportTracks, 0, wxBOTTOM|wxRIGHT, 5 );
164
165 m_cbExportZones = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Export zones"), wxDefaultPosition, wxDefaultSize, 0 );
166 m_cbExportZones->SetToolTip( _("Export zones on external copper layers.") );
167
168 sbOtherOptions->Add( m_cbExportZones, 0, wxBOTTOM|wxRIGHT, 5 );
169
170 m_cbExportInnerCopper = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Export inner copper layers"), wxDefaultPosition, wxDefaultSize, 0 );
171 sbOtherOptions->Add( m_cbExportInnerCopper, 0, wxBOTTOM|wxEXPAND|wxRIGHT, 5 );
172
173 m_cbFuseShapes = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Fuse shapes (time consuming)"), wxDefaultPosition, wxDefaultSize, 0 );
174 m_cbFuseShapes->SetToolTip( _("Combine intersecting geometry into one shape.") );
175
176 sbOtherOptions->Add( m_cbFuseShapes, 0, wxBOTTOM|wxRIGHT, 5 );
177
178 m_cbExportSilkscreen_hidden = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Export silkscreen"), wxDefaultPosition, wxDefaultSize, 0 );
180 m_cbExportSilkscreen_hidden->SetToolTip( _("Export silkscreen graphics.") );
181
182 sbOtherOptions->Add( m_cbExportSilkscreen_hidden, 0, wxBOTTOM|wxRIGHT, 5 );
183
184 m_cbExportSoldermask_hidden = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Export solder mask"), wxDefaultPosition, wxDefaultSize, 0 );
186 m_cbExportSoldermask_hidden->SetToolTip( _("Export solder mask graphics.") );
187
188 sbOtherOptions->Add( m_cbExportSoldermask_hidden, 0, wxBOTTOM|wxRIGHT, 5 );
189
190 m_cbExportSolderpaste_hidden = new wxCheckBox( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Export solder paste"), wxDefaultPosition, wxDefaultSize, 0 );
192 m_cbExportSolderpaste_hidden->SetToolTip( _("Export solder paste graphics.") );
193
194 sbOtherOptions->Add( m_cbExportSolderpaste_hidden, 0, wxBOTTOM|wxRIGHT, 5 );
195
196 m_staticTextNetFilter = new wxStaticText( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Net filter (supports wildcards):"), wxDefaultPosition, wxDefaultSize, 0 );
197 m_staticTextNetFilter->Wrap( -1 );
198 sbOtherOptions->Add( m_staticTextNetFilter, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
199
200 m_txtNetFilter = new wxTextCtrl( sbOtherOptions->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
201 m_txtNetFilter->SetToolTip( _("Only copper items belonging to nets matching this filter will be exported.") );
202
203 sbOtherOptions->Add( m_txtNetFilter, 0, wxALL|wxEXPAND, 5 );
204
205 m_staticTextTolerance = new wxStaticText( sbOtherOptions->GetStaticBox(), wxID_ANY, _("Board outline chaining tolerance:"), wxDefaultPosition, wxDefaultSize, 0 );
206 m_staticTextTolerance->Wrap( -1 );
207 sbOtherOptions->Add( m_staticTextTolerance, 0, wxLEFT|wxRIGHT|wxTOP, 5 );
208
209 wxString m_choiceToleranceChoices[] = { _("Tight (0.001 mm)"), _("Standard (0.01 mm)"), _("Loose (0.1 mm)") };
210 int m_choiceToleranceNChoices = sizeof( m_choiceToleranceChoices ) / sizeof( wxString );
211 m_choiceTolerance = new wxChoice( sbOtherOptions->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceToleranceNChoices, m_choiceToleranceChoices, 0 );
212 m_choiceTolerance->SetSelection( 1 );
213 m_choiceTolerance->SetToolTip( _("Tolerance sets the distance between two points that are considered joined when building the board outlines.") );
214
215 sbOtherOptions->Add( m_choiceTolerance, 0, wxALL|wxEXPAND, 5 );
216
217
218 bSizer2->Add( sbOtherOptions, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
219
220
221 bSizerSTEPFile->Add( bSizer2, 1, wxBOTTOM|wxEXPAND|wxTOP, 5 );
222
223 wxBoxSizer* bSizer81;
224 bSizer81 = new wxBoxSizer( wxHORIZONTAL );
225
226
227 bSizerSTEPFile->Add( bSizer81, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 10 );
228
229 m_sdbSizer = new wxStdDialogButtonSizer();
230 m_sdbSizerOK = new wxButton( this, wxID_OK );
231 m_sdbSizer->AddButton( m_sdbSizerOK );
232 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
233 m_sdbSizer->AddButton( m_sdbSizerCancel );
234 m_sdbSizer->Realize();
235
236 bSizerSTEPFile->Add( m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxRIGHT|wxTOP, 5 );
237
238
239 this->SetSizer( bSizerSTEPFile );
240 this->Layout();
241 bSizerSTEPFile->Fit( this );
242
243 this->Centre( wxBOTH );
244
245 // Connect Events
246 m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onBrowseClicked ), NULL, this );
247 m_STEP_OrgUnitChoice->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateUnits ), NULL, this );
248 m_STEP_Xorg->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateXPos ), NULL, this );
249 m_STEP_Yorg->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateYPos ), NULL, this );
250 m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onExportButton ), NULL, this );
251}
252
254{
255 // Disconnect Events
256 m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onBrowseClicked ), NULL, this );
257 m_STEP_OrgUnitChoice->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateUnits ), NULL, this );
258 m_STEP_Xorg->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateXPos ), NULL, this );
259 m_STEP_Yorg->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_EXPORT_STEP_BASE::onUpdateYPos ), NULL, this );
260 m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_STEP_BASE::onExportButton ), NULL, this );
261
262}
wxStdDialogButtonSizer * m_sdbSizer
virtual void onUpdateUnits(wxUpdateUIEvent &event)
virtual void onBrowseClicked(wxCommandEvent &event)
virtual void onExportButton(wxCommandEvent &event)
virtual void onUpdateXPos(wxUpdateUIEvent &event)
virtual void onUpdateYPos(wxUpdateUIEvent &event)
DIALOG_EXPORT_STEP_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Export STEP / BREP / XAO / GLTF"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxRadioButton * m_rbDrillAndPlotOrigin
STD_BITMAP_BUTTON * m_browseButton
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.
wxTextCtrl wrapper to handle math expression evaluation.
#define _(s)