KiCad PCB EDA Suite
dialog_layer_selection_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Jul 10 2019)
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 ) : DIALOG_SHIM( 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_CENTER, wxALIGN_CENTER );
39 
40  // Rows
41  m_leftGridLayers->EnableDragRowSize( false );
42  m_leftGridLayers->SetRowLabelSize( 0 );
43  m_leftGridLayers->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
44 
45  // Label Appearance
46 
47  // Cell Defaults
48  m_leftGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
49  bSizerUpper->Add( m_leftGridLayers, 1, wxALL|wxEXPAND, 5 );
50 
51  m_rightGridLayers = new wxGrid( this, ID_RIGHT_LIST, wxDefaultPosition, wxDefaultSize, 0 );
52 
53  // Grid
54  m_rightGridLayers->CreateGrid( 1, 3 );
55  m_rightGridLayers->EnableEditing( false );
56  m_rightGridLayers->EnableGridLines( false );
57  m_rightGridLayers->EnableDragGridSize( false );
58  m_rightGridLayers->SetMargins( 5, 3 );
59 
60  // Columns
61  m_rightGridLayers->SetColSize( 0, 24 );
62  m_rightGridLayers->SetColSize( 1, 20 );
63  m_rightGridLayers->SetColSize( 2, 72 );
64  m_rightGridLayers->EnableDragColMove( false );
65  m_rightGridLayers->EnableDragColSize( false );
66  m_rightGridLayers->SetColLabelSize( 0 );
67  m_rightGridLayers->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
68 
69  // Rows
70  m_rightGridLayers->EnableDragRowSize( false );
71  m_rightGridLayers->SetRowLabelSize( 0 );
72  m_rightGridLayers->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
73 
74  // Label Appearance
75 
76  // Cell Defaults
77  m_rightGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
78  bSizerUpper->Add( m_rightGridLayers, 1, wxALL|wxEXPAND, 5 );
79 
80 
81  bSizerMain->Add( bSizerUpper, 1, wxEXPAND|wxALL, 10 );
82 
83 
84  this->SetSizer( bSizerMain );
85  this->Layout();
86  bSizerMain->Fit( this );
87 
88  this->Centre( wxBOTH );
89 
90  // Connect Events
91  m_leftGridLayers->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftGridCellClick ), NULL, this );
92  m_leftGridLayers->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftButtonReleased ), NULL, this );
93  m_rightGridLayers->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_LAYER_SELECTION_BASE::OnRightGridCellClick ), NULL, this );
94  m_rightGridLayers->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftButtonReleased ), NULL, this );
95 }
96 
98 {
99  // Disconnect Events
100  m_leftGridLayers->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftGridCellClick ), NULL, this );
101  m_leftGridLayers->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftButtonReleased ), NULL, this );
102  m_rightGridLayers->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_LAYER_SELECTION_BASE::OnRightGridCellClick ), NULL, this );
103  m_rightGridLayers->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( DIALOG_LAYER_SELECTION_BASE::OnLeftButtonReleased ), NULL, this );
104 
105 }
106 
107 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 ) : DIALOG_SHIM( parent, id, title, pos, size, style )
108 {
109  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
110 
111  wxBoxSizer* bSizerMain;
112  bSizerMain = new wxBoxSizer( wxVERTICAL );
113 
114  wxBoxSizer* bSizerUpper;
115  bSizerUpper = new wxBoxSizer( wxHORIZONTAL );
116 
117  wxBoxSizer* bSizerLeft;
118  bSizerLeft = new wxBoxSizer( wxVERTICAL );
119 
120  m_staticTextTopLayer = new wxStaticText( this, wxID_ANY, _("Top/Front layer:"), wxDefaultPosition, wxDefaultSize, 0 );
121  m_staticTextTopLayer->Wrap( -1 );
122  bSizerLeft->Add( m_staticTextTopLayer, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
123 
124  m_leftGridLayers = new wxGrid( this, ID_LEFT_LIST, wxDefaultPosition, wxDefaultSize, 0 );
125 
126  // Grid
127  m_leftGridLayers->CreateGrid( 1, 3 );
128  m_leftGridLayers->EnableEditing( false );
129  m_leftGridLayers->EnableGridLines( false );
130  m_leftGridLayers->EnableDragGridSize( false );
131  m_leftGridLayers->SetMargins( 3, 3 );
132 
133  // Columns
134  m_leftGridLayers->SetColSize( 0, 24 );
135  m_leftGridLayers->SetColSize( 1, 20 );
136  m_leftGridLayers->SetColSize( 2, 72 );
137  m_leftGridLayers->EnableDragColMove( false );
138  m_leftGridLayers->EnableDragColSize( false );
139  m_leftGridLayers->SetColLabelSize( 0 );
140  m_leftGridLayers->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
141 
142  // Rows
143  m_leftGridLayers->EnableDragRowSize( false );
144  m_leftGridLayers->SetRowLabelSize( 0 );
145  m_leftGridLayers->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
146 
147  // Label Appearance
148 
149  // Cell Defaults
150  m_leftGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
151  bSizerLeft->Add( m_leftGridLayers, 0, wxALL|wxEXPAND, 5 );
152 
153 
154  bSizerUpper->Add( bSizerLeft, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
155 
156  wxBoxSizer* bSizerRight;
157  bSizerRight = new wxBoxSizer( wxVERTICAL );
158 
159  m_staticTextBottomLayer = new wxStaticText( this, wxID_ANY, _("Bottom/Back layer:"), wxDefaultPosition, wxDefaultSize, 0 );
160  m_staticTextBottomLayer->Wrap( -1 );
161  bSizerRight->Add( m_staticTextBottomLayer, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
162 
163  m_rightGridLayers = new wxGrid( this, ID_RIGHT_LIST, wxDefaultPosition, wxDefaultSize, 0 );
164 
165  // Grid
166  m_rightGridLayers->CreateGrid( 1, 3 );
167  m_rightGridLayers->EnableEditing( false );
168  m_rightGridLayers->EnableGridLines( false );
169  m_rightGridLayers->EnableDragGridSize( false );
170  m_rightGridLayers->SetMargins( 3, 3 );
171 
172  // Columns
173  m_rightGridLayers->SetColSize( 0, 24 );
174  m_rightGridLayers->SetColSize( 1, 20 );
175  m_rightGridLayers->SetColSize( 2, 72 );
176  m_rightGridLayers->EnableDragColMove( false );
177  m_rightGridLayers->EnableDragColSize( false );
178  m_rightGridLayers->SetColLabelSize( 0 );
179  m_rightGridLayers->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
180 
181  // Rows
182  m_rightGridLayers->EnableDragRowSize( false );
183  m_rightGridLayers->SetRowLabelSize( 0 );
184  m_rightGridLayers->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
185 
186  // Label Appearance
187 
188  // Cell Defaults
189  m_rightGridLayers->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
190  bSizerRight->Add( m_rightGridLayers, 0, wxALL|wxEXPAND, 5 );
191 
192 
193  bSizerUpper->Add( bSizerRight, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
194 
195 
196  bSizerMain->Add( bSizerUpper, 1, wxALL|wxEXPAND, 5 );
197 
198  m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
199  bSizerMain->Add( m_staticline, 0, wxEXPAND | wxALL, 5 );
200 
201  m_sdbSizer = new wxStdDialogButtonSizer();
202  m_sdbSizerOK = new wxButton( this, wxID_OK );
203  m_sdbSizer->AddButton( m_sdbSizerOK );
204  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
205  m_sdbSizer->AddButton( m_sdbSizerCancel );
206  m_sdbSizer->Realize();
207 
208  bSizerMain->Add( m_sdbSizer, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_RIGHT, 5 );
209 
210 
211  this->SetSizer( bSizerMain );
212  this->Layout();
213  bSizerMain->Fit( this );
214 
215  this->Centre( wxBOTH );
216 
217  // Connect Events
218  m_leftGridLayers->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnLeftGridCellClick ), NULL, this );
219  m_rightGridLayers->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnRightGridCellClick ), NULL, this );
220 }
221 
223 {
224  // Disconnect Events
225  m_leftGridLayers->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnLeftGridCellClick ), NULL, this );
226  m_rightGridLayers->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnRightGridCellClick ), NULL, this );
227 
228 }
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)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:83
#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)
#define _(s)
virtual void OnLeftGridCellClick(wxGridEvent &event)