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(485, 200), 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 OnReloadButtonClick (wxCommandEvent &event)
 

Protected Attributes

WX_GRIDm_grid
 
wxBitmapButton * m_moveUpButton
 
wxBitmapButton * m_moveDownButton
 
wxBitmapButton * m_reloadButton
 

Detailed Description

Constructor & Destructor Documentation

PANEL_PCBNEW_ACTION_PLUGINS_BASE::PANEL_PCBNEW_ACTION_PLUGINS_BASE ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint pos = wxDefaultPosition,
const wxSize &  size = wxSize( 485,200 ),
long  style = wxTAB_TRAVERSAL,
const wxString &  name = wxEmptyString 
)

Definition at line 14 of file panel_pcbnew_action_plugins_base.cpp.

References m_grid, m_moveDownButton, m_moveUpButton, m_reloadButton, OnGridCellClick(), OnMoveDownButtonClick(), OnMoveUpButtonClick(), and OnReloadButtonClick().

Referenced by OnReloadButtonClick().

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, wxT("Icon") );
37  m_grid->SetColLabelValue( 1, wxT("Show button") );
38  m_grid->SetColLabelValue( 2, wxT("Name") );
39  m_grid->SetColLabelValue( 3, wxT("Category") );
40  m_grid->SetColLabelValue( 4, wxT("Description") );
41  m_grid->SetColLabelValue( 5, wxT("Path") );
42  m_grid->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
43 
44  // Rows
45  m_grid->EnableDragRowSize( true );
46  m_grid->SetRowLabelSize( 0 );
47  m_grid->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
48 
49  // Label Appearance
50 
51  // Cell Defaults
52  m_grid->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_CENTRE );
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->SetMinSize( wxSize( 30,30 ) );
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->SetMinSize( wxSize( 30,30 ) );
68 
69  bButtonsSizer->Add( m_moveDownButton, 0, wxRIGHT, 5 );
70 
71 
72  bButtonsSizer->Add( 0, 0, 0, wxEXPAND|wxLEFT|wxRIGHT, 5 );
73 
74  m_reloadButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
75  m_reloadButton->SetMinSize( wxSize( 30,30 ) );
76 
77  bButtonsSizer->Add( m_reloadButton, 0, wxLEFT|wxRIGHT, 5 );
78 
79 
80  bPanelSizer->Add( bButtonsSizer, 0, wxEXPAND, 0 );
81 
82 
83  this->SetSizer( bPanelSizer );
84  this->Layout();
85 
86  // Connect Events
87  m_grid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnGridCellClick ), NULL, this );
88  m_moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveUpButtonClick ), NULL, this );
89  m_moveDownButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveDownButtonClick ), NULL, this );
90  m_reloadButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnReloadButtonClick ), NULL, this );
91 }
virtual void OnMoveDownButtonClick(wxCommandEvent &event)
virtual void OnReloadButtonClick(wxCommandEvent &event)
virtual void OnGridCellClick(wxGridEvent &event)
virtual void OnMoveUpButtonClick(wxCommandEvent &event)
const char * name
Definition: DXF_plotter.cpp:61
PANEL_PCBNEW_ACTION_PLUGINS_BASE::~PANEL_PCBNEW_ACTION_PLUGINS_BASE ( )

Definition at line 93 of file panel_pcbnew_action_plugins_base.cpp.

References m_grid, m_moveDownButton, m_moveUpButton, m_reloadButton, OnGridCellClick(), OnMoveDownButtonClick(), OnMoveUpButtonClick(), and OnReloadButtonClick().

Referenced by OnReloadButtonClick().

94 {
95  // Disconnect Events
96  m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnGridCellClick ), NULL, this );
97  m_moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveUpButtonClick ), NULL, this );
98  m_moveDownButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveDownButtonClick ), NULL, this );
99  m_reloadButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnReloadButtonClick ), NULL, this );
100 
101 }
virtual void OnMoveDownButtonClick(wxCommandEvent &event)
virtual void OnReloadButtonClick(wxCommandEvent &event)
virtual void OnGridCellClick(wxGridEvent &event)
virtual void OnMoveUpButtonClick(wxCommandEvent &event)

Member Function Documentation

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

Reimplemented in PANEL_PCBNEW_ACTION_PLUGINS.

Definition at line 45 of file panel_pcbnew_action_plugins_base.h.

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

45 { event.Skip(); }
virtual void PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveDownButtonClick ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_PCBNEW_ACTION_PLUGINS.

Definition at line 47 of file panel_pcbnew_action_plugins_base.h.

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

47 { event.Skip(); }
virtual void PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveUpButtonClick ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_PCBNEW_ACTION_PLUGINS.

Definition at line 46 of file panel_pcbnew_action_plugins_base.h.

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

46 { event.Skip(); }
virtual void PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnReloadButtonClick ( wxCommandEvent &  event)
inlineprotectedvirtual

Member Data Documentation

wxBitmapButton* PANEL_PCBNEW_ACTION_PLUGINS_BASE::m_moveDownButton
protected
wxBitmapButton* PANEL_PCBNEW_ACTION_PLUGINS_BASE::m_moveUpButton
protected
wxBitmapButton* PANEL_PCBNEW_ACTION_PLUGINS_BASE::m_reloadButton
protected

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