KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_sym_lib_table_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf0)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_grid.h"
10
12
14
15PANEL_SYM_LIB_TABLE_BASE::PANEL_SYM_LIB_TABLE_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
16{
17 wxBoxSizer* bMainSizer;
18 bMainSizer = new wxBoxSizer( wxVERTICAL );
19
20 m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
21 m_global_panel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
22 wxBoxSizer* m_global_sizer;
23 m_global_sizer = new wxBoxSizer( wxVERTICAL );
24
25 m_global_grid = new WX_GRID( m_global_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
26
27 // Grid
28 m_global_grid->CreateGrid( 1, 7 );
29 m_global_grid->EnableEditing( true );
30 m_global_grid->EnableGridLines( true );
31 m_global_grid->EnableDragGridSize( false );
32 m_global_grid->SetMargins( 0, 0 );
33
34 // Columns
35 m_global_grid->SetColSize( 0, 48 );
36 m_global_grid->SetColSize( 1, 48 );
37 m_global_grid->SetColSize( 2, 100 );
38 m_global_grid->SetColSize( 3, 240 );
39 m_global_grid->SetColSize( 4, 100 );
40 m_global_grid->SetColSize( 5, 80 );
41 m_global_grid->SetColSize( 6, 240 );
42 m_global_grid->EnableDragColMove( false );
43 m_global_grid->EnableDragColSize( true );
44 m_global_grid->SetColLabelValue( 0, _("Active") );
45 m_global_grid->SetColLabelValue( 1, _("Visible") );
46 m_global_grid->SetColLabelValue( 2, _("Nickname") );
47 m_global_grid->SetColLabelValue( 3, _("Library Path") );
48 m_global_grid->SetColLabelValue( 4, _("Library Format") );
49 m_global_grid->SetColLabelValue( 5, _("Options") );
50 m_global_grid->SetColLabelValue( 6, _("Description") );
52 m_global_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
53
54 // Rows
55 m_global_grid->AutoSizeRows();
56 m_global_grid->EnableDragRowSize( false );
57 m_global_grid->SetRowLabelSize( 0 );
58 m_global_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
59
60 // Label Appearance
61
62 // Cell Defaults
63 m_global_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
64 m_global_sizer->Add( m_global_grid, 5, wxALL|wxEXPAND, 5 );
65
66
67 m_global_panel->SetSizer( m_global_sizer );
68 m_global_panel->Layout();
69 m_global_sizer->Fit( m_global_panel );
70 m_notebook->AddPage( m_global_panel, _("Global Libraries"), true );
71 m_project_panel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
72 wxBoxSizer* m_project_sizer;
73 m_project_sizer = new wxBoxSizer( wxVERTICAL );
74
75 m_project_grid = new WX_GRID( m_project_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
76
77 // Grid
78 m_project_grid->CreateGrid( 1, 7 );
79 m_project_grid->EnableEditing( true );
80 m_project_grid->EnableGridLines( true );
81 m_project_grid->EnableDragGridSize( false );
82 m_project_grid->SetMargins( 0, 0 );
83
84 // Columns
85 m_project_grid->SetColSize( 0, 48 );
86 m_project_grid->SetColSize( 1, 48 );
87 m_project_grid->SetColSize( 2, 100 );
88 m_project_grid->SetColSize( 3, 240 );
89 m_project_grid->SetColSize( 4, 100 );
90 m_project_grid->SetColSize( 5, 80 );
91 m_project_grid->SetColSize( 6, 240 );
92 m_project_grid->EnableDragColMove( false );
93 m_project_grid->EnableDragColSize( true );
94 m_project_grid->SetColLabelValue( 0, _("Active") );
95 m_project_grid->SetColLabelValue( 1, _("Visible") );
96 m_project_grid->SetColLabelValue( 2, _("Nickname") );
97 m_project_grid->SetColLabelValue( 3, _("Library Path") );
98 m_project_grid->SetColLabelValue( 4, _("Library Format") );
99 m_project_grid->SetColLabelValue( 5, _("Options") );
100 m_project_grid->SetColLabelValue( 6, _("Description") );
102 m_project_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
103
104 // Rows
105 m_project_grid->EnableDragRowSize( false );
106 m_project_grid->SetRowLabelSize( 0 );
107 m_project_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
108
109 // Label Appearance
110
111 // Cell Defaults
112 m_project_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
113 m_project_grid->SetMinSize( wxSize( 600,-1 ) );
114
115 m_project_sizer->Add( m_project_grid, 2, wxALL|wxEXPAND, 5 );
116
117
118 m_project_panel->SetSizer( m_project_sizer );
119 m_project_panel->Layout();
120 m_project_sizer->Fit( m_project_panel );
121 m_notebook->AddPage( m_project_panel, _("Project Specific Libraries"), false );
122
123 bMainSizer->Add( m_notebook, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
124
125 wxBoxSizer* bButtonsSizer;
126 bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
127
128 m_append_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
129 m_append_button->SetToolTip( _("Add empty row to table") );
130
131 bButtonsSizer->Add( m_append_button, 0, wxALL, 5 );
132
133 m_browse_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
134 m_browse_button->SetToolTip( _("Add existing library to table") );
135
136 bButtonsSizer->Add( m_browse_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
137
138 m_move_up_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
139 m_move_up_button->SetToolTip( _("Move up") );
140
141 bButtonsSizer->Add( m_move_up_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
142
143 m_move_down_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
144 m_move_down_button->SetToolTip( _("Move down") );
145
146 bButtonsSizer->Add( m_move_down_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
147
148
149 bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
150
151 m_delete_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
152 m_delete_button->SetToolTip( _("Remove library from table") );
153
154 bButtonsSizer->Add( m_delete_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
155
156
157 bButtonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
158
159 m_resetGlobal = new wxButton( this, wxID_ANY, _("Reset Libraries"), wxDefaultPosition, wxDefaultSize, 0 );
160 bButtonsSizer->Add( m_resetGlobal, 0, wxALL, 5 );
161
162
163 bButtonsSizer->Add( 0, 0, 0, wxEXPAND, 5 );
164
165 m_convertLegacy = new wxButton( this, wxID_ANY, _("Migrate Libraries"), wxDefaultPosition, wxDefaultSize, 0 );
166 bButtonsSizer->Add( m_convertLegacy, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
167
168
169 bMainSizer->Add( bButtonsSizer, 0, wxEXPAND|wxALL, 3 );
170
171
172 bMainSizer->Add( 0, 5, 0, wxEXPAND, 5 );
173
174 wxStaticText* stPathsLabel;
175 stPathsLabel = new wxStaticText( this, wxID_ANY, _("Available path substitutions:"), wxDefaultPosition, wxDefaultSize, 0 );
176 stPathsLabel->Wrap( -1 );
177 bMainSizer->Add( stPathsLabel, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 );
178
179
180 bMainSizer->Add( 0, 2, 0, wxEXPAND, 5 );
181
182 m_path_subs_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
183
184 // Grid
185 m_path_subs_grid->CreateGrid( 1, 2 );
186 m_path_subs_grid->EnableEditing( false );
187 m_path_subs_grid->EnableGridLines( true );
188 m_path_subs_grid->EnableDragGridSize( false );
189 m_path_subs_grid->SetMargins( 0, 0 );
190
191 // Columns
192 m_path_subs_grid->SetColSize( 0, 150 );
193 m_path_subs_grid->SetColSize( 1, 500 );
194 m_path_subs_grid->AutoSizeColumns();
195 m_path_subs_grid->EnableDragColMove( false );
196 m_path_subs_grid->EnableDragColSize( true );
198 m_path_subs_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
199
200 // Rows
201 m_path_subs_grid->EnableDragRowSize( true );
202 m_path_subs_grid->SetRowLabelSize( 0 );
203 m_path_subs_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
204
205 // Label Appearance
206
207 // Cell Defaults
208 m_path_subs_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
209 m_path_subs_grid->SetToolTip( _("This is a read-only table which shows pertinent environment variables.") );
210
211 bMainSizer->Add( m_path_subs_grid, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
212
213
214 this->SetSizer( bMainSizer );
215 this->Layout();
216 bMainSizer->Fit( this );
217
218 // Connect Events
219 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SYM_LIB_TABLE_BASE::OnUpdateUI ) );
220 m_notebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( PANEL_SYM_LIB_TABLE_BASE::onPageChange ), NULL, this );
221 m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
222 m_browse_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::browseLibrariesHandler ), NULL, this );
223 m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
224 m_move_down_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
225 m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
226 m_resetGlobal->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::onReset ), NULL, this );
227 m_convertLegacy->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::onConvertLegacyLibraries ), NULL, this );
228 m_path_subs_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SYM_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
229}
230
232{
233 // Disconnect Events
234 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_SYM_LIB_TABLE_BASE::OnUpdateUI ) );
235 m_notebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( PANEL_SYM_LIB_TABLE_BASE::onPageChange ), NULL, this );
236 m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
237 m_browse_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::browseLibrariesHandler ), NULL, this );
238 m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
239 m_move_down_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
240 m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
241 m_resetGlobal->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::onReset ), NULL, this );
242 m_convertLegacy->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_SYM_LIB_TABLE_BASE::onConvertLegacyLibraries ), NULL, this );
243 m_path_subs_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_SYM_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
244
245}
const char * name
Definition: DXF_plotter.cpp:57
PANEL_SYM_LIB_TABLE_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
STD_BITMAP_BUTTON * m_browse_button
virtual void onSizeGrid(wxSizeEvent &event)
STD_BITMAP_BUTTON * m_move_up_button
virtual void appendRowHandler(wxCommandEvent &event)
virtual void browseLibrariesHandler(wxCommandEvent &event)
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void onPageChange(wxNotebookEvent &event)
STD_BITMAP_BUTTON * m_delete_button
virtual void moveUpHandler(wxCommandEvent &event)
virtual void moveDownHandler(wxCommandEvent &event)
virtual void onConvertLegacyLibraries(wxCommandEvent &event)
virtual void deleteRowHandler(wxCommandEvent &event)
virtual void onReset(wxCommandEvent &event)
STD_BITMAP_BUTTON * m_move_down_button
STD_BITMAP_BUTTON * m_append_button
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:249
#define _(s)