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 3.10.1-254-gc2ef7767)
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 wxBoxSizer* bUpperSizer;
22 bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
23
24 wxBoxSizer* bSizerdirBrowse;
25 bSizerdirBrowse = new wxBoxSizer( wxHORIZONTAL );
26
27 m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
28 m_staticTextDir->Wrap( -1 );
29 bSizerdirBrowse->Add( m_staticTextDir, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
30
31 m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
32 m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the board file location.") );
33 m_outputDirectoryName->SetMinSize( wxSize( 350,-1 ) );
34
35 bSizerdirBrowse->Add( m_outputDirectoryName, 1, wxALIGN_CENTER_VERTICAL, 5 );
36
37 m_browseButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
38 bSizerdirBrowse->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL, 5 );
39
40
41 bUpperSizer->Add( bSizerdirBrowse, 1, wxEXPAND|wxALL, 10 );
42
43
44 m_MainSizer->Add( bUpperSizer, 0, wxEXPAND, 2 );
45
46 wxBoxSizer* bSizerMiddle;
47 bSizerMiddle = new wxBoxSizer( wxHORIZONTAL );
48
49 wxString m_rbFormatChoices[] = { _("ASCII"), _("CSV"), _("Gerber X3") };
50 int m_rbFormatNChoices = sizeof( m_rbFormatChoices ) / sizeof( wxString );
51 m_rbFormat = new wxRadioBox( this, wxID_ANY, _("Format"), wxDefaultPosition, wxDefaultSize, m_rbFormatNChoices, m_rbFormatChoices, 1, wxRA_SPECIFY_COLS );
52 m_rbFormat->SetSelection( 2 );
53 bSizerMiddle->Add( m_rbFormat, 1, wxALL|wxEXPAND, 5 );
54
55 wxString m_radioBoxUnitsChoices[] = { _("Inches"), _("Millimeters") };
56 int m_radioBoxUnitsNChoices = sizeof( m_radioBoxUnitsChoices ) / sizeof( wxString );
57 m_radioBoxUnits = new wxRadioBox( this, wxID_ANY, _("Units"), wxDefaultPosition, wxDefaultSize, m_radioBoxUnitsNChoices, m_radioBoxUnitsChoices, 1, wxRA_SPECIFY_COLS );
58 m_radioBoxUnits->SetSelection( 1 );
59 bSizerMiddle->Add( m_radioBoxUnits, 1, wxALL|wxEXPAND, 5 );
60
61 wxString m_radioBoxFilesCountChoices[] = { _("Separate files for front, back"), _("Single file for board") };
62 int m_radioBoxFilesCountNChoices = sizeof( m_radioBoxFilesCountChoices ) / sizeof( wxString );
63 m_radioBoxFilesCount = new wxRadioBox( this, wxID_ANY, _("Files"), wxDefaultPosition, wxDefaultSize, m_radioBoxFilesCountNChoices, m_radioBoxFilesCountChoices, 1, wxRA_SPECIFY_COLS );
64 m_radioBoxFilesCount->SetSelection( 0 );
65 m_radioBoxFilesCount->SetToolTip( _("Creates 2 files: one for each board side or\nCreates only one file containing all footprints to place\n") );
66
67 bSizerMiddle->Add( m_radioBoxFilesCount, 1, wxALL|wxEXPAND, 5 );
68
69
70 m_MainSizer->Add( bSizerMiddle, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
71
72 wxBoxSizer* bSizerLower;
73 bSizerLower = new wxBoxSizer( wxVERTICAL );
74
75 m_onlySMD = new wxCheckBox( this, wxID_ANY, _("Include only SMD footprints"), wxDefaultPosition, wxDefaultSize, 0 );
76 bSizerLower->Add( m_onlySMD, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
77
78 m_excludeTH = new wxCheckBox( this, wxID_ANY, _("Exclude all footprints with through hole pads"), wxDefaultPosition, wxDefaultSize, 0 );
79 bSizerLower->Add( m_excludeTH, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
80
81 m_excludeDNP = new wxCheckBox( this, wxID_ANY, _("Exclude all footprints with the Do Not Populate flag set"), wxDefaultPosition, wxDefaultSize, 0 );
82 bSizerLower->Add( m_excludeDNP, 0, wxALL, 5 );
83
84 m_cbIncludeBoardEdge = new wxCheckBox( this, wxID_ANY, _("Include board edge layer"), wxDefaultPosition, wxDefaultSize, 0 );
85 bSizerLower->Add( m_cbIncludeBoardEdge, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
86
87 m_useDrillPlaceOrigin = new wxCheckBox( this, wxID_ANY, _("Use drill/place file origin"), wxDefaultPosition, wxDefaultSize, 0 );
88 bSizerLower->Add( m_useDrillPlaceOrigin, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
89
90 m_negateXcb = new wxCheckBox( this, wxID_ANY, _("Use negative X coordinates for footprints on bottom layer"), wxDefaultPosition, wxDefaultSize, 0 );
91 bSizerLower->Add( m_negateXcb, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
92
93 m_messagesPanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
94 m_messagesPanel->SetMinSize( wxSize( 350,300 ) );
95
96 bSizerLower->Add( m_messagesPanel, 1, wxEXPAND|wxTOP, 10 );
97
98
99 m_MainSizer->Add( bSizerLower, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
100
101 m_sdbSizer = new wxStdDialogButtonSizer();
102 m_sdbSizerOK = new wxButton( this, wxID_OK );
103 m_sdbSizer->AddButton( m_sdbSizerOK );
104 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
105 m_sdbSizer->AddButton( m_sdbSizerCancel );
106 m_sdbSizer->Realize();
107
108 m_MainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
109
110
111 this->SetSizer( m_MainSizer );
112 this->Layout();
113 m_MainSizer->Fit( this );
114
115 this->Centre( wxBOTH );
116
117 // Connect Events
118 m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
119 m_rbFormat->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onSelectFormat ), NULL, this );
120 m_radioBoxUnits->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIUnits ), NULL, this );
121 m_radioBoxFilesCount->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIFileOpt ), NULL, this );
122 m_onlySMD->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIOnlySMD ), NULL, this );
123 m_excludeTH->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
124 m_excludeDNP->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
125 m_cbIncludeBoardEdge->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIincludeBoardEdge ), NULL, this );
126 m_negateXcb->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUInegXcoord ), NULL, this );
127 m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnGenerate ), NULL, this );
128}
129
131{
132 // Disconnect Events
133 m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
134 m_rbFormat->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onSelectFormat ), NULL, this );
135 m_radioBoxUnits->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIUnits ), NULL, this );
136 m_radioBoxFilesCount->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIFileOpt ), NULL, this );
137 m_onlySMD->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIOnlySMD ), NULL, this );
138 m_excludeTH->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
139 m_excludeDNP->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIExcludeTH ), NULL, this );
140 m_cbIncludeBoardEdge->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIincludeBoardEdge ), NULL, this );
141 m_negateXcb->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUInegXcoord ), NULL, this );
142 m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnGenerate ), NULL, this );
143
144}
virtual void onUpdateUIExcludeTH(wxUpdateUIEvent &event)
virtual void OnOutputDirectoryBrowseClicked(wxCommandEvent &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 onUpdateUIUnits(wxUpdateUIEvent &event)
virtual void onUpdateUIFileOpt(wxUpdateUIEvent &event)
virtual void onUpdateUIOnlySMD(wxUpdateUIEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:84
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)