KiCad PCB EDA Suite
PANEL_PCBNEW_ACTION_PLUGINS_BASE Class Reference

Class PANEL_PCBNEW_ACTION_PLUGINS_BASE. More...

#include <panel_pcbnew_action_plugins_base.h>

Inheritance diagram for PANEL_PCBNEW_ACTION_PLUGINS_BASE:
PANEL_PCBNEW_ACTION_PLUGINS

Public Member Functions

 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)
 
 ~PANEL_PCBNEW_ACTION_PLUGINS_BASE ()
 

Protected Member Functions

virtual void OnGridCellClick (wxGridEvent &event)
 
virtual void OnMoveUpButtonClick (wxCommandEvent &event)
 
virtual void OnMoveDownButtonClick (wxCommandEvent &event)
 
virtual void OnOpenDirectoryButtonClick (wxCommandEvent &event)
 
virtual void OnReloadButtonClick (wxCommandEvent &event)
 
virtual void OnShowErrorsButtonClick (wxCommandEvent &event)
 

Protected Attributes

WX_GRIDm_grid
 
wxBitmapButton * m_moveUpButton
 
wxBitmapButton * m_moveDownButton
 
wxBitmapButton * m_openDirectoryButton
 
wxBitmapButton * m_reloadButton
 
wxBitmapButton * m_showErrorsButton
 

Detailed Description

Constructor & Destructor Documentation

◆ PANEL_PCBNEW_ACTION_PLUGINS_BASE()

PANEL_PCBNEW_ACTION_PLUGINS_BASE::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 
)

Definition at line 14 of file panel_pcbnew_action_plugins_base.cpp.

14  : 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 }
virtual void OnMoveDownButtonClick(wxCommandEvent &event)
virtual void OnReloadButtonClick(wxCommandEvent &event)
virtual void OnGridCellClick(wxGridEvent &event)
virtual void OnMoveUpButtonClick(wxCommandEvent &event)
#define NULL
virtual void OnShowErrorsButtonClick(wxCommandEvent &event)
const char * name
Definition: DXF_plotter.cpp:59
#define _(s)
Definition: 3d_actions.cpp:33
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:49

References _, m_grid, m_moveDownButton, m_moveUpButton, m_openDirectoryButton, m_reloadButton, m_showErrorsButton, NULL, OnGridCellClick(), OnMoveDownButtonClick(), OnMoveUpButtonClick(), OnOpenDirectoryButtonClick(), OnReloadButtonClick(), OnShowErrorsButtonClick(), and WX_GRID::SetColLabelSize().

◆ ~PANEL_PCBNEW_ACTION_PLUGINS_BASE()

PANEL_PCBNEW_ACTION_PLUGINS_BASE::~PANEL_PCBNEW_ACTION_PLUGINS_BASE ( )

Definition at line 106 of file panel_pcbnew_action_plugins_base.cpp.

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)
virtual void OnMoveUpButtonClick(wxCommandEvent &event)
#define NULL
virtual void OnShowErrorsButtonClick(wxCommandEvent &event)
virtual void OnOpenDirectoryButtonClick(wxCommandEvent &event)

References m_grid, m_moveDownButton, m_moveUpButton, m_openDirectoryButton, m_reloadButton, m_showErrorsButton, NULL, OnGridCellClick(), OnMoveDownButtonClick(), OnMoveUpButtonClick(), OnOpenDirectoryButtonClick(), OnReloadButtonClick(), and OnShowErrorsButtonClick().

Member Function Documentation

◆ OnGridCellClick()

virtual void PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnGridCellClick ( wxGridEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_PCBNEW_ACTION_PLUGINS.

Definition at line 47 of file panel_pcbnew_action_plugins_base.h.

47 { event.Skip(); }

Referenced by PANEL_PCBNEW_ACTION_PLUGINS_BASE(), and ~PANEL_PCBNEW_ACTION_PLUGINS_BASE().

◆ OnMoveDownButtonClick()

virtual void PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveDownButtonClick ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_PCBNEW_ACTION_PLUGINS.

Definition at line 49 of file panel_pcbnew_action_plugins_base.h.

49 { event.Skip(); }

Referenced by PANEL_PCBNEW_ACTION_PLUGINS_BASE(), and ~PANEL_PCBNEW_ACTION_PLUGINS_BASE().

◆ OnMoveUpButtonClick()

virtual void PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveUpButtonClick ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_PCBNEW_ACTION_PLUGINS.

Definition at line 48 of file panel_pcbnew_action_plugins_base.h.

48 { event.Skip(); }

Referenced by PANEL_PCBNEW_ACTION_PLUGINS_BASE(), and ~PANEL_PCBNEW_ACTION_PLUGINS_BASE().

◆ OnOpenDirectoryButtonClick()

virtual void PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnOpenDirectoryButtonClick ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_PCBNEW_ACTION_PLUGINS.

Definition at line 50 of file panel_pcbnew_action_plugins_base.h.

50 { event.Skip(); }

Referenced by PANEL_PCBNEW_ACTION_PLUGINS_BASE(), and ~PANEL_PCBNEW_ACTION_PLUGINS_BASE().

◆ OnReloadButtonClick()

virtual void PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnReloadButtonClick ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_PCBNEW_ACTION_PLUGINS.

Definition at line 51 of file panel_pcbnew_action_plugins_base.h.

51 { event.Skip(); }

Referenced by PANEL_PCBNEW_ACTION_PLUGINS_BASE(), and ~PANEL_PCBNEW_ACTION_PLUGINS_BASE().

◆ OnShowErrorsButtonClick()

virtual void PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnShowErrorsButtonClick ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_PCBNEW_ACTION_PLUGINS.

Definition at line 52 of file panel_pcbnew_action_plugins_base.h.

52 { event.Skip(); }

Referenced by PANEL_PCBNEW_ACTION_PLUGINS_BASE(), and ~PANEL_PCBNEW_ACTION_PLUGINS_BASE().

Member Data Documentation

◆ m_grid

◆ m_moveDownButton

wxBitmapButton* PANEL_PCBNEW_ACTION_PLUGINS_BASE::m_moveDownButton
protected

◆ m_moveUpButton

wxBitmapButton* PANEL_PCBNEW_ACTION_PLUGINS_BASE::m_moveUpButton
protected

◆ m_openDirectoryButton

wxBitmapButton* PANEL_PCBNEW_ACTION_PLUGINS_BASE::m_openDirectoryButton
protected

◆ m_reloadButton

wxBitmapButton* PANEL_PCBNEW_ACTION_PLUGINS_BASE::m_reloadButton
protected

◆ m_showErrorsButton


The documentation for this class was generated from the following files: