KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_gen_footprint_position_file_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
10
12
14
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 )
16{
17 this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
18
19 m_MainSizer = new wxBoxSizer( wxVERTICAL );
20
21 wxFlexGridSizer* fgSizerTop;
22 fgSizerTop = new wxFlexGridSizer( 0, 2, 5, 5 );
23 fgSizerTop->SetFlexibleDirection( wxBOTH );
24 fgSizerTop->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
25
26 m_variantLabel = new wxStaticText( this, wxID_ANY, _("Design variant:"), wxDefaultPosition, wxDefaultSize, 0 );
27 m_variantLabel->Wrap( -1 );
28 fgSizerTop->Add( m_variantLabel, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
29
30 wxArrayString m_variantChoiceCtrlChoices;
31 m_variantChoiceCtrl = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_variantChoiceCtrlChoices, 0 );
32 m_variantChoiceCtrl->SetSelection( 0 );
33 fgSizerTop->Add( m_variantChoiceCtrl, 0, wxEXPAND, 5 );
34
35 m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
36 m_staticTextDir->Wrap( -1 );
37 fgSizerTop->Add( m_staticTextDir, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
38
39 wxBoxSizer* bSizerdirBrowse;
40 bSizerdirBrowse = new wxBoxSizer( wxHORIZONTAL );
41
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.") );
44 m_outputDirectoryName->SetMinSize( wxSize( 350,-1 ) );
45
46 bSizerdirBrowse->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL, 5 );
47
48 m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
49 bSizerdirBrowse->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL, 5 );
50
51
52 fgSizerTop->Add( bSizerdirBrowse, 1, wxEXPAND, 10 );
53
54
55 m_MainSizer->Add( fgSizerTop, 0, wxALL|wxEXPAND, 5 );
56
57 wxBoxSizer* bSizerMiddle;
58 bSizerMiddle = new wxBoxSizer( wxHORIZONTAL );
59
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 );
65
66 m_formatLabel = new wxStaticText( this, wxID_ANY, _("Format:"), wxDefaultPosition, wxDefaultSize, 0 );
67 m_formatLabel->Wrap( -1 );
68 fgSizer1->Add( m_formatLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
69
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 );
73 m_formatCtrl->SetSelection( 0 );
74 fgSizer1->Add( m_formatCtrl, 0, wxRIGHT|wxLEFT|wxEXPAND, 5 );
75
76 m_unitsLabel = new wxStaticText( this, wxID_ANY, _("Units:"), wxDefaultPosition, wxDefaultSize, 0 );
77 m_unitsLabel->Wrap( -1 );
78 fgSizer1->Add( m_unitsLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
79
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 );
83 m_unitsCtrl->SetSelection( 1 );
84 fgSizer1->Add( m_unitsCtrl, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
85
86
87 bSizerMiddle->Add( fgSizer1, 1, wxEXPAND|wxBOTTOM|wxLEFT, 5 );
88
89 wxBoxSizer* bSizer6;
90 bSizer6 = new wxBoxSizer( wxVERTICAL );
91
92
93 bSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
94
95
96 bSizerMiddle->Add( bSizer6, 1, wxEXPAND, 5 );
97
98
99 m_MainSizer->Add( bSizerMiddle, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
100
101 wxBoxSizer* bSizerLower;
102 bSizerLower = new wxBoxSizer( wxVERTICAL );
103
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 );
106
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 );
109
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 );
112
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 );
115
116 m_cbIncludeBoardEdge = new wxCheckBox( this, wxID_ANY, _("Include board edge layer"), wxDefaultPosition, wxDefaultSize, 0 );
117 bSizerLower->Add( m_cbIncludeBoardEdge, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
118
119 m_useDrillPlaceOrigin = new wxCheckBox( this, wxID_ANY, _("Use drill/place file origin"), wxDefaultPosition, wxDefaultSize, 0 );
120 m_useDrillPlaceOrigin->SetValue(true);
121 bSizerLower->Add( m_useDrillPlaceOrigin, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
122
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 );
125
126 m_singleFile = new wxCheckBox( this, wxID_ANY, _("Generate single file with both front and back positions"), wxDefaultPosition, wxDefaultSize, 0 );
127 m_singleFile->SetValue(true);
128 bSizerLower->Add( m_singleFile, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
129
130
131 bSizerLower->Add( 0, 5, 0, wxEXPAND, 5 );
132
133 m_messagesPanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
134 m_messagesPanel->SetMinSize( wxSize( 350,120 ) );
135
136 bSizerLower->Add( m_messagesPanel, 1, wxEXPAND|wxTOP, 10 );
137
138
139 m_MainSizer->Add( bSizerLower, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
140
141 m_sdbSizer = new wxStdDialogButtonSizer();
142 m_sdbSizerOK = new wxButton( this, wxID_OK );
143 m_sdbSizer->AddButton( m_sdbSizerOK );
144 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
145 m_sdbSizer->AddButton( m_sdbSizerCancel );
146 m_sdbSizer->Realize();
147
148 m_MainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
149
150
151 this->SetSizer( m_MainSizer );
152 this->Layout();
153 m_MainSizer->Fit( this );
154
155 this->Centre( wxBOTH );
156
157 // Connect Events
158 m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onOutputDirectoryBrowseClicked ), NULL, this );
159 m_formatCtrl->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIFileOpt ), NULL, this );
160 m_unitsCtrl->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIUnits ), NULL, this );
161 m_onlySMD->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIOnlySMD ), NULL, this );
162 m_excludeTH->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
163 m_excludeDNP->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
164 m_excludeBOM->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
165 m_cbIncludeBoardEdge->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIincludeBoardEdge ), NULL, this );
166 m_negateXcb->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUInegXcoord ), NULL, this );
167 m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onGenerate ), NULL, this );
168}
169
171{
172 // Disconnect Events
173 m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onOutputDirectoryBrowseClicked ), NULL, this );
174 m_formatCtrl->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIFileOpt ), NULL, this );
175 m_unitsCtrl->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIUnits ), NULL, this );
176 m_onlySMD->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIOnlySMD ), NULL, this );
177 m_excludeTH->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
178 m_excludeDNP->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
179 m_excludeBOM->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
180 m_cbIncludeBoardEdge->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIincludeBoardEdge ), NULL, this );
181 m_negateXcb->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUInegXcoord ), NULL, this );
182 m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onGenerate ), NULL, this );
183
184}
virtual void onUpdateUIExcludeTH(wxUpdateUIEvent &event)
virtual void onUpdateUIincludeBoardEdge(wxUpdateUIEvent &event)
DIALOG_GEN_FOOTPRINT_POSITION_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Generate Placement Files"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void onUpdateUInegXcoord(wxUpdateUIEvent &event)
virtual void onOutputDirectoryBrowseClicked(wxCommandEvent &event)
virtual void onUpdateUIFileOpt(wxUpdateUIEvent &event)
virtual void onUpdateUIOnlySMD(wxUpdateUIEvent &event)
DIALOG_SHIM(wxWindow *aParent, wxWindowID id, const wxString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE|wxRESIZE_BORDER, const wxString &name=wxDialogNameStr)
A bitmap button widget that behaves like a standard dialog button except with an icon.
A widget for browsing a rich text error/status report.
#define _(s)