KiCad PCB EDA Suite
dialog_net_inspector_base.cpp
Go to the documentation of this file.
1 // 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 
12 DIALOG_NET_INSPECTOR_BASE::DIALOG_NET_INSPECTOR_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  wxFlexGridSizer* fgSizer1;
23  fgSizer1 = new wxFlexGridSizer( 0, 3, 5, 0 );
24  fgSizer1->AddGrowableCol( 1 );
25  fgSizer1->SetFlexibleDirection( wxBOTH );
26  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
27 
28  m_staticTextFilter = new wxStaticText( this, wxID_ANY, _("Net name filter:"), wxDefaultPosition, wxDefaultSize, 0 );
29  m_staticTextFilter->Wrap( -1 );
30  fgSizer1->Add( m_staticTextFilter, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
31 
32  wxBoxSizer* bSizer7;
33  bSizer7 = new wxBoxSizer( wxHORIZONTAL );
34 
35  m_textCtrlFilter = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
36  bSizer7->Add( m_textCtrlFilter, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
37 
38 
39  bSizer7->Add( 20, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
40 
41 
42  fgSizer1->Add( bSizer7, 1, wxEXPAND, 5 );
43 
44  m_cbShowZeroPad = new wxCheckBox( this, wxID_ANY, _("Show zero pad nets"), wxDefaultPosition, wxDefaultSize, 0 );
45  m_cbShowZeroPad->SetValue(true);
46  fgSizer1->Add( m_cbShowZeroPad, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
47 
48  m_groupBy = new wxCheckBox( this, wxID_ANY, _("Group by:"), wxDefaultPosition, wxDefaultSize, 0 );
49  fgSizer1->Add( m_groupBy, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
50 
51  m_groupByText = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
52  fgSizer1->Add( m_groupByText, 1, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
53 
54  m_groupByKind = new wxComboBox( this, wxID_ANY, _("Wildcard"), wxDefaultPosition, wxSize( -1,-1 ), 0, NULL, wxCB_DROPDOWN|wxCB_READONLY|wxCB_SIMPLE );
55  m_groupByKind->Append( _("Wildcard") );
56  m_groupByKind->Append( _("RegEx") );
57  m_groupByKind->Append( _("Wildcard Substr") );
58  m_groupByKind->Append( _("RegEx Substr") );
59  m_groupByKind->SetSelection( 0 );
60  fgSizer1->Add( m_groupByKind, 0, wxALIGN_CENTER|wxFIXED_MINSIZE|wxRIGHT|wxLEFT, 5 );
61 
62 
63  bTopSizer->Add( fgSizer1, 1, wxEXPAND, 5 );
64 
65 
66  bSizerMain->Add( bTopSizer, 0, wxEXPAND|wxALL, 5 );
67 
68  wxBoxSizer* bMidSizer;
69  bMidSizer = new wxBoxSizer( wxHORIZONTAL );
70 
71 
72  bSizerMain->Add( bMidSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
73 
74  m_netsList = new wxDataViewCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_HORIZ_RULES|wxDV_MULTIPLE|wxDV_VERT_RULES );
75  m_netsList->SetMinSize( wxSize( 500,300 ) );
76 
77  bSizerMain->Add( m_netsList, 1, wxEXPAND|wxLEFT|wxRIGHT, 10 );
78 
79  wxBoxSizer* bSizerListButtons;
80  bSizerListButtons = new wxBoxSizer( wxHORIZONTAL );
81 
82  m_addNet = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
83  bSizerListButtons->Add( m_addNet, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
84 
85  m_renameNet = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
86  bSizerListButtons->Add( m_renameNet, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
87 
88 
89  bSizerListButtons->Add( 20, 0, 0, wxEXPAND, 5 );
90 
91  m_deleteNet = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
92  bSizerListButtons->Add( m_deleteNet, 0, wxALL, 5 );
93 
94 
95  bSizerListButtons->Add( 0, 0, 1, wxEXPAND, 5 );
96 
97  m_ReportButt = new wxButton( this, wxID_ANY, _("Create Report..."), wxDefaultPosition, wxDefaultSize, 0 );
98  bSizerListButtons->Add( m_ReportButt, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
99 
100 
101  bSizerMain->Add( bSizerListButtons, 0, wxEXPAND|wxALL, 5 );
102 
103  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
104  bSizerMain->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
105 
106  wxBoxSizer* bSizerBottom;
107  bSizerBottom = new wxBoxSizer( wxHORIZONTAL );
108 
109  m_sdbSizer = new wxStdDialogButtonSizer();
110  m_sdbSizerOK = new wxButton( this, wxID_OK );
111  m_sdbSizer->AddButton( m_sdbSizerOK );
112  m_sdbSizer->Realize();
113 
114  bSizerBottom->Add( m_sdbSizer, 1, wxALL|wxEXPAND, 5 );
115 
116 
117  bSizerMain->Add( bSizerBottom, 0, wxEXPAND|wxLEFT, 5 );
118 
119 
120  this->SetSizer( bSizerMain );
121  this->Layout();
122  bSizerMain->Fit( this );
123 
124  this->Centre( wxBOTH );
125 
126  // Connect Events
127  m_textCtrlFilter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onFilterChange ), NULL, this );
128  m_cbShowZeroPad->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onFilterChange ), NULL, this );
129  m_groupBy->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onFilterChange ), NULL, this );
130  m_groupByText->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onFilterChange ), NULL, this );
131  m_groupByKind->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onFilterChange ), NULL, this );
132  m_netsList->Connect( wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED, wxDataViewEventHandler( DIALOG_NET_INSPECTOR_BASE::onSortingChanged ), NULL, this );
133  m_netsList->Connect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_NET_INSPECTOR_BASE::onSelChanged ), NULL, this );
134  m_netsList->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_NET_INSPECTOR_BASE::onListSize ), NULL, this );
135  m_addNet->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onAddNet ), NULL, this );
136  m_renameNet->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onRenameNet ), NULL, this );
137  m_deleteNet->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onDeleteNet ), NULL, this );
138  m_ReportButt->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onReport ), NULL, this );
139 }
140 
142 {
143  // Disconnect Events
144  m_textCtrlFilter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onFilterChange ), NULL, this );
145  m_cbShowZeroPad->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onFilterChange ), NULL, this );
146  m_groupBy->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onFilterChange ), NULL, this );
147  m_groupByText->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onFilterChange ), NULL, this );
148  m_groupByKind->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onFilterChange ), NULL, this );
149  m_netsList->Disconnect( wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED, wxDataViewEventHandler( DIALOG_NET_INSPECTOR_BASE::onSortingChanged ), NULL, this );
150  m_netsList->Disconnect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_NET_INSPECTOR_BASE::onSelChanged ), NULL, this );
151  m_netsList->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_NET_INSPECTOR_BASE::onListSize ), NULL, this );
152  m_addNet->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onAddNet ), NULL, this );
153  m_renameNet->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onRenameNet ), NULL, this );
154  m_deleteNet->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onDeleteNet ), NULL, this );
155  m_ReportButt->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NET_INSPECTOR_BASE::onReport ), NULL, this );
156 
157 }
virtual void onReport(wxCommandEvent &event)
virtual void onDeleteNet(wxCommandEvent &event)
virtual void onRenameNet(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:82
virtual void onSortingChanged(wxDataViewEvent &event)
#define _(s)
virtual void onFilterChange(wxCommandEvent &event)
virtual void onListSize(wxSizeEvent &event)
DIALOG_NET_INSPECTOR_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Net Inspector"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxStdDialogButtonSizer * m_sdbSizer
virtual void onSelChanged(wxDataViewEvent &event)
virtual void onAddNet(wxCommandEvent &event)