KiCad PCB EDA Suite
dialog_gen_footprint_position_file_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version v3.8.0)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
8 #include "wx_html_report_panel.h"
9 
11 
13 
14 DIALOG_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 )
15 {
16  this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
17 
18  m_MainSizer = new wxBoxSizer( wxVERTICAL );
19 
20  wxBoxSizer* bUpperSizer;
21  bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
22 
23  wxBoxSizer* bSizerdirBrowse;
24  bSizerdirBrowse = new wxBoxSizer( wxHORIZONTAL );
25 
26  m_staticTextDir = new wxStaticText( this, wxID_ANY, _("Output directory:"), wxDefaultPosition, wxDefaultSize, 0 );
27  m_staticTextDir->Wrap( -1 );
28  bSizerdirBrowse->Add( m_staticTextDir, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
29 
30  m_outputDirectoryName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
31  m_outputDirectoryName->SetToolTip( _("Target directory for plot files. Can be absolute or relative to the board file location.") );
32  m_outputDirectoryName->SetMinSize( wxSize( 350,-1 ) );
33 
34  bSizerdirBrowse->Add( m_outputDirectoryName, 0, wxALIGN_CENTER_VERTICAL, 5 );
35 
36  m_browseButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
37  m_browseButton->SetMinSize( wxSize( 30,28 ) );
38 
39  bSizerdirBrowse->Add( m_browseButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
40 
41 
42  bUpperSizer->Add( bSizerdirBrowse, 0, wxEXPAND|wxALL, 5 );
43 
44 
45  m_MainSizer->Add( bUpperSizer, 0, wxEXPAND, 2 );
46 
47  wxBoxSizer* bSizerMiddle;
48  bSizerMiddle = new wxBoxSizer( wxHORIZONTAL );
49 
50  wxString m_rbFormatChoices[] = { _("ASCII"), _("CSV"), _("Gerber (very experimental)") };
51  int m_rbFormatNChoices = sizeof( m_rbFormatChoices ) / sizeof( wxString );
52  m_rbFormat = new wxRadioBox( this, wxID_ANY, _("Format"), wxDefaultPosition, wxDefaultSize, m_rbFormatNChoices, m_rbFormatChoices, 1, wxRA_SPECIFY_COLS );
53  m_rbFormat->SetSelection( 2 );
54  bSizerMiddle->Add( m_rbFormat, 0, wxALL, 5 );
55 
56  wxString m_radioBoxUnitsChoices[] = { _("Inches"), _("Millimeters") };
57  int m_radioBoxUnitsNChoices = sizeof( m_radioBoxUnitsChoices ) / sizeof( wxString );
58  m_radioBoxUnits = new wxRadioBox( this, wxID_ANY, _("Units"), wxDefaultPosition, wxDefaultSize, m_radioBoxUnitsNChoices, m_radioBoxUnitsChoices, 1, wxRA_SPECIFY_COLS );
59  m_radioBoxUnits->SetSelection( 0 );
60  bSizerMiddle->Add( m_radioBoxUnits, 0, wxALL, 5 );
61 
62  wxString m_radioBoxFilesCountChoices[] = { _("Separate files for front and back"), _("Single file for board") };
63  int m_radioBoxFilesCountNChoices = sizeof( m_radioBoxFilesCountChoices ) / sizeof( wxString );
64  m_radioBoxFilesCount = new wxRadioBox( this, wxID_ANY, _("Files"), wxDefaultPosition, wxDefaultSize, m_radioBoxFilesCountNChoices, m_radioBoxFilesCountChoices, 1, wxRA_SPECIFY_COLS );
65  m_radioBoxFilesCount->SetSelection( 0 );
66  m_radioBoxFilesCount->SetToolTip( _("Creates 2 files: one for each board side or\nCreates only one file containing all footprints to place\n") );
67 
68  bSizerMiddle->Add( m_radioBoxFilesCount, 0, wxALL, 5 );
69 
70 
71  m_MainSizer->Add( bSizerMiddle, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
72 
73  wxBoxSizer* bSizerLower;
74  bSizerLower = new wxBoxSizer( wxVERTICAL );
75 
76  m_forceSMDOpt = new wxCheckBox( this, wxID_ANY, _("Include footprints with SMD pads even if not marked Surface Mount"), wxDefaultPosition, wxDefaultSize, 0 );
77  bSizerLower->Add( m_forceSMDOpt, 0, wxALL, 5 );
78 
79  m_cbIncludeBoardEdge = new wxCheckBox( this, wxID_ANY, _("Include board edge layer"), wxDefaultPosition, wxDefaultSize, 0 );
80  bSizerLower->Add( m_cbIncludeBoardEdge, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
81 
82  m_messagesPanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
83  m_messagesPanel->SetMinSize( wxSize( 350,300 ) );
84 
85  bSizerLower->Add( m_messagesPanel, 1, wxEXPAND | wxALL, 5 );
86 
87 
88  m_MainSizer->Add( bSizerLower, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
89 
90  m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
91  m_MainSizer->Add( m_staticline, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
92 
93  m_sdbSizer = new wxStdDialogButtonSizer();
94  m_sdbSizerOK = new wxButton( this, wxID_OK );
95  m_sdbSizer->AddButton( m_sdbSizerOK );
96  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
97  m_sdbSizer->AddButton( m_sdbSizerCancel );
98  m_sdbSizer->Realize();
99 
100  m_MainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
101 
102 
103  this->SetSizer( m_MainSizer );
104  this->Layout();
105 
106  this->Centre( wxBOTH );
107 
108  // Connect Events
109  m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
110  m_rbFormat->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onSelectFormat ), NULL, this );
111  m_radioBoxUnits->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIUnits ), NULL, this );
112  m_radioBoxFilesCount->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIFileOpt ), NULL, this );
113  m_forceSMDOpt->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIforceSMDOpt ), NULL, this );
114  m_cbIncludeBoardEdge->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIincludeBoardEdge ), NULL, this );
115  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnGenerate ), NULL, this );
116 }
117 
119 {
120  // Disconnect Events
121  m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnOutputDirectoryBrowseClicked ), NULL, this );
122  m_rbFormat->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onSelectFormat ), NULL, this );
123  m_radioBoxUnits->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIUnits ), NULL, this );
124  m_radioBoxFilesCount->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIFileOpt ), NULL, this );
125  m_forceSMDOpt->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIforceSMDOpt ), NULL, this );
126  m_cbIncludeBoardEdge->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::onUpdateUIincludeBoardEdge ), NULL, this );
127  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GEN_FOOTPRINT_POSITION_BASE::OnGenerate ), NULL, this );
128 
129 }
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:84
virtual void onUpdateUIUnits(wxUpdateUIEvent &event)
virtual void onUpdateUIincludeBoardEdge(wxUpdateUIEvent &event)
#define NULL
virtual void onUpdateUIFileOpt(wxUpdateUIEvent &event)
virtual void onUpdateUIforceSMDOpt(wxUpdateUIEvent &event)
DIALOG_GEN_FOOTPRINT_POSITION_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Generate Footprint Position Files"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(520, 450), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
#define _(s)
Definition: 3d_actions.cpp:31
virtual void OnOutputDirectoryBrowseClicked(wxCommandEvent &event)
WX_HTML_REPORT_PANEL.