KiCad PCB EDA Suite
dialog_get_component_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_GET_COMPONENT_BASE::DIALOG_GET_COMPONENT_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* bSizerMain;
17  bSizerMain = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bSizerUpper;
20  bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
21 
22  wxBoxSizer* bSizerLeft;
23  bSizerLeft = new wxBoxSizer( wxVERTICAL );
24 
25  m_staticTextName = new wxStaticText( this, wxID_ANY, _("Name:"), wxDefaultPosition, wxDefaultSize, 0 );
26  m_staticTextName->Wrap( -1 );
27  bSizerLeft->Add( m_staticTextName, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
28 
29  m_textCmpNameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
30  m_textCmpNameCtrl->SetMaxLength( 0 );
31  bSizerLeft->Add( m_textCmpNameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
32 
33  m_staticTextHistory = new wxStaticText( this, wxID_ANY, _("History list:"), wxDefaultPosition, wxDefaultSize, 0 );
34  m_staticTextHistory->Wrap( -1 );
35  bSizerLeft->Add( m_staticTextHistory, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
36 
37  m_historyList = new wxListBox( this, ID_SEL_BY_LISTBOX, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
38  m_historyList->SetMinSize( wxSize( 200,100 ) );
39 
40  bSizerLeft->Add( m_historyList, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
41 
42 
43  bSizerUpper->Add( bSizerLeft, 1, wxEXPAND, 5 );
44 
45  wxBoxSizer* bSizerRight;
46  bSizerRight = new wxBoxSizer( wxVERTICAL );
47 
48  m_buttonKW = new wxButton( this, ID_ACCEPT_KEYWORD, _("Search by Keyword"), wxDefaultPosition, wxDefaultSize, 0 );
49  bSizerRight->Add( m_buttonKW, 0, wxALL|wxEXPAND, 5 );
50 
51  m_buttonList = new wxButton( this, ID_LIST_ALL, _("List All"), wxDefaultPosition, wxDefaultSize, 0 );
52  bSizerRight->Add( m_buttonList, 0, wxALL|wxEXPAND, 5 );
53 
54  m_buttonBrowse = new wxButton( this, ID_EXTRA_TOOL, _("Select by Browser"), wxDefaultPosition, wxDefaultSize, 0 );
55  bSizerRight->Add( m_buttonBrowse, 0, wxALL|wxEXPAND, 5 );
56 
57 
58  bSizerUpper->Add( bSizerRight, 0, wxALIGN_CENTER_VERTICAL, 5 );
59 
60 
61  bSizerMain->Add( bSizerUpper, 1, wxEXPAND, 5 );
62 
63  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
64  bSizerMain->Add( m_staticline1, 0, wxEXPAND|wxTOP|wxRIGHT, 5 );
65 
66  m_sdbSizer = new wxStdDialogButtonSizer();
67  m_sdbSizerOK = new wxButton( this, wxID_OK );
68  m_sdbSizer->AddButton( m_sdbSizerOK );
69  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
70  m_sdbSizer->AddButton( m_sdbSizerCancel );
71  m_sdbSizer->Realize();
72 
73  bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
74 
75 
76  this->SetSizer( bSizerMain );
77  this->Layout();
78 
79  this->Centre( wxBOTH );
80 
81  // Connect Events
82  m_historyList->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_GET_COMPONENT_BASE::Accept ), NULL, this );
83  m_buttonKW->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GET_COMPONENT_BASE::Accept ), NULL, this );
84  m_buttonList->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GET_COMPONENT_BASE::Accept ), NULL, this );
85  m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GET_COMPONENT_BASE::GetExtraSelection ), NULL, this );
86  m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GET_COMPONENT_BASE::OnCancel ), NULL, this );
87  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GET_COMPONENT_BASE::Accept ), NULL, this );
88 }
89 
91 {
92  // Disconnect Events
93  m_historyList->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DIALOG_GET_COMPONENT_BASE::Accept ), NULL, this );
94  m_buttonKW->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GET_COMPONENT_BASE::Accept ), NULL, this );
95  m_buttonList->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GET_COMPONENT_BASE::Accept ), NULL, this );
96  m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GET_COMPONENT_BASE::GetExtraSelection ), NULL, this );
97  m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GET_COMPONENT_BASE::OnCancel ), NULL, this );
98  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_GET_COMPONENT_BASE::Accept ), NULL, this );
99 
100 }
#define ID_LIST_ALL
#define ID_ACCEPT_KEYWORD
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
#define ID_EXTRA_TOOL
DIALOG_GET_COMPONENT_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(361, 285), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void Accept(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer
virtual void OnCancel(wxCommandEvent &event)
virtual void GetExtraSelection(wxCommandEvent &event)
#define ID_SEL_BY_LISTBOX