KiCad PCB EDA Suite
dialog_select_net_from_list_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 1 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
12 DIALOG_SELECT_NET_FROM_LIST_BASE::DIALOG_SELECT_NET_FROM_LIST_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( wxSize( -1,-1 ), wxDefaultSize );
15 
16  wxBoxSizer* bSizerMain;
17  bSizerMain = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bTopSizer;
20  bTopSizer = new wxBoxSizer( wxHORIZONTAL );
21 
22  m_staticTextFilter = new wxStaticText( this, wxID_ANY, _("Net name filter:"), wxDefaultPosition, wxDefaultSize, 0 );
23  m_staticTextFilter->Wrap( -1 );
24  bTopSizer->Add( m_staticTextFilter, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
25 
26  m_textCtrlFilter = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
27  bTopSizer->Add( m_textCtrlFilter, 1, wxBOTTOM|wxEXPAND|wxRIGHT|wxTOP, 5 );
28 
29 
30  bTopSizer->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 );
31 
32  m_cbShowZeroPad = new wxCheckBox( this, wxID_ANY, _("Show zero pad nets"), wxDefaultPosition, wxDefaultSize, 0 );
33  m_cbShowZeroPad->SetValue(true);
34  bTopSizer->Add( m_cbShowZeroPad, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
35 
36 
37  bSizerMain->Add( bTopSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
38 
39  m_netsList = new wxDataViewListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_HORIZ_RULES );
40  m_netsList->SetMinSize( wxSize( 500,300 ) );
41 
42  bSizerMain->Add( m_netsList, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
43 
44  wxBoxSizer* bSizerBottom;
45  bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
46 
47  m_ReportButt = new wxButton( this, wxID_ANY, _("Create Report..."), wxDefaultPosition, wxDefaultSize, 0 );
48  bSizerBottom->Add( m_ReportButt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
49 
50 
51  bSizerBottom->Add( 0, 0, 1, wxEXPAND, 5 );
52 
53  m_sdbSizer = new wxStdDialogButtonSizer();
54  m_sdbSizerOK = new wxButton( this, wxID_OK );
55  m_sdbSizer->AddButton( m_sdbSizerOK );
56  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
57  m_sdbSizer->AddButton( m_sdbSizerCancel );
58  m_sdbSizer->Realize();
59 
60  bSizerBottom->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
61 
62 
63  bSizerMain->Add( bSizerBottom, 0, wxEXPAND|wxLEFT, 5 );
64 
65 
66  this->SetSizer( bSizerMain );
67  this->Layout();
68 
69  this->Centre( wxBOTH );
70 
71  // Connect Events
72  m_textCtrlFilter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SELECT_NET_FROM_LIST_BASE::onFilterChange ), NULL, this );
73  m_cbShowZeroPad->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SELECT_NET_FROM_LIST_BASE::onFilterChange ), NULL, this );
74  m_netsList->Connect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_SELECT_NET_FROM_LIST_BASE::onSelChanged ), NULL, this );
75  m_netsList->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SELECT_NET_FROM_LIST_BASE::onListSize ), NULL, this );
76  m_ReportButt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_NET_FROM_LIST_BASE::onReport ), NULL, this );
77 }
78 
80 {
81  // Disconnect Events
82  m_textCtrlFilter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SELECT_NET_FROM_LIST_BASE::onFilterChange ), NULL, this );
83  m_cbShowZeroPad->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SELECT_NET_FROM_LIST_BASE::onFilterChange ), NULL, this );
84  m_netsList->Disconnect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_SELECT_NET_FROM_LIST_BASE::onSelChanged ), NULL, this );
85  m_netsList->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SELECT_NET_FROM_LIST_BASE::onListSize ), NULL, this );
86  m_ReportButt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_NET_FROM_LIST_BASE::onReport ), NULL, this );
87 
88 }
DIALOG_SELECT_NET_FROM_LIST_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Nets"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(584, 397), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:83
virtual void onSelChanged(wxDataViewEvent &event)
virtual void onListSize(wxSizeEvent &event)
virtual void onFilterChange(wxCommandEvent &event)
virtual void onReport(wxCommandEvent &event)