KiCad PCB EDA Suite
dialog_import_gfx_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_IMPORT_GFX_BASE::DIALOG_IMPORT_GFX_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* bSizerMain;
19 bSizerMain = new wxBoxSizer( wxVERTICAL );
20
21 wxBoxSizer* bSizerFile;
22 bSizerFile = new wxBoxSizer( wxHORIZONTAL );
23
24 m_staticTextFile = new wxStaticText( this, wxID_ANY, _("File:"), wxDefaultPosition, wxDefaultSize, 0 );
25 m_staticTextFile->Wrap( -1 );
26 m_staticTextFile->SetToolTip( _("Only vectors will be imported. Bitmaps and fonts will be ignored.") );
27
28 bSizerFile->Add( m_staticTextFile, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
29
30 m_textCtrlFileName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
31 m_textCtrlFileName->SetToolTip( _("Only vectors will be imported. Bitmaps and fonts will be ignored.") );
32 m_textCtrlFileName->SetMinSize( wxSize( 300,-1 ) );
33
34 bSizerFile->Add( m_textCtrlFileName, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
35
36 m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
37 bSizerFile->Add( m_browseButton, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
38
39
40 bSizerMain->Add( bSizerFile, 0, wxALL|wxEXPAND, 10 );
41
42 wxStaticBoxSizer* sbSizer2;
43 sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Placement") ), wxVERTICAL );
44
45 wxBoxSizer* bSizerOptions;
46 bSizerOptions = new wxBoxSizer( wxVERTICAL );
47
48 m_rbInteractivePlacement = new wxRadioButton( sbSizer2->GetStaticBox(), wxID_ANY, _("Interactive placement"), wxDefaultPosition, wxDefaultSize, 0 );
49 m_rbInteractivePlacement->SetValue( true );
50 bSizerOptions->Add( m_rbInteractivePlacement, 0, wxEXPAND|wxBOTTOM, 5 );
51
52 wxBoxSizer* bSizerUserPos;
53 bSizerUserPos = new wxBoxSizer( wxHORIZONTAL );
54
55 m_rbAbsolutePlacement = new wxRadioButton( sbSizer2->GetStaticBox(), wxID_ANY, _("At"), wxDefaultPosition, wxDefaultSize, 0 );
56 bSizerUserPos->Add( m_rbAbsolutePlacement, 0, wxALIGN_CENTER_VERTICAL, 5 );
57
58 wxBoxSizer* bSizerPosSettings;
59 bSizerPosSettings = new wxBoxSizer( wxHORIZONTAL );
60
61 m_xLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
62 m_xLabel->Wrap( -1 );
63 bSizerPosSettings->Add( m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
64
65 m_xCtrl = new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
66 #ifdef __WXGTK__
67 if ( !m_xCtrl->HasFlag( wxTE_MULTILINE ) )
68 {
69 m_xCtrl->SetMaxLength( 10 );
70 }
71 #else
72 m_xCtrl->SetMaxLength( 10 );
73 #endif
74 m_xCtrl->SetToolTip( _("DXF origin on PCB Grid, X Coordinate") );
75
76 bSizerPosSettings->Add( m_xCtrl, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
77
78 m_xUnits = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
79 m_xUnits->Wrap( -1 );
80 bSizerPosSettings->Add( m_xUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
81
82 m_yLabel = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
83 m_yLabel->Wrap( -1 );
84 bSizerPosSettings->Add( m_yLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
85
86 m_yCtrl = new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
87 #ifdef __WXGTK__
88 if ( !m_yCtrl->HasFlag( wxTE_MULTILINE ) )
89 {
90 m_yCtrl->SetMaxLength( 10 );
91 }
92 #else
93 m_yCtrl->SetMaxLength( 10 );
94 #endif
95 m_yCtrl->SetToolTip( _("DXF origin on PCB Grid, Y Coordinate") );
96
97 bSizerPosSettings->Add( m_yCtrl, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
98
99 m_yUnits = new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
100 m_yUnits->Wrap( -1 );
101 bSizerPosSettings->Add( m_yUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
102
103
104 bSizerUserPos->Add( bSizerPosSettings, 1, wxBOTTOM|wxEXPAND|wxRIGHT|wxTOP, 5 );
105
106
107 bSizerOptions->Add( bSizerUserPos, 0, wxEXPAND, 5 );
108
109
110 sbSizer2->Add( bSizerOptions, 0, wxEXPAND, 5 );
111
112
113 bSizerMain->Add( sbSizer2, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
114
115 wxStaticBoxSizer* sbSizer1;
116 sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Import Parameters") ), wxVERTICAL );
117
118 wxBoxSizer* bSizer7;
119 bSizer7 = new wxBoxSizer( wxHORIZONTAL );
120
121 wxFlexGridSizer* fgSizerImportSettings;
122 fgSizerImportSettings = new wxFlexGridSizer( 0, 3, 5, 5 );
123 fgSizerImportSettings->AddGrowableCol( 1 );
124 fgSizerImportSettings->SetFlexibleDirection( wxBOTH );
125 fgSizerImportSettings->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
126
127 m_staticTextBrdlayer = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Graphic layer:"), wxDefaultPosition, wxDefaultSize, 0 );
128 m_staticTextBrdlayer->Wrap( -1 );
129 fgSizerImportSettings->Add( m_staticTextBrdlayer, 0, wxALIGN_CENTER_VERTICAL, 5 );
130
131 m_SelLayerBox = new PCB_LAYER_BOX_SELECTOR( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
132 fgSizerImportSettings->Add( m_SelLayerBox, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
133
134
135 fgSizerImportSettings->Add( 0, 0, 0, 0, 5 );
136
137 m_importScaleLabel = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Import scale:"), wxDefaultPosition, wxDefaultSize, 0 );
138 m_importScaleLabel->Wrap( -1 );
139 fgSizerImportSettings->Add( m_importScaleLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
140
141 m_importScaleCtrl = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
142 fgSizerImportSettings->Add( m_importScaleCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
143
144
145 fgSizerImportSettings->Add( 0, 0, 0, 0, 5 );
146
147
148 bSizer7->Add( fgSizerImportSettings, 1, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
149
150
151 sbSizer1->Add( bSizer7, 1, wxEXPAND, 5 );
152
153 m_staticline1 = new wxStaticLine( sbSizer1->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
154 sbSizer1->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
155
156 wxBoxSizer* bSizer8;
157 bSizer8 = new wxBoxSizer( wxVERTICAL );
158
159 m_groupItems = new wxCheckBox( sbSizer1->GetStaticBox(), wxID_ANY, _("Group items"), wxDefaultPosition, wxDefaultSize, 0 );
160 m_groupItems->SetToolTip( _("Add all imported items into a new group") );
161
162 bSizer8->Add( m_groupItems, 0, wxEXPAND|wxBOTTOM, 5 );
163
164
165 sbSizer1->Add( bSizer8, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
166
167
168 bSizerMain->Add( sbSizer1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
169
170 wxStaticBoxSizer* sbSizer3;
171 sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("DXF Parameters") ), wxVERTICAL );
172
173 wxBoxSizer* bSizer81;
174 bSizer81 = new wxBoxSizer( wxHORIZONTAL );
175
176 wxFlexGridSizer* fgDxfImportSettings;
177 fgDxfImportSettings = new wxFlexGridSizer( 0, 3, 5, 5 );
178 fgDxfImportSettings->AddGrowableCol( 1 );
179 fgDxfImportSettings->SetFlexibleDirection( wxBOTH );
180 fgDxfImportSettings->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
181
182 m_lineWidthLabel = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("Default line width:"), wxDefaultPosition, wxDefaultSize, 0 );
183 m_lineWidthLabel->Wrap( -1 );
184 fgDxfImportSettings->Add( m_lineWidthLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
185
186 m_lineWidthCtrl = new wxTextCtrl( sbSizer3->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
187 fgDxfImportSettings->Add( m_lineWidthCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
188
189 m_lineWidthUnits = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
190 m_lineWidthUnits->Wrap( -1 );
191 fgDxfImportSettings->Add( m_lineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
192
193 m_staticTextLineWidth1 = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("Default units:"), wxDefaultPosition, wxDefaultSize, 0 );
194 m_staticTextLineWidth1->Wrap( -1 );
195 fgDxfImportSettings->Add( m_staticTextLineWidth1, 0, wxALIGN_CENTER_VERTICAL, 5 );
196
197 wxArrayString m_choiceDxfUnitsChoices;
198 m_choiceDxfUnits = new wxChoice( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceDxfUnitsChoices, 0 );
199 m_choiceDxfUnits->SetSelection( 0 );
200 fgDxfImportSettings->Add( m_choiceDxfUnits, 0, wxEXPAND, 5 );
201
202
203 fgDxfImportSettings->Add( 0, 0, 1, wxEXPAND, 5 );
204
205
206 bSizer81->Add( fgDxfImportSettings, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
207
208
209 sbSizer3->Add( bSizer81, 1, wxEXPAND, 5 );
210
211
212 bSizerMain->Add( sbSizer3, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
213
214 m_sdbSizer = new wxStdDialogButtonSizer();
215 m_sdbSizerOK = new wxButton( this, wxID_OK );
216 m_sdbSizer->AddButton( m_sdbSizerOK );
217 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
218 m_sdbSizer->AddButton( m_sdbSizerCancel );
219 m_sdbSizer->Realize();
220
221 bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
222
223
224 this->SetSizer( bSizerMain );
225 this->Layout();
226 bSizerMain->Fit( this );
227
228 this->Centre( wxBOTH );
229
230 // Connect Events
231 m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_GFX_BASE::onBrowseFiles ), NULL, this );
232 m_rbInteractivePlacement->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_IMPORT_GFX_BASE::onInteractivePlacement ), NULL, this );
233 m_rbInteractivePlacement->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_IMPORT_GFX_BASE::originOptionOnUpdateUI ), NULL, this );
234 m_rbAbsolutePlacement->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_IMPORT_GFX_BASE::onAbsolutePlacement ), NULL, this );
235 m_rbAbsolutePlacement->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_IMPORT_GFX_BASE::originOptionOnUpdateUI ), NULL, this );
236 m_groupItems->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_GFX_BASE::onGroupItems ), NULL, this );
237}
238
240{
241 // Disconnect Events
242 m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_GFX_BASE::onBrowseFiles ), NULL, this );
243 m_rbInteractivePlacement->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_IMPORT_GFX_BASE::onInteractivePlacement ), NULL, this );
244 m_rbInteractivePlacement->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_IMPORT_GFX_BASE::originOptionOnUpdateUI ), NULL, this );
245 m_rbAbsolutePlacement->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_IMPORT_GFX_BASE::onAbsolutePlacement ), NULL, this );
246 m_rbAbsolutePlacement->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_IMPORT_GFX_BASE::originOptionOnUpdateUI ), NULL, this );
247 m_groupItems->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_GFX_BASE::onGroupItems ), NULL, this );
248
249}
virtual void onAbsolutePlacement(wxCommandEvent &event)
PCB_LAYER_BOX_SELECTOR * m_SelLayerBox
wxRadioButton * m_rbInteractivePlacement
virtual void onBrowseFiles(wxCommandEvent &event)
DIALOG_IMPORT_GFX_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Import Vector Graphics File"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void onInteractivePlacement(wxCommandEvent &event)
virtual void onGroupItems(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer
virtual void originOptionOnUpdateUI(wxUpdateUIEvent &event)
wxRadioButton * m_rbAbsolutePlacement
wxStaticText * m_staticTextLineWidth1
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
Class to display a pcb layer list in a wxBitmapComboBox.
#define _(s)