KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_fp_lib_table_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_grid.h"
10
12
14
15PANEL_FP_LIB_TABLE_BASE::PANEL_FP_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->EnableDragRowSize( false );
56 m_global_grid->SetRowLabelSize( 0 );
57 m_global_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
58
59 // Label Appearance
60
61 // Cell Defaults
62 m_global_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
63 m_global_sizer->Add( m_global_grid, 1, wxALL|wxEXPAND, 5 );
64
65
66 m_global_panel->SetSizer( m_global_sizer );
67 m_global_panel->Layout();
68 m_global_sizer->Fit( m_global_panel );
69 m_notebook->AddPage( m_global_panel, _("Global Libraries"), true );
70 m_project_panel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
71 wxBoxSizer* m_project_sizer;
72 m_project_sizer = new wxBoxSizer( wxVERTICAL );
73
74 m_project_grid = new WX_GRID( m_project_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
75
76 // Grid
77 m_project_grid->CreateGrid( 1, 7 );
78 m_project_grid->EnableEditing( true );
79 m_project_grid->EnableGridLines( true );
80 m_project_grid->EnableDragGridSize( false );
81 m_project_grid->SetMargins( 0, 0 );
82
83 // Columns
84 m_project_grid->SetColSize( 0, 48 );
85 m_project_grid->SetColSize( 1, 48 );
86 m_project_grid->SetColSize( 2, 100 );
87 m_project_grid->SetColSize( 3, 240 );
88 m_project_grid->SetColSize( 4, 100 );
89 m_project_grid->SetColSize( 5, 80 );
90 m_project_grid->SetColSize( 6, 240 );
91 m_project_grid->EnableDragColMove( false );
92 m_project_grid->EnableDragColSize( true );
93 m_project_grid->SetColLabelValue( 0, _("Active") );
94 m_project_grid->SetColLabelValue( 1, _("Visible") );
95 m_project_grid->SetColLabelValue( 2, _("Nickname") );
96 m_project_grid->SetColLabelValue( 3, _("Library Path") );
97 m_project_grid->SetColLabelValue( 4, _("LIbrary Format") );
98 m_project_grid->SetColLabelValue( 5, _("Options") );
99 m_project_grid->SetColLabelValue( 6, _("Description") );
101 m_project_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
102
103 // Rows
104 m_project_grid->EnableDragRowSize( false );
105 m_project_grid->SetRowLabelSize( 0 );
106 m_project_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
107
108 // Label Appearance
109
110 // Cell Defaults
111 m_project_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
112 m_project_sizer->Add( m_project_grid, 1, wxALL|wxEXPAND, 5 );
113
114
115 m_project_panel->SetSizer( m_project_sizer );
116 m_project_panel->Layout();
117 m_project_sizer->Fit( m_project_panel );
118 m_notebook->AddPage( m_project_panel, _("Project Specific Libraries"), false );
119
120 bMainSizer->Add( m_notebook, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
121
122 wxBoxSizer* bButtonsSizer;
123 bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
124
125 m_append_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
126 m_append_button->SetToolTip( _("Add empty row to table") );
127
128 bButtonsSizer->Add( m_append_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
129
130 m_browseButton = new SPLIT_BUTTON( this, wxID_ANY, _( "Add Existing" ), wxDefaultPosition );
131 m_browseButton->SetToolTip( _("Add Existing") );
132
133 bButtonsSizer->Add( m_browseButton, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
134
135 m_move_up_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
136 m_move_up_button->SetToolTip( _("Move up") );
137
138 bButtonsSizer->Add( m_move_up_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
139
140 m_move_down_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
141 m_move_down_button->SetToolTip( _("Move down") );
142
143 bButtonsSizer->Add( m_move_down_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
144
145
146 bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
147
148 m_delete_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
149 m_delete_button->SetToolTip( _("Remove library from table") );
150
151 bButtonsSizer->Add( m_delete_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
152
153
154 bButtonsSizer->Add( 20, 0, 1, wxEXPAND, 5 );
155
156 m_migrate_libs_button = new wxButton( this, wxID_ANY, _("Migrate Libraries"), wxDefaultPosition, wxDefaultSize, 0 );
157 bButtonsSizer->Add( m_migrate_libs_button, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
158
159
160 bMainSizer->Add( bButtonsSizer, 0, wxEXPAND|wxALL, 8 );
161
162 wxStaticText* stPathsLabel;
163 stPathsLabel = new wxStaticText( this, wxID_ANY, _("Available path substitutions:"), wxDefaultPosition, wxDefaultSize, 0 );
164 stPathsLabel->Wrap( -1 );
165 bMainSizer->Add( stPathsLabel, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 8 );
166
167
168 bMainSizer->Add( 0, 2, 0, wxEXPAND, 5 );
169
170 m_path_subs_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
171
172 // Grid
173 m_path_subs_grid->CreateGrid( 1, 2 );
174 m_path_subs_grid->EnableEditing( false );
175 m_path_subs_grid->EnableGridLines( true );
176 m_path_subs_grid->EnableDragGridSize( false );
177 m_path_subs_grid->SetMargins( 0, 0 );
178
179 // Columns
180 m_path_subs_grid->SetColSize( 0, 150 );
181 m_path_subs_grid->SetColSize( 1, 500 );
182 m_path_subs_grid->AutoSizeColumns();
183 m_path_subs_grid->EnableDragColMove( false );
184 m_path_subs_grid->EnableDragColSize( true );
186 m_path_subs_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
187
188 // Rows
189 m_path_subs_grid->EnableDragRowSize( true );
190 m_path_subs_grid->SetRowLabelSize( 0 );
191 m_path_subs_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
192
193 // Label Appearance
194
195 // Cell Defaults
196 m_path_subs_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
197 m_path_subs_grid->SetToolTip( _("This is a read-only table which shows pertinent environment variables.") );
198
199 bMainSizer->Add( m_path_subs_grid, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
200
201
202 this->SetSizer( bMainSizer );
203 this->Layout();
204 bMainSizer->Fit( this );
205
206 // Connect Events
207 this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_FP_LIB_TABLE_BASE::OnUpdateUI ) );
208 m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
209 m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
210 m_move_down_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
211 m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
212 m_migrate_libs_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::onMigrateLibraries ), NULL, this );
213 m_path_subs_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
214}
215
217{
218 // Disconnect Events
219 this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_FP_LIB_TABLE_BASE::OnUpdateUI ) );
220 m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
221 m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
222 m_move_down_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
223 m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
224 m_migrate_libs_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::onMigrateLibraries ), NULL, this );
225 m_path_subs_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
226
227}
const char * name
Definition: DXF_plotter.cpp:57
STD_BITMAP_BUTTON * m_move_up_button
virtual void deleteRowHandler(wxCommandEvent &event)
virtual void appendRowHandler(wxCommandEvent &event)
virtual void onSizeGrid(wxSizeEvent &event)
STD_BITMAP_BUTTON * m_append_button
STD_BITMAP_BUTTON * m_move_down_button
STD_BITMAP_BUTTON * m_delete_button
virtual void OnUpdateUI(wxUpdateUIEvent &event)
virtual void moveUpHandler(wxCommandEvent &event)
virtual void onMigrateLibraries(wxCommandEvent &event)
PANEL_FP_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)
virtual void moveDownHandler(wxCommandEvent &event)
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:211
#define _(s)