KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_lib_edit_pin_table_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
10#include "widgets/wx_grid.h"
11
13
15
16DIALOG_LIB_EDIT_PIN_TABLE_BASE::DIALOG_LIB_EDIT_PIN_TABLE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
17{
18 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
19
20 wxBoxSizer* top_sizer;
21 top_sizer = new wxBoxSizer( wxVERTICAL );
22
23 wxBoxSizer* bSummarySizer;
24 bSummarySizer = new wxBoxSizer( wxHORIZONTAL );
25
26 m_staticTextPinNumbers = new wxStaticText( this, wxID_ANY, _("Pin numbers:"), wxDefaultPosition, wxDefaultSize, 0 );
27 m_staticTextPinNumbers->Wrap( -1 );
28 bSummarySizer->Add( m_staticTextPinNumbers, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
29
30 m_pin_numbers_summary = new wxStaticText( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
31 m_pin_numbers_summary->Wrap( -1 );
32 bSummarySizer->Add( m_pin_numbers_summary, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
33
34
35 bSummarySizer->Add( 0, 0, 1, wxEXPAND, 5 );
36
37 m_staticTextPinCount = new wxStaticText( this, wxID_ANY, _("Pin count:"), wxDefaultPosition, wxDefaultSize, 0 );
38 m_staticTextPinCount->Wrap( -1 );
39 bSummarySizer->Add( m_staticTextPinCount, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
40
41 m_pin_count = new wxStaticText( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
42 m_pin_count->Wrap( -1 );
43 bSummarySizer->Add( m_pin_count, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
44
45
46 bSummarySizer->Add( 0, 0, 1, wxEXPAND, 5 );
47
48 m_staticTextDuplicatePins = new wxStaticText( this, wxID_ANY, _("Duplicate pins:"), wxDefaultPosition, wxDefaultSize, 0 );
49 m_staticTextDuplicatePins->Wrap( -1 );
50 bSummarySizer->Add( m_staticTextDuplicatePins, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
51
52 m_duplicate_pins = new wxStaticText( this, wxID_ANY, _("0"), wxDefaultPosition, wxDefaultSize, 0 );
53 m_duplicate_pins->Wrap( -1 );
54 bSummarySizer->Add( m_duplicate_pins, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
55
56
57 top_sizer->Add( bSummarySizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
58
59 wxBoxSizer* bGridMarginsSizer;
60 bGridMarginsSizer = new wxBoxSizer( wxVERTICAL );
61
62 m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxSize( 800,400 ), 0 );
63
64 // Grid
65 m_grid->CreateGrid( 5, 14 );
66 m_grid->EnableEditing( true );
67 m_grid->EnableGridLines( true );
68 m_grid->EnableDragGridSize( false );
69 m_grid->SetMargins( 0, 0 );
70
71 // Columns
72 m_grid->SetColSize( 0, 60 );
73 m_grid->SetColSize( 1, 66 );
74 m_grid->SetColSize( 2, 84 );
75 m_grid->SetColSize( 3, 140 );
76 m_grid->SetColSize( 4, 140 );
77 m_grid->SetColSize( 5, 100 );
78 m_grid->SetColSize( 6, 110 );
79 m_grid->SetColSize( 7, 110 );
80 m_grid->SetColSize( 8, 84 );
81 m_grid->SetColSize( 9, 84 );
82 m_grid->SetColSize( 10, 84 );
83 m_grid->SetColSize( 11, 84 );
84 m_grid->SetColSize( 12, 66 );
85 m_grid->EnableDragColMove( false );
86 m_grid->EnableDragColSize( true );
87 m_grid->SetColLabelValue( 0, _("Count") );
88 m_grid->SetColLabelValue( 1, _("Number") );
89 m_grid->SetColLabelValue( 2, _("Name") );
90 m_grid->SetColLabelValue( 3, _("Electrical Type") );
91 m_grid->SetColLabelValue( 4, _("Graphic Style") );
92 m_grid->SetColLabelValue( 5, _("Orientation") );
93 m_grid->SetColLabelValue( 6, _("Number Text Size") );
94 m_grid->SetColLabelValue( 7, _("Name Text Size") );
95 m_grid->SetColLabelValue( 8, _("Length") );
96 m_grid->SetColLabelValue( 9, _("X Position") );
97 m_grid->SetColLabelValue( 10, _("Y Position") );
98 m_grid->SetColLabelValue( 11, _("Visible") );
99 m_grid->SetColLabelValue( 12, _("Unit") );
100 m_grid->SetColLabelValue( 13, _("De Morgan") );
101 m_grid->SetColLabelSize( 24 );
102 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
103
104 // Rows
105 m_grid->EnableDragRowSize( false );
106 m_grid->SetRowLabelSize( 0 );
107 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
108
109 // Label Appearance
110
111 // Cell Defaults
112 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
113 m_grid->SetMinSize( wxSize( 690,200 ) );
114
115 bGridMarginsSizer->Add( m_grid, 1, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 10 );
116
117
118 top_sizer->Add( bGridMarginsSizer, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
119
120 wxBoxSizer* bBottomSizer;
121 bBottomSizer = new wxBoxSizer( wxHORIZONTAL );
122
123 wxBoxSizer* bSizer5;
124 bSizer5 = new wxBoxSizer( wxHORIZONTAL );
125
126 m_addButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
127 bSizer5->Add( m_addButton, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
128
129 m_deleteButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
130 bSizer5->Add( m_deleteButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
131
132 m_divider1 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
133 m_divider1->Enable( false );
134
135 bSizer5->Add( m_divider1, 0, wxEXPAND|wxALL, 4 );
136
137 m_cbGroup = new wxCheckBox( this, wxID_ANY, _("Group by name"), wxDefaultPosition, wxDefaultSize, 0 );
138 bSizer5->Add( m_cbGroup, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
139
140 m_groupSelected = new wxButton( this, wxID_ANY, _("Group Selected"), wxDefaultPosition, wxDefaultSize, 0 );
141 bSizer5->Add( m_groupSelected, 0, wxALL|wxALIGN_CENTER_VERTICAL, 7 );
142
143 m_refreshButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
144 bSizer5->Add( m_refreshButton, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 10 );
145
146 m_divider2 = new BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
147 m_divider2->Enable( false );
148
149 bSizer5->Add( m_divider2, 0, wxEXPAND|wxALL, 4 );
150
151 m_cbFilterByUnit = new wxCheckBox( this, wxID_ANY, _("Filter by unit:"), wxDefaultPosition, wxDefaultSize, 0 );
152 bSizer5->Add( m_cbFilterByUnit, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
153
154 wxArrayString m_unitFilterChoices;
155 m_unitFilter = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unitFilterChoices, 0 );
156 m_unitFilter->SetSelection( 0 );
157 bSizer5->Add( m_unitFilter, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
158
159
160 bBottomSizer->Add( bSizer5, 0, wxEXPAND|wxTOP|wxBOTTOM|wxRIGHT, 5 );
161
162
163 bBottomSizer->Add( 30, 0, 1, wxEXPAND, 5 );
164
165 m_Buttons = new wxStdDialogButtonSizer();
166 m_ButtonsOK = new wxButton( this, wxID_OK );
167 m_Buttons->AddButton( m_ButtonsOK );
168 m_ButtonsCancel = new wxButton( this, wxID_CANCEL );
169 m_Buttons->AddButton( m_ButtonsCancel );
170 m_Buttons->Realize();
171
172 bBottomSizer->Add( m_Buttons, 0, wxEXPAND|wxALL, 5 );
173
174
175 top_sizer->Add( bBottomSizer, 0, wxLEFT|wxEXPAND, 10 );
176
177
178 this->SetSizer( top_sizer );
179 this->Layout();
180 top_sizer->Fit( this );
181
182 this->Centre( wxBOTH );
183
184 // Connect Events
185 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnClose ) );
186 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnUpdateUI ) );
187 m_grid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnCellEdited ), NULL, this );
188 m_grid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnCellSelected ), NULL, this );
189 m_grid->Connect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnCellSelected ), NULL, this );
190 m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnSize ), NULL, this );
191 m_addButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnAddRow ), NULL, this );
192 m_deleteButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnDeleteRow ), NULL, this );
193 m_cbGroup->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnRebuildRows ), NULL, this );
194 m_groupSelected->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnGroupSelected ), NULL, this );
195 m_refreshButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnRebuildRows ), NULL, this );
196 m_cbFilterByUnit->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnFilterCheckBox ), NULL, this );
197 m_unitFilter->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnFilterChoice ), NULL, this );
198 m_ButtonsCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnCancel ), NULL, this );
199}
200
202{
203 // Disconnect Events
204 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnClose ) );
205 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnUpdateUI ) );
206 m_grid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnCellEdited ), NULL, this );
207 m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnCellSelected ), NULL, this );
208 m_grid->Disconnect( wxEVT_GRID_EDITOR_SHOWN, wxGridEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnCellSelected ), NULL, this );
209 m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnSize ), NULL, this );
210 m_addButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnAddRow ), NULL, this );
211 m_deleteButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnDeleteRow ), NULL, this );
212 m_cbGroup->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnRebuildRows ), NULL, this );
213 m_groupSelected->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnGroupSelected ), NULL, this );
214 m_refreshButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnRebuildRows ), NULL, this );
215 m_cbFilterByUnit->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnFilterCheckBox ), NULL, this );
216 m_unitFilter->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnFilterChoice ), NULL, this );
217 m_ButtonsCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_LIB_EDIT_PIN_TABLE_BASE::OnCancel ), NULL, this );
218
219}
A bitmap button widget that behaves like an AUI toolbar item's button when it is drawn.
Definition: bitmap_button.h:42
bool Enable(bool aEnable=true) override
Enable the button.
virtual void OnUpdateUI(wxUpdateUIEvent &event)=0
virtual void OnAddRow(wxCommandEvent &event)=0
virtual void OnClose(wxCloseEvent &event)=0
virtual void OnCellSelected(wxGridEvent &event)=0
virtual void OnDeleteRow(wxCommandEvent &event)=0
virtual void OnGroupSelected(wxCommandEvent &event)=0
virtual void OnFilterCheckBox(wxCommandEvent &event)=0
virtual void OnCellEdited(wxGridEvent &event)=0
virtual void OnSize(wxSizeEvent &event)=0
virtual void OnRebuildRows(wxCommandEvent &event)=0
DIALOG_LIB_EDIT_PIN_TABLE_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Pin Table"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnCancel(wxCommandEvent &event)=0
virtual void OnFilterChoice(wxCommandEvent &event)=0
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
A bitmap button widget that behaves like a standard dialog button except with an icon.
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:249
#define _(s)