KiCad PCB EDA Suite
dialog_fp_lib_table_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Mar 9 2015)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO "NOT" EDIT THIS FILE!
7 
9 
11 
12 DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_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* bSizer1;
17  bSizer1 = new wxBoxSizer( wxVERTICAL );
18 
19  wxStaticBoxSizer* m_top_sizer;
20  m_top_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Library Tables by Scope") ), wxVERTICAL );
21 
22  m_auinotebook = new wxAuiNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_BOTTOM );
23  m_global_panel = new wxPanel( m_auinotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
24  wxBoxSizer* m_global_sizer;
25  m_global_sizer = new wxBoxSizer( wxVERTICAL );
26 
27  wxFlexGridSizer* fgSizer1;
28  fgSizer1 = new wxFlexGridSizer( 1, 2, 0, 0 );
29  fgSizer1->SetFlexibleDirection( wxBOTH );
30  fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
31 
32  m_staticText3 = new wxStaticText( m_global_panel, wxID_ANY, _("Table:"), wxDefaultPosition, wxDefaultSize, 0 );
33  m_staticText3->Wrap( -1 );
34  fgSizer1->Add( m_staticText3, 0, wxRIGHT|wxLEFT, 5 );
35 
36  m_GblTableFilename = new wxStaticText( m_global_panel, wxID_ANY, _("Table Name"), wxDefaultPosition, wxDefaultSize, 0 );
37  m_GblTableFilename->Wrap( -1 );
38  fgSizer1->Add( m_GblTableFilename, 0, wxRIGHT|wxLEFT, 5 );
39 
40 
41  m_global_sizer->Add( fgSizer1, 0, wxEXPAND, 5 );
42 
43  m_global_grid = new wxGrid( m_global_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
44 
45  // Grid
46  m_global_grid->CreateGrid( 1, 5 );
47  m_global_grid->EnableEditing( true );
48  m_global_grid->EnableGridLines( true );
49  m_global_grid->EnableDragGridSize( false );
50  m_global_grid->SetMargins( 0, 0 );
51 
52  // Columns
53  m_global_grid->AutoSizeColumns();
54  m_global_grid->EnableDragColMove( false );
55  m_global_grid->EnableDragColSize( true );
56  m_global_grid->SetColLabelSize( 30 );
57  m_global_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
58 
59  // Rows
60  m_global_grid->EnableDragRowSize( false );
61  m_global_grid->SetRowLabelSize( 40 );
62  m_global_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
63 
64  // Label Appearance
65 
66  // Cell Defaults
67  m_global_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
68  m_global_sizer->Add( m_global_grid, 1, wxALL|wxEXPAND, 5 );
69 
70 
71  m_global_panel->SetSizer( m_global_sizer );
72  m_global_panel->Layout();
73  m_global_sizer->Fit( m_global_panel );
74  m_auinotebook->AddPage( m_global_panel, _("Global Libraries"), true, wxNullBitmap );
75  m_project_panel = new wxPanel( m_auinotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
76  wxBoxSizer* m_project_sizer;
77  m_project_sizer = new wxBoxSizer( wxVERTICAL );
78 
79  wxFlexGridSizer* fgSizer2;
80  fgSizer2 = new wxFlexGridSizer( 1, 2, 0, 0 );
81  fgSizer2->SetFlexibleDirection( wxBOTH );
82  fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
83 
84  m_staticText4 = new wxStaticText( m_project_panel, wxID_ANY, _("Table:"), wxDefaultPosition, wxDefaultSize, 0 );
85  m_staticText4->Wrap( -1 );
86  fgSizer2->Add( m_staticText4, 0, wxRIGHT|wxLEFT, 5 );
87 
88  m_PrjTableFilename = new wxStaticText( m_project_panel, wxID_ANY, _("Table Name"), wxDefaultPosition, wxDefaultSize, 0 );
89  m_PrjTableFilename->Wrap( -1 );
90  fgSizer2->Add( m_PrjTableFilename, 0, wxRIGHT|wxLEFT, 5 );
91 
92 
93  m_project_sizer->Add( fgSizer2, 0, wxEXPAND, 5 );
94 
95  m_project_grid = new wxGrid( m_project_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
96 
97  // Grid
98  m_project_grid->CreateGrid( 1, 5 );
99  m_project_grid->EnableEditing( true );
100  m_project_grid->EnableGridLines( true );
101  m_project_grid->EnableDragGridSize( false );
102  m_project_grid->SetMargins( 0, 0 );
103 
104  // Columns
105  m_project_grid->AutoSizeColumns();
106  m_project_grid->EnableDragColMove( false );
107  m_project_grid->EnableDragColSize( true );
108  m_project_grid->SetColLabelSize( 30 );
109  m_project_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
110 
111  // Rows
112  m_project_grid->EnableDragRowSize( false );
113  m_project_grid->SetRowLabelSize( 40 );
114  m_project_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
115 
116  // Label Appearance
117 
118  // Cell Defaults
119  m_project_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
120  m_project_sizer->Add( m_project_grid, 1, wxALL|wxEXPAND, 5 );
121 
122 
123  m_project_panel->SetSizer( m_project_sizer );
124  m_project_panel->Layout();
125  m_project_sizer->Fit( m_project_panel );
126  m_auinotebook->AddPage( m_project_panel, _("Project Specific Libraries"), false, wxNullBitmap );
127 
128  m_top_sizer->Add( m_auinotebook, 6, wxEXPAND | wxALL, 5 );
129 
130  wxBoxSizer* bSizer51;
131  bSizer51 = new wxBoxSizer( wxHORIZONTAL );
132 
133  m_buttonWizard = new wxButton( this, wxID_ANY, _("Append with Wizard"), wxDefaultPosition, wxDefaultSize, 0 );
134  bSizer51->Add( m_buttonWizard, 0, wxALL, 5 );
135 
136  m_append_button = new wxButton( this, wxID_ANY, _("Append Library"), wxDefaultPosition, wxDefaultSize, 0 );
137  m_append_button->SetToolTip( _("Add a PCB library row to this table") );
138 
139  bSizer51->Add( m_append_button, 0, wxALL, 5 );
140 
141  m_delete_button = new wxButton( this, wxID_ANY, _("Remove Library"), wxDefaultPosition, wxDefaultSize, 0 );
142  m_delete_button->SetToolTip( _("Remove a PCB library from this library table") );
143 
144  bSizer51->Add( m_delete_button, 0, wxALL, 5 );
145 
146  m_move_up_button = new wxButton( this, wxID_ANY, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
147  m_move_up_button->SetToolTip( _("Move the currently selected row up one position") );
148 
149  bSizer51->Add( m_move_up_button, 0, wxALL, 5 );
150 
151  m_move_down_button = new wxButton( this, wxID_ANY, _("Move Down"), wxDefaultPosition, wxDefaultSize, 0 );
152  m_move_down_button->SetToolTip( _("Move the currently selected row down one position") );
153 
154  bSizer51->Add( m_move_down_button, 0, wxALL, 5 );
155 
156  m_edit_options = new wxButton( this, wxID_ANY, _("Options Editor"), wxDefaultPosition, wxDefaultSize, 0 );
157  m_edit_options->SetToolTip( _("Zoom into the options table for current row") );
158 
159  bSizer51->Add( m_edit_options, 0, wxALL, 5 );
160 
161 
162  m_top_sizer->Add( bSizer51, 0, wxALIGN_CENTER|wxBOTTOM, 8 );
163 
164 
165  bSizer1->Add( m_top_sizer, 1, wxEXPAND, 5 );
166 
167  wxStaticBoxSizer* sbSizer1;
168  sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Path Substitutions") ), wxVERTICAL );
169 
170  m_path_subs_grid = new wxGrid( 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 );
185  m_path_subs_grid->SetColLabelSize( 30 );
186  m_path_subs_grid->SetColLabelValue( 0, _("Environment Variable") );
187  m_path_subs_grid->SetColLabelValue( 1, _("Path Segment") );
188  m_path_subs_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
189 
190  // Rows
191  m_path_subs_grid->EnableDragRowSize( true );
192  m_path_subs_grid->SetRowLabelSize( 40 );
193  m_path_subs_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
194 
195  // Label Appearance
196 
197  // Cell Defaults
198  m_path_subs_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
199  m_path_subs_grid->SetToolTip( _("This is a read-only table which shows pertinent environment variables.") );
200 
201  sbSizer1->Add( m_path_subs_grid, 1, wxALL|wxEXPAND, 5 );
202 
203 
204  bSizer1->Add( sbSizer1, 0, wxALL|wxEXPAND, 5 );
205 
206  wxBoxSizer* m_bottom_sizer;
207  m_bottom_sizer = new wxBoxSizer( wxVERTICAL );
208 
209  m_sdbSizer = new wxStdDialogButtonSizer();
210  m_sdbSizerOK = new wxButton( this, wxID_OK );
211  m_sdbSizer->AddButton( m_sdbSizerOK );
212  m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
213  m_sdbSizer->AddButton( m_sdbSizerCancel );
214  m_sdbSizer->Realize();
215 
216  m_bottom_sizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
217 
218 
219  bSizer1->Add( m_bottom_sizer, 0, wxEXPAND, 5 );
220 
221 
222  this->SetSizer( bSizer1 );
223  this->Layout();
224 
225  this->Centre( wxBOTH );
226 
227  // Connect Events
228  this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelCaptionButtonClick ) );
229  this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FP_LIB_TABLE_BASE::onKeyDown ) );
230  m_auinotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( DIALOG_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this );
231  m_buttonWizard->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::OnClickLibraryWizard ), NULL, this );
232  m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
233  m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
234  m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
235  m_move_down_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
236  m_edit_options->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::optionsEditor ), NULL, this );
237  m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelButtonClick ), NULL, this );
238  m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::onOKButtonClick ), NULL, this );
239 }
240 
242 {
243  // Disconnect Events
244  this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelCaptionButtonClick ) );
245  this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FP_LIB_TABLE_BASE::onKeyDown ) );
246  m_auinotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( DIALOG_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this );
247  m_buttonWizard->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::OnClickLibraryWizard ), NULL, this );
248  m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
249  m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
250  m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
251  m_move_down_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
252  m_edit_options->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::optionsEditor ), NULL, this );
253  m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelButtonClick ), NULL, this );
254  m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::onOKButtonClick ), NULL, this );
255 
256 }
virtual void deleteRowHandler(wxCommandEvent &event)=0
virtual void OnClickLibraryWizard(wxCommandEvent &event)=0
Class DIALOG_SHIM may sit in the inheritance tree between wxDialog and any class written by wxFormBui...
Definition: dialog_shim.h:60
DIALOG_FP_LIB_TABLE_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("PCB Library Tables"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(717, 600), long style=wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU)
virtual void onCancelCaptionButtonClick(wxCloseEvent &event)=0
wxStdDialogButtonSizer * m_sdbSizer
virtual void onOKButtonClick(wxCommandEvent &event)=0
virtual void onCancelButtonClick(wxCommandEvent &event)=0
virtual void moveUpHandler(wxCommandEvent &event)=0
virtual void appendRowHandler(wxCommandEvent &event)=0
virtual void pageChangedHandler(wxAuiNotebookEvent &event)=0
virtual void optionsEditor(wxCommandEvent &event)=0
virtual void onKeyDown(wxKeyEvent &event)=0
virtual void moveDownHandler(wxCommandEvent &event)=0