KiCad PCB EDA Suite
panel_text_variables_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version Oct 26 2018)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
8#include "widgets/wx_grid.h"
9
11
13
14PANEL_TEXT_VARIABLES_BASE::PANEL_TEXT_VARIABLES_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( wxVERTICAL );
18
19 wxBoxSizer* bSizer3;
20 bSizer3 = new wxBoxSizer( wxVERTICAL );
21
22 m_TextVars = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
23
24 // Grid
25 m_TextVars->CreateGrid( 1, 2 );
26 m_TextVars->EnableEditing( true );
27 m_TextVars->EnableGridLines( true );
28 m_TextVars->EnableDragGridSize( false );
29 m_TextVars->SetMargins( 0, 0 );
30
31 // Columns
32 m_TextVars->SetColSize( 0, 150 );
33 m_TextVars->SetColSize( 1, 454 );
34 m_TextVars->EnableDragColMove( false );
35 m_TextVars->EnableDragColSize( true );
37 m_TextVars->SetColLabelValue( 0, _("Variable Name") );
38 m_TextVars->SetColLabelValue( 1, _("Text Substitution") );
39 m_TextVars->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
40
41 // Rows
42 m_TextVars->EnableDragRowSize( true );
43 m_TextVars->SetRowLabelSize( 0 );
44 m_TextVars->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
45
46 // Label Appearance
47
48 // Cell Defaults
49 m_TextVars->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
50 m_TextVars->SetMinSize( wxSize( 604,170 ) );
51
52 bSizer3->Add( m_TextVars, 1, wxEXPAND|wxALL, 5 );
53
54 wxBoxSizer* bSizerEnvVarBtns;
55 bSizerEnvVarBtns = new wxBoxSizer( wxHORIZONTAL );
56
57 m_btnAddTextVar = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
58 bSizerEnvVarBtns->Add( m_btnAddTextVar, 0, wxRIGHT, 5 );
59
60
61 bSizerEnvVarBtns->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
62
63 m_btnDeleteTextVar = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
64 bSizerEnvVarBtns->Add( m_btnDeleteTextVar, 0, wxRIGHT|wxLEFT, 5 );
65
66
67 bSizer3->Add( bSizerEnvVarBtns, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
68
69
70 bPanelSizer->Add( bSizer3, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
71
72
73 this->SetSizer( bPanelSizer );
74 this->Layout();
75 bPanelSizer->Fit( this );
76
77 // Connect Events
78 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_TEXT_VARIABLES_BASE::OnUpdateUI ) );
79 m_TextVars->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_TEXT_VARIABLES_BASE::OnGridCellChange ), NULL, this );
80 m_TextVars->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_TEXT_VARIABLES_BASE::OnGridSize ), NULL, this );
81 m_btnAddTextVar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_TEXT_VARIABLES_BASE::OnAddTextVar ), NULL, this );
82 m_btnDeleteTextVar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_TEXT_VARIABLES_BASE::OnRemoveTextVar ), NULL, this );
83}
84
86{
87 // Disconnect Events
88 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_TEXT_VARIABLES_BASE::OnUpdateUI ) );
89 m_TextVars->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( PANEL_TEXT_VARIABLES_BASE::OnGridCellChange ), NULL, this );
90 m_TextVars->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_TEXT_VARIABLES_BASE::OnGridSize ), NULL, this );
91 m_btnAddTextVar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_TEXT_VARIABLES_BASE::OnAddTextVar ), NULL, this );
92 m_btnDeleteTextVar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_TEXT_VARIABLES_BASE::OnRemoveTextVar ), NULL, this );
93
94}
const char * name
Definition: DXF_plotter.cpp:56
virtual void OnGridCellChange(wxGridEvent &event)
PANEL_TEXT_VARIABLES_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)
virtual void OnRemoveTextVar(wxCommandEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void OnGridSize(wxSizeEvent &event)
virtual void OnAddTextVar(wxCommandEvent &event)
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:76
#define _(s)