KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_export_idf_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_EXPORT_IDF3_BASE::DIALOG_EXPORT_IDF3_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* bSizerIDFFile;
19 bSizerIDFFile = new wxBoxSizer( wxVERTICAL );
20
21 m_txtBrdFile = new wxStaticText( this, wxID_ANY, _("File name:"), wxDefaultPosition, wxDefaultSize, 0 );
22 m_txtBrdFile->Wrap( -1 );
23 bSizerIDFFile->Add( m_txtBrdFile, 0, wxTOP|wxRIGHT|wxLEFT, 10 );
24
25 m_filePickerIDF = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Select an IDF export filename"), _("*.emn"), wxDefaultPosition, wxSize( 450,-1 ), wxFLP_OVERWRITE_PROMPT|wxFLP_SAVE|wxFLP_USE_TEXTCTRL );
26 bSizerIDFFile->Add( m_filePickerIDF, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
27
28 wxBoxSizer* bSizer2;
29 bSizer2 = new wxBoxSizer( wxVERTICAL );
30
31 wxBoxSizer* bSizer6;
32 bSizer6 = new wxBoxSizer( wxHORIZONTAL );
33
34 wxStaticBoxSizer* sbsGeneral;
35 sbsGeneral = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Board options") ), wxVERTICAL );
36
37 wxBoxSizer* bSizer3;
38 bSizer3 = new wxBoxSizer( wxHORIZONTAL );
39
40 m_outputUnitsLabel = new wxStaticText( sbsGeneral->GetStaticBox(), wxID_ANY, _("Output units:"), wxDefaultPosition, wxDefaultSize, 0 );
41 m_outputUnitsLabel->Wrap( -1 );
42 bSizer3->Add( m_outputUnitsLabel, 0, wxALL, 5 );
43
44 wxString m_outputUnitsChoiceChoices[] = { _("Millimeters"), _("Mils") };
45 int m_outputUnitsChoiceNChoices = sizeof( m_outputUnitsChoiceChoices ) / sizeof( wxString );
46 m_outputUnitsChoice = new wxChoice( sbsGeneral->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_outputUnitsChoiceNChoices, m_outputUnitsChoiceChoices, 0 );
47 m_outputUnitsChoice->SetSelection( 0 );
48 bSizer3->Add( m_outputUnitsChoice, 0, wxALL, 5 );
49
50
51 sbsGeneral->Add( bSizer3, 0, wxEXPAND, 5 );
52
53
54 sbsGeneral->Add( 0, 20, 0, wxEXPAND, 5 );
55
56 wxBoxSizer* bSizer5;
57 bSizer5 = new wxBoxSizer( wxVERTICAL );
58
59 m_staticText8 = new wxStaticText( sbsGeneral->GetStaticBox(), wxID_ANY, _("Coordinate Origin"), wxDefaultPosition, wxDefaultSize, 0 );
60 m_staticText8->Wrap( -1 );
61 bSizer5->Add( m_staticText8, 0, wxALL, 5 );
62
63 m_staticline1 = new wxStaticLine( sbsGeneral->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
64 bSizer5->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
65
66 m_rbOriginBoardCenter = new wxRadioButton( sbsGeneral->GetStaticBox(), wxID_ANY, _("Board center origin"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
67 m_rbOriginBoardCenter->SetValue( true );
68 bSizer5->Add( m_rbOriginBoardCenter, 0, wxALL, 5 );
69
70 m_rbOriginDrill = new wxRadioButton( sbsGeneral->GetStaticBox(), wxID_ANY, _("Drill/place file origin"), wxDefaultPosition, wxDefaultSize, 0 );
71 bSizer5->Add( m_rbOriginDrill, 0, wxALL, 5 );
72
73 m_rbOriginGrid = new wxRadioButton( sbsGeneral->GetStaticBox(), wxID_ANY, _("Grid origin"), wxDefaultPosition, wxDefaultSize, 0 );
74 bSizer5->Add( m_rbOriginGrid, 0, wxALL, 5 );
75
76 m_rbOriginUser = new wxRadioButton( sbsGeneral->GetStaticBox(), wxID_ANY, _("User defined origin"), wxDefaultPosition, wxDefaultSize, 0 );
77 bSizer5->Add( m_rbOriginUser, 0, wxALL, 5 );
78
79
80 sbsGeneral->Add( bSizer5, 0, wxEXPAND, 5 );
81
82 wxGridBagSizer* gbSizer1;
83 gbSizer1 = new wxGridBagSizer( 2, 3 );
84 gbSizer1->SetFlexibleDirection( wxBOTH );
85 gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
86
87 m_xLabel = new wxStaticText( sbsGeneral->GetStaticBox(), wxID_ANY, _("X position:"), wxDefaultPosition, wxDefaultSize, 0 );
88 m_xLabel->Wrap( -1 );
89 gbSizer1->Add( m_xLabel, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 23 );
90
91 m_IDF_Xref = new TEXT_CTRL_EVAL( sbsGeneral->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
92 #ifdef __WXGTK__
93 if ( !m_IDF_Xref->HasFlag( wxTE_MULTILINE ) )
94 {
95 m_IDF_Xref->SetMaxLength( 8 );
96 }
97 #else
98 m_IDF_Xref->SetMaxLength( 8 );
99 #endif
100 gbSizer1->Add( m_IDF_Xref, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
101
102 m_xUnits = new wxStaticText( sbsGeneral->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
103 m_xUnits->Wrap( -1 );
104 gbSizer1->Add( m_xUnits, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
105
106 m_yLabel = new wxStaticText( sbsGeneral->GetStaticBox(), wxID_ANY, _("Y position:"), wxDefaultPosition, wxDefaultSize, 0 );
107 m_yLabel->Wrap( -1 );
108 gbSizer1->Add( m_yLabel, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 23 );
109
110 m_IDF_Yref = new TEXT_CTRL_EVAL( sbsGeneral->GetStaticBox(), wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
111 #ifdef __WXGTK__
112 if ( !m_IDF_Yref->HasFlag( wxTE_MULTILINE ) )
113 {
114 m_IDF_Yref->SetMaxLength( 8 );
115 }
116 #else
117 m_IDF_Yref->SetMaxLength( 8 );
118 #endif
119 gbSizer1->Add( m_IDF_Yref, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
120
121 m_yUnits = new wxStaticText( sbsGeneral->GetStaticBox(), wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 );
122 m_yUnits->Wrap( -1 );
123 gbSizer1->Add( m_yUnits, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
124
125
126 sbsGeneral->Add( gbSizer1, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
127
128
129 bSizer6->Add( sbsGeneral, 1, wxALL|wxEXPAND, 5 );
130
131 wxStaticBoxSizer* sbsComponents;
132 sbsComponents = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Component options") ), wxVERTICAL );
133
134 m_cbRemoveDNP = new wxCheckBox( sbsComponents->GetStaticBox(), wxID_ANY, _("Ignore 'Do not populate' components"), wxDefaultPosition, wxDefaultSize, 0 );
135 sbsComponents->Add( m_cbRemoveDNP, 0, wxALL, 5 );
136
137 m_cbRemoveUnspecified = new wxCheckBox( sbsComponents->GetStaticBox(), wxID_ANY, _("Ignore 'Unspecified' components"), wxDefaultPosition, wxDefaultSize, 0 );
138 sbsComponents->Add( m_cbRemoveUnspecified, 0, wxALL, 5 );
139
140 m_cbHeightFromModels = new wxCheckBox( sbsComponents->GetStaticBox(), wxID_ANY, _("Calculate component height from 3D models"), wxDefaultPosition, wxDefaultSize, 0 );
141 m_cbHeightFromModels->SetValue(true);
142 m_cbHeightFromModels->SetToolTip( _("When enabled, any footprint with an explicit height not specified will be exported with the height from its tallest visible 3D model. When disabled, footprints without an explicit height will not be included in the IDF file.") );
143
144 sbsComponents->Add( m_cbHeightFromModels, 0, wxALL, 5 );
145
146 wxBoxSizer* bSizer61;
147 bSizer61 = new wxBoxSizer( wxHORIZONTAL );
148
149 m_stPartNumberField = new wxStaticText( sbsComponents->GetStaticBox(), wxID_ANY, _("Part number field:"), wxDefaultPosition, wxDefaultSize, 0 );
150 m_stPartNumberField->Wrap( -1 );
151 m_stPartNumberField->SetToolTip( _("Which footprint field to export as the part number in the IDF library file") );
152
153 bSizer61->Add( m_stPartNumberField, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
154
155 wxArrayString m_choicePartNumberFieldChoices;
156 m_choicePartNumberField = new wxChoice( sbsComponents->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choicePartNumberFieldChoices, 0 );
157 m_choicePartNumberField->SetSelection( 0 );
158 m_choicePartNumberField->SetToolTip( _("Which footprint field to export as the part number in the IDF library file") );
159
160 bSizer61->Add( m_choicePartNumberField, 1, wxALL, 5 );
161
162
163 sbsComponents->Add( bSizer61, 0, wxEXPAND, 5 );
164
165
166 bSizer6->Add( sbsComponents, 1, wxALL|wxEXPAND, 5 );
167
168
169 bSizer2->Add( bSizer6, 0, wxALL|wxEXPAND, 5 );
170
171 wxStaticBoxSizer* sbSizer4;
172 sbSizer4 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Log") ), wxVERTICAL );
173
174 m_tcLog = new wxTextCtrl( sbSizer4->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,80 ), wxTE_MULTILINE|wxTE_READONLY );
175 sbSizer4->Add( m_tcLog, 1, wxEXPAND, 5 );
176
177
178 bSizer2->Add( sbSizer4, 1, wxALL|wxEXPAND, 5 );
179
180
181 bSizerIDFFile->Add( bSizer2, 1, wxEXPAND, 5 );
182
183 m_sdbSizer = new wxStdDialogButtonSizer();
184 m_sdbSizerOK = new wxButton( this, wxID_OK );
185 m_sdbSizer->AddButton( m_sdbSizerOK );
186 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
187 m_sdbSizer->AddButton( m_sdbSizerCancel );
188 m_sdbSizer->Realize();
189
190 bSizerIDFFile->Add( m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
191
192
193 this->SetSizer( bSizerIDFFile );
194 this->Layout();
195 bSizerIDFFile->Fit( this );
196
197 this->Centre( wxBOTH );
198
199 // Connect Events
200 m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_IDF3_BASE::OnOKButton ), NULL, this );
201}
202
204{
205 // Disconnect Events
206 m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXPORT_IDF3_BASE::OnOKButton ), NULL, this );
207
208}
wxStdDialogButtonSizer * m_sdbSizer
wxFilePickerCtrl * m_filePickerIDF
DIALOG_EXPORT_IDF3_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Export IDFv3"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnOKButton(wxCommandEvent &event)
DIALOG_SHIM(wxWindow *aParent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER, const wxString &name=wxDialogNameStr)
wxTextCtrl wrapper to handle math expression evaluation.
#define _(s)