KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_template_fieldnames_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_grid.h"
10
12
14
15PANEL_TEMPLATE_FIELDNAMES_BASE::PANEL_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 )
16{
17 wxBoxSizer* bPanelSizer;
18 bPanelSizer = new wxBoxSizer( wxVERTICAL );
19
20 m_title = new wxStaticText( this, wxID_ANY, _("Field name templates:"), wxDefaultPosition, wxDefaultSize, 0 );
21 m_title->Wrap( -1 );
22 bPanelSizer->Add( m_title, 0, wxTOP|wxLEFT|wxEXPAND, 8 );
23
24
25 bPanelSizer->Add( 0, 3, 0, wxEXPAND, 5 );
26
27 m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
28
29 // Grid
30 m_grid->CreateGrid( 0, 3 );
31 m_grid->EnableEditing( true );
32 m_grid->EnableGridLines( true );
33 m_grid->EnableDragGridSize( false );
34 m_grid->SetMargins( 0, 0 );
35
36 // Columns
37 m_grid->SetColSize( 0, 300 );
38 m_grid->SetColSize( 1, 60 );
39 m_grid->SetColSize( 2, 60 );
40 m_grid->EnableDragColMove( false );
41 m_grid->EnableDragColSize( true );
42 m_grid->SetColLabelValue( 0, _("Name") );
43 m_grid->SetColLabelValue( 1, _("Visible") );
44 m_grid->SetColLabelValue( 2, _("URL") );
45 m_grid->SetColLabelSize( wxGRID_AUTOSIZE );
46 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
47
48 // Rows
49 m_grid->EnableDragRowSize( true );
50 m_grid->SetRowLabelSize( 0 );
51 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
52
53 // Label Appearance
54
55 // Cell Defaults
56 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
57 m_grid->SetMinSize( wxSize( -1,180 ) );
58
59 bPanelSizer->Add( m_grid, 1, wxEXPAND|wxRIGHT, 5 );
60
61 wxBoxSizer* bSizer10;
62 bSizer10 = new wxBoxSizer( wxHORIZONTAL );
63
64 m_addFieldButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
65 bSizer10->Add( m_addFieldButton, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
66
67
68 bSizer10->Add( 20, 0, 0, wxEXPAND, 5 );
69
70 m_deleteFieldButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
71 bSizer10->Add( m_deleteFieldButton, 0, wxALL, 5 );
72
73
74 bPanelSizer->Add( bSizer10, 0, wxEXPAND, 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_TEMPLATE_FIELDNAMES_BASE::OnSizeGrid ), NULL, this );
83 m_addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_TEMPLATE_FIELDNAMES_BASE::OnAddButtonClick ), NULL, this );
84 m_deleteFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_TEMPLATE_FIELDNAMES_BASE::OnDeleteButtonClick ), NULL, this );
85}
86
88{
89 // Disconnect Events
90 m_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_TEMPLATE_FIELDNAMES_BASE::OnSizeGrid ), NULL, this );
91 m_addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_TEMPLATE_FIELDNAMES_BASE::OnAddButtonClick ), NULL, this );
92 m_deleteFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_TEMPLATE_FIELDNAMES_BASE::OnDeleteButtonClick ), NULL, this );
93
94}
const char * name
Definition: DXF_plotter.cpp:57
virtual void OnAddButtonClick(wxCommandEvent &event)
virtual void OnSizeGrid(wxSizeEvent &event)
virtual void OnDeleteButtonClick(wxCommandEvent &event)
PANEL_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)
A bitmap button widget that behaves like a standard dialog button except with an icon.
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:249
#define _(s)