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