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)
 
virtual void OnCancelClick (wxCommandEvent &event)
 
virtual void OnOKClick (wxCommandEvent &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 106 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, OnCancelClick(), OnLeftGridCellClick(), OnOKClick(), and OnRightGridCellClick().

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

Definition at line 222 of file dialog_layer_selection_base.cpp.

References m_leftGridLayers, m_rightGridLayers, m_sdbSizerCancel, m_sdbSizerOK, OnCancelClick(), OnLeftGridCellClick(), OnOKClick(), and OnRightGridCellClick().

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

Member Function Documentation

virtual void DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnCancelClick ( wxCommandEvent &  event)
inlineprotectedvirtual
virtual void DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnLeftGridCellClick ( wxGridEvent &  event)
inlineprotectedvirtual
virtual void DIALOG_COPPER_LAYER_PAIR_SELECTION_BASE::OnOKClick ( wxCommandEvent &  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: