KiCad PCB EDA Suite
panel_eeschema_template_fieldnames_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Aug 2 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
8 #include "widgets/wx_grid.h"
9 
11 
13 
14 PANEL_EESCHEMA_TEMPLATE_FIELDNAMES_BASE::PANEL_EESCHEMA_TEMPLATE_FIELDNAMES_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
15 {
16  wxBoxSizer* bPanelSizer;
17  bPanelSizer = new wxBoxSizer( wxHORIZONTAL );
18 
19  wxBoxSizer* bMargins;
20  bMargins = new wxBoxSizer( wxVERTICAL );
21 
22  m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
23 
24  // Grid
25  m_grid->CreateGrid( 0, 3 );
26  m_grid->EnableEditing( true );
27  m_grid->EnableGridLines( true );
28  m_grid->EnableDragGridSize( false );
29  m_grid->SetMargins( 0, 0 );
30 
31  // Columns
32  m_grid->SetColSize( 0, 300 );
33  m_grid->SetColSize( 1, 60 );
34  m_grid->SetColSize( 2, 60 );
35  m_grid->EnableDragColMove( false );
36  m_grid->EnableDragColSize( true );
37  m_grid->SetColLabelSize( 22 );
38  m_grid->SetColLabelValue( 0, _("Name") );
39  m_grid->SetColLabelValue( 1, _("Visible") );
40  m_grid->SetColLabelValue( 2, _("URL") );
41  m_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
42 
43  // Rows
44  m_grid->EnableDragRowSize( true );
45  m_grid->SetRowLabelSize( 0 );
46  m_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
47 
48  // Label Appearance
49 
50  // Cell Defaults
51  m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
52  bMargins->Add( m_grid, 1, wxEXPAND|wxTOP, 2 );
53 
54  wxBoxSizer* bSizer10;
55  bSizer10 = new wxBoxSizer( wxHORIZONTAL );
56 
57  m_addFieldButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
58  m_addFieldButton->SetMinSize( wxSize( 29,29 ) );
59 
60  bSizer10->Add( m_addFieldButton, 0, wxTOP|wxRIGHT, 5 );
61 
62 
63  bSizer10->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
64 
65  m_deleteFieldButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
66  m_deleteFieldButton->SetMinSize( wxSize( 29,29 ) );
67 
68  bSizer10->Add( m_deleteFieldButton, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
69 
70 
71  bMargins->Add( bSizer10, 0, wxEXPAND, 5 );
72 
73 
74  bPanelSizer->Add( bMargins, 1, wxEXPAND|wxRIGHT|wxLEFT, 10 );
75 
76 
77  this->SetSizer( bPanelSizer );
78  this->Layout();
79  bPanelSizer->Fit( this );
80 
81  // Connect Events
82  m_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_EESCHEMA_TEMPLATE_FIELDNAMES_BASE::OnSizeGrid ), NULL, this );
83  m_addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_EESCHEMA_TEMPLATE_FIELDNAMES_BASE::OnAddButtonClick ), NULL, this );
84  m_deleteFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_EESCHEMA_TEMPLATE_FIELDNAMES_BASE::OnDeleteButtonClick ), NULL, this );
85 }
86 
88 {
89  // Disconnect Events
90  m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_EESCHEMA_TEMPLATE_FIELDNAMES_BASE::OnSizeGrid ), NULL, this );
91  m_addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_EESCHEMA_TEMPLATE_FIELDNAMES_BASE::OnAddButtonClick ), NULL, this );
92  m_deleteFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_EESCHEMA_TEMPLATE_FIELDNAMES_BASE::OnDeleteButtonClick ), NULL, this );
93 
94 }
const char * name
Definition: DXF_plotter.cpp:61
PANEL_EESCHEMA_TEMPLATE_FIELDNAMES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)