KiCad PCB EDA Suite
dialog_env_var_config_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Jun 17 2015)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
7 
9 
11 
12 DIALOG_ENV_VAR_CONFIG_BASE::DIALOG_ENV_VAR_CONFIG_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
13 {
14  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
15 
16  wxBoxSizer* mainSizer;
17  mainSizer = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bupperSizer;
20  bupperSizer = new wxBoxSizer( wxHORIZONTAL );
21 
22  wxBoxSizer* bleftSizer;
23  bleftSizer = new wxBoxSizer( wxVERTICAL );
24 
25  m_grid = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
26 
27  // Grid
28  m_grid->CreateGrid( 0, 2 );
29  m_grid->EnableEditing( true );
30  m_grid->EnableGridLines( true );
31  m_grid->EnableDragGridSize( true );
32  m_grid->SetMargins( 0, 0 );
33 
34  // Columns
35  m_grid->EnableDragColMove( false );
36  m_grid->EnableDragColSize( true );
37  m_grid->SetColLabelSize( 30 );
38  m_grid->SetColLabelValue( 0, _("Name") );
39  m_grid->SetColLabelValue( 1, _("Path") );
40  m_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
41 
42  // Rows
43  m_grid->EnableDragRowSize( true );
44  m_grid->SetRowLabelSize( 40 );
45  m_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
46 
47  // Label Appearance
48 
49  // Cell Defaults
50  m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
51  bleftSizer->Add( m_grid, 1, wxALL|wxEXPAND, 5 );
52 
53 
54  bupperSizer->Add( bleftSizer, 1, wxEXPAND, 5 );
55 
56  wxBoxSizer* brightSizer;
57  brightSizer = new wxBoxSizer( wxVERTICAL );
58 
59  m_buttonAdd = new wxButton( this, wxID_ANY, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
60  m_buttonAdd->SetToolTip( _("Add a new entry to the table.") );
61 
62  brightSizer->Add( m_buttonAdd, 0, wxALL|wxEXPAND, 5 );
63 
64  m_buttonDelete = new wxButton( this, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
65  m_buttonDelete->SetToolTip( _("Remove the selected entry from the table.") );
66 
67  brightSizer->Add( m_buttonDelete, 0, wxBOTTOM|wxLEFT|wxRIGHT|wxEXPAND, 5 );
68 
69 
70  bupperSizer->Add( brightSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
71 
72 
73  mainSizer->Add( bupperSizer, 1, wxEXPAND, 5 );
74 
75  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
76  mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
77 
78  m_sdbSizer = new wxStdDialogButtonSizer();
79  m_sdbSizerOK = new wxButton( this, wxID_OK );
80  m_sdbSizer->AddButton( m_sdbSizerOK );
81  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
82  m_sdbSizer->AddButton( m_sdbSizerCancel );
83  m_sdbSizerHelp = new wxButton( this, wxID_HELP );
84  m_sdbSizer->AddButton( m_sdbSizerHelp );
85  m_sdbSizer->Realize();
86 
87  mainSizer->Add( m_sdbSizer, 0, wxALL|wxALIGN_RIGHT, 5 );
88 
89 
90  this->SetSizer( mainSizer );
91  this->Layout();
92 
93  this->Centre( wxBOTH );
94 
95  // Connect Events
96  m_buttonAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnAddRow ), NULL, this );
97  m_buttonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnDeleteSelectedRows ), NULL, this );
98  m_sdbSizerHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnHelpRequest ), NULL, this );
99 }
100 
102 {
103  // Disconnect Events
104  m_buttonAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnAddRow ), NULL, this );
105  m_buttonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnDeleteSelectedRows ), NULL, this );
106  m_sdbSizerHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnHelpRequest ), NULL, this );
107 
108 }
virtual void OnHelpRequest(wxCommandEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
wxStdDialogButtonSizer * m_sdbSizer
virtual void OnAddRow(wxCommandEvent &event)
virtual void OnDeleteSelectedRows(wxCommandEvent &event)
DIALOG_ENV_VAR_CONFIG_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Path Configuration"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(363, 177), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)