15DIALOG_GEN_FOOTPRINT_POSITION_BASE::DIALOG_GEN_FOOTPRINT_POSITION_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( wxSize( -1,-1 ), wxDefaultSize );
21 wxFlexGridSizer* fgSizerTop;
22 fgSizerTop =
new wxFlexGridSizer( 0, 2, 5, 5 );
23 fgSizerTop->SetFlexibleDirection( wxBOTH );
24 fgSizerTop->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
26 m_variantLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Design variant:"), wxDefaultPosition, wxDefaultSize, 0 );
28 fgSizerTop->Add(
m_variantLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
30 wxArrayString m_variantChoiceCtrlChoices;
31 m_variantChoiceCtrl =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_variantChoiceCtrlChoices, 0 );
35 m_staticTextDir =
new wxStaticText(
this, wxID_ANY,
_(
"Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
37 fgSizerTop->Add(
m_staticTextDir, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
39 wxBoxSizer* bSizerdirBrowse;
40 bSizerdirBrowse =
new wxBoxSizer( wxHORIZONTAL );
42 m_outputDirectoryName =
new wxTextCtrl(
this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
43 m_outputDirectoryName->SetToolTip(
_(
"Target directory for plot files. Can be absolute or relative to the board file location.") );
49 bSizerdirBrowse->Add(
m_browseButton, 0, wxALIGN_CENTER_VERTICAL, 5 );
52 fgSizerTop->Add( bSizerdirBrowse, 1, wxEXPAND, 10 );
55 m_MainSizer->Add( fgSizerTop, 0, wxALL|wxEXPAND, 5 );
57 wxBoxSizer* bSizerMiddle;
58 bSizerMiddle =
new wxBoxSizer( wxHORIZONTAL );
60 wxFlexGridSizer* fgSizer1;
61 fgSizer1 =
new wxFlexGridSizer( 0, 2, 5, 5 );
62 fgSizer1->AddGrowableCol( 1 );
63 fgSizer1->SetFlexibleDirection( wxBOTH );
64 fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
66 m_formatLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Format:"), wxDefaultPosition, wxDefaultSize, 0 );
68 fgSizer1->Add(
m_formatLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
70 wxString m_formatCtrlChoices[] = {
_(
"Plain text"),
_(
"CSV"),
_(
"Gerber X3") };
71 int m_formatCtrlNChoices =
sizeof( m_formatCtrlChoices ) /
sizeof( wxString );
72 m_formatCtrl =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_formatCtrlNChoices, m_formatCtrlChoices, 0 );
74 fgSizer1->Add(
m_formatCtrl, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
76 m_unitsLabel =
new wxStaticText(
this, wxID_ANY,
_(
"Units:"), wxDefaultPosition, wxDefaultSize, 0 );
78 fgSizer1->Add(
m_unitsLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
80 wxString m_unitsCtrlChoices[] = {
_(
"Inches"),
_(
"Millimeters") };
81 int m_unitsCtrlNChoices =
sizeof( m_unitsCtrlChoices ) /
sizeof( wxString );
82 m_unitsCtrl =
new wxChoice(
this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitsCtrlNChoices, m_unitsCtrlChoices, 0 );
84 fgSizer1->Add(
m_unitsCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
87 bSizerMiddle->Add( fgSizer1, 1, wxEXPAND|wxBOTTOM|wxLEFT, 5 );
90 bSizer6 =
new wxBoxSizer( wxVERTICAL );
93 bSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
96 bSizerMiddle->Add( bSizer6, 1, wxEXPAND, 5 );
99 m_MainSizer->Add( bSizerMiddle, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
101 wxBoxSizer* bSizerLower;
102 bSizerLower =
new wxBoxSizer( wxVERTICAL );
104 m_onlySMD =
new wxCheckBox(
this, wxID_ANY,
_(
"Include only SMD footprints"), wxDefaultPosition, wxDefaultSize, 0 );
105 bSizerLower->Add(
m_onlySMD, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
107 m_excludeTH =
new wxCheckBox(
this, wxID_ANY,
_(
"Exclude all footprints with through hole pads"), wxDefaultPosition, wxDefaultSize, 0 );
108 bSizerLower->Add(
m_excludeTH, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
110 m_excludeDNP =
new wxCheckBox(
this, wxID_ANY,
_(
"Exclude all footprints with the Do Not Populate flag set"), wxDefaultPosition, wxDefaultSize, 0 );
111 bSizerLower->Add(
m_excludeDNP, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
113 m_excludeBOM =
new wxCheckBox(
this, wxID_ANY,
_(
"Exclude all footprints with the Exclude from BOM flag set"), wxDefaultPosition, wxDefaultSize, 0 );
114 bSizerLower->Add(
m_excludeBOM, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
116 m_cbIncludeBoardEdge =
new wxCheckBox(
this, wxID_ANY,
_(
"Include board edge layer"), wxDefaultPosition, wxDefaultSize, 0 );
119 m_useDrillPlaceOrigin =
new wxCheckBox(
this, wxID_ANY,
_(
"Use drill/place file origin"), wxDefaultPosition, wxDefaultSize, 0 );
123 m_negateXcb =
new wxCheckBox(
this, wxID_ANY,
_(
"Use negative X coordinates for footprints on bottom layer"), wxDefaultPosition, wxDefaultSize, 0 );
124 bSizerLower->Add(
m_negateXcb, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
126 m_singleFile =
new wxCheckBox(
this, wxID_ANY,
_(
"Generate single file with both front and back positions"), wxDefaultPosition, wxDefaultSize, 0 );
128 bSizerLower->Add(
m_singleFile, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
131 bSizerLower->Add( 0, 5, 0, wxEXPAND, 5 );
139 m_MainSizer->Add( bSizerLower, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
155 this->Centre( wxBOTH );