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(400, 175), long style=wxDEFAULT_DIALOG_STYLE)
 
 ~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( 400,175 ),
long  style = wxDEFAULT_DIALOG_STYLE 
)

Definition at line 103 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().

103  : 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 }
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 216 of file dialog_layer_selection_base.cpp.

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

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 }
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: