KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_import_graphics_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_IMPORT_GRAPHICS_BASE::DIALOG_IMPORT_GRAPHICS_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 wxBoxSizer* bSizerMain;
20 bSizerMain = new wxBoxSizer( wxVERTICAL );
21
22 wxBoxSizer* bSizerFile;
23 bSizerFile = new wxBoxSizer( wxHORIZONTAL );
24
25 m_staticTextFile = new wxStaticText( this, wxID_ANY, _("File:"), wxDefaultPosition, wxDefaultSize, 0 );
26 m_staticTextFile->Wrap( -1 );
27 m_staticTextFile->SetToolTip( _("Only vectors will be imported. Bitmaps and fonts will be ignored.") );
28
29 bSizerFile->Add( m_staticTextFile, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
30
31 m_textCtrlFileName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
32 m_textCtrlFileName->SetToolTip( _("Only vectors will be imported. Bitmaps and fonts will be ignored.") );
33 m_textCtrlFileName->SetMinSize( wxSize( 300,-1 ) );
34
35 bSizerFile->Add( m_textCtrlFileName, 1, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
36
37 m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
38 bSizerFile->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL, 5 );
39
40
41 bSizerMain->Add( bSizerFile, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 10 );
42
43 wxFlexGridSizer* fgSizer3;
44 fgSizer3 = new wxFlexGridSizer( 0, 3, 5, 3 );
45 fgSizer3->AddGrowableCol( 1 );
46 fgSizer3->SetFlexibleDirection( wxBOTH );
47 fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
48
49 m_importScaleLabel = new wxStaticText( this, wxID_ANY, _("Import scale:"), wxDefaultPosition, wxDefaultSize, 0 );
50 m_importScaleLabel->Wrap( -1 );
51 fgSizer3->Add( m_importScaleLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
52
53 m_importScaleCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 120,-1 ), 0 );
54 fgSizer3->Add( m_importScaleCtrl, 0, wxALIGN_CENTER_VERTICAL, 5 );
55
56
57 fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
58
59 m_lineWidthLabel = new wxStaticText( this, wxID_ANY, _("DXF default line width:"), wxDefaultPosition, wxDefaultSize, 0 );
60 m_lineWidthLabel->Wrap( -1 );
61 m_lineWidthLabel->SetToolTip( _("Used when the DXF items in file have no line thickness set") );
62
63 fgSizer3->Add( m_lineWidthLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
64
65 m_lineWidthCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
66 fgSizer3->Add( m_lineWidthCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
67
68 m_lineWidthUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
69 m_lineWidthUnits->Wrap( -1 );
70 fgSizer3->Add( m_lineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
71
72 m_dxfUnitsLabel = new wxStaticText( this, wxID_ANY, _("DXF default units:"), wxDefaultPosition, wxDefaultSize, 0 );
73 m_dxfUnitsLabel->Wrap( -1 );
74 m_dxfUnitsLabel->SetToolTip( _("Used when the DXF file has no unit set") );
75
76 fgSizer3->Add( m_dxfUnitsLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
77
78 wxArrayString m_dxfUnitsChoiceChoices;
79 m_dxfUnitsChoice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dxfUnitsChoiceChoices, 0 );
80 m_dxfUnitsChoice->SetSelection( 0 );
81 fgSizer3->Add( m_dxfUnitsChoice, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
82
83
84 bSizerMain->Add( fgSizer3, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
85
86
87 bSizerMain->Add( 0, 5, 0, wxEXPAND, 5 );
88
89 m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
90 bSizerMain->Add( m_staticline2, 0, wxEXPAND|wxALL, 5 );
91
92 wxGridBagSizer* gbSizer2;
93 gbSizer2 = new wxGridBagSizer( 0, 0 );
94 gbSizer2->SetFlexibleDirection( wxBOTH );
95 gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
96
97 m_placeAtCheckbox = new wxCheckBox( this, wxID_ANY, _("Place at:"), wxDefaultPosition, wxDefaultSize, 0 );
98 m_placeAtCheckbox->SetToolTip( _("If not checked: use interactive placement.") );
99
100 gbSizer2->Add( m_placeAtCheckbox, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
101
102 m_xLabel = new wxStaticText( this, wxID_ANY, _("X:"), wxDefaultPosition, wxDefaultSize, 0 );
103 m_xLabel->Wrap( -1 );
104 gbSizer2->Add( m_xLabel, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
105
106 m_xCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
107 #ifdef __WXGTK__
108 if ( !m_xCtrl->HasFlag( wxTE_MULTILINE ) )
109 {
110 m_xCtrl->SetMaxLength( 10 );
111 }
112 #else
113 m_xCtrl->SetMaxLength( 10 );
114 #endif
115 m_xCtrl->SetToolTip( _("DXF origin on PCB Grid, X Coordinate") );
116
117 gbSizer2->Add( m_xCtrl, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
118
119 m_yLabel = new wxStaticText( this, wxID_ANY, _("Y:"), wxDefaultPosition, wxDefaultSize, 0 );
120 m_yLabel->Wrap( -1 );
121 gbSizer2->Add( m_yLabel, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 18 );
122
123 m_yCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
124 #ifdef __WXGTK__
125 if ( !m_yCtrl->HasFlag( wxTE_MULTILINE ) )
126 {
127 m_yCtrl->SetMaxLength( 10 );
128 }
129 #else
130 m_yCtrl->SetMaxLength( 10 );
131 #endif
132 m_yCtrl->SetToolTip( _("DXF origin on PCB Grid, Y Coordinate") );
133
134 gbSizer2->Add( m_yCtrl, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT, 5 );
135
136 m_yUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
137 m_yUnits->Wrap( -1 );
138 gbSizer2->Add( m_yUnits, wxGBPosition( 0, 5 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
139
140 m_setLayerCheckbox = new wxCheckBox( this, wxID_ANY, _("Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
141 m_setLayerCheckbox->SetValue(true);
142 m_setLayerCheckbox->SetToolTip( _("If checked, use the selected layer in this dialog\nIf unchecked, use the Board Editor active layer") );
143
144 gbSizer2->Add( m_setLayerCheckbox, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
145
146 m_SelLayerBox = new PCB_LAYER_BOX_SELECTOR( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
147 gbSizer2->Add( m_SelLayerBox, wxGBPosition( 1, 2 ), wxGBSpan( 1, 3 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
148
149
150 gbSizer2->AddGrowableCol( 2 );
151 gbSizer2->AddGrowableCol( 4 );
152
153 bSizerMain->Add( gbSizer2, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
154
155 wxBoxSizer* bSizerGroupOpt;
156 bSizerGroupOpt = new wxBoxSizer( wxVERTICAL );
157
158 m_cbGroupItems = new wxCheckBox( this, wxID_ANY, _("Group imported items"), wxDefaultPosition, wxDefaultSize, 0 );
159 m_cbGroupItems->SetValue(true);
160 m_cbGroupItems->SetToolTip( _("Add all imported items to a new group") );
161
162 bSizerGroupOpt->Add( m_cbGroupItems, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
163
164
165 bSizerMain->Add( bSizerGroupOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
166
167 m_staticline3 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
168 bSizerMain->Add( m_staticline3, 0, wxEXPAND|wxALL, 5 );
169
170 wxBoxSizer* bSizer11;
171 bSizer11 = new wxBoxSizer( wxHORIZONTAL );
172
173 m_rbFixDiscontinuities = new wxCheckBox( this, wxID_ANY, _("Fix discontinuities"), wxDefaultPosition, wxDefaultSize, 0 );
174 m_rbFixDiscontinuities->SetToolTip( _("Trim/extend open shapes or add segments to make vertices of shapes coincide") );
175
176 bSizer11->Add( m_rbFixDiscontinuities, 0, wxALIGN_CENTER_VERTICAL, 5 );
177
178 m_toleranceLabel = new wxStaticText( this, wxID_ANY, _("Tolerance:"), wxDefaultPosition, wxDefaultSize, 0 );
179 m_toleranceLabel->Wrap( -1 );
180 bSizer11->Add( m_toleranceLabel, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 30 );
181
182 m_toleranceCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
183 bSizer11->Add( m_toleranceCtrl, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
184
185 m_toleranceUnits = new wxStaticText( this, wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
186 m_toleranceUnits->Wrap( -1 );
187 bSizer11->Add( m_toleranceUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
188
189
190 bSizerMain->Add( bSizer11, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
191
192
193 bSizerMain->Add( 0, 3, 1, wxEXPAND, 5 );
194
195 m_sdbSizer = new wxStdDialogButtonSizer();
196 m_sdbSizerOK = new wxButton( this, wxID_OK );
197 m_sdbSizer->AddButton( m_sdbSizerOK );
198 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
199 m_sdbSizer->AddButton( m_sdbSizerCancel );
200 m_sdbSizer->Realize();
201
202 bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
203
204
205 this->SetSizer( bSizerMain );
206 this->Layout();
207 bSizerMain->Fit( this );
208
209 this->Centre( wxBOTH );
210
211 // Connect Events
212 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_IMPORT_GRAPHICS_BASE::onUpdateUI ) );
213 m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_GRAPHICS_BASE::onBrowseFiles ), NULL, this );
214}
215
217{
218 // Disconnect Events
219 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_IMPORT_GRAPHICS_BASE::onUpdateUI ) );
220 m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_GRAPHICS_BASE::onBrowseFiles ), NULL, this );
221
222}
DIALOG_IMPORT_GRAPHICS_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)
PCB_LAYER_BOX_SELECTOR * m_SelLayerBox
virtual void onBrowseFiles(wxCommandEvent &event)
virtual void onUpdateUI(wxUpdateUIEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
Class to display a pcb layer list in a wxBitmapComboBox.
A bitmap button widget that behaves like a standard dialog button except with an icon.
#define _(s)