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 Jan 1 2016)
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( 400,200 ), wxDefaultSize );
15 
16  wxBoxSizer* bSizerMain;
17  bSizerMain = new wxBoxSizer( wxVERTICAL );
18 
19  wxFlexGridSizer* fgSizer1;
20  fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 );
21  fgSizer1->AddGrowableCol( 1 );
22  fgSizer1->SetFlexibleDirection( wxBOTH );
23  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
24 
25  m_staticTextFilter = new wxStaticText( this, wxID_ANY, _("Net name filter"), wxDefaultPosition, wxDefaultSize, 0 );
26  m_staticTextFilter->Wrap( -1 );
27  fgSizer1->Add( m_staticTextFilter, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
28 
29  m_textCtrlFilter = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
30  fgSizer1->Add( m_textCtrlFilter, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
31 
32  m_cbShowZeroPad = new wxCheckBox( this, wxID_ANY, _("Show zero pad nets"), wxDefaultPosition, wxDefaultSize, 0 );
33  m_cbShowZeroPad->SetValue(true);
34  fgSizer1->Add( m_cbShowZeroPad, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
35 
36 
37  bSizerMain->Add( fgSizer1, 0, wxEXPAND, 5 );
38 
39  m_netsListGrid = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
40 
41  // Grid
42  m_netsListGrid->CreateGrid( 1, 2 );
43  m_netsListGrid->EnableEditing( false );
44  m_netsListGrid->EnableGridLines( true );
45  m_netsListGrid->EnableDragGridSize( false );
46  m_netsListGrid->SetMargins( 0, 0 );
47 
48  // Columns
49  m_netsListGrid->SetColSize( 0, 325 );
50  m_netsListGrid->SetColSize( 1, 100 );
51  m_netsListGrid->EnableDragColMove( false );
52  m_netsListGrid->EnableDragColSize( true );
53  m_netsListGrid->SetColLabelSize( 20 );
54  m_netsListGrid->SetColLabelValue( 0, _("Net name") );
55  m_netsListGrid->SetColLabelValue( 1, _("Number of pads") );
56  m_netsListGrid->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
57 
58  // Rows
59  m_netsListGrid->AutoSizeRows();
60  m_netsListGrid->EnableDragRowSize( true );
61  m_netsListGrid->SetRowLabelSize( 50 );
62  m_netsListGrid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
63 
64  // Label Appearance
65 
66  // Cell Defaults
67  m_netsListGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
68  m_netsListGrid->SetMinSize( wxSize( 485,300 ) );
69 
70  bSizerMain->Add( m_netsListGrid, 1, wxALL|wxEXPAND, 5 );
71 
72  m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
73  bSizerMain->Add( m_staticline, 0, wxEXPAND | wxALL, 5 );
74 
75  m_sdbSizer = new wxStdDialogButtonSizer();
76  m_sdbSizerOK = new wxButton( this, wxID_OK );
77  m_sdbSizer->AddButton( m_sdbSizerOK );
78  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
79  m_sdbSizer->AddButton( m_sdbSizerCancel );
80  m_sdbSizer->Realize();
81 
82  bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxALL, 5 );
83 
84 
85  this->SetSizer( bSizerMain );
86  this->Layout();
87 
88  this->Centre( wxBOTH );
89 
90  // Connect Events
91  m_textCtrlFilter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SELECT_NET_FROM_LIST_BASE::onFilterChange ), NULL, this );
92  m_cbShowZeroPad->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SELECT_NET_FROM_LIST_BASE::onFilterChange ), NULL, this );
93  m_netsListGrid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_SELECT_NET_FROM_LIST_BASE::onCellClick ), NULL, this );
94 }
95 
97 {
98  // Disconnect Events
99  m_textCtrlFilter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_SELECT_NET_FROM_LIST_BASE::onFilterChange ), NULL, this );
100  m_cbShowZeroPad->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_SELECT_NET_FROM_LIST_BASE::onFilterChange ), NULL, this );
101  m_netsListGrid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_SELECT_NET_FROM_LIST_BASE::onCellClick ), NULL, this );
102 
103 }
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
virtual void onFilterChange(wxCommandEvent &event)
virtual void onCellClick(wxGridEvent &event)
DIALOG_SELECT_NET_FROM_LIST_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Nets"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(477, 278), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)