KiCad PCB EDA Suite
dialog_configure_paths_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Dec 30 2017)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
8 #include "widgets/wx_grid.h"
9 
11 
13 
14 DIALOG_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 )
15 {
16  this->SetSizeHints( wxSize( -1,-1 ), wxDefaultSize );
17 
18  wxBoxSizer* bSizerMain;
19  bSizerMain = new wxBoxSizer( wxVERTICAL );
20 
21  wxStaticBoxSizer* sbEnvVars;
22  sbEnvVars = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Environment Variables") ), wxVERTICAL );
23 
24  m_EnvVars = new WX_GRID( sbEnvVars->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
25 
26  // Grid
27  m_EnvVars->CreateGrid( 1, 2 );
28  m_EnvVars->EnableEditing( true );
29  m_EnvVars->EnableGridLines( true );
30  m_EnvVars->EnableDragGridSize( false );
31  m_EnvVars->SetMargins( 0, 0 );
32 
33  // Columns
34  m_EnvVars->SetColSize( 0, 150 );
35  m_EnvVars->SetColSize( 1, 454 );
36  m_EnvVars->EnableDragColMove( false );
37  m_EnvVars->EnableDragColSize( true );
38  m_EnvVars->SetColLabelSize( 22 );
39  m_EnvVars->SetColLabelValue( 0, _("Name") );
40  m_EnvVars->SetColLabelValue( 1, _("Path") );
41  m_EnvVars->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
42 
43  // Rows
44  m_EnvVars->EnableDragRowSize( true );
45  m_EnvVars->SetRowLabelSize( 0 );
46  m_EnvVars->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
47 
48  // Label Appearance
49 
50  // Cell Defaults
51  m_EnvVars->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
52  m_EnvVars->SetMinSize( wxSize( 604,170 ) );
53 
54  sbEnvVars->Add( m_EnvVars, 1, wxEXPAND|wxBOTTOM, 5 );
55 
56  wxBoxSizer* bSizerEnvVarBtns;
57  bSizerEnvVarBtns = new wxBoxSizer( wxHORIZONTAL );
58 
59  m_btnAddEnvVar = new wxBitmapButton( sbEnvVars->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
60  m_btnAddEnvVar->SetMinSize( wxSize( 30,29 ) );
61 
62  bSizerEnvVarBtns->Add( m_btnAddEnvVar, 0, wxRIGHT, 5 );
63 
64 
65  bSizerEnvVarBtns->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
66 
67  m_btnDeleteEnvVar = new wxBitmapButton( sbEnvVars->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
68  m_btnDeleteEnvVar->SetMinSize( wxSize( 30,29 ) );
69 
70  bSizerEnvVarBtns->Add( m_btnDeleteEnvVar, 0, wxRIGHT|wxLEFT, 5 );
71 
72 
73  sbEnvVars->Add( bSizerEnvVarBtns, 0, wxEXPAND, 5 );
74 
75 
76  bSizerMain->Add( sbEnvVars, 1, wxEXPAND|wxALL, 5 );
77 
78  m_sb3DSearchPaths = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("3D Search Paths") ), wxVERTICAL );
79 
80  m_SearchPaths = new WX_GRID( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
81 
82  // Grid
83  m_SearchPaths->CreateGrid( 1, 3 );
84  m_SearchPaths->EnableEditing( true );
85  m_SearchPaths->EnableGridLines( true );
86  m_SearchPaths->EnableDragGridSize( false );
87  m_SearchPaths->SetMargins( 0, 0 );
88 
89  // Columns
90  m_SearchPaths->SetColSize( 0, 150 );
91  m_SearchPaths->SetColSize( 1, 300 );
92  m_SearchPaths->SetColSize( 2, 154 );
93  m_SearchPaths->EnableDragColMove( false );
94  m_SearchPaths->EnableDragColSize( true );
95  m_SearchPaths->SetColLabelSize( 22 );
96  m_SearchPaths->SetColLabelValue( 0, _("Alias") );
97  m_SearchPaths->SetColLabelValue( 1, _("Path") );
98  m_SearchPaths->SetColLabelValue( 2, _("Description") );
99  m_SearchPaths->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
100 
101  // Rows
102  m_SearchPaths->AutoSizeRows();
103  m_SearchPaths->EnableDragRowSize( false );
104  m_SearchPaths->SetRowLabelSize( 0 );
105  m_SearchPaths->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
106 
107  // Label Appearance
108 
109  // Cell Defaults
110  m_SearchPaths->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
111  m_SearchPaths->SetMinSize( wxSize( 604,150 ) );
112 
113  m_sb3DSearchPaths->Add( m_SearchPaths, 1, wxEXPAND|wxBOTTOM, 5 );
114 
115  wxBoxSizer* bSizerSearchPathBtns;
116  bSizerSearchPathBtns = new wxBoxSizer( wxHORIZONTAL );
117 
118  m_btnAddSearchPath = new wxBitmapButton( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
119  m_btnAddSearchPath->SetMinSize( wxSize( 30,29 ) );
120 
121  bSizerSearchPathBtns->Add( m_btnAddSearchPath, 0, wxRIGHT, 5 );
122 
123  m_btnMoveUp = new wxBitmapButton( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
124  m_btnMoveUp->SetMinSize( wxSize( 30,29 ) );
125 
126  bSizerSearchPathBtns->Add( m_btnMoveUp, 0, wxRIGHT, 5 );
127 
128  m_btnMoveDown = new wxBitmapButton( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
129  m_btnMoveDown->SetMinSize( wxSize( 30,29 ) );
130 
131  bSizerSearchPathBtns->Add( m_btnMoveDown, 0, wxRIGHT, 5 );
132 
133 
134  bSizerSearchPathBtns->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
135 
136  m_btnDeleteSearchPath = new wxBitmapButton( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
137  m_btnDeleteSearchPath->SetMinSize( wxSize( 30,29 ) );
138 
139  bSizerSearchPathBtns->Add( m_btnDeleteSearchPath, 0, wxRIGHT|wxLEFT, 5 );
140 
141 
142  m_sb3DSearchPaths->Add( bSizerSearchPathBtns, 0, wxEXPAND, 5 );
143 
144 
145  bSizerMain->Add( m_sb3DSearchPaths, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
146 
147  m_sdbSizer = new wxStdDialogButtonSizer();
148  m_sdbSizerOK = new wxButton( this, wxID_OK );
149  m_sdbSizer->AddButton( m_sdbSizerOK );
150  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
151  m_sdbSizer->AddButton( m_sdbSizerCancel );
152  m_sdbSizerHelp = new wxButton( this, wxID_HELP );
153  m_sdbSizer->AddButton( m_sdbSizerHelp );
154  m_sdbSizer->Realize();
155 
156  bSizerMain->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
157 
158 
159  this->SetSizer( bSizerMain );
160  this->Layout();
161  bSizerMain->Fit( this );
162 
163  this->Centre( wxBOTH );
164 
165  // Connect Events
166  this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnUpdateUI ) );
167  m_EnvVars->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridCellChange ), NULL, this );
168  m_EnvVars->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridSize ), NULL, this );
169  m_btnAddEnvVar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnAddEnvVar ), NULL, this );
170  m_btnDeleteEnvVar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnRemoveEnvVar ), NULL, this );
171  m_SearchPaths->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridCellChange ), NULL, this );
172  m_SearchPaths->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridCellRightClick ), NULL, this );
173  m_btnAddSearchPath->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnAddSearchPath ), NULL, this );
174  m_btnMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnSearchPathMoveUp ), NULL, this );
175  m_btnMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnSearchPathMoveDown ), NULL, this );
176  m_btnDeleteSearchPath->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnDeleteSearchPath ), NULL, this );
177  m_sdbSizerHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnHelp ), NULL, this );
178 }
179 
181 {
182  // Disconnect Events
183  this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnUpdateUI ) );
184  m_EnvVars->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridCellChange ), NULL, this );
185  m_EnvVars->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridSize ), NULL, this );
186  m_btnAddEnvVar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnAddEnvVar ), NULL, this );
187  m_btnDeleteEnvVar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnRemoveEnvVar ), NULL, this );
188  m_SearchPaths->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridCellChange ), NULL, this );
189  m_SearchPaths->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridCellRightClick ), NULL, this );
190  m_btnAddSearchPath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnAddSearchPath ), NULL, this );
191  m_btnMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnSearchPathMoveUp ), NULL, this );
192  m_btnMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnSearchPathMoveDown ), NULL, this );
193  m_btnDeleteSearchPath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnDeleteSearchPath ), NULL, this );
194  m_sdbSizerHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnHelp ), NULL, this );
195 
196 }
virtual void OnHelp(wxCommandEvent &event)
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:53
virtual void OnAddEnvVar(wxCommandEvent &event)
virtual void OnRemoveEnvVar(wxCommandEvent &event)
virtual void OnGridSize(wxSizeEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void OnSearchPathMoveUp(wxCommandEvent &event)
virtual void OnGridCellRightClick(wxGridEvent &event)
virtual void OnGridCellChange(wxGridEvent &event)
virtual void OnAddSearchPath(wxCommandEvent &event)
virtual void OnDeleteSearchPath(wxCommandEvent &event)
virtual void OnSearchPathMoveDown(wxCommandEvent &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)