KiCad PCB EDA Suite
dialog_env_var_config_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Aug 4 2017)
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* bSizer5;
20  bSizer5 = new wxBoxSizer( wxVERTICAL );
21 
22  wxStaticBoxSizer* sbSizer2;
23  sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("KiCad Environment Paths") ), wxVERTICAL );
24 
25  wxBoxSizer* bSizer7;
26  bSizer7 = new wxBoxSizer( wxHORIZONTAL );
27 
28  m_pathList = new wxListCtrl( sbSizer2->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT|wxLC_VRULES );
29  bSizer7->Add( m_pathList, 1, wxALL|wxEXPAND, 5 );
30 
31  wxBoxSizer* bSizer6;
32  bSizer6 = new wxBoxSizer( wxVERTICAL );
33 
34  m_addPathButton = new wxButton( sbSizer2->GetStaticBox(), ID_BUTTON_ADD_PATH, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
35  m_addPathButton->SetToolTip( _("Add path prefix") );
36 
37  bSizer6->Add( m_addPathButton, 0, wxALL, 5 );
38 
39  m_editPathButton = new wxButton( sbSizer2->GetStaticBox(), ID_BUTTON_EDIT_PATH, _("Edit"), wxDefaultPosition, wxDefaultSize, 0 );
40  m_editPathButton->SetToolTip( _("Edit selected path prefix") );
41 
42  bSizer6->Add( m_editPathButton, 0, wxALL, 5 );
43 
44  m_deletePathButton = new wxButton( sbSizer2->GetStaticBox(), ID_BUTTON_DELETE_PATH, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
45  m_deletePathButton->SetToolTip( _("Remove selected path prefix") );
46 
47  bSizer6->Add( m_deletePathButton, 0, wxALL, 5 );
48 
49 
50  bSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
51 
52 
53  bSizer7->Add( bSizer6, 0, wxEXPAND, 5 );
54 
55 
56  sbSizer2->Add( bSizer7, 1, wxEXPAND, 5 );
57 
58 
59  bSizer5->Add( sbSizer2, 1, wxEXPAND, 5 );
60 
61 
62  mainSizer->Add( bSizer5, 1, wxEXPAND, 5 );
63 
64  m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
65  mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
66 
67  m_sdbSizer = new wxStdDialogButtonSizer();
68  m_sdbSizerOK = new wxButton( this, wxID_OK );
69  m_sdbSizer->AddButton( m_sdbSizerOK );
70  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
71  m_sdbSizer->AddButton( m_sdbSizerCancel );
72  m_sdbSizerHelp = new wxButton( this, wxID_HELP );
73  m_sdbSizer->AddButton( m_sdbSizerHelp );
74  m_sdbSizer->Realize();
75 
76  mainSizer->Add( m_sdbSizer, 0, wxALL|wxALIGN_RIGHT, 5 );
77 
78 
79  this->SetSizer( mainSizer );
80  this->Layout();
81 
82  this->Centre( wxBOTH );
83 
84  // Connect Events
85  m_pathList->Connect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnPathActivated ), NULL, this );
86  m_pathList->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnPathSelected ), NULL, this );
87  m_addPathButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnAddButton ), NULL, this );
88  m_editPathButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnEditButton ), NULL, this );
89  m_deletePathButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnRemoveButton ), NULL, this );
90  m_sdbSizerHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnHelpButton ), NULL, this );
91 }
92 
94 {
95  // Disconnect Events
96  m_pathList->Disconnect( wxEVT_COMMAND_LIST_ITEM_ACTIVATED, wxListEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnPathActivated ), NULL, this );
97  m_pathList->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnPathSelected ), NULL, this );
98  m_addPathButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnAddButton ), NULL, this );
99  m_editPathButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnEditButton ), NULL, this );
100  m_deletePathButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnRemoveButton ), NULL, this );
101  m_sdbSizerHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_CONFIG_BASE::OnHelpButton ), NULL, this );
102 
103 }
104 
105 DIALOG_ENV_VAR_SINGLE_BASE::DIALOG_ENV_VAR_SINGLE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
106 {
107  this->SetSizeHints( wxDefaultSize, wxDefaultSize );
108 
109  wxBoxSizer* bSizerMain;
110  bSizerMain = new wxBoxSizer( wxVERTICAL );
111 
112  wxFlexGridSizer* fgSizer1;
113  fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 );
114  fgSizer1->AddGrowableCol( 1 );
115  fgSizer1->SetFlexibleDirection( wxBOTH );
116  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
117 
118  m_envVarNameLabel = new wxStaticText( this, wxID_ANY, _("Name"), wxDefaultPosition, wxDefaultSize, 0 );
119  m_envVarNameLabel->Wrap( -1 );
120  fgSizer1->Add( m_envVarNameLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
121 
122  m_envVarName = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
123  fgSizer1->Add( m_envVarName, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
124 
125  m_buttonHelp = new wxButton( this, wxID_ANY, _("Help"), wxDefaultPosition, wxDefaultSize, 0 );
126  fgSizer1->Add( m_buttonHelp, 0, wxALL, 5 );
127 
128  m_envVarPathLabel = new wxStaticText( this, wxID_ANY, _("Value"), wxDefaultPosition, wxDefaultSize, 0 );
129  m_envVarPathLabel->Wrap( -1 );
130  fgSizer1->Add( m_envVarPathLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
131 
132  m_envVarPath = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
133  fgSizer1->Add( m_envVarPath, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
134 
135  m_selectPathButton = new wxButton( this, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, 0 );
136  fgSizer1->Add( m_selectPathButton, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
137 
138 
139  bSizerMain->Add( fgSizer1, 0, wxEXPAND, 5 );
140 
141 
142  bSizerMain->Add( 0, 0, 1, wxEXPAND, 5 );
143 
144  m_staticline2 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
145  bSizerMain->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
146 
147  m_sdbSizer2 = new wxStdDialogButtonSizer();
148  m_sdbSizer2OK = new wxButton( this, wxID_OK );
149  m_sdbSizer2->AddButton( m_sdbSizer2OK );
150  m_sdbSizer2Cancel = new wxButton( this, wxID_CANCEL );
151  m_sdbSizer2->AddButton( m_sdbSizer2Cancel );
152  m_sdbSizer2->Realize();
153 
154  bSizerMain->Add( m_sdbSizer2, 0, wxALIGN_RIGHT, 5 );
155 
156 
157  this->SetSizer( bSizerMain );
158  this->Layout();
159 
160  this->Centre( wxBOTH );
161 
162  // Connect Events
163  m_buttonHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_SINGLE_BASE::onHelpClick ), NULL, this );
164  m_selectPathButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_SINGLE_BASE::OnSelectPath ), NULL, this );
165 }
166 
168 {
169  // Disconnect Events
170  m_buttonHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_SINGLE_BASE::onHelpClick ), NULL, this );
171  m_selectPathButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ENV_VAR_SINGLE_BASE::OnSelectPath ), NULL, this );
172 
173 }
#define ID_BUTTON_EDIT_PATH
wxStdDialogButtonSizer * m_sdbSizer2
virtual void onHelpClick(wxCommandEvent &event)
virtual void OnSelectPath(wxCommandEvent &event)
virtual void OnHelpButton(wxCommandEvent &event)
virtual void OnEditButton(wxCommandEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
#define ID_BUTTON_ADD_PATH
virtual void OnRemoveButton(wxCommandEvent &event)
wxStdDialogButtonSizer * m_sdbSizer
virtual void OnAddButton(wxCommandEvent &event)
#define ID_BUTTON_DELETE_PATH
virtual void OnPathSelected(wxListEvent &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(582, 283), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
DIALOG_ENV_VAR_SINGLE_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Edit Environment Value Variable"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(439, 141), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
virtual void OnPathActivated(wxListEvent &event)