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 )
16 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
18 wxBoxSizer* bSizerMain;
19 bSizerMain =
new wxBoxSizer( wxVERTICAL );
21 wxBoxSizer* bSizerFile;
22 bSizerFile =
new wxBoxSizer( wxHORIZONTAL );
24 m_staticTextFile =
new wxStaticText(
this, wxID_ANY,
_(
"File:"), wxDefaultPosition, wxDefaultSize, 0 );
26 m_staticTextFile->SetToolTip(
_(
"Only vectors will be imported. Bitmaps and fonts will be ignored.") );
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.") );
40 bSizerMain->Add( bSizerFile, 0, wxALL|wxEXPAND, 10 );
42 wxStaticBoxSizer* sbSizer2;
43 sbSizer2 =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Placement") ), wxVERTICAL );
45 wxBoxSizer* bSizerOptions;
46 bSizerOptions =
new wxBoxSizer( wxVERTICAL );
48 m_rbInteractivePlacement =
new wxRadioButton( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"Interactive placement"), wxDefaultPosition, wxDefaultSize, 0 );
52 wxBoxSizer* bSizerUserPos;
53 bSizerUserPos =
new wxBoxSizer( wxHORIZONTAL );
55 m_rbAbsolutePlacement =
new wxRadioButton( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"At"), wxDefaultPosition, wxDefaultSize, 0 );
58 wxBoxSizer* bSizerPosSettings;
59 bSizerPosSettings =
new wxBoxSizer( wxHORIZONTAL );
61 m_xLabel =
new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"X:"), wxDefaultPosition, wxDefaultSize, 0 );
63 bSizerPosSettings->Add(
m_xLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
65 m_xCtrl =
new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
67 if ( !
m_xCtrl->HasFlag( wxTE_MULTILINE ) )
74 m_xCtrl->SetToolTip(
_(
"DXF origin on PCB Grid, X Coordinate") );
76 bSizerPosSettings->Add(
m_xCtrl, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
78 m_xUnits =
new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
80 bSizerPosSettings->Add(
m_xUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
82 m_yLabel =
new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"Y:"), wxDefaultPosition, wxDefaultSize, 0 );
84 bSizerPosSettings->Add(
m_yLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
86 m_yCtrl =
new wxTextCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
88 if ( !
m_yCtrl->HasFlag( wxTE_MULTILINE ) )
95 m_yCtrl->SetToolTip(
_(
"DXF origin on PCB Grid, Y Coordinate") );
97 bSizerPosSettings->Add(
m_yCtrl, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
99 m_yUnits =
new wxStaticText( sbSizer2->GetStaticBox(), wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
101 bSizerPosSettings->Add(
m_yUnits, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
104 bSizerUserPos->Add( bSizerPosSettings, 1, wxBOTTOM|wxEXPAND|wxRIGHT|wxTOP, 5 );
107 bSizerOptions->Add( bSizerUserPos, 0, wxEXPAND, 5 );
110 sbSizer2->Add( bSizerOptions, 0, wxEXPAND|wxTOP|wxLEFT, 5 );
113 bSizerMain->Add( sbSizer2, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
115 wxStaticBoxSizer* sbSizer1;
116 sbSizer1 =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"Import Parameters") ), wxVERTICAL );
119 bSizer7 =
new wxBoxSizer( wxHORIZONTAL );
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 );
127 m_importScaleLabel =
new wxStaticText( sbSizer1->GetStaticBox(), wxID_ANY,
_(
"Import scale:"), wxDefaultPosition, wxDefaultSize, 0 );
131 m_importScaleCtrl =
new wxTextCtrl( sbSizer1->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
132 fgSizerImportSettings->Add(
m_importScaleCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
135 fgSizerImportSettings->Add( 0, 0, 0, 0, 5 );
138 bSizer7->Add( fgSizerImportSettings, 1, wxEXPAND|wxALL, 5 );
141 sbSizer1->Add( bSizer7, 1, wxEXPAND, 5 );
144 bSizerMain->Add( sbSizer1, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 10 );
146 wxStaticBoxSizer* sbSizer3;
147 sbSizer3 =
new wxStaticBoxSizer(
new wxStaticBox(
this, wxID_ANY,
_(
"DXF Parameters") ), wxVERTICAL );
149 wxBoxSizer* bSizer81;
150 bSizer81 =
new wxBoxSizer( wxHORIZONTAL );
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 );
158 m_lineWidthLabel =
new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY,
_(
"Default line width:"), wxDefaultPosition, wxDefaultSize, 0 );
160 fgDxfImportSettings->Add(
m_lineWidthLabel, 0, wxALIGN_CENTER_VERTICAL, 5 );
162 m_lineWidthCtrl =
new wxTextCtrl( sbSizer3->GetStaticBox(), wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
163 fgDxfImportSettings->Add(
m_lineWidthCtrl, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
165 m_lineWidthUnits =
new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY,
_(
"mm"), wxDefaultPosition, wxDefaultSize, 0 );
167 fgDxfImportSettings->Add(
m_lineWidthUnits, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxTOP, 5 );
169 m_staticTextLineWidth1 =
new wxStaticText( sbSizer3->GetStaticBox(), wxID_ANY,
_(
"Default units:"), wxDefaultPosition, wxDefaultSize, 0 );
173 wxArrayString m_choiceDxfUnitsChoices;
174 m_choiceDxfUnits =
new wxChoice( sbSizer3->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, m_choiceDxfUnitsChoices, 0 );
179 fgDxfImportSettings->Add( 0, 0, 1, wxEXPAND, 5 );
182 bSizer81->Add( fgDxfImportSettings, 1, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 );
185 sbSizer3->Add( bSizer81, 1, wxEXPAND, 5 );
188 bSizerMain->Add( sbSizer3, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
197 bSizerMain->Add(
m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
200 this->SetSizer( bSizerMain );
202 bSizerMain->Fit(
this );
204 this->Centre( wxBOTH );
wxTextCtrl * m_lineWidthCtrl
STD_BITMAP_BUTTON * m_browseButton
wxStaticText * m_importScaleLabel
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)
wxStaticText * m_lineWidthUnits
wxRadioButton * m_rbInteractivePlacement
wxStaticText * m_staticTextFile
wxRadioButton * m_rbAbsolutePlacement
wxChoice * m_choiceDxfUnits
virtual void onAbsolutePlacement(wxCommandEvent &event)
~DIALOG_IMPORT_GFX_SCH_BASE()
wxStaticText * m_staticTextLineWidth1
virtual void onInteractivePlacement(wxCommandEvent &event)
wxButton * m_sdbSizerCancel
virtual void onBrowseFiles(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer
virtual void originOptionOnUpdateUI(wxUpdateUIEvent &event)
wxTextCtrl * m_textCtrlFileName
wxTextCtrl * m_importScaleCtrl
wxStaticText * m_lineWidthLabel
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...