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