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