KiCad PCB EDA Suite
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE Class Reference

Class DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE. More...

#include <dialog_layer_selection_base.h>

Inheritance diagram for DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE:
SELECT_COPPER_LAYERS_PAIR_DIALOG

Public Member Functions

 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)
 
 ~DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE ()
 

Protected Member Functions

virtual void OnLeftGridCellClick (wxGridEvent &event)
 
virtual void OnRightGridCellClick (wxGridEvent &event)
 

Protected Attributes

wxStaticText * m_staticTextTopLayer
 
wxGrid * m_leftGridLayers
 
wxStaticText * m_staticTextBottomLayer
 
wxGrid * m_rightGridLayers
 
wxStaticLine * m_staticline1
 
wxStdDialogButtonSizer * m_sdbSizer
 
wxButton * m_sdbSizerOK
 
wxButton * m_sdbSizerCancel
 

Detailed Description

Constructor & Destructor Documentation

DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::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 
)

Definition at line 110 of file dialog_layer_selection_base.cpp.

References ID_LEFT_LIST, ID_RIGHT_LIST, m_leftGridLayers, m_rightGridLayers, m_sdbSizer, m_sdbSizerCancel, m_sdbSizerOK, m_staticline1, m_staticTextBottomLayer, m_staticTextTopLayer, OnLeftGridCellClick(), and OnRightGridCellClick().

110  : 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 }
virtual void OnRightGridCellClick(wxGridEvent &event)
#define ID_RIGHT_LIST
#define ID_LEFT_LIST
virtual void OnLeftGridCellClick(wxGridEvent &event)
DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::~DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE ( )

Definition at line 228 of file dialog_layer_selection_base.cpp.

References m_leftGridLayers, m_rightGridLayers, OnLeftGridCellClick(), and OnRightGridCellClick().

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 }
virtual void OnRightGridCellClick(wxGridEvent &event)
virtual void OnLeftGridCellClick(wxGridEvent &event)

Member Function Documentation

virtual void DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnLeftGridCellClick ( wxGridEvent &  event)
inlineprotectedvirtual
virtual void DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnRightGridCellClick ( wxGridEvent &  event)
inlineprotectedvirtual

Member Data Documentation

wxStdDialogButtonSizer* DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::m_sdbSizer
protected
wxButton* DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::m_sdbSizerCancel
protected
wxButton* DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::m_sdbSizerOK
protected
wxStaticLine* DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::m_staticline1
protected
wxStaticText* DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::m_staticTextBottomLayer
protected
wxStaticText* DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::m_staticTextTopLayer
protected

The documentation for this class was generated from the following files: