2018-08-15 09:26:32 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////
|
2020-08-17 22:34:02 +00:00
|
|
|
// C++ code generated with wxFormBuilder (version Oct 26 2018)
|
2018-08-15 09:26:32 +00:00
|
|
|
// http://www.wxformbuilder.org/
|
|
|
|
//
|
|
|
|
// PLEASE DO *NOT* EDIT THIS FILE!
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#include "widgets/wx_grid.h"
|
|
|
|
|
|
|
|
#include "panel_pcbnew_action_plugins_base.h"
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2018-08-27 19:11:05 +00:00
|
|
|
PANEL_PCBNEW_ACTION_PLUGINS_BASE::PANEL_PCBNEW_ACTION_PLUGINS_BASE( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
|
2018-08-15 09:26:32 +00:00
|
|
|
{
|
|
|
|
wxBoxSizer* bPanelSizer;
|
2018-08-27 11:37:11 +00:00
|
|
|
bPanelSizer = new wxBoxSizer( wxVERTICAL );
|
2019-02-10 10:39:07 +00:00
|
|
|
|
2018-08-15 09:26:32 +00:00
|
|
|
wxBoxSizer* bGridSizer;
|
|
|
|
bGridSizer = new wxBoxSizer( wxVERTICAL );
|
2019-02-10 10:39:07 +00:00
|
|
|
|
2018-08-27 19:11:05 +00:00
|
|
|
m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
2019-02-10 10:39:07 +00:00
|
|
|
|
2018-08-15 09:26:32 +00:00
|
|
|
// Grid
|
|
|
|
m_grid->CreateGrid( 3, 6 );
|
|
|
|
m_grid->EnableEditing( false );
|
|
|
|
m_grid->EnableGridLines( true );
|
|
|
|
m_grid->EnableDragGridSize( false );
|
|
|
|
m_grid->SetMargins( 0, 0 );
|
2019-02-10 10:39:07 +00:00
|
|
|
|
2018-08-15 09:26:32 +00:00
|
|
|
// Columns
|
|
|
|
m_grid->AutoSizeColumns();
|
|
|
|
m_grid->EnableDragColMove( false );
|
|
|
|
m_grid->EnableDragColSize( true );
|
|
|
|
m_grid->SetColLabelSize( 22 );
|
2019-02-10 10:39:07 +00:00
|
|
|
m_grid->SetColLabelValue( 0, _("Icon") );
|
|
|
|
m_grid->SetColLabelValue( 1, _("Show button") );
|
|
|
|
m_grid->SetColLabelValue( 2, _("Name") );
|
|
|
|
m_grid->SetColLabelValue( 3, _("Category") );
|
|
|
|
m_grid->SetColLabelValue( 4, _("Description") );
|
|
|
|
m_grid->SetColLabelValue( 5, _("Path") );
|
|
|
|
m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
|
|
|
|
2018-08-15 09:26:32 +00:00
|
|
|
// Rows
|
|
|
|
m_grid->EnableDragRowSize( true );
|
|
|
|
m_grid->SetRowLabelSize( 0 );
|
2019-02-10 10:39:07 +00:00
|
|
|
m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
|
|
|
|
|
2018-08-15 09:26:32 +00:00
|
|
|
// Label Appearance
|
2019-02-10 10:39:07 +00:00
|
|
|
|
2018-08-15 09:26:32 +00:00
|
|
|
// Cell Defaults
|
2019-02-10 10:39:07 +00:00
|
|
|
m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
|
2018-08-15 09:26:32 +00:00
|
|
|
bGridSizer->Add( m_grid, 1, wxALL|wxEXPAND, 5 );
|
2019-02-10 10:39:07 +00:00
|
|
|
|
|
|
|
|
2018-08-15 09:26:32 +00:00
|
|
|
bPanelSizer->Add( bGridSizer, 1, wxALIGN_LEFT|wxEXPAND|wxLEFT, 0 );
|
2019-02-10 10:39:07 +00:00
|
|
|
|
2018-08-15 09:26:32 +00:00
|
|
|
wxBoxSizer* bButtonsSizer;
|
2018-08-27 11:37:11 +00:00
|
|
|
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
|
2019-02-10 10:39:07 +00:00
|
|
|
|
2018-08-27 19:11:05 +00:00
|
|
|
m_moveUpButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
2018-08-27 11:37:11 +00:00
|
|
|
bButtonsSizer->Add( m_moveUpButton, 0, wxLEFT|wxRIGHT, 5 );
|
2019-02-10 10:39:07 +00:00
|
|
|
|
2018-08-27 19:11:05 +00:00
|
|
|
m_moveDownButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
2018-08-27 11:37:11 +00:00
|
|
|
bButtonsSizer->Add( m_moveDownButton, 0, wxRIGHT, 5 );
|
2019-02-10 10:39:07 +00:00
|
|
|
|
|
|
|
|
2020-08-17 22:34:02 +00:00
|
|
|
bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
|
2019-02-10 10:39:07 +00:00
|
|
|
|
2018-08-27 19:11:05 +00:00
|
|
|
m_reloadButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
2018-08-27 11:37:11 +00:00
|
|
|
bButtonsSizer->Add( m_reloadButton, 0, wxLEFT|wxRIGHT, 5 );
|
2019-02-10 10:39:07 +00:00
|
|
|
|
|
|
|
|
2018-08-27 11:37:11 +00:00
|
|
|
bPanelSizer->Add( bButtonsSizer, 0, wxEXPAND, 0 );
|
2019-02-10 10:39:07 +00:00
|
|
|
|
|
|
|
|
2018-08-15 09:26:32 +00:00
|
|
|
this->SetSizer( bPanelSizer );
|
|
|
|
this->Layout();
|
2020-06-03 17:46:50 +00:00
|
|
|
bPanelSizer->Fit( this );
|
2019-02-10 10:39:07 +00:00
|
|
|
|
2018-08-15 09:26:32 +00:00
|
|
|
// Connect Events
|
|
|
|
m_grid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnGridCellClick ), NULL, this );
|
|
|
|
m_moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveUpButtonClick ), NULL, this );
|
|
|
|
m_moveDownButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveDownButtonClick ), NULL, this );
|
|
|
|
m_reloadButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnReloadButtonClick ), NULL, this );
|
|
|
|
}
|
|
|
|
|
|
|
|
PANEL_PCBNEW_ACTION_PLUGINS_BASE::~PANEL_PCBNEW_ACTION_PLUGINS_BASE()
|
|
|
|
{
|
|
|
|
// Disconnect Events
|
|
|
|
m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnGridCellClick ), NULL, this );
|
|
|
|
m_moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveUpButtonClick ), NULL, this );
|
|
|
|
m_moveDownButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveDownButtonClick ), NULL, this );
|
|
|
|
m_reloadButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnReloadButtonClick ), NULL, this );
|
2019-02-10 10:39:07 +00:00
|
|
|
|
2018-08-15 09:26:32 +00:00
|
|
|
}
|