KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_pcbnew_action_plugins_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
9#include "widgets/wx_grid.h"
10
12
14
15PANEL_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 )
16{
17 wxBoxSizer* bPanelSizer;
18 bPanelSizer = new wxBoxSizer( wxVERTICAL );
19
20 wxBoxSizer* bGridSizer;
21 bGridSizer = new wxBoxSizer( wxVERTICAL );
22
23 m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
24
25 // Grid
26 m_grid->CreateGrid( 3, 6 );
27 m_grid->EnableEditing( false );
28 m_grid->EnableGridLines( true );
29 m_grid->EnableDragGridSize( false );
30 m_grid->SetMargins( 0, 0 );
31
32 // Columns
33 m_grid->AutoSizeColumns();
34 m_grid->EnableDragColMove( false );
35 m_grid->EnableDragColSize( true );
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->SetColLabelSize( wxGRID_AUTOSIZE );
43 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
44
45 // Rows
46 m_grid->EnableDragRowSize( true );
47 m_grid->SetRowLabelSize( 0 );
48 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
49
50 // Label Appearance
51
52 // Cell Defaults
53 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
54 bGridSizer->Add( m_grid, 1, wxBOTTOM|wxEXPAND|wxLEFT, 5 );
55
56
57 bPanelSizer->Add( bGridSizer, 1, wxEXPAND, 0 );
58
59 wxBoxSizer* bButtonsSizer;
60 bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
61
62 m_moveUpButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
63 m_moveUpButton->SetToolTip( _("Move Up") );
64
65 bButtonsSizer->Add( m_moveUpButton, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
66
67 m_moveDownButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
68 m_moveDownButton->SetToolTip( _("Move Down") );
69
70 bButtonsSizer->Add( m_moveDownButton, 0, wxBOTTOM, 5 );
71
72
73 bButtonsSizer->Add( 15, 0, 0, wxEXPAND, 5 );
74
75 m_openDirectoryButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
76 m_openDirectoryButton->SetToolTip( _("Open Plugin Directory") );
77
78 bButtonsSizer->Add( m_openDirectoryButton, 0, wxBOTTOM|wxRIGHT, 5 );
79
80 m_reloadButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
81 m_reloadButton->SetToolTip( _("Reload Plugins") );
82
83 bButtonsSizer->Add( m_reloadButton, 0, wxBOTTOM|wxRIGHT, 5 );
84
85 m_showErrorsButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
86 m_showErrorsButton->SetToolTip( _("Show Plugin Errors") );
87
88 bButtonsSizer->Add( m_showErrorsButton, 0, wxBOTTOM|wxRIGHT, 5 );
89
90
91 bPanelSizer->Add( bButtonsSizer, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
92
93
94 this->SetSizer( bPanelSizer );
95 this->Layout();
96 bPanelSizer->Fit( this );
97
98 // Connect Events
99 m_grid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnGridCellClick ), NULL, this );
100 m_moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveUpButtonClick ), NULL, this );
101 m_moveDownButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveDownButtonClick ), NULL, this );
102 m_openDirectoryButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnOpenDirectoryButtonClick ), NULL, this );
103 m_reloadButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnReloadButtonClick ), NULL, this );
104 m_showErrorsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnShowErrorsButtonClick ), NULL, this );
105}
106
108{
109 // Disconnect Events
110 m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnGridCellClick ), NULL, this );
111 m_moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveUpButtonClick ), NULL, this );
112 m_moveDownButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveDownButtonClick ), NULL, this );
113 m_openDirectoryButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnOpenDirectoryButtonClick ), NULL, this );
114 m_reloadButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnReloadButtonClick ), NULL, this );
115 m_showErrorsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnShowErrorsButtonClick ), NULL, this );
116
117}
const char * name
Definition: DXF_plotter.cpp:57
virtual void OnMoveUpButtonClick(wxCommandEvent &event)
virtual void OnMoveDownButtonClick(wxCommandEvent &event)
virtual void OnShowErrorsButtonClick(wxCommandEvent &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 OnReloadButtonClick(wxCommandEvent &event)
virtual void OnOpenDirectoryButtonClick(wxCommandEvent &event)
virtual void OnGridCellClick(wxGridEvent &event)
A bitmap button widget that behaves like a standard dialog button except with an icon.
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:211
#define _(s)