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 )
17 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
19 wxBoxSizer* bSizerMain;
20 bSizerMain =
new wxBoxSizer( wxVERTICAL );
22 wxBoxSizer* bSizerFile;
23 bSizerFile =
new wxBoxSizer( wxHORIZONTAL );
25 m_staticTextFile =
new wxStaticText(
this, wxID_ANY,
_(
"File:"), wxDefaultPosition, wxDefaultSize, 0 );
27 m_staticTextFile->SetToolTip(
_(
"Only vectors will be imported. Bitmaps and fonts will be ignored.") );
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.") );
41 bSizerMain->Add( bSizerFile, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 10 );
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 );
49 m_importScaleLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Import scale:"), wxDefaultPosition, wxDefaultSize, 0 );
53 m_importScaleCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 120,-1 ), 0 );
57 fgSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
59 m_lineWidthLabel =
new wxStaticText(
this, wxID_ANY,
_(
"DXF default line width:"), wxDefaultPosition, wxDefaultSize, 0 );
61 m_lineWidthLabel->SetToolTip(
_(
"Used when the DXF items in file have no line thickness set") );
65 m_lineWidthCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
66 fgSizer3->Add(
m_lineWidthCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
68 m_lineWidthUnits =
new wxStaticText(
this, wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
72 m_dxfUnitsLabel =
new wxStaticText(
this, wxID_ANY,
_(
"DXF default units:"), wxDefaultPosition, wxDefaultSize, 0 );
78 wxArrayString m_dxfUnitsChoiceChoices;
79 m_dxfUnitsChoice =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_dxfUnitsChoiceChoices, 0 );
84 bSizerMain->Add( fgSizer3, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
87 bSizerMain->Add( 0, 5, 0, wxEXPAND, 5 );
89 m_staticline2 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
92 wxGridBagSizer* gbSizer2;
93 gbSizer2 =
new wxGridBagSizer( 0, 0 );
94 gbSizer2->SetFlexibleDirection( wxBOTH );
95 gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
97 m_placeAtCheckbox =
new wxCheckBox(
this, wxID_ANY,
_(
"Place at:"), wxDefaultPosition, wxDefaultSize, 0 );
100 gbSizer2->Add(
m_placeAtCheckbox, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
102 m_xLabel =
new wxStaticText(
this, wxID_ANY,
_(
"X:"), wxDefaultPosition, wxDefaultSize, 0 );
104 gbSizer2->Add(
m_xLabel, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
106 m_xCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
108 if ( !
m_xCtrl->HasFlag( wxTE_MULTILINE ) )
115 m_xCtrl->SetToolTip(
_(
"DXF origin on PCB Grid, X Coordinate") );
117 gbSizer2->Add(
m_xCtrl, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
119 m_yLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Y:"), wxDefaultPosition, wxDefaultSize, 0 );
121 gbSizer2->Add(
m_yLabel, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 18 );
123 m_yCtrl =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
125 if ( !
m_yCtrl->HasFlag( wxTE_MULTILINE ) )
132 m_yCtrl->SetToolTip(
_(
"DXF origin on PCB Grid, Y Coordinate") );
134 gbSizer2->Add(
m_yCtrl, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT, 5 );
136 m_yUnits =
new wxStaticText(
this, wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
138 gbSizer2->Add(
m_yUnits, wxGBPosition( 0, 5 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
140 m_setLayerCheckbox =
new wxCheckBox(
this, wxID_ANY,
_(
"Layer:"), wxDefaultPosition, wxDefaultSize, 0 );
142 m_setLayerCheckbox->SetToolTip(
_(
"If checked, use the selected layer in this dialog\nIf unchecked, use the Board Editor active layer") );
144 gbSizer2->Add(
m_setLayerCheckbox, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
147 gbSizer2->Add(
m_SelLayerBox, wxGBPosition( 1, 2 ), wxGBSpan( 1, 3 ), wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
150 gbSizer2->AddGrowableCol( 2 );
151 gbSizer2->AddGrowableCol( 4 );
153 bSizerMain->Add( gbSizer2, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
155 wxBoxSizer* bSizerGroupOpt;
156 bSizerGroupOpt =
new wxBoxSizer( wxVERTICAL );
158 m_cbGroupItems =
new wxCheckBox(
this, wxID_ANY,
_(
"Group imported items"), wxDefaultPosition, wxDefaultSize, 0 );
160 m_cbGroupItems->SetToolTip(
_(
"Add all imported items to a new group") );
162 bSizerGroupOpt->Add(
m_cbGroupItems, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
165 bSizerMain->Add( bSizerGroupOpt, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
167 m_staticline3 =
new wxStaticLine(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
170 wxBoxSizer* bSizer11;
171 bSizer11 =
new wxBoxSizer( wxHORIZONTAL );
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") );
178 m_toleranceLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Tolerance:"), wxDefaultPosition, wxDefaultSize, 0 );
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 );
185 m_toleranceUnits =
new wxStaticText(
this, wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
187 bSizer11->Add(
m_toleranceUnits, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
190 bSizerMain->Add( bSizer11, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
193 bSizerMain->Add( 0, 3, 1, wxEXPAND, 5 );
202 bSizerMain->Add(
m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
205 this->SetSizer( bSizerMain );
207 bSizerMain->Fit(
this );
209 this->Centre( wxBOTH );
wxTextCtrl * m_lineWidthCtrl
wxStaticText * m_dxfUnitsLabel
wxStaticText * m_importScaleLabel
wxStaticText * m_lineWidthLabel
wxChoice * m_dxfUnitsChoice
wxStaticText * m_toleranceUnits
wxCheckBox * m_placeAtCheckbox
wxStdDialogButtonSizer * m_sdbSizer
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)
wxButton * m_sdbSizerCancel
wxCheckBox * m_rbFixDiscontinuities
wxCheckBox * m_setLayerCheckbox
wxStaticText * m_lineWidthUnits
PCB_LAYER_BOX_SELECTOR * m_SelLayerBox
wxStaticText * m_staticTextFile
wxStaticText * m_toleranceLabel
wxCheckBox * m_cbGroupItems
virtual void onBrowseFiles(wxCommandEvent &event)
wxTextCtrl * m_toleranceCtrl
wxTextCtrl * m_importScaleCtrl
~DIALOG_IMPORT_GRAPHICS_BASE()
wxStaticLine * m_staticline2
wxStaticLine * m_staticline3
wxTextCtrl * m_textCtrlFileName
STD_BITMAP_BUTTON * m_browseButton
virtual void onUpdateUI(wxUpdateUIEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Class to display a pcb layer list in a wxBitmapComboBox.