KiCad PCB EDA Suite
dialog_swap_layers_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version Dec 30 2017)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
8#include "widgets/wx_grid.h"
9
11
13
14DIALOG_SWAP_LAYERS_BASE::DIALOG_SWAP_LAYERS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
15{
16 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
17
18 wxBoxSizer* bMainSizer;
19 bMainSizer = new wxBoxSizer( wxVERTICAL );
20
21 wxBoxSizer* bMarginsSizer;
22 bMarginsSizer = new wxBoxSizer( wxVERTICAL );
23
24 m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
25
26 // Grid
27 m_grid->CreateGrid( 2, 2 );
28 m_grid->EnableEditing( true );
29 m_grid->EnableGridLines( true );
30 m_grid->EnableDragGridSize( false );
31 m_grid->SetMargins( 0, 0 );
32
33 // Columns
34 m_grid->SetColSize( 0, 125 );
35 m_grid->SetColSize( 1, 125 );
36 m_grid->EnableDragColMove( false );
37 m_grid->EnableDragColSize( false );
39 m_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
40
41 // Rows
42 m_grid->EnableDragRowSize( false );
43 m_grid->SetRowLabelSize( 0 );
44 m_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
45
46 // Label Appearance
47
48 // Cell Defaults
49 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
50 m_grid->SetMinSize( wxSize( 250,150 ) );
51
52 bMarginsSizer->Add( m_grid, 1, wxEXPAND|wxALL, 5 );
53
54
55 bMainSizer->Add( bMarginsSizer, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 );
56
57 m_sdbSizer = new wxStdDialogButtonSizer();
58 m_sdbSizerOK = new wxButton( this, wxID_OK );
59 m_sdbSizer->AddButton( m_sdbSizerOK );
60 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
61 m_sdbSizer->AddButton( m_sdbSizerCancel );
62 m_sdbSizer->Realize();
63
64 bMainSizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
65
66
67 this->SetSizer( bMainSizer );
68 this->Layout();
69 bMainSizer->Fit( this );
70
71 this->Centre( wxBOTH );
72
73 // Connect Events
74 m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SWAP_LAYERS_BASE::OnSize ), NULL, this );
75}
76
78{
79 // Disconnect Events
80 m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_SWAP_LAYERS_BASE::OnSize ), NULL, this );
81
82}
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
DIALOG_SWAP_LAYERS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Swap Layers"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnSize(wxSizeEvent &event)
wxStdDialogButtonSizer * m_sdbSizer
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:74