KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_layer_selection_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.1.0-0-g733bf3d)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
8#include "widgets/wx_grid.h"
9
11
13
14DIALOG_LAYER_SELECTION_BASE::DIALOG_LAYER_SELECTION_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
15{
16 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
17
18 wxBoxSizer* bSizerMain;
19 bSizerMain = new wxBoxSizer( wxHORIZONTAL );
20
21 wxBoxSizer* bSizerUpper;
22 bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
23
24 m_leftGridLayers = new wxGrid( this, ID_LEFT_LIST, wxDefaultPosition, wxDefaultSize, 0 );
25
26 // Grid
27 m_leftGridLayers->CreateGrid( 1, 3 );
28 m_leftGridLayers->EnableEditing( false );
29 m_leftGridLayers->EnableGridLines( false );
30 m_leftGridLayers->EnableDragGridSize( false );
31 m_leftGridLayers->SetMargins( 5, 3 );
32
33 // Columns
34 m_leftGridLayers->SetColSize( 0, 24 );
35 m_leftGridLayers->SetColSize( 1, 20 );
36 m_leftGridLayers->SetColSize( 2, 72 );
37 m_leftGridLayers->EnableDragColMove( false );
38 m_leftGridLayers->EnableDragColSize( false );
39 m_leftGridLayers->SetColLabelSize( 0 );
40 m_leftGridLayers->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
41
42 // Rows
43 m_leftGridLayers->EnableDragRowSize( false );
44 m_leftGridLayers->SetRowLabelSize( 0 );
45 m_leftGridLayers->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
46
47 // Label Appearance
48
49 // Cell Defaults
50 m_leftGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
51 bSizerUpper->Add( m_leftGridLayers, 1, wxALL|wxEXPAND, 5 );
52
53 m_rightGridLayers = new wxGrid( this, ID_RIGHT_LIST, wxDefaultPosition, wxDefaultSize, 0 );
54
55 // Grid
56 m_rightGridLayers->CreateGrid( 1, 3 );
57 m_rightGridLayers->EnableEditing( false );
58 m_rightGridLayers->EnableGridLines( false );
59 m_rightGridLayers->EnableDragGridSize( false );
60 m_rightGridLayers->SetMargins( 5, 3 );
61
62 // Columns
63 m_rightGridLayers->SetColSize( 0, 24 );
64 m_rightGridLayers->SetColSize( 1, 20 );
65 m_rightGridLayers->SetColSize( 2, 72 );
66 m_rightGridLayers->EnableDragColMove( false );
67 m_rightGridLayers->EnableDragColSize( false );
68 m_rightGridLayers->SetColLabelSize( 0 );
69 m_rightGridLayers->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
70
71 // Rows
72 m_rightGridLayers->EnableDragRowSize( false );
73 m_rightGridLayers->SetRowLabelSize( 0 );
74 m_rightGridLayers->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
75
76 // Label Appearance
77
78 // Cell Defaults
79 m_rightGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
80 bSizerUpper->Add( m_rightGridLayers, 1, wxALL|wxEXPAND, 5 );
81
82
83 bSizerMain->Add( bSizerUpper, 1, wxEXPAND|wxALL, 10 );
84
85
86 this->SetSizer( bSizerMain );
87 this->Layout();
88 bSizerMain->Fit( this );
89
90 this->Centre( wxBOTH );
91
92 // Connect Events
93 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_LAYER_SELECTION_BASE::OnMouseMove ) );
94 m_leftGridLayers->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftGridCellClick ), NULL, this );
95 m_leftGridLayers->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftButtonReleased ), NULL, this );
96 m_rightGridLayers->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_LAYER_SELECTION_BASE::OnRightGridCellClick ), NULL, this );
97 m_rightGridLayers->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftButtonReleased ), NULL, this );
98}
99
101{
102 // Disconnect Events
103 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_LAYER_SELECTION_BASE::OnMouseMove ) );
104 m_leftGridLayers->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftGridCellClick ), NULL, this );
105 m_leftGridLayers->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftButtonReleased ), NULL, this );
106 m_rightGridLayers->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_LAYER_SELECTION_BASE::OnRightGridCellClick ), NULL, this );
107 m_rightGridLayers->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftButtonReleased ), NULL, this );
108
109}
110
111DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
112{
113 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
114
115 wxBoxSizer* bSizerMain;
116 bSizerMain = new wxBoxSizer( wxVERTICAL );
117
118 wxBoxSizer* bSizerUpper;
119 bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
120
121 wxBoxSizer* bSizerLeft;
122 bSizerLeft = new wxBoxSizer( wxVERTICAL );
123
124 m_staticTextTopLayer = new wxStaticText( this, wxID_ANY, _("Top/Front layer:"), wxDefaultPosition, wxDefaultSize, 0 );
125 m_staticTextTopLayer->Wrap( -1 );
126 bSizerLeft->Add( m_staticTextTopLayer, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
127
128 m_leftGridLayers = new wxGrid( this, ID_LEFT_LIST, wxDefaultPosition, wxDefaultSize, 0 );
129
130 // Grid
131 m_leftGridLayers->CreateGrid( 1, 3 );
132 m_leftGridLayers->EnableEditing( false );
133 m_leftGridLayers->EnableGridLines( false );
134 m_leftGridLayers->EnableDragGridSize( false );
135 m_leftGridLayers->SetMargins( 3, 3 );
136
137 // Columns
138 m_leftGridLayers->SetColSize( 0, 24 );
139 m_leftGridLayers->SetColSize( 1, 20 );
140 m_leftGridLayers->SetColSize( 2, 72 );
141 m_leftGridLayers->EnableDragColMove( false );
142 m_leftGridLayers->EnableDragColSize( false );
143 m_leftGridLayers->SetColLabelSize( 0 );
144 m_leftGridLayers->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
145
146 // Rows
147 m_leftGridLayers->EnableDragRowSize( false );
148 m_leftGridLayers->SetRowLabelSize( 0 );
149 m_leftGridLayers->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
150
151 // Label Appearance
152
153 // Cell Defaults
154 m_leftGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
155 bSizerLeft->Add( m_leftGridLayers, 0, wxALL|wxEXPAND, 5 );
156
157
158 bSizerUpper->Add( bSizerLeft, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
159
160 wxBoxSizer* bSizerRight;
161 bSizerRight = new wxBoxSizer( wxVERTICAL );
162
163 m_staticTextBottomLayer = new wxStaticText( this, wxID_ANY, _("Bottom/Back layer:"), wxDefaultPosition, wxDefaultSize, 0 );
164 m_staticTextBottomLayer->Wrap( -1 );
165 bSizerRight->Add( m_staticTextBottomLayer, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
166
167 m_rightGridLayers = new wxGrid( this, ID_RIGHT_LIST, wxDefaultPosition, wxDefaultSize, 0 );
168
169 // Grid
170 m_rightGridLayers->CreateGrid( 1, 3 );
171 m_rightGridLayers->EnableEditing( false );
172 m_rightGridLayers->EnableGridLines( false );
173 m_rightGridLayers->EnableDragGridSize( false );
174 m_rightGridLayers->SetMargins( 3, 3 );
175
176 // Columns
177 m_rightGridLayers->SetColSize( 0, 24 );
178 m_rightGridLayers->SetColSize( 1, 20 );
179 m_rightGridLayers->SetColSize( 2, 72 );
180 m_rightGridLayers->EnableDragColMove( false );
181 m_rightGridLayers->EnableDragColSize( false );
182 m_rightGridLayers->SetColLabelSize( 0 );
183 m_rightGridLayers->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
184
185 // Rows
186 m_rightGridLayers->EnableDragRowSize( false );
187 m_rightGridLayers->SetRowLabelSize( 0 );
188 m_rightGridLayers->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
189
190 // Label Appearance
191
192 // Cell Defaults
193 m_rightGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
194 bSizerRight->Add( m_rightGridLayers, 0, wxALL|wxEXPAND, 5 );
195
196
197 bSizerUpper->Add( bSizerRight, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
198
199 wxBoxSizer* bSizer7;
200 bSizer7 = new wxBoxSizer( wxVERTICAL );
201
202 m_addToPresetsButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
203 bSizer7->Add( m_addToPresetsButton, 0, wxALL, 5 );
204
205
206 bSizerUpper->Add( bSizer7, 0, wxALIGN_CENTER_VERTICAL, 5 );
207
208 wxStaticBoxSizer* m_presetsSizer;
209 m_presetsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Copper layer pair presets") ), wxVERTICAL );
210
211 m_presetsGrid = new WX_GRID( m_presetsSizer->GetStaticBox(), ID_LEFT_LIST, wxDefaultPosition, wxDefaultSize, 0 );
212
213 // Grid
214 m_presetsGrid->CreateGrid( 0, 4 );
215 m_presetsGrid->EnableEditing( true );
216 m_presetsGrid->EnableGridLines( true );
217 m_presetsGrid->EnableDragGridSize( false );
218 m_presetsGrid->SetMargins( 5, 3 );
219
220 // Columns
221 m_presetsGrid->SetColSize( 0, 60 );
222 m_presetsGrid->SetColSize( 1, 24 );
223 m_presetsGrid->SetColSize( 2, 100 );
224 m_presetsGrid->SetColSize( 3, 200 );
225 m_presetsGrid->EnableDragColMove( false );
226 m_presetsGrid->EnableDragColSize( false );
227 m_presetsGrid->SetColLabelValue( 0, _("Enabled") );
228 m_presetsGrid->SetColLabelValue( 1, wxEmptyString );
229 m_presetsGrid->SetColLabelValue( 2, _("Layers") );
230 m_presetsGrid->SetColLabelValue( 3, _("Label") );
231 m_presetsGrid->SetColLabelSize( wxGRID_AUTOSIZE );
232 m_presetsGrid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
233
234 // Rows
235 m_presetsGrid->EnableDragRowSize( false );
236 m_presetsGrid->SetRowLabelSize( 0 );
237 m_presetsGrid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
238
239 // Label Appearance
240
241 // Cell Defaults
242 m_presetsGrid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
243 m_presetsSizer->Add( m_presetsGrid, 1, wxALL|wxEXPAND, 0 );
244
245 m_deleteRowButton = new wxBitmapButton( m_presetsSizer->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
246 m_presetsSizer->Add( m_deleteRowButton, 0, wxALL, 5 );
247
248
249 bSizerUpper->Add( m_presetsSizer, 1, wxEXPAND, 5 );
250
251
252 bSizerMain->Add( bSizerUpper, 1, wxALL|wxEXPAND, 5 );
253
254 m_sdbSizer = new wxStdDialogButtonSizer();
255 m_sdbSizerOK = new wxButton( this, wxID_OK );
256 m_sdbSizer->AddButton( m_sdbSizerOK );
257 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
258 m_sdbSizer->AddButton( m_sdbSizerCancel );
259 m_sdbSizer->Realize();
260
261 bSizerMain->Add( m_sdbSizer, 0, wxBOTTOM|wxEXPAND|wxLEFT|wxTOP, 5 );
262
263
264 this->SetSizer( bSizerMain );
265 this->Layout();
266
267 this->Centre( wxBOTH );
268}
269
271{
272}
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Select Copper Layer Pair"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(744, 217), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnMouseMove(wxUpdateUIEvent &event)
virtual void OnRightGridCellClick(wxGridEvent &event)
DIALOG_LAYER_SELECTION_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Select Layer"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnLeftGridCellClick(wxGridEvent &event)
virtual void OnLeftButtonReleased(wxMouseEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
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 ID_LEFT_LIST
#define ID_RIGHT_LIST
#define _(s)