KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_setup_buses_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
9#include "widgets/wx_grid.h"
10
12
14
15PANEL_SETUP_BUSES_BASE::PANEL_SETUP_BUSES_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
16{
17 wxBoxSizer* bPanelSizer;
18 bPanelSizer = new wxBoxSizer( wxHORIZONTAL );
19
20 bMargins = new wxBoxSizer( wxHORIZONTAL );
21
22 bLeftCol = new wxBoxSizer( wxVERTICAL );
23
24 m_busesLabel = new wxStaticText( this, wxID_ANY, _("Bus definitions:"), wxDefaultPosition, wxDefaultSize, 0 );
25 m_busesLabel->Wrap( -1 );
26 bLeftCol->Add( m_busesLabel, 0, wxTOP|wxLEFT, 8 );
27
28
29 bLeftCol->Add( 0, 3, 0, wxEXPAND, 5 );
30
31 m_aliasesGrid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
32
33 // Grid
34 m_aliasesGrid->CreateGrid( 0, 1 );
35 m_aliasesGrid->EnableEditing( true );
36 m_aliasesGrid->EnableGridLines( true );
37 m_aliasesGrid->EnableDragGridSize( false );
38 m_aliasesGrid->SetMargins( 0, 0 );
39
40 // Columns
41 m_aliasesGrid->SetColSize( 0, 300 );
42 m_aliasesGrid->EnableDragColMove( false );
43 m_aliasesGrid->EnableDragColSize( true );
44 m_aliasesGrid->SetColLabelValue( 0, _("Alias") );
45 m_aliasesGrid->SetColLabelSize( wxGRID_AUTOSIZE );
46 m_aliasesGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
47
48 // Rows
49 m_aliasesGrid->EnableDragRowSize( true );
50 m_aliasesGrid->SetRowLabelSize( 0 );
51 m_aliasesGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
52
53 // Label Appearance
54
55 // Cell Defaults
56 m_aliasesGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
57 m_aliasesGrid->SetMinSize( wxSize( -1,180 ) );
58
59 bLeftCol->Add( m_aliasesGrid, 1, wxEXPAND, 10 );
60
61 wxBoxSizer* bSizer10;
62 bSizer10 = new wxBoxSizer( wxHORIZONTAL );
63
64 m_addAlias = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
65 bSizer10->Add( m_addAlias, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
66
67
68 bSizer10->Add( 20, 0, 0, wxEXPAND, 5 );
69
70 m_deleteAlias = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
71 bSizer10->Add( m_deleteAlias, 0, wxALL, 5 );
72
73
74 bSizer10->Add( 15, 0, 0, 0, 5 );
75
76 m_source = new wxStaticText( this, wxID_ANY, _("(source)"), wxDefaultPosition, wxDefaultSize, 0 );
77 m_source->Wrap( -1 );
78 bSizer10->Add( m_source, 1, wxALIGN_CENTER_VERTICAL|wxLEFT|wxRIGHT, 5 );
79
80
81 bLeftCol->Add( bSizer10, 0, wxEXPAND, 10 );
82
83
84 bMargins->Add( bLeftCol, 1, wxEXPAND|wxRIGHT, 5 );
85
86 wxBoxSizer* bRightColumn;
87 bRightColumn = new wxBoxSizer( wxVERTICAL );
88
89 m_membersBook = new wxSimplebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
90 membersPanel = new wxPanel( m_membersBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
91 wxBoxSizer* bSizer7;
92 bSizer7 = new wxBoxSizer( wxVERTICAL );
93
94 m_membersLabel = new wxStaticText( membersPanel, wxID_ANY, _("Members of '%s':"), wxDefaultPosition, wxDefaultSize, 0 );
95 m_membersLabel->Wrap( -1 );
96 bSizer7->Add( m_membersLabel, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 );
97
98
99 bSizer7->Add( 0, 3, 0, wxEXPAND, 5 );
100
101 m_membersGrid = new WX_GRID( membersPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
102
103 // Grid
104 m_membersGrid->CreateGrid( 0, 1 );
105 m_membersGrid->EnableEditing( true );
106 m_membersGrid->EnableGridLines( true );
107 m_membersGrid->EnableDragGridSize( false );
108 m_membersGrid->SetMargins( 0, 0 );
109
110 // Columns
111 m_membersGrid->SetColSize( 0, 300 );
112 m_membersGrid->EnableDragColMove( false );
113 m_membersGrid->EnableDragColSize( true );
114 m_membersGrid->SetColLabelValue( 0, _("Net / Nested Bus Name") );
115 m_membersGrid->SetColLabelSize( wxGRID_AUTOSIZE );
116 m_membersGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
117
118 // Rows
119 m_membersGrid->EnableDragRowSize( true );
120 m_membersGrid->SetRowLabelSize( 0 );
121 m_membersGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
122
123 // Label Appearance
124
125 // Cell Defaults
126 m_membersGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
127 m_membersGrid->SetMinSize( wxSize( -1,180 ) );
128
129 bSizer7->Add( m_membersGrid, 1, wxEXPAND, 5 );
130
131 wxBoxSizer* bSizer101;
132 bSizer101 = new wxBoxSizer( wxHORIZONTAL );
133
134 m_addMember = new STD_BITMAP_BUTTON( membersPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
135 bSizer101->Add( m_addMember, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
136
137
138 bSizer101->Add( 20, 0, 0, wxEXPAND, 5 );
139
140 m_removeMember = new STD_BITMAP_BUTTON( membersPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
141 bSizer101->Add( m_removeMember, 0, wxALL, 5 );
142
143
144 bSizer7->Add( bSizer101, 0, wxEXPAND, 5 );
145
146
147 membersPanel->SetSizer( bSizer7 );
148 membersPanel->Layout();
149 bSizer7->Fit( membersPanel );
150 m_membersBook->AddPage( membersPanel, _("a page"), false );
151 emptyPanel = new wxPanel( m_membersBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
152 emptyPanel->Enable( false );
153
154 m_membersBook->AddPage( emptyPanel, _("a page"), false );
155
156 bRightColumn->Add( m_membersBook, 1, wxEXPAND, 5 );
157
158
159 bMargins->Add( bRightColumn, 1, wxEXPAND|wxLEFT, 5 );
160
161
162 bPanelSizer->Add( bMargins, 1, wxEXPAND, 5 );
163
164
165 this->SetSizer( bPanelSizer );
166 this->Layout();
167 bPanelSizer->Fit( this );
168
169 // Connect Events
170 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BUSES_BASE::OnUpdateUI ) );
171 m_aliasesGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_BUSES_BASE::OnSizeGrid ), NULL, this );
172 m_addAlias->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BUSES_BASE::OnAddAlias ), NULL, this );
173 m_deleteAlias->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BUSES_BASE::OnDeleteAlias ), NULL, this );
174 m_membersGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_BUSES_BASE::OnSizeGrid ), NULL, this );
175 m_addMember->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BUSES_BASE::OnAddMember ), NULL, this );
176 m_removeMember->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BUSES_BASE::OnRemoveMember ), NULL, this );
177}
178
180{
181 // Disconnect Events
182 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SETUP_BUSES_BASE::OnUpdateUI ) );
183 m_aliasesGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_BUSES_BASE::OnSizeGrid ), NULL, this );
184 m_addAlias->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BUSES_BASE::OnAddAlias ), NULL, this );
185 m_deleteAlias->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BUSES_BASE::OnDeleteAlias ), NULL, this );
186 m_membersGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SETUP_BUSES_BASE::OnSizeGrid ), NULL, this );
187 m_addMember->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BUSES_BASE::OnAddMember ), NULL, this );
188 m_removeMember->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SETUP_BUSES_BASE::OnRemoveMember ), NULL, this );
189
190}
const char * name
Definition: DXF_plotter.cpp:57
virtual void OnRemoveMember(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_addAlias
virtual void OnDeleteAlias(wxCommandEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void OnAddMember(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_addMember
virtual void OnSizeGrid(wxSizeEvent &event)
PANEL_SETUP_BUSES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
virtual void OnAddAlias(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_deleteAlias
STD_BITMAP_BUTTON * m_removeMember
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)