KiCad PCB EDA Suite
eda_list_dialog_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version Oct 26 2018)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9
11
12EDA_LIST_DIALOG_BASE::EDA_LIST_DIALOG_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* bMargins;
20 bMargins = new wxBoxSizer( wxVERTICAL );
21
22 m_listLabel = new wxStaticText( this, wxID_ANY, _("Items:"), wxDefaultPosition, wxDefaultSize, 0 );
23 m_listLabel->Wrap( -1 );
24 bMargins->Add( m_listLabel, 0, wxALL, 5 );
25
26 m_listBox = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_SINGLE_SEL|wxLC_VRULES|wxBORDER_SIMPLE|wxVSCROLL );
27 m_listBox->SetMinSize( wxSize( 280,150 ) );
28
29 bMargins->Add( m_listBox, 3, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
30
31 m_filterBox = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
32 bMargins->Add( m_filterBox, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
33
34
35 bSizerMain->Add( bMargins, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
36
37 m_ButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
38
39 m_sdbSizer = new wxStdDialogButtonSizer();
40 m_sdbSizerOK = new wxButton( this, wxID_OK );
41 m_sdbSizer->AddButton( m_sdbSizerOK );
42 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
43 m_sdbSizer->AddButton( m_sdbSizerCancel );
44 m_sdbSizer->Realize();
45
46 m_ButtonsSizer->Add( m_sdbSizer, 1, wxALL, 5 );
47
48
49 bSizerMain->Add( m_ButtonsSizer, 0, wxEXPAND, 5 );
50
51
52 this->SetSizer( bSizerMain );
53 this->Layout();
54 bSizerMain->Fit( this );
55
56 this->Centre( wxBOTH );
57
58 // Connect Events
59 m_listBox->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( EDA_LIST_DIALOG_BASE::onListItemActivated ), NULL, this );
60 m_filterBox->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( EDA_LIST_DIALOG_BASE::textChangeInFilterBox ), NULL, this );
61}
62
64{
65 // Disconnect Events
66 m_listBox->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( EDA_LIST_DIALOG_BASE::onListItemActivated ), NULL, this );
67 m_filterBox->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( EDA_LIST_DIALOG_BASE::textChangeInFilterBox ), NULL, this );
68
69}
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
virtual void onListItemActivated(wxListEvent &event)=0
virtual void textChangeInFilterBox(wxCommandEvent &event)=0
EDA_LIST_DIALOG_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=wxEmptyString, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxStdDialogButtonSizer * m_sdbSizer
#define _(s)