KiCad PCB EDA Suite
dialog_configure_paths_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
15DIALOG_CONFIGURE_PATHS_BASE::DIALOG_CONFIGURE_PATHS_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
16{
17 this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
18
19 wxBoxSizer* bSizerMain;
20 bSizerMain = new wxBoxSizer( wxVERTICAL );
21
22 wxStaticBoxSizer* sbEnvVars;
23 sbEnvVars = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Environment Variables") ), wxVERTICAL );
24
25 m_EnvVars = new WX_GRID( sbEnvVars->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
26
27 // Grid
28 m_EnvVars->CreateGrid( 1, 2 );
29 m_EnvVars->EnableEditing( true );
30 m_EnvVars->EnableGridLines( true );
31 m_EnvVars->EnableDragGridSize( false );
32 m_EnvVars->SetMargins( 0, 0 );
33
34 // Columns
35 m_EnvVars->SetColSize( 0, 150 );
36 m_EnvVars->SetColSize( 1, 454 );
37 m_EnvVars->EnableDragColMove( false );
38 m_EnvVars->EnableDragColSize( true );
39 m_EnvVars->SetColLabelValue( 0, _("Name") );
40 m_EnvVars->SetColLabelValue( 1, _("Path") );
41 m_EnvVars->SetColLabelSize( wxGRID_AUTOSIZE );
42 m_EnvVars->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
43
44 // Rows
45 m_EnvVars->EnableDragRowSize( true );
46 m_EnvVars->SetRowLabelSize( 0 );
47 m_EnvVars->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
48
49 // Label Appearance
50
51 // Cell Defaults
52 m_EnvVars->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
53 m_EnvVars->SetMinSize( wxSize( 604,170 ) );
54
55 sbEnvVars->Add( m_EnvVars, 1, wxALL|wxEXPAND, 5 );
56
57 wxBoxSizer* bSizerEnvVarBtns;
58 bSizerEnvVarBtns = new wxBoxSizer( wxHORIZONTAL );
59
60 m_btnAddEnvVar = new STD_BITMAP_BUTTON( sbEnvVars->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
61 bSizerEnvVarBtns->Add( m_btnAddEnvVar, 0, wxBOTTOM|wxLEFT, 5 );
62
63
64 bSizerEnvVarBtns->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
65
66 m_btnDeleteEnvVar = new STD_BITMAP_BUTTON( sbEnvVars->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
67 bSizerEnvVarBtns->Add( m_btnDeleteEnvVar, 0, wxBOTTOM, 5 );
68
69
70 sbEnvVars->Add( bSizerEnvVarBtns, 0, wxEXPAND, 5 );
71
72
73 bSizerMain->Add( sbEnvVars, 1, wxEXPAND|wxALL, 5 );
74
75 m_sdbSizer = new wxStdDialogButtonSizer();
76 m_sdbSizerOK = new wxButton( this, wxID_OK );
77 m_sdbSizer->AddButton( m_sdbSizerOK );
78 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
79 m_sdbSizer->AddButton( m_sdbSizerCancel );
80 m_sdbSizerHelp = new wxButton( this, wxID_HELP );
81 m_sdbSizer->AddButton( m_sdbSizerHelp );
82 m_sdbSizer->Realize();
83
84 bSizerMain->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
85
86
87 this->SetSizer( bSizerMain );
88 this->Layout();
89 bSizerMain->Fit( this );
90
91 this->Centre( wxBOTH );
92
93 // Connect Events
94 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnUpdateUI ) );
95 m_EnvVars->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridSize ), NULL, this );
96 m_btnAddEnvVar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnAddEnvVar ), NULL, this );
97 m_btnDeleteEnvVar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnRemoveEnvVar ), NULL, this );
98 m_sdbSizerHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnHelp ), NULL, this );
99}
100
102{
103 // Disconnect Events
104 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnUpdateUI ) );
105 m_EnvVars->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridSize ), NULL, this );
106 m_btnAddEnvVar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnAddEnvVar ), NULL, this );
107 m_btnDeleteEnvVar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnRemoveEnvVar ), NULL, this );
108 m_sdbSizerHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnHelp ), NULL, this );
109
110}
virtual void OnGridSize(wxSizeEvent &event)
DIALOG_CONFIGURE_PATHS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Configure Paths"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnAddEnvVar(wxCommandEvent &event)
virtual void OnHelp(wxCommandEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void OnRemoveEnvVar(wxCommandEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
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:144
#define _(s)