KiCad PCB EDA Suite
panel_pcbnew_action_plugins_base.cpp
Go to the documentation of this file.
1 // C++ code generated with wxFormBuilder (version Oct 26 2018)
3 // http://www.wxformbuilder.org/
4 //
5 // PLEASE DO *NOT* EDIT THIS FILE!
7 
8 #include "widgets/wx_grid.h"
9 
11 
13 
14 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 )
15 {
16  wxBoxSizer* bPanelSizer;
17  bPanelSizer = new wxBoxSizer( wxVERTICAL );
18 
19  wxBoxSizer* bGridSizer;
20  bGridSizer = new wxBoxSizer( wxVERTICAL );
21 
22  m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
23 
24  // Grid
25  m_grid->CreateGrid( 3, 6 );
26  m_grid->EnableEditing( false );
27  m_grid->EnableGridLines( true );
28  m_grid->EnableDragGridSize( false );
29  m_grid->SetMargins( 0, 0 );
30 
31  // Columns
32  m_grid->AutoSizeColumns();
33  m_grid->EnableDragColMove( false );
34  m_grid->EnableDragColSize( true );
35  m_grid->SetColLabelSize( 22 );
36  m_grid->SetColLabelValue( 0, _("Icon") );
37  m_grid->SetColLabelValue( 1, _("Show button") );
38  m_grid->SetColLabelValue( 2, _("Name") );
39  m_grid->SetColLabelValue( 3, _("Category") );
40  m_grid->SetColLabelValue( 4, _("Description") );
41  m_grid->SetColLabelValue( 5, _("Path") );
42  m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
43 
44  // Rows
45  m_grid->EnableDragRowSize( true );
46  m_grid->SetRowLabelSize( 0 );
47  m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
48 
49  // Label Appearance
50 
51  // Cell Defaults
52  m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
53  bGridSizer->Add( m_grid, 1, wxALL|wxEXPAND, 5 );
54 
55 
56  bPanelSizer->Add( bGridSizer, 1, wxALIGN_LEFT|wxEXPAND|wxLEFT, 0 );
57 
58  wxBoxSizer* bButtonsSizer;
59  bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
60 
61  m_moveUpButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
62  m_moveUpButton->SetToolTip( _("Move Up") );
63 
64  bButtonsSizer->Add( m_moveUpButton, 0, wxLEFT|wxRIGHT, 5 );
65 
66  m_moveDownButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
67  m_moveDownButton->SetToolTip( _("Move Down") );
68 
69  bButtonsSizer->Add( m_moveDownButton, 0, wxRIGHT, 5 );
70 
71 
72  bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
73 
74  m_openDirectoryButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
75  m_openDirectoryButton->SetToolTip( _("Open Plugin Directory") );
76 
77  bButtonsSizer->Add( m_openDirectoryButton, 0, wxLEFT|wxRIGHT, 5 );
78 
79  m_reloadButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
80  m_reloadButton->SetToolTip( _("Reload Plugins") );
81 
82  bButtonsSizer->Add( m_reloadButton, 0, wxRIGHT, 5 );
83 
84  m_showErrorsButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
85  m_showErrorsButton->SetToolTip( _("Show Plugin Errors") );
86 
87  bButtonsSizer->Add( m_showErrorsButton, 0, wxRIGHT, 5 );
88 
89 
90  bPanelSizer->Add( bButtonsSizer, 0, wxEXPAND, 0 );
91 
92 
93  this->SetSizer( bPanelSizer );
94  this->Layout();
95  bPanelSizer->Fit( this );
96 
97  // Connect Events
98  m_grid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnGridCellClick ), NULL, this );
99  m_moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveUpButtonClick ), NULL, this );
100  m_moveDownButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveDownButtonClick ), NULL, this );
101  m_openDirectoryButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnOpenDirectoryButtonClick ), NULL, this );
102  m_reloadButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnReloadButtonClick ), NULL, this );
103  m_showErrorsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnShowErrorsButtonClick ), NULL, this );
104 }
105 
107 {
108  // Disconnect Events
109  m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnGridCellClick ), NULL, this );
110  m_moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveUpButtonClick ), NULL, this );
111  m_moveDownButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveDownButtonClick ), NULL, this );
112  m_openDirectoryButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnOpenDirectoryButtonClick ), NULL, this );
113  m_reloadButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnReloadButtonClick ), NULL, this );
114  m_showErrorsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnShowErrorsButtonClick ), NULL, this );
115 
116 }
virtual void OnMoveDownButtonClick(wxCommandEvent &event)
virtual void OnReloadButtonClick(wxCommandEvent &event)
virtual void OnGridCellClick(wxGridEvent &event)
PANEL_PCBNEW_ACTION_PLUGINS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
virtual void OnMoveUpButtonClick(wxCommandEvent &event)
#define _(s)
virtual void OnShowErrorsButtonClick(wxCommandEvent &event)
const char * name
Definition: DXF_plotter.cpp:56
virtual void OnOpenDirectoryButtonClick(wxCommandEvent &event)
void SetColLabelSize(int aHeight)
Hide wxGrid's SetColLabelSize() method with one which makes sure the size is tall enough for the syst...
Definition: wx_grid.cpp:53