You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

116 lines
5.2 KiB

  1. ///////////////////////////////////////////////////////////////////////////
  2. // C++ code generated with wxFormBuilder (version Oct 26 2018)
  3. // http://www.wxformbuilder.org/
  4. //
  5. // PLEASE DO *NOT* EDIT THIS FILE!
  6. ///////////////////////////////////////////////////////////////////////////
  7. #include "widgets/wx_grid.h"
  8. #include "panel_pcbnew_action_plugins_base.h"
  9. ///////////////////////////////////////////////////////////////////////////
  10. 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 )
  11. {
  12. wxBoxSizer* bPanelSizer;
  13. bPanelSizer = new wxBoxSizer( wxVERTICAL );
  14. wxBoxSizer* bGridSizer;
  15. bGridSizer = new wxBoxSizer( wxVERTICAL );
  16. m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
  17. // Grid
  18. m_grid->CreateGrid( 3, 6 );
  19. m_grid->EnableEditing( false );
  20. m_grid->EnableGridLines( true );
  21. m_grid->EnableDragGridSize( false );
  22. m_grid->SetMargins( 0, 0 );
  23. // Columns
  24. m_grid->AutoSizeColumns();
  25. m_grid->EnableDragColMove( false );
  26. m_grid->EnableDragColSize( true );
  27. m_grid->SetColLabelSize( 22 );
  28. m_grid->SetColLabelValue( 0, _("Icon") );
  29. m_grid->SetColLabelValue( 1, _("Show button") );
  30. m_grid->SetColLabelValue( 2, _("Name") );
  31. m_grid->SetColLabelValue( 3, _("Category") );
  32. m_grid->SetColLabelValue( 4, _("Description") );
  33. m_grid->SetColLabelValue( 5, _("Path") );
  34. m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
  35. // Rows
  36. m_grid->EnableDragRowSize( true );
  37. m_grid->SetRowLabelSize( 0 );
  38. m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
  39. // Label Appearance
  40. // Cell Defaults
  41. m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
  42. bGridSizer->Add( m_grid, 1, wxALL|wxEXPAND, 5 );
  43. bPanelSizer->Add( bGridSizer, 1, wxALIGN_LEFT|wxEXPAND|wxLEFT, 0 );
  44. wxBoxSizer* bButtonsSizer;
  45. bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
  46. m_moveUpButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
  47. m_moveUpButton->SetToolTip( _("Move Up") );
  48. bButtonsSizer->Add( m_moveUpButton, 0, wxLEFT|wxRIGHT, 5 );
  49. m_moveDownButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
  50. m_moveDownButton->SetToolTip( _("Move Down") );
  51. bButtonsSizer->Add( m_moveDownButton, 0, wxRIGHT, 5 );
  52. bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
  53. m_openDirectoryButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
  54. m_openDirectoryButton->SetToolTip( _("Open Plugin Directory") );
  55. bButtonsSizer->Add( m_openDirectoryButton, 0, wxLEFT|wxRIGHT, 5 );
  56. m_reloadButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
  57. m_reloadButton->SetToolTip( _("Reload Plugins") );
  58. bButtonsSizer->Add( m_reloadButton, 0, wxRIGHT, 5 );
  59. m_showErrorsButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
  60. m_showErrorsButton->SetToolTip( _("Show Plugin Errors") );
  61. bButtonsSizer->Add( m_showErrorsButton, 0, wxRIGHT, 5 );
  62. bPanelSizer->Add( bButtonsSizer, 0, wxEXPAND, 0 );
  63. this->SetSizer( bPanelSizer );
  64. this->Layout();
  65. bPanelSizer->Fit( this );
  66. // Connect Events
  67. m_grid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnGridCellClick ), NULL, this );
  68. m_moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveUpButtonClick ), NULL, this );
  69. m_moveDownButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveDownButtonClick ), NULL, this );
  70. m_openDirectoryButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnOpenDirectoryButtonClick ), NULL, this );
  71. m_reloadButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnReloadButtonClick ), NULL, this );
  72. m_showErrorsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnShowErrorsButtonClick ), NULL, this );
  73. }
  74. PANEL_PCBNEW_ACTION_PLUGINS_BASE::~PANEL_PCBNEW_ACTION_PLUGINS_BASE()
  75. {
  76. // Disconnect Events
  77. m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnGridCellClick ), NULL, this );
  78. m_moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveUpButtonClick ), NULL, this );
  79. m_moveDownButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveDownButtonClick ), NULL, this );
  80. m_openDirectoryButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnOpenDirectoryButtonClick ), NULL, this );
  81. m_reloadButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnReloadButtonClick ), NULL, this );
  82. m_showErrorsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnShowErrorsButtonClick ), NULL, this );
  83. }