KiCad PCB EDA Suite
dialog_layer_selection_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 30 2017)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
9 
11 
12 DIALOG_LAYER_SELECTION_BASE::DIALOG_LAYER_SELECTION_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
13 {
14  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15 
16  wxBoxSizer* bSizerMain;
17  bSizerMain = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bSizerUpper;
20  bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
21 
22  m_leftGridLayers = new wxGrid( this, ID_LEFT_LIST, wxDefaultPosition, wxDefaultSize, 0 );
23 
24  // Grid
25  m_leftGridLayers->CreateGrid( 1, 3 );
26  m_leftGridLayers->EnableEditing( false );
27  m_leftGridLayers->EnableGridLines( false );
28  m_leftGridLayers->EnableDragGridSize( false );
29  m_leftGridLayers->SetMargins( 5, 3 );
30 
31  // Columns
32  m_leftGridLayers->SetColSize( 0, 24 );
33  m_leftGridLayers->SetColSize( 1, 20 );
34  m_leftGridLayers->SetColSize( 2, 72 );
35  m_leftGridLayers->EnableDragColMove( false );
36  m_leftGridLayers->EnableDragColSize( false );
37  m_leftGridLayers->SetColLabelSize( 0 );
38  m_leftGridLayers->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
39 
40  // Rows
41  m_leftGridLayers->EnableDragRowSize( false );
42  m_leftGridLayers->SetRowLabelSize( 0 );
43  m_leftGridLayers->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
44 
45  // Label Appearance
46  m_leftGridLayers->SetLabelBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
47 
48  // Cell Defaults
49  m_leftGridLayers->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) );
50  m_leftGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
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_CENTRE, wxALIGN_CENTRE );
70 
71  // Rows
72  m_rightGridLayers->EnableDragRowSize( false );
73  m_rightGridLayers->SetRowLabelSize( 0 );
74  m_rightGridLayers->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
75 
76  // Label Appearance
77 
78  // Cell Defaults
79  m_rightGridLayers->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) );
80  m_rightGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
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  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  m_leftGridLayers->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftGridCellClick ), NULL, this );
104  m_leftGridLayers->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftButtonReleased ), NULL, this );
105  m_rightGridLayers->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_LAYER_SELECTION_BASE::OnRightGridCellClick ), NULL, this );
106  m_rightGridLayers->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftButtonReleased ), NULL, this );
107 
108 }
109 
110 DIALOG_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 ) : wxDialog( parent, id, title, pos, size, style )
111 {
112  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
113 
114  wxBoxSizer* bSizerMain;
115  bSizerMain = new wxBoxSizer( wxVERTICAL );
116 
117  wxBoxSizer* bSizerUpper;
118  bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
119 
120  wxBoxSizer* bSizerLeft;
121  bSizerLeft = new wxBoxSizer( wxVERTICAL );
122 
123  m_staticTextTopLayer = new wxStaticText( this, wxID_ANY, _("Top/Front layer:"), wxDefaultPosition, wxDefaultSize, 0 );
124  m_staticTextTopLayer->Wrap( -1 );
125  bSizerLeft->Add( m_staticTextTopLayer, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
126 
127  m_leftGridLayers = new wxGrid( this, ID_LEFT_LIST, wxDefaultPosition, wxDefaultSize, 0 );
128 
129  // Grid
130  m_leftGridLayers->CreateGrid( 1, 3 );
131  m_leftGridLayers->EnableEditing( false );
132  m_leftGridLayers->EnableGridLines( false );
133  m_leftGridLayers->EnableDragGridSize( false );
134  m_leftGridLayers->SetMargins( 3, 3 );
135 
136  // Columns
137  m_leftGridLayers->SetColSize( 0, 24 );
138  m_leftGridLayers->SetColSize( 1, 20 );
139  m_leftGridLayers->SetColSize( 2, 72 );
140  m_leftGridLayers->EnableDragColMove( false );
141  m_leftGridLayers->EnableDragColSize( false );
142  m_leftGridLayers->SetColLabelSize( 0 );
143  m_leftGridLayers->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
144 
145  // Rows
146  m_leftGridLayers->EnableDragRowSize( false );
147  m_leftGridLayers->SetRowLabelSize( 0 );
148  m_leftGridLayers->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
149 
150  // Label Appearance
151  m_leftGridLayers->SetLabelBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
152 
153  // Cell Defaults
154  m_leftGridLayers->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) );
155  m_leftGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
156  bSizerLeft->Add( m_leftGridLayers, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 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, ID_RIGHT_LIST, 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_CENTRE, wxALIGN_CENTRE );
185 
186  // Rows
187  m_rightGridLayers->EnableDragRowSize( false );
188  m_rightGridLayers->SetRowLabelSize( 0 );
189  m_rightGridLayers->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
190 
191  // Label Appearance
192 
193  // Cell Defaults
194  m_rightGridLayers->SetDefaultCellBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_MENU ) );
195  m_rightGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
196  bSizerRight->Add( m_rightGridLayers, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
197 
198 
199  bSizerUpper->Add( bSizerRight, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
200 
201 
202  bSizerMain->Add( bSizerUpper, 0, wxALL|wxEXPAND, 5 );
203 
204  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
205  bSizerMain->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
206 
207  m_sdbSizer = new wxStdDialogButtonSizer();
208  m_sdbSizerOK = new wxButton( this, wxID_OK );
209  m_sdbSizer->AddButton( m_sdbSizerOK );
210  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
211  m_sdbSizer->AddButton( m_sdbSizerCancel );
212  m_sdbSizer->Realize();
213 
214  bSizerMain->Add( m_sdbSizer, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
215 
216 
217  this->SetSizer( bSizerMain );
218  this->Layout();
219  bSizerMain->Fit( this );
220 
221  this->Centre( wxBOTH );
222 
223  // Connect Events
224  m_leftGridLayers->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnLeftGridCellClick ), NULL, this );
225  m_rightGridLayers->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnRightGridCellClick ), NULL, this );
226 }
227 
229 {
230  // Disconnect Events
231  m_leftGridLayers->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnLeftGridCellClick ), NULL, this );
232  m_rightGridLayers->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnRightGridCellClick ), NULL, this );
233 
234 }
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 OnRightGridCellClick(wxGridEvent &event)
#define ID_RIGHT_LIST
virtual void OnLeftButtonReleased(wxMouseEvent &event)
#define ID_LEFT_LIST
virtual void OnRightGridCellClick(wxGridEvent &event)
virtual void OnLeftGridCellClick(wxGridEvent &event)
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 OnLeftGridCellClick(wxGridEvent &event)