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