@ -16,15 +16,10 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID
wxBoxSizer * bSizer1 ;
bSizer1 = new wxBoxSizer ( wxVERTICAL ) ;
m_splitter = new wxSplitterWindow ( this , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxSP_3DSASH ) ;
m_splitter - > Connect ( wxEVT_IDLE , wxIdleEventHandler ( DIALOG_FP_LIB_TABLE_BASE : : m_splitterOnIdle ) , NULL , this ) ;
m_splitter - > SetMinimumPaneSize ( 10 ) ;
m_top = new wxPanel ( m_splitter , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxTAB_TRAVERSAL ) ;
wxStaticBoxSizer * m_top_sizer ;
m_top_sizer = new wxStaticBoxSizer ( new wxStaticBox ( m_top , wxID_ANY , _ ( " Library Tables by Scope " ) ) , wxVERTICAL ) ;
m_top_sizer = new wxStaticBoxSizer ( new wxStaticBox ( this , wxID_ANY , _ ( " Library Tables by Scope " ) ) , wxVERTICAL ) ;
m_auinotebook = new wxAuiNotebook ( m_top , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxAUI_NB_BOTTOM ) ;
m_auinotebook = new wxAuiNotebook ( this , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxAUI_NB_BOTTOM ) ;
m_global_panel = new wxPanel ( m_auinotebook , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxTAB_TRAVERSAL ) ;
m_global_panel - > SetToolTip ( _ ( " Module libraries which are visible for all projects " ) ) ;
@ -56,6 +51,8 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID
// Cell Defaults
m_global_grid - > SetDefaultCellAlignment ( wxALIGN_LEFT , wxALIGN_TOP ) ;
m_global_grid - > SetToolTip ( _ ( " This table is associated with all projects " ) ) ;
m_global_sizer - > Add ( m_global_grid , 1 , wxALL | wxEXPAND , 5 ) ;
@ -94,6 +91,8 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID
// Cell Defaults
m_project_grid - > SetDefaultCellAlignment ( wxALIGN_LEFT , wxALIGN_TOP ) ;
m_project_grid - > SetToolTip ( _ ( " Libraries list in this table is associated with the current project " ) ) ;
m_project_sizer - > Add ( m_project_grid , 1 , wxALL | wxEXPAND , 5 ) ;
@ -102,32 +101,32 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID
m_project_sizer - > Fit ( m_project_panel ) ;
m_auinotebook - > AddPage ( m_project_panel , _ ( " Project Specific Libraries " ) , false , wxNullBitmap ) ;
m_top_sizer - > Add ( m_auinotebook , 1 , wxEXPAND | wxALL , 5 ) ;
m_top_sizer - > Add ( m_auinotebook , 6 , wxEXPAND | wxALL , 5 ) ;
wxBoxSizer * bSizer51 ;
bSizer51 = new wxBoxSizer ( wxHORIZONTAL ) ;
m_append_button = new wxButton ( m_top , wxID_ANY , _ ( " Append Row " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_append_button = new wxButton ( this , wxID_ANY , _ ( " Append Row " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_append_button - > SetToolTip ( _ ( " Add a PCB library row to this table " ) ) ;
bSizer51 - > Add ( m_append_button , 0 , wxALL , 5 ) ;
m_delete_button = new wxButton ( m_top , wxID_ANY , _ ( " Delete Row " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_delete_button = new wxButton ( this , wxID_ANY , _ ( " Delete Row " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_delete_button - > SetToolTip ( _ ( " Remove a PCB library from this library table " ) ) ;
bSizer51 - > Add ( m_delete_button , 0 , wxALL , 5 ) ;
m_move_up_button = new wxButton ( m_top , wxID_ANY , _ ( " Move Up " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_move_up_button = new wxButton ( this , wxID_ANY , _ ( " Move Up " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_move_up_button - > SetToolTip ( _ ( " Move the currently selected row up one position " ) ) ;
bSizer51 - > Add ( m_move_up_button , 0 , wxALL , 5 ) ;
m_move_down_button = new wxButton ( m_top , wxID_ANY , _ ( " Move Down " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_move_down_button = new wxButton ( this , wxID_ANY , _ ( " Move Down " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_move_down_button - > SetToolTip ( _ ( " Move the currently selected row down one position " ) ) ;
bSizer51 - > Add ( m_move_down_button , 0 , wxALL , 5 ) ;
m_edit_options = new wxButton ( m_top , wxID_ANY , _ ( " Options Editor " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_edit_options = new wxButton ( this , wxID_ANY , _ ( " Options Editor " ) , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_edit_options - > SetToolTip ( _ ( " Zoom into the options table for current row " ) ) ;
bSizer51 - > Add ( m_edit_options , 0 , wxALL , 5 ) ;
@ -136,17 +135,12 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID
m_top_sizer - > Add ( bSizer51 , 0 , wxALIGN_CENTER | wxBOTTOM , 8 ) ;
m_top - > SetSizer ( m_top_sizer ) ;
m_top - > Layout ( ) ;
m_top_sizer - > Fit ( m_top ) ;
m_bottom = new wxPanel ( m_splitter , wxID_ANY , wxDefaultPosition , wxDefaultSize , wxTAB_TRAVERSAL ) ;
wxBoxSizer * m_bottom_sizer ;
m_bottom_sizer = new wxBoxSizer ( wxVERTICAL ) ;
bSizer1 - > Add ( m_top_sizer , 1 , wxEXPAND , 5 ) ;
wxStaticBoxSizer * sbSizer1 ;
sbSizer1 = new wxStaticBoxSizer ( new wxStaticBox ( m_bottom , wxID_ANY , _ ( " Path Substitutions " ) ) , wxVERTICAL ) ;
sbSizer1 = new wxStaticBoxSizer ( new wxStaticBox ( this , wxID_ANY , _ ( " Path Substitutions " ) ) , wxVERTICAL ) ;
m_path_subs_grid = new wxGrid ( m_bottom , wxID_ANY , wxDefaultPosition , wxDefaultSize , 0 ) ;
m_path_subs_grid = new wxGrid ( this , wxID_ANY , wxDefaultPosition , wxDefaultSize , 0 ) ;
// Grid
m_path_subs_grid - > CreateGrid ( 1 , 2 ) ;
@ -175,26 +169,27 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID
// Cell Defaults
m_path_subs_grid - > SetDefaultCellAlignment ( wxALIGN_LEFT , wxALIGN_TOP ) ;
m_path_subs_grid - > SetToolTip ( _ ( " This is a read-only table which shows pertinent environment variables. " ) ) ;
sbSizer1 - > Add ( m_path_subs_grid , 1 , wxALL | wxEXPAND , 5 ) ;
m_bottom_sizer - > Add ( sbSizer1 , 1 , wxALL | wxEXPAND , 5 ) ;
bSizer1 - > Add ( sbSizer1 , 0 , wxALL | wxEXPAND , 5 ) ;
wxBoxSizer * m_bottom_sizer ;
m_bottom_sizer = new wxBoxSizer ( wxVERTICAL ) ;
m_sdbSizer1 = new wxStdDialogButtonSizer ( ) ;
m_sdbSizer1OK = new wxButton ( m_bottom , wxID_OK ) ;
m_sdbSizer1OK = new wxButton ( this , wxID_OK ) ;
m_sdbSizer1 - > AddButton ( m_sdbSizer1OK ) ;
m_sdbSizer1Cancel = new wxButton ( m_bottom , wxID_CANCEL ) ;
m_sdbSizer1Cancel = new wxButton ( this , wxID_CANCEL ) ;
m_sdbSizer1 - > AddButton ( m_sdbSizer1Cancel ) ;
m_sdbSizer1 - > Realize ( ) ;
m_bottom_sizer - > Add ( m_sdbSizer1 , 0 , wxALL | wxEXPAND , 5 ) ;
m_bottom - > SetSizer ( m_bottom_sizer ) ;
m_bottom - > Layout ( ) ;
m_bottom_sizer - > Fit ( m_bottom ) ;
m_splitter - > SplitHorizontally ( m_top , m_bottom , 398 ) ;
bSizer1 - > Add ( m_splitter , 2 , wxEXPAND , 5 ) ;
bSizer1 - > Add ( m_bottom_sizer , 0 , wxEXPAND , 5 ) ;
this - > SetSizer ( bSizer1 ) ;
@ -203,6 +198,7 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID
this - > Centre ( wxBOTH ) ;
// Connect Events
this - > Connect ( wxEVT_INIT_DIALOG , wxInitDialogEventHandler ( DIALOG_FP_LIB_TABLE_BASE : : onInitDialog ) ) ;
m_auinotebook - > Connect ( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED , wxAuiNotebookEventHandler ( DIALOG_FP_LIB_TABLE_BASE : : pageChangedHandler ) , NULL , this ) ;
m_global_grid - > Connect ( wxEVT_GRID_CELL_LEFT_CLICK , wxGridEventHandler ( DIALOG_FP_LIB_TABLE_BASE : : onGridCellLeftClick ) , NULL , this ) ;
m_global_grid - > Connect ( wxEVT_GRID_CELL_LEFT_DCLICK , wxGridEventHandler ( DIALOG_FP_LIB_TABLE_BASE : : onGridCellLeftDClick ) , NULL , this ) ;
@ -224,6 +220,7 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID
DIALOG_FP_LIB_TABLE_BASE : : ~ DIALOG_FP_LIB_TABLE_BASE ( )
{
// Disconnect Events
this - > Disconnect ( wxEVT_INIT_DIALOG , wxInitDialogEventHandler ( DIALOG_FP_LIB_TABLE_BASE : : onInitDialog ) ) ;
m_auinotebook - > Disconnect ( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED , wxAuiNotebookEventHandler ( DIALOG_FP_LIB_TABLE_BASE : : pageChangedHandler ) , NULL , this ) ;
m_global_grid - > Disconnect ( wxEVT_GRID_CELL_LEFT_CLICK , wxGridEventHandler ( DIALOG_FP_LIB_TABLE_BASE : : onGridCellLeftClick ) , NULL , this ) ;
m_global_grid - > Disconnect ( wxEVT_GRID_CELL_LEFT_DCLICK , wxGridEventHandler ( DIALOG_FP_LIB_TABLE_BASE : : onGridCellLeftDClick ) , NULL , this ) ;