2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2015-03-30 16:42:39 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version Mar 9 2015)
|
2013-05-26 04:36:44 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
|
|
|
// PLEASE DO "NOT" EDIT THIS FILE!
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "dialog_fp_lib_table_base.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
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 )
|
|
|
|
{
|
|
|
|
this->SetSizeHints( wxDefaultSize, wxDefaultSize );
|
|
|
|
|
|
|
|
wxBoxSizer* bSizer1;
|
|
|
|
bSizer1 = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
|
|
|
wxStaticBoxSizer* m_top_sizer;
|
2013-10-03 22:12:56 +00:00
|
|
|
m_top_sizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Library Tables by Scope") ), wxVERTICAL );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2013-10-03 22:12:56 +00:00
|
|
|
m_auinotebook = new wxAuiNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_BOTTOM );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_global_panel = new wxPanel( m_auinotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
|
|
|
wxBoxSizer* m_global_sizer;
|
|
|
|
m_global_sizer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
2015-01-01 15:46:11 +00:00
|
|
|
wxFlexGridSizer* fgSizer1;
|
|
|
|
fgSizer1 = new wxFlexGridSizer( 1, 2, 0, 0 );
|
|
|
|
fgSizer1->SetFlexibleDirection( wxBOTH );
|
|
|
|
fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
|
|
|
|
|
|
|
m_staticText3 = new wxStaticText( m_global_panel, wxID_ANY, _("Table:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_staticText3->Wrap( -1 );
|
|
|
|
fgSizer1->Add( m_staticText3, 0, wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
|
|
|
m_GblTableFilename = new wxStaticText( m_global_panel, wxID_ANY, _("Table Name"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_GblTableFilename->Wrap( -1 );
|
|
|
|
fgSizer1->Add( m_GblTableFilename, 0, wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
m_global_sizer->Add( fgSizer1, 0, wxEXPAND, 5 );
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
m_global_grid = new wxGrid( m_global_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
|
|
|
|
// Grid
|
|
|
|
m_global_grid->CreateGrid( 1, 5 );
|
|
|
|
m_global_grid->EnableEditing( true );
|
|
|
|
m_global_grid->EnableGridLines( true );
|
2013-10-05 04:41:15 +00:00
|
|
|
m_global_grid->EnableDragGridSize( false );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_global_grid->SetMargins( 0, 0 );
|
|
|
|
|
|
|
|
// Columns
|
|
|
|
m_global_grid->AutoSizeColumns();
|
|
|
|
m_global_grid->EnableDragColMove( false );
|
|
|
|
m_global_grid->EnableDragColSize( true );
|
|
|
|
m_global_grid->SetColLabelSize( 30 );
|
|
|
|
m_global_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
|
|
|
|
|
|
|
// Rows
|
2013-10-05 04:41:15 +00:00
|
|
|
m_global_grid->EnableDragRowSize( false );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_global_grid->SetRowLabelSize( 40 );
|
|
|
|
m_global_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
|
|
|
|
|
|
|
// Label Appearance
|
|
|
|
|
|
|
|
// Cell Defaults
|
|
|
|
m_global_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
|
|
|
m_global_sizer->Add( m_global_grid, 1, wxALL|wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
m_global_panel->SetSizer( m_global_sizer );
|
|
|
|
m_global_panel->Layout();
|
|
|
|
m_global_sizer->Fit( m_global_panel );
|
|
|
|
m_auinotebook->AddPage( m_global_panel, _("Global Libraries"), true, wxNullBitmap );
|
|
|
|
m_project_panel = new wxPanel( m_auinotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
|
|
|
wxBoxSizer* m_project_sizer;
|
|
|
|
m_project_sizer = new wxBoxSizer( wxVERTICAL );
|
|
|
|
|
2015-01-01 15:46:11 +00:00
|
|
|
wxFlexGridSizer* fgSizer2;
|
|
|
|
fgSizer2 = new wxFlexGridSizer( 1, 2, 0, 0 );
|
|
|
|
fgSizer2->SetFlexibleDirection( wxBOTH );
|
|
|
|
fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
|
|
|
|
|
|
|
|
m_staticText4 = new wxStaticText( m_project_panel, wxID_ANY, _("Table:"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_staticText4->Wrap( -1 );
|
|
|
|
fgSizer2->Add( m_staticText4, 0, wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
|
|
|
m_PrjTableFilename = new wxStaticText( m_project_panel, wxID_ANY, _("Table Name"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
m_PrjTableFilename->Wrap( -1 );
|
|
|
|
fgSizer2->Add( m_PrjTableFilename, 0, wxRIGHT|wxLEFT, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
m_project_sizer->Add( fgSizer2, 0, wxEXPAND, 5 );
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
m_project_grid = new wxGrid( m_project_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
|
|
|
|
// Grid
|
|
|
|
m_project_grid->CreateGrid( 1, 5 );
|
|
|
|
m_project_grid->EnableEditing( true );
|
|
|
|
m_project_grid->EnableGridLines( true );
|
2013-10-05 04:41:15 +00:00
|
|
|
m_project_grid->EnableDragGridSize( false );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_project_grid->SetMargins( 0, 0 );
|
|
|
|
|
|
|
|
// Columns
|
|
|
|
m_project_grid->AutoSizeColumns();
|
|
|
|
m_project_grid->EnableDragColMove( false );
|
|
|
|
m_project_grid->EnableDragColSize( true );
|
|
|
|
m_project_grid->SetColLabelSize( 30 );
|
|
|
|
m_project_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
|
|
|
|
|
|
|
// Rows
|
2013-10-05 04:41:15 +00:00
|
|
|
m_project_grid->EnableDragRowSize( false );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_project_grid->SetRowLabelSize( 40 );
|
|
|
|
m_project_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
|
|
|
|
|
|
|
// Label Appearance
|
|
|
|
|
|
|
|
// Cell Defaults
|
|
|
|
m_project_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
|
|
|
m_project_sizer->Add( m_project_grid, 1, wxALL|wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
|
|
|
m_project_panel->SetSizer( m_project_sizer );
|
|
|
|
m_project_panel->Layout();
|
|
|
|
m_project_sizer->Fit( m_project_panel );
|
|
|
|
m_auinotebook->AddPage( m_project_panel, _("Project Specific Libraries"), false, wxNullBitmap );
|
|
|
|
|
2013-10-03 22:12:56 +00:00
|
|
|
m_top_sizer->Add( m_auinotebook, 6, wxEXPAND | wxALL, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
wxBoxSizer* bSizer51;
|
|
|
|
bSizer51 = new wxBoxSizer( wxHORIZONTAL );
|
|
|
|
|
2015-03-30 16:42:39 +00:00
|
|
|
m_buttonWizard = new wxButton( this, wxID_ANY, _("Append with Wizard"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bSizer51->Add( m_buttonWizard, 0, wxALL, 5 );
|
|
|
|
|
2014-09-22 07:51:06 +00:00
|
|
|
m_append_button = new wxButton( this, wxID_ANY, _("Append Library"), wxDefaultPosition, wxDefaultSize, 0 );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_append_button->SetToolTip( _("Add a PCB library row to this table") );
|
|
|
|
|
|
|
|
bSizer51->Add( m_append_button, 0, wxALL, 5 );
|
|
|
|
|
2014-09-22 07:51:06 +00:00
|
|
|
m_delete_button = new wxButton( this, wxID_ANY, _("Remove Library"), wxDefaultPosition, wxDefaultSize, 0 );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_delete_button->SetToolTip( _("Remove a PCB library from this library table") );
|
|
|
|
|
|
|
|
bSizer51->Add( m_delete_button, 0, wxALL, 5 );
|
|
|
|
|
2013-10-03 22:12:56 +00:00
|
|
|
m_move_up_button = new wxButton( this, wxID_ANY, _("Move Up"), wxDefaultPosition, wxDefaultSize, 0 );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_move_up_button->SetToolTip( _("Move the currently selected row up one position") );
|
|
|
|
|
|
|
|
bSizer51->Add( m_move_up_button, 0, wxALL, 5 );
|
|
|
|
|
2013-10-03 22:12:56 +00:00
|
|
|
m_move_down_button = new wxButton( this, wxID_ANY, _("Move Down"), wxDefaultPosition, wxDefaultSize, 0 );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_move_down_button->SetToolTip( _("Move the currently selected row down one position") );
|
|
|
|
|
|
|
|
bSizer51->Add( m_move_down_button, 0, wxALL, 5 );
|
|
|
|
|
2013-10-03 22:12:56 +00:00
|
|
|
m_edit_options = new wxButton( this, wxID_ANY, _("Options Editor"), wxDefaultPosition, wxDefaultSize, 0 );
|
2013-09-24 21:23:13 +00:00
|
|
|
m_edit_options->SetToolTip( _("Zoom into the options table for current row") );
|
|
|
|
|
|
|
|
bSizer51->Add( m_edit_options, 0, wxALL, 5 );
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
m_top_sizer->Add( bSizer51, 0, wxALIGN_CENTER|wxBOTTOM, 8 );
|
|
|
|
|
|
|
|
|
2013-10-03 22:12:56 +00:00
|
|
|
bSizer1->Add( m_top_sizer, 1, wxEXPAND, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
wxStaticBoxSizer* sbSizer1;
|
2013-10-03 22:12:56 +00:00
|
|
|
sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Path Substitutions") ), wxVERTICAL );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2013-10-03 22:12:56 +00:00
|
|
|
m_path_subs_grid = new wxGrid( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
// Grid
|
|
|
|
m_path_subs_grid->CreateGrid( 1, 2 );
|
2013-09-30 21:26:49 +00:00
|
|
|
m_path_subs_grid->EnableEditing( false );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_path_subs_grid->EnableGridLines( true );
|
|
|
|
m_path_subs_grid->EnableDragGridSize( false );
|
|
|
|
m_path_subs_grid->SetMargins( 0, 0 );
|
|
|
|
|
|
|
|
// Columns
|
|
|
|
m_path_subs_grid->SetColSize( 0, 150 );
|
|
|
|
m_path_subs_grid->SetColSize( 1, 500 );
|
|
|
|
m_path_subs_grid->AutoSizeColumns();
|
|
|
|
m_path_subs_grid->EnableDragColMove( false );
|
|
|
|
m_path_subs_grid->EnableDragColSize( true );
|
|
|
|
m_path_subs_grid->SetColLabelSize( 30 );
|
|
|
|
m_path_subs_grid->SetColLabelValue( 0, _("Environment Variable") );
|
|
|
|
m_path_subs_grid->SetColLabelValue( 1, _("Path Segment") );
|
|
|
|
m_path_subs_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
|
|
|
|
|
|
|
// Rows
|
|
|
|
m_path_subs_grid->EnableDragRowSize( true );
|
|
|
|
m_path_subs_grid->SetRowLabelSize( 40 );
|
|
|
|
m_path_subs_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
|
|
|
|
|
|
|
|
// Label Appearance
|
|
|
|
|
|
|
|
// Cell Defaults
|
|
|
|
m_path_subs_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
|
2013-10-03 22:12:56 +00:00
|
|
|
m_path_subs_grid->SetToolTip( _("This is a read-only table which shows pertinent environment variables.") );
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
sbSizer1->Add( m_path_subs_grid, 1, wxALL|wxEXPAND, 5 );
|
|
|
|
|
|
|
|
|
2013-10-03 22:12:56 +00:00
|
|
|
bSizer1->Add( sbSizer1, 0, wxALL|wxEXPAND, 5 );
|
|
|
|
|
|
|
|
wxBoxSizer* m_bottom_sizer;
|
|
|
|
m_bottom_sizer = new wxBoxSizer( wxVERTICAL );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2015-01-27 07:34:19 +00:00
|
|
|
m_sdbSizer = new wxStdDialogButtonSizer();
|
|
|
|
m_sdbSizerOK = new wxButton( this, wxID_OK );
|
|
|
|
m_sdbSizer->AddButton( m_sdbSizerOK );
|
|
|
|
m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
|
|
|
|
m_sdbSizer->AddButton( m_sdbSizerCancel );
|
|
|
|
m_sdbSizer->Realize();
|
2013-05-26 04:36:44 +00:00
|
|
|
|
2015-01-27 07:34:19 +00:00
|
|
|
m_bottom_sizer->Add( m_sdbSizer, 0, wxALL|wxEXPAND, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
|
2013-10-03 22:12:56 +00:00
|
|
|
bSizer1->Add( m_bottom_sizer, 0, wxEXPAND, 5 );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
this->SetSizer( bSizer1 );
|
|
|
|
this->Layout();
|
|
|
|
|
|
|
|
this->Centre( wxBOTH );
|
|
|
|
|
|
|
|
// Connect Events
|
2013-12-22 19:02:04 +00:00
|
|
|
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelCaptionButtonClick ) );
|
2013-10-04 22:23:53 +00:00
|
|
|
this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FP_LIB_TABLE_BASE::onKeyDown ) );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_auinotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( DIALOG_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this );
|
2014-12-21 14:13:14 +00:00
|
|
|
m_buttonWizard->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::OnClickLibraryWizard ), NULL, this );
|
2015-03-30 16:42:39 +00:00
|
|
|
m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
|
2015-01-27 07:34:19 +00:00
|
|
|
m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
|
|
|
|
m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
|
|
|
|
m_move_down_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
|
|
|
|
m_edit_options->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::optionsEditor ), NULL, this );
|
|
|
|
m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelButtonClick ), NULL, this );
|
|
|
|
m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::onOKButtonClick ), NULL, this );
|
2013-05-26 04:36:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DIALOG_FP_LIB_TABLE_BASE::~DIALOG_FP_LIB_TABLE_BASE()
|
|
|
|
{
|
|
|
|
// Disconnect Events
|
2013-12-22 19:02:04 +00:00
|
|
|
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelCaptionButtonClick ) );
|
2013-10-04 22:23:53 +00:00
|
|
|
this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FP_LIB_TABLE_BASE::onKeyDown ) );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_auinotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( DIALOG_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this );
|
2014-12-21 14:13:14 +00:00
|
|
|
m_buttonWizard->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::OnClickLibraryWizard ), NULL, this );
|
2015-03-30 16:42:39 +00:00
|
|
|
m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
|
2015-01-27 07:34:19 +00:00
|
|
|
m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
|
|
|
|
m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
|
|
|
|
m_move_down_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
|
|
|
|
m_edit_options->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::optionsEditor ), NULL, this );
|
|
|
|
m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelButtonClick ), NULL, this );
|
|
|
|
m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::onOKButtonClick ), NULL, this );
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
}
|