KiCad PCB EDA Suite
dialog_exchange_modules_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Aug 4 2017)
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_EXCHANGE_MODULE_BASE::DIALOG_EXCHANGE_MODULE_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( wxDefaultSize, wxDefaultSize );
17 
18  wxBoxSizer* bMainSizer;
19  bMainSizer = new wxBoxSizer( wxVERTICAL );
20 
21  wxBoxSizer* bUpperSizer;
22  bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
23 
24  wxBoxSizer* bLeftSizer;
25  bLeftSizer = new wxBoxSizer( wxVERTICAL );
26 
27  m_staticTextCmpVal = new wxStaticText( this, wxID_ANY, _("Component value"), wxDefaultPosition, wxDefaultSize, 0 );
28  m_staticTextCmpVal->Wrap( -1 );
29  bLeftSizer->Add( m_staticTextCmpVal, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
30 
31  m_CmpValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
32  bLeftSizer->Add( m_CmpValue, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
33 
34  m_staticTexCmpRef = new wxStaticText( this, wxID_ANY, _("Component reference"), wxDefaultPosition, wxDefaultSize, 0 );
35  m_staticTexCmpRef->Wrap( -1 );
36  bLeftSizer->Add( m_staticTexCmpRef, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
37 
38  m_CmpReference = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
39  bLeftSizer->Add( m_CmpReference, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
40 
41 
42  bUpperSizer->Add( bLeftSizer, 1, wxALIGN_CENTER_VERTICAL, 5 );
43 
44  wxBoxSizer* bMiddleSizer;
45  bMiddleSizer = new wxBoxSizer( wxVERTICAL );
46 
47  wxString m_SelectionChoices[] = { _("Change footprint"), _("Change footprints"), _("Change footprints having same value"), _("Update all footprints of the board") };
48  int m_SelectionNChoices = sizeof( m_SelectionChoices ) / sizeof( wxString );
49  m_Selection = new wxRadioBox( this, ID_SELECTION_CLICKED, _("Options"), wxDefaultPosition, wxDefaultSize, m_SelectionNChoices, m_SelectionChoices, 1, wxRA_SPECIFY_COLS );
50  m_Selection->SetSelection( 1 );
51  bMiddleSizer->Add( m_Selection, 0, wxALL, 5 );
52 
53 
54  bUpperSizer->Add( bMiddleSizer, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
55 
56  wxBoxSizer* bRightSizer;
57  bRightSizer = new wxBoxSizer( wxVERTICAL );
58 
59  m_buttonCmpList = new wxButton( this, wxID_ANY, _("Export Footprint Association File"), wxDefaultPosition, wxDefaultSize, 0 );
60  bRightSizer->Add( m_buttonCmpList, 0, wxALL|wxEXPAND, 5 );
61 
62  m_Browsebutton = new wxButton( this, wxID_ANY, _("List Footprints"), wxDefaultPosition, wxDefaultSize, 0 );
63  bRightSizer->Add( m_Browsebutton, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
64 
65  m_buttonFPViewer = new wxButton( this, wxID_ANY, _("View Footprints"), wxDefaultPosition, wxDefaultSize, 0 );
66  bRightSizer->Add( m_buttonFPViewer, 0, wxALL|wxEXPAND, 5 );
67 
68 
69  bUpperSizer->Add( bRightSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
70 
71 
72  bMainSizer->Add( bUpperSizer, 0, wxALL|wxEXPAND, 5 );
73 
74  m_staticTextCurrFPID = new wxStaticText( this, wxID_ANY, _("Current footprint name (FPID)"), wxDefaultPosition, wxDefaultSize, 0 );
75  m_staticTextCurrFPID->Wrap( -1 );
76  bMainSizer->Add( m_staticTextCurrFPID, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
77 
78  m_CurrentFootprintFPID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
79  bMainSizer->Add( m_CurrentFootprintFPID, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
80 
81  m_staticTextNewFPID = new wxStaticText( this, wxID_ANY, _("New footprint name (FPID)"), wxDefaultPosition, wxDefaultSize, 0 );
82  m_staticTextNewFPID->Wrap( -1 );
83  bMainSizer->Add( m_staticTextNewFPID, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
84 
85  m_NewFootprintFPID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
86  bMainSizer->Add( m_NewFootprintFPID, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
87 
88  m_MessageWindow = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
89  m_MessageWindow->SetMinSize( wxSize( 300,300 ) );
90 
91  bMainSizer->Add( m_MessageWindow, 1, wxEXPAND | wxALL, 5 );
92 
93  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
94  bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
95 
96  wxBoxSizer* bSizerButts;
97  bSizerButts = new wxBoxSizer( wxHORIZONTAL );
98 
99  m_Applybutton = new wxButton( this, wxID_OK, _("Apply"), wxDefaultPosition, wxDefaultSize, 0 );
100  bSizerButts->Add( m_Applybutton, 0, wxEXPAND|wxALL, 5 );
101 
102  m_Quitbutton = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
103  bSizerButts->Add( m_Quitbutton, 0, wxALL|wxEXPAND, 5 );
104 
105 
106  bMainSizer->Add( bSizerButts, 0, wxALIGN_RIGHT, 5 );
107 
108 
109  this->SetSizer( bMainSizer );
110  this->Layout();
111 
112  // Connect Events
113  m_Selection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnSelectionClicked ), NULL, this );
114  m_buttonCmpList->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::RebuildCmpList ), NULL, this );
115  m_Browsebutton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::BrowseAndSelectFootprint ), NULL, this );
116  m_buttonFPViewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::ViewAndSelectFootprint ), NULL, this );
117  m_Applybutton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnOkClick ), NULL, this );
118  m_Quitbutton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnQuit ), NULL, this );
119 }
120 
122 {
123  // Disconnect Events
124  m_Selection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnSelectionClicked ), NULL, this );
125  m_buttonCmpList->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::RebuildCmpList ), NULL, this );
126  m_Browsebutton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::BrowseAndSelectFootprint ), NULL, this );
127  m_buttonFPViewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::ViewAndSelectFootprint ), NULL, this );
128  m_Applybutton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnOkClick ), NULL, this );
129  m_Quitbutton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnQuit ), NULL, this );
130 
131 }
virtual void OnQuit(wxCommandEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
DIALOG_EXCHANGE_MODULE_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Change Footprint"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(555, 449), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void ViewAndSelectFootprint(wxCommandEvent &event)
virtual void RebuildCmpList(wxCommandEvent &event)
virtual void OnSelectionClicked(wxCommandEvent &event)
virtual void BrowseAndSelectFootprint(wxCommandEvent &event)
#define ID_SELECTION_CLICKED
virtual void OnOkClick(wxCommandEvent &event)
Class WX_HTML_REPORT_PANEL.