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.2.1-0-g80c4cb6)
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* bSizer4;
18 bSizer4 = new wxBoxSizer( wxHORIZONTAL );
19
20 wxBoxSizer* bPanelSizer;
21 bPanelSizer = new wxBoxSizer( wxVERTICAL );
22
23 wxBoxSizer* bGridSizer;
24 bGridSizer = new wxBoxSizer( wxVERTICAL );
25
26 m_grid = new WX_GRID( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
27
28 // Grid
29 m_grid->CreateGrid( 3, 5 );
30 m_grid->EnableEditing( false );
31 m_grid->EnableGridLines( true );
32 m_grid->EnableDragGridSize( false );
33 m_grid->SetMargins( 0, 0 );
34
35 // Columns
36 m_grid->AutoSizeColumns();
37 m_grid->EnableDragColMove( false );
38 m_grid->EnableDragColSize( true );
39 m_grid->SetColLabelValue( 0, _("Action") );
40 m_grid->SetColLabelValue( 1, _("Show Button") );
41 m_grid->SetColLabelValue( 2, _("Plugin") );
42 m_grid->SetColLabelValue( 3, _("Description") );
43 m_grid->SetColLabelValue( 4, wxEmptyString );
44 m_grid->SetColLabelSize( wxGRID_AUTOSIZE );
45 m_grid->SetColLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
46
47 // Rows
48 m_grid->EnableDragRowSize( true );
49 m_grid->SetRowLabelSize( 0 );
50 m_grid->SetRowLabelAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
51
52 // Label Appearance
53
54 // Cell Defaults
55 m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTER );
56 bGridSizer->Add( m_grid, 1, wxBOTTOM|wxEXPAND|wxLEFT, 5 );
57
58
59 bPanelSizer->Add( bGridSizer, 1, wxEXPAND, 0 );
60
61 wxBoxSizer* bButtonsSizer;
62 bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
63
64 m_moveUpButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
65 m_moveUpButton->SetToolTip( _("Move Up") );
66
67 bButtonsSizer->Add( m_moveUpButton, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
68
69 m_moveDownButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
70 m_moveDownButton->SetToolTip( _("Move Down") );
71
72 bButtonsSizer->Add( m_moveDownButton, 0, wxBOTTOM, 5 );
73
74
75 bButtonsSizer->Add( 15, 0, 0, wxEXPAND, 5 );
76
77 m_openDirectoryButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
78 m_openDirectoryButton->SetToolTip( _("Open Plugin Directory") );
79
80 bButtonsSizer->Add( m_openDirectoryButton, 0, wxBOTTOM|wxRIGHT, 5 );
81
82 m_reloadButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
83 m_reloadButton->SetToolTip( _("Reload Plugins") );
84
85 bButtonsSizer->Add( m_reloadButton, 0, wxBOTTOM|wxRIGHT, 5 );
86
87 m_showErrorsButton = new STD_BITMAP_BUTTON( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
88 m_showErrorsButton->SetToolTip( _("Show Plugin Errors") );
89
90 bButtonsSizer->Add( m_showErrorsButton, 0, wxBOTTOM|wxRIGHT, 5 );
91
92
93 bPanelSizer->Add( bButtonsSizer, 0, wxEXPAND|wxLEFT|wxTOP, 5 );
94
95
96 bSizer4->Add( bPanelSizer, 1, wxEXPAND, 5 );
97
98
99 this->SetSizer( bSizer4 );
100 this->Layout();
101 bSizer4->Fit( this );
102
103 // Connect Events
104 m_grid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnGridCellClick ), NULL, this );
105 m_moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveUpButtonClick ), NULL, this );
106 m_moveDownButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveDownButtonClick ), NULL, this );
107 m_openDirectoryButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnOpenDirectoryButtonClick ), NULL, this );
108 m_reloadButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnReloadButtonClick ), NULL, this );
109 m_showErrorsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnShowErrorsButtonClick ), NULL, this );
110}
111
113{
114 // Disconnect Events
115 m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnGridCellClick ), NULL, this );
116 m_moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveUpButtonClick ), NULL, this );
117 m_moveDownButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveDownButtonClick ), NULL, this );
118 m_openDirectoryButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnOpenDirectoryButtonClick ), NULL, this );
119 m_reloadButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnReloadButtonClick ), NULL, this );
120 m_showErrorsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnShowErrorsButtonClick ), NULL, this );
121
122}
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:249
#define _(s)