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