KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_import_gfx_sch_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b3)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
13
14DIALOG_IMPORT_GFX_SCH_BASE::DIALOG_IMPORT_GFX_SCH_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, 5 );
35
36 m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
37 bSizerFile->Add( m_browseButton, 0, wxTOP|wxBOTTOM, 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|wxTOP|wxLEFT, 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_importScaleLabel = new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY, _("Import scale:"), wxDefaultPosition, wxDefaultSize, 0 );
128 m_importScaleLabel->Wrap( -1 );
129 fgSizerImportSettings->Add( m_importScaleLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
130
131 m_importScaleCtrl = new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
132 fgSizerImportSettings->Add( m_importScaleCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
133
134
135 fgSizerImportSettings->Add( 0, 0, 0, 0, 5 );
136
137
138 bSizer7->Add( fgSizerImportSettings, 1, wxEXPAND|wxALL, 5 );
139
140
141 sbSizer1->Add( bSizer7, 1, wxEXPAND, 5 );
142
143
144 bSizerMain->Add( sbSizer1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
145
146 wxStaticBoxSizer* sbSizer3;
147 sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("DXF Parameters") ), wxVERTICAL );
148
149 wxBoxSizer* bSizer81;
150 bSizer81 = new wxBoxSizer( wxHORIZONTAL );
151
152 wxFlexGridSizer* fgDxfImportSettings;
153 fgDxfImportSettings = new wxFlexGridSizer( 0, 3, 5, 5 );
154 fgDxfImportSettings->AddGrowableCol( 1 );
155 fgDxfImportSettings->SetFlexibleDirection( wxBOTH );
156 fgDxfImportSettings->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
157
158 m_lineWidthLabel = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("Default line width:"), wxDefaultPosition, wxDefaultSize, 0 );
159 m_lineWidthLabel->Wrap( -1 );
160 fgDxfImportSettings->Add( m_lineWidthLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
161
162 m_lineWidthCtrl = new wxTextCtrl( sbSizer3->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
163 fgDxfImportSettings->Add( m_lineWidthCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
164
165 m_lineWidthUnits = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("mm"), wxDefaultPosition, wxDefaultSize, 0 );
166 m_lineWidthUnits->Wrap( -1 );
167 fgDxfImportSettings->Add( m_lineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
168
169 m_staticTextLineWidth1 = new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY, _("Default units:"), wxDefaultPosition, wxDefaultSize, 0 );
170 m_staticTextLineWidth1->Wrap( -1 );
171 fgDxfImportSettings->Add( m_staticTextLineWidth1, 0, wxALIGN_CENTER_VERTICAL, 5 );
172
173 wxArrayString m_choiceDxfUnitsChoices;
174 m_choiceDxfUnits = new wxChoice( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceDxfUnitsChoices, 0 );
175 m_choiceDxfUnits->SetSelection( 0 );
176 fgDxfImportSettings->Add( m_choiceDxfUnits, 0, wxEXPAND, 5 );
177
178
179 fgDxfImportSettings->Add( 0, 0, 1, wxEXPAND, 5 );
180
181
182 bSizer81->Add( fgDxfImportSettings, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
183
184
185 sbSizer3->Add( bSizer81, 1, wxEXPAND, 5 );
186
187
188 bSizerMain->Add( sbSizer3, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
189
190 m_sdbSizer = new wxStdDialogButtonSizer();
191 m_sdbSizerOK = new wxButton( this, wxID_OK );
192 m_sdbSizer->AddButton( m_sdbSizerOK );
193 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
194 m_sdbSizer->AddButton( m_sdbSizerCancel );
195 m_sdbSizer->Realize();
196
197 bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
198
199
200 this->SetSizer( bSizerMain );
201 this->Layout();
202 bSizerMain->Fit( this );
203
204 this->Centre( wxBOTH );
205
206 // Connect Events
207 m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_GFX_SCH_BASE::onBrowseFiles ), NULL, this );
208 m_rbInteractivePlacement->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_IMPORT_GFX_SCH_BASE::onInteractivePlacement ), NULL, this );
209 m_rbInteractivePlacement->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_IMPORT_GFX_SCH_BASE::originOptionOnUpdateUI ), NULL, this );
210 m_rbAbsolutePlacement->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_IMPORT_GFX_SCH_BASE::onAbsolutePlacement ), NULL, this );
211 m_rbAbsolutePlacement->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_IMPORT_GFX_SCH_BASE::originOptionOnUpdateUI ), NULL, this );
212}
213
215{
216 // Disconnect Events
217 m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_IMPORT_GFX_SCH_BASE::onBrowseFiles ), NULL, this );
218 m_rbInteractivePlacement->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_IMPORT_GFX_SCH_BASE::onInteractivePlacement ), NULL, this );
219 m_rbInteractivePlacement->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_IMPORT_GFX_SCH_BASE::originOptionOnUpdateUI ), NULL, this );
220 m_rbAbsolutePlacement->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( DIALOG_IMPORT_GFX_SCH_BASE::onAbsolutePlacement ), NULL, this );
221 m_rbAbsolutePlacement->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_IMPORT_GFX_SCH_BASE::originOptionOnUpdateUI ), NULL, this );
222
223}
DIALOG_IMPORT_GFX_SCH_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 onAbsolutePlacement(wxCommandEvent &event)
virtual void onInteractivePlacement(wxCommandEvent &event)
virtual void onBrowseFiles(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer
virtual void originOptionOnUpdateUI(wxUpdateUIEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
A bitmap button widget that behaves like a standard dialog button except with an icon.
#define _(s)