KiCad PCB EDA Suite
dialog_exchange_modules_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Jun 17 2015)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
7 
9 
11 
12 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 )
13 {
14  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15 
16  wxBoxSizer* bMainSizer;
17  bMainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bUpperSizer;
20  bUpperSizer = new wxBoxSizer( wxHORIZONTAL );
21 
22  wxBoxSizer* bLeftSizer;
23  bLeftSizer = new wxBoxSizer( wxVERTICAL );
24 
25  m_staticTextCmpVal = new wxStaticText( this, wxID_ANY, _("Component value"), wxDefaultPosition, wxDefaultSize, 0 );
26  m_staticTextCmpVal->Wrap( -1 );
27  bLeftSizer->Add( m_staticTextCmpVal, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
28 
29  m_CmpValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
30  m_CmpValue->SetMaxLength( 0 );
31  bLeftSizer->Add( m_CmpValue, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
32 
33  m_staticTexCmpRef = new wxStaticText( this, wxID_ANY, _("Component reference"), wxDefaultPosition, wxDefaultSize, 0 );
34  m_staticTexCmpRef->Wrap( -1 );
35  bLeftSizer->Add( m_staticTexCmpRef, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
36 
37  m_CmpReference = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
38  bLeftSizer->Add( m_CmpReference, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
39 
40 
41  bUpperSizer->Add( bLeftSizer, 1, wxALIGN_CENTER_VERTICAL, 5 );
42 
43  wxBoxSizer* bMiddleSizer;
44  bMiddleSizer = new wxBoxSizer( wxVERTICAL );
45 
46  wxString m_SelectionChoices[] = { _("Change footprint"), _("Change footprints"), _("Change footprints having same value"), _("Update all footprints of the board") };
47  int m_SelectionNChoices = sizeof( m_SelectionChoices ) / sizeof( wxString );
48  m_Selection = new wxRadioBox( this, ID_SELECTION_CLICKED, _("Options"), wxDefaultPosition, wxDefaultSize, m_SelectionNChoices, m_SelectionChoices, 1, wxRA_SPECIFY_COLS );
49  m_Selection->SetSelection( 1 );
50  bMiddleSizer->Add( m_Selection, 0, wxALL, 5 );
51 
52 
53  bUpperSizer->Add( bMiddleSizer, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
54 
55  wxBoxSizer* bRightSizer;
56  bRightSizer = new wxBoxSizer( wxVERTICAL );
57 
58  m_buttonCmpList = new wxButton( this, wxID_ANY, _("Export Footprint Association File"), wxDefaultPosition, wxDefaultSize, 0 );
59  bRightSizer->Add( m_buttonCmpList, 0, wxALL|wxEXPAND, 5 );
60 
61  m_Browsebutton = new wxButton( this, wxID_ANY, _("List Footprints"), wxDefaultPosition, wxDefaultSize, 0 );
62  bRightSizer->Add( m_Browsebutton, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
63 
64  m_buttonFPViewer = new wxButton( this, wxID_ANY, _("View Footprints"), wxDefaultPosition, wxDefaultSize, 0 );
65  bRightSizer->Add( m_buttonFPViewer, 0, wxALL|wxEXPAND, 5 );
66 
67 
68  bUpperSizer->Add( bRightSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
69 
70 
71  bMainSizer->Add( bUpperSizer, 0, wxALL|wxEXPAND, 5 );
72 
73  m_staticTextCurrFPID = new wxStaticText( this, wxID_ANY, _("Current footprint name (FPID)"), wxDefaultPosition, wxDefaultSize, 0 );
74  m_staticTextCurrFPID->Wrap( -1 );
75  bMainSizer->Add( m_staticTextCurrFPID, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
76 
77  m_CurrentFootprintFPID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
78  m_CurrentFootprintFPID->SetMaxLength( 0 );
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  m_NewFootprintFPID->SetMaxLength( 0 );
87  bMainSizer->Add( m_NewFootprintFPID, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
88 
89  m_staticTextMsg = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
90  m_staticTextMsg->Wrap( -1 );
91  bMainSizer->Add( m_staticTextMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
92 
93  m_WinMessages = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
94  m_WinMessages->SetMinSize( wxSize( -1,150 ) );
95 
96  bMainSizer->Add( m_WinMessages, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
97 
98  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
99  bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
100 
101  wxBoxSizer* bSizerButts;
102  bSizerButts = new wxBoxSizer( wxHORIZONTAL );
103 
104  m_Applybutton = new wxButton( this, wxID_OK, _("Apply"), wxDefaultPosition, wxDefaultSize, 0 );
105  bSizerButts->Add( m_Applybutton, 0, wxEXPAND|wxALL, 5 );
106 
107  m_Quitbutton = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
108  bSizerButts->Add( m_Quitbutton, 0, wxALL|wxEXPAND, 5 );
109 
110 
111  bMainSizer->Add( bSizerButts, 0, wxALIGN_RIGHT, 5 );
112 
113 
114  this->SetSizer( bMainSizer );
115  this->Layout();
116 
117  // Connect Events
118  m_Selection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnSelectionClicked ), NULL, this );
119  m_buttonCmpList->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::RebuildCmpList ), NULL, this );
120  m_Browsebutton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::BrowseAndSelectFootprint ), NULL, this );
121  m_buttonFPViewer->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::ViewAndSelectFootprint ), NULL, this );
122  m_Applybutton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnOkClick ), NULL, this );
123  m_Quitbutton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnQuit ), NULL, this );
124 }
125 
127 {
128  // Disconnect Events
129  m_Selection->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnSelectionClicked ), NULL, this );
130  m_buttonCmpList->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::RebuildCmpList ), NULL, this );
131  m_Browsebutton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::BrowseAndSelectFootprint ), NULL, this );
132  m_buttonFPViewer->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::ViewAndSelectFootprint ), NULL, this );
133  m_Applybutton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnOkClick ), NULL, this );
134  m_Quitbutton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnQuit ), NULL, this );
135 
136 }
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)