2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2023-08-31 16:47:28 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version 3.10.1-0-g8feb16b)
|
2013-05-26 04:36:44 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
2018-03-14 04:51:59 +00:00
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
2013-05-26 04:36:44 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2022-12-13 20:47:28 +00:00
|
|
|
#include "widgets/std_bitmap_button.h"
|
2018-08-19 16:10:14 +00:00
|
|
|
#include "widgets/wx_grid.h"
|
|
|
|
|
2018-07-20 17:46:56 +00:00
|
|
|
#include "panel_fp_lib_table_base.h"
|
2013-05-26 04:36:44 +00:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2020-01-03 15:09:26 +00:00
|
|
|
PANEL_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 )
|
2013-05-26 04:36:44 +00:00
|
|
|
{
|
2018-03-14 04:51:59 +00:00
|
|
|
wxBoxSizer* bMainSizer;
|
|
|
|
bMainSizer = new wxBoxSizer( wxVERTICAL );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2023-01-20 13:30:17 +00:00
|
|
|
m_notebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
2020-11-01 13:30:27 +00:00
|
|
|
m_global_panel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
2013-05-26 04:36:44 +00:00
|
|
|
wxBoxSizer* m_global_sizer;
|
|
|
|
m_global_sizer = new wxBoxSizer( wxVERTICAL );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2018-08-19 16:10:14 +00:00
|
|
|
m_global_grid = new WX_GRID( m_global_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Grid
|
2022-12-28 16:27:03 +00:00
|
|
|
m_global_grid->CreateGrid( 1, 7 );
|
2013-05-26 04:36:44 +00:00
|
|
|
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 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Columns
|
2022-12-28 16:27:03 +00:00
|
|
|
m_global_grid->SetColSize( 0, 48 );
|
|
|
|
m_global_grid->SetColSize( 1, 48 );
|
|
|
|
m_global_grid->SetColSize( 2, 100 );
|
|
|
|
m_global_grid->SetColSize( 3, 240 );
|
|
|
|
m_global_grid->SetColSize( 4, 100 );
|
|
|
|
m_global_grid->SetColSize( 5, 80 );
|
|
|
|
m_global_grid->SetColSize( 6, 240 );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_global_grid->EnableDragColMove( false );
|
|
|
|
m_global_grid->EnableDragColSize( true );
|
2022-12-28 16:27:03 +00:00
|
|
|
m_global_grid->SetColLabelValue( 0, _("Active") );
|
|
|
|
m_global_grid->SetColLabelValue( 1, _("Visible") );
|
|
|
|
m_global_grid->SetColLabelValue( 2, _("Nickname") );
|
|
|
|
m_global_grid->SetColLabelValue( 3, _("Library Path") );
|
2022-12-31 10:41:04 +00:00
|
|
|
m_global_grid->SetColLabelValue( 4, _("Library Format") );
|
2022-12-28 16:27:03 +00:00
|
|
|
m_global_grid->SetColLabelValue( 5, _("Options") );
|
|
|
|
m_global_grid->SetColLabelValue( 6, _("Description") );
|
2018-03-14 04:51:59 +00:00
|
|
|
m_global_grid->SetColLabelSize( 22 );
|
2020-01-03 15:09:26 +00:00
|
|
|
m_global_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Rows
|
2013-10-05 04:41:15 +00:00
|
|
|
m_global_grid->EnableDragRowSize( false );
|
2018-03-14 04:51:59 +00:00
|
|
|
m_global_grid->SetRowLabelSize( 0 );
|
2020-01-03 15:09:26 +00:00
|
|
|
m_global_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Label Appearance
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Cell Defaults
|
2023-09-18 14:15:22 +00:00
|
|
|
m_global_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_global_sizer->Add( m_global_grid, 1, wxALL|wxEXPAND, 5 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
m_global_panel->SetSizer( m_global_sizer );
|
|
|
|
m_global_panel->Layout();
|
|
|
|
m_global_sizer->Fit( m_global_panel );
|
2020-11-01 14:13:39 +00:00
|
|
|
m_notebook->AddPage( m_global_panel, _("Global Libraries"), true );
|
2020-11-01 13:30:27 +00:00
|
|
|
m_project_panel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
2013-05-26 04:36:44 +00:00
|
|
|
wxBoxSizer* m_project_sizer;
|
|
|
|
m_project_sizer = new wxBoxSizer( wxVERTICAL );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2018-08-19 16:10:14 +00:00
|
|
|
m_project_grid = new WX_GRID( m_project_panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Grid
|
2022-12-28 16:27:03 +00:00
|
|
|
m_project_grid->CreateGrid( 1, 7 );
|
2013-05-26 04:36:44 +00:00
|
|
|
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 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Columns
|
2022-12-28 16:27:03 +00:00
|
|
|
m_project_grid->SetColSize( 0, 48 );
|
|
|
|
m_project_grid->SetColSize( 1, 48 );
|
|
|
|
m_project_grid->SetColSize( 2, 100 );
|
|
|
|
m_project_grid->SetColSize( 3, 240 );
|
|
|
|
m_project_grid->SetColSize( 4, 100 );
|
|
|
|
m_project_grid->SetColSize( 5, 80 );
|
|
|
|
m_project_grid->SetColSize( 6, 240 );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_project_grid->EnableDragColMove( false );
|
|
|
|
m_project_grid->EnableDragColSize( true );
|
2022-12-28 16:27:03 +00:00
|
|
|
m_project_grid->SetColLabelValue( 0, _("Active") );
|
|
|
|
m_project_grid->SetColLabelValue( 1, _("Visible") );
|
|
|
|
m_project_grid->SetColLabelValue( 2, _("Nickname") );
|
|
|
|
m_project_grid->SetColLabelValue( 3, _("Library Path") );
|
|
|
|
m_project_grid->SetColLabelValue( 4, _("LIbrary Format") );
|
|
|
|
m_project_grid->SetColLabelValue( 5, _("Options") );
|
|
|
|
m_project_grid->SetColLabelValue( 6, _("Description") );
|
2018-03-14 04:51:59 +00:00
|
|
|
m_project_grid->SetColLabelSize( 22 );
|
2020-01-03 15:09:26 +00:00
|
|
|
m_project_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Rows
|
2013-10-05 04:41:15 +00:00
|
|
|
m_project_grid->EnableDragRowSize( false );
|
2018-03-14 04:51:59 +00:00
|
|
|
m_project_grid->SetRowLabelSize( 0 );
|
2020-01-03 15:09:26 +00:00
|
|
|
m_project_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Label Appearance
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Cell Defaults
|
2023-09-18 14:15:22 +00:00
|
|
|
m_project_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
|
2013-05-26 04:36:44 +00:00
|
|
|
m_project_sizer->Add( m_project_grid, 1, wxALL|wxEXPAND, 5 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
m_project_panel->SetSizer( m_project_sizer );
|
|
|
|
m_project_panel->Layout();
|
|
|
|
m_project_sizer->Fit( m_project_panel );
|
2020-11-01 14:13:39 +00:00
|
|
|
m_notebook->AddPage( m_project_panel, _("Project Specific Libraries"), false );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2023-01-20 13:30:17 +00:00
|
|
|
bMainSizer->Add( m_notebook, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
wxBoxSizer* bButtonsSizer;
|
|
|
|
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2023-01-20 13:30:17 +00:00
|
|
|
m_append_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
2018-11-24 14:43:01 +00:00
|
|
|
m_append_button->SetToolTip( _("Add empty row to table") );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2023-01-20 13:30:17 +00:00
|
|
|
bButtonsSizer->Add( m_append_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2023-01-20 13:30:17 +00:00
|
|
|
m_browseButton = new SPLIT_BUTTON( this, wxID_ANY, _( "Add Existing" ), wxDefaultPosition );
|
2022-12-15 01:38:49 +00:00
|
|
|
m_browseButton->SetToolTip( _("Add Existing") );
|
|
|
|
|
2023-08-31 16:47:28 +00:00
|
|
|
bButtonsSizer->Add( m_browseButton, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2023-01-20 13:30:17 +00:00
|
|
|
m_move_up_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
2018-11-24 14:43:01 +00:00
|
|
|
m_move_up_button->SetToolTip( _("Move up") );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2023-01-20 13:30:17 +00:00
|
|
|
bButtonsSizer->Add( m_move_up_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2023-01-20 13:30:17 +00:00
|
|
|
m_move_down_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
2018-11-24 14:43:01 +00:00
|
|
|
m_move_down_button->SetToolTip( _("Move down") );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2023-01-20 13:30:17 +00:00
|
|
|
bButtonsSizer->Add( m_move_down_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
|
|
|
|
2020-08-17 22:34:02 +00:00
|
|
|
bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2023-01-20 13:30:17 +00:00
|
|
|
m_delete_button = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( -1,-1 ), wxBU_AUTODRAW|0 );
|
2018-11-24 14:43:01 +00:00
|
|
|
m_delete_button->SetToolTip( _("Remove library from table") );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2023-01-20 13:30:17 +00:00
|
|
|
bButtonsSizer->Add( m_delete_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
|
|
|
|
2023-08-28 20:44:10 +00:00
|
|
|
bButtonsSizer->Add( 20, 0, 1, wxEXPAND, 5 );
|
|
|
|
|
|
|
|
m_migrate_libs_button = new wxButton( this, wxID_ANY, _("Migrate Libraries"), wxDefaultPosition, wxDefaultSize, 0 );
|
|
|
|
bButtonsSizer->Add( m_migrate_libs_button, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
|
|
|
|
|
|
|
|
2023-01-20 13:30:17 +00:00
|
|
|
bMainSizer->Add( bButtonsSizer, 0, wxEXPAND|wxALL, 8 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2023-01-20 13:30:17 +00:00
|
|
|
wxStaticText* stPathsLabel;
|
2023-01-21 13:40:39 +00:00
|
|
|
stPathsLabel = new wxStaticText( this, wxID_ANY, _("Available path substitutions:"), wxDefaultPosition, wxDefaultSize, 0 );
|
2023-01-20 13:30:17 +00:00
|
|
|
stPathsLabel->Wrap( -1 );
|
|
|
|
bMainSizer->Add( stPathsLabel, 0, wxTOP|wxRIGHT|wxLEFT|wxEXPAND, 8 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
|
|
|
|
2023-01-20 13:30:17 +00:00
|
|
|
bMainSizer->Add( 0, 2, 0, wxEXPAND, 5 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2023-01-20 13:30:17 +00:00
|
|
|
m_path_subs_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Grid
|
|
|
|
m_path_subs_grid->CreateGrid( 1, 2 );
|
2020-11-28 12:54:04 +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 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// 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 );
|
2018-03-14 04:51:59 +00:00
|
|
|
m_path_subs_grid->SetColLabelSize( 0 );
|
2020-01-03 15:09:26 +00:00
|
|
|
m_path_subs_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Rows
|
|
|
|
m_path_subs_grid->EnableDragRowSize( true );
|
2018-03-14 04:51:59 +00:00
|
|
|
m_path_subs_grid->SetRowLabelSize( 0 );
|
2020-01-03 15:09:26 +00:00
|
|
|
m_path_subs_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Label Appearance
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Cell Defaults
|
2023-09-18 14:15:22 +00:00
|
|
|
m_path_subs_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
|
2013-10-03 22:12:56 +00:00
|
|
|
m_path_subs_grid->SetToolTip( _("This is a read-only table which shows pertinent environment variables.") );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2023-01-20 13:30:17 +00:00
|
|
|
bMainSizer->Add( m_path_subs_grid, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
|
|
|
|
2018-03-14 04:51:59 +00:00
|
|
|
this->SetSizer( bMainSizer );
|
2013-05-26 04:36:44 +00:00
|
|
|
this->Layout();
|
2020-06-03 17:46:50 +00:00
|
|
|
bMainSizer->Fit( this );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
// Connect Events
|
2020-11-14 20:12:49 +00:00
|
|
|
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_FP_LIB_TABLE_BASE::OnUpdateUI ) );
|
2018-07-19 19:15:40 +00:00
|
|
|
m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
|
|
|
|
m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
|
|
|
|
m_move_down_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
|
2018-08-19 16:05:48 +00:00
|
|
|
m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
|
2023-08-28 20:44:10 +00:00
|
|
|
m_migrate_libs_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::onMigrateLibraries ), NULL, this );
|
2018-07-19 19:15:40 +00:00
|
|
|
m_path_subs_grid->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
|
2013-05-26 04:36:44 +00:00
|
|
|
}
|
|
|
|
|
2018-07-19 19:15:40 +00:00
|
|
|
PANEL_FP_LIB_TABLE_BASE::~PANEL_FP_LIB_TABLE_BASE()
|
2013-05-26 04:36:44 +00:00
|
|
|
{
|
|
|
|
// Disconnect Events
|
2020-11-14 20:12:49 +00:00
|
|
|
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( PANEL_FP_LIB_TABLE_BASE::OnUpdateUI ) );
|
2018-07-19 19:15:40 +00:00
|
|
|
m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
|
|
|
|
m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
|
|
|
|
m_move_down_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
|
2018-08-19 16:05:48 +00:00
|
|
|
m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
|
2023-08-28 20:44:10 +00:00
|
|
|
m_migrate_libs_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_FP_LIB_TABLE_BASE::onMigrateLibraries ), NULL, this );
|
2018-07-19 19:15:40 +00:00
|
|
|
m_path_subs_grid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_FP_LIB_TABLE_BASE::onSizeGrid ), NULL, this );
|
2020-01-03 15:09:26 +00:00
|
|
|
|
2013-05-26 04:36:44 +00:00
|
|
|
}
|