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.9.0 Jul 27 2020)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
8#include "widgets/wx_grid.h"
9
11
13
14DIALOG_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 );
39 m_EnvVars->SetColLabelValue( 0, _("Name") );
40 m_EnvVars->SetColLabelValue( 1, _("Path") );
41 m_EnvVars->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
42
43 // Rows
44 m_EnvVars->EnableDragRowSize( true );
45 m_EnvVars->SetRowLabelSize( 0 );
46 m_EnvVars->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
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, wxALL|wxEXPAND, 5 );
55
56 wxBoxSizer* bSizerEnvVarBtns;
57 bSizerEnvVarBtns = new wxBoxSizer( wxHORIZONTAL );
58
59 m_btnAddEnvVar = new wxBitmapButton( sbEnvVars->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
60 bSizerEnvVarBtns->Add( m_btnAddEnvVar, 0, wxBOTTOM|wxLEFT, 5 );
61
62
63 bSizerEnvVarBtns->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
64
65 m_btnDeleteEnvVar = new wxBitmapButton( sbEnvVars->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
66 bSizerEnvVarBtns->Add( m_btnDeleteEnvVar, 0, wxBOTTOM, 5 );
67
68
69 sbEnvVars->Add( bSizerEnvVarBtns, 0, wxEXPAND, 5 );
70
71
72 bSizerMain->Add( sbEnvVars, 1, wxEXPAND|wxALL, 5 );
73
74 m_sb3DSearchPaths = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("3D Search Paths") ), wxVERTICAL );
75
76 m_SearchPaths = new WX_GRID( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
77
78 // Grid
79 m_SearchPaths->CreateGrid( 1, 3 );
80 m_SearchPaths->EnableEditing( true );
81 m_SearchPaths->EnableGridLines( true );
82 m_SearchPaths->EnableDragGridSize( false );
83 m_SearchPaths->SetMargins( 0, 0 );
84
85 // Columns
86 m_SearchPaths->SetColSize( 0, 150 );
87 m_SearchPaths->SetColSize( 1, 300 );
88 m_SearchPaths->SetColSize( 2, 154 );
89 m_SearchPaths->EnableDragColMove( false );
90 m_SearchPaths->EnableDragColSize( true );
92 m_SearchPaths->SetColLabelValue( 0, _("Alias") );
93 m_SearchPaths->SetColLabelValue( 1, _("Path") );
94 m_SearchPaths->SetColLabelValue( 2, _("Description") );
95 m_SearchPaths->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
96
97 // Rows
98 m_SearchPaths->AutoSizeRows();
99 m_SearchPaths->EnableDragRowSize( false );
100 m_SearchPaths->SetRowLabelSize( 0 );
101 m_SearchPaths->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
102
103 // Label Appearance
104
105 // Cell Defaults
106 m_SearchPaths->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
107 m_SearchPaths->SetMinSize( wxSize( 604,150 ) );
108
109 m_sb3DSearchPaths->Add( m_SearchPaths, 1, wxALL|wxEXPAND, 5 );
110
111 wxBoxSizer* bSizerSearchPathBtns;
112 bSizerSearchPathBtns = new wxBoxSizer( wxHORIZONTAL );
113
114 m_btnAddSearchPath = new wxBitmapButton( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
115 bSizerSearchPathBtns->Add( m_btnAddSearchPath, 0, wxBOTTOM|wxLEFT|wxRIGHT, 5 );
116
117 m_btnMoveUp = new wxBitmapButton( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
118 bSizerSearchPathBtns->Add( m_btnMoveUp, 0, wxBOTTOM|wxRIGHT, 5 );
119
120 m_btnMoveDown = new wxBitmapButton( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
121 bSizerSearchPathBtns->Add( m_btnMoveDown, 0, wxBOTTOM|wxRIGHT, 5 );
122
123
124 bSizerSearchPathBtns->Add( 0, 0, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
125
126 m_btnDeleteSearchPath = new wxBitmapButton( m_sb3DSearchPaths->GetStaticBox(), wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
127 bSizerSearchPathBtns->Add( m_btnDeleteSearchPath, 0, wxBOTTOM|wxRIGHT, 5 );
128
129
130 m_sb3DSearchPaths->Add( bSizerSearchPathBtns, 0, wxEXPAND, 5 );
131
132
133 bSizerMain->Add( m_sb3DSearchPaths, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
134
135 m_sdbSizer = new wxStdDialogButtonSizer();
136 m_sdbSizerOK = new wxButton( this, wxID_OK );
137 m_sdbSizer->AddButton( m_sdbSizerOK );
138 m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
139 m_sdbSizer->AddButton( m_sdbSizerCancel );
140 m_sdbSizerHelp = new wxButton( this, wxID_HELP );
141 m_sdbSizer->AddButton( m_sdbSizerHelp );
142 m_sdbSizer->Realize();
143
144 bSizerMain->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
145
146
147 this->SetSizer( bSizerMain );
148 this->Layout();
149 bSizerMain->Fit( this );
150
151 this->Centre( wxBOTH );
152
153 // Connect Events
154 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnUpdateUI ) );
155 m_EnvVars->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridSize ), NULL, this );
156 m_btnAddEnvVar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnAddEnvVar ), NULL, this );
157 m_btnDeleteEnvVar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnRemoveEnvVar ), NULL, this );
158 m_SearchPaths->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridCellChange ), NULL, this );
159 m_SearchPaths->Connect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridCellRightClick ), NULL, this );
160 m_btnAddSearchPath->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnAddSearchPath ), NULL, this );
161 m_btnMoveUp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnSearchPathMoveUp ), NULL, this );
162 m_btnMoveDown->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnSearchPathMoveDown ), NULL, this );
163 m_btnDeleteSearchPath->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnDeleteSearchPath ), NULL, this );
164 m_sdbSizerHelp->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnHelp ), NULL, this );
165}
166
168{
169 // Disconnect Events
170 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnUpdateUI ) );
171 m_EnvVars->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridSize ), NULL, this );
172 m_btnAddEnvVar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnAddEnvVar ), NULL, this );
173 m_btnDeleteEnvVar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnRemoveEnvVar ), NULL, this );
174 m_SearchPaths->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridCellChange ), NULL, this );
175 m_SearchPaths->Disconnect( wxEVT_GRID_CELL_RIGHT_CLICK, wxGridEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnGridCellRightClick ), NULL, this );
176 m_btnAddSearchPath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnAddSearchPath ), NULL, this );
177 m_btnMoveUp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnSearchPathMoveUp ), NULL, this );
178 m_btnMoveDown->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnSearchPathMoveDown ), NULL, this );
179 m_btnDeleteSearchPath->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnDeleteSearchPath ), NULL, this );
180 m_sdbSizerHelp->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_CONFIGURE_PATHS_BASE::OnHelp ), NULL, this );
181
182}
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 OnSearchPathMoveDown(wxCommandEvent &event)
virtual void OnHelp(wxCommandEvent &event)
virtual void OnAddSearchPath(wxCommandEvent &event)
virtual void OnGridCellChange(wxGridEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void OnRemoveEnvVar(wxCommandEvent &event)
virtual void OnDeleteSearchPath(wxCommandEvent &event)
virtual void OnSearchPathMoveUp(wxCommandEvent &event)
virtual void OnGridCellRightClick(wxGridEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:83
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:74
#define _(s)