KiCad PCB EDA Suite
PANEL_PACKAGE_BASE Class Reference

Class PANEL_PACKAGE_BASE. More...

#include <panel_package_base.h>

Inheritance diagram for PANEL_PACKAGE_BASE:
PANEL_PACKAGE

Public Member Functions

 PANEL_PACKAGE_BASE (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxBORDER_NONE|wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
 ~PANEL_PACKAGE_BASE ()
 

Protected Member Functions

virtual void OnClick (wxMouseEvent &event)
 
virtual void OnPaint (wxPaintEvent &event)
 
virtual void OnSize (wxSizeEvent &event)
 
virtual void OnButtonClicked (wxCommandEvent &event)
 

Protected Attributes

wxStaticBitmap * m_bitmap
 
wxStaticText * m_name
 
wxStaticText * m_desc
 
wxButton * m_button
 

Detailed Description

Class PANEL_PACKAGE_BASE.

Definition at line 33 of file panel_package_base.h.

Constructor & Destructor Documentation

◆ PANEL_PACKAGE_BASE()

PANEL_PACKAGE_BASE::PANEL_PACKAGE_BASE ( wxWindow *  parent,
wxWindowID  id = wxID_ANY,
const wxPoint &  pos = wxDefaultPosition,
const wxSize &  size = wxSize( -1,-1 ),
long  style = wxBORDER_NONE|wxTAB_TRAVERSAL,
const wxString &  name = wxEmptyString 
)

Definition at line 12 of file panel_package_base.cpp.

12  : wxPanel( parent, id, pos, size, style, name )
13 {
14  this->SetMinSize( wxSize( -1,84 ) );
15 
16  wxBoxSizer* bSizer1;
17  bSizer1 = new wxBoxSizer( wxHORIZONTAL );
18 
19  wxBoxSizer* bSizer5;
20  bSizer5 = new wxBoxSizer( wxVERTICAL );
21 
22  bSizer5->SetMinSize( wxSize( 70,-1 ) );
23 
24  bSizer5->Add( 0, 0, 1, wxEXPAND, 5 );
25 
26  wxBoxSizer* bSizer6;
27  bSizer6 = new wxBoxSizer( wxHORIZONTAL );
28 
29 
30  bSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
31 
32  m_bitmap = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
33  bSizer6->Add( m_bitmap, 0, wxALL, 5 );
34 
35 
36  bSizer6->Add( 0, 0, 1, wxEXPAND, 5 );
37 
38 
39  bSizer5->Add( bSizer6, 1, wxEXPAND, 5 );
40 
41 
42  bSizer5->Add( 0, 0, 1, wxEXPAND, 5 );
43 
44 
45  bSizer1->Add( bSizer5, 0, wxEXPAND, 5 );
46 
47  wxBoxSizer* bSizer2;
48  bSizer2 = new wxBoxSizer( wxVERTICAL );
49 
50  m_name = new wxStaticText( this, wxID_ANY, _("Name"), wxDefaultPosition, wxDefaultSize, wxST_ELLIPSIZE_END );
51  m_name->Wrap( -1 );
52  bSizer2->Add( m_name, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 );
53 
54  wxBoxSizer* bSizer3;
55  bSizer3 = new wxBoxSizer( wxHORIZONTAL );
56 
57  m_desc = new wxStaticText( this, wxID_ANY, _("Description"), wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE );
58  m_desc->Wrap( -1 );
59  bSizer3->Add( m_desc, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
60 
61  wxBoxSizer* bSizer4;
62  bSizer4 = new wxBoxSizer( wxVERTICAL );
63 
64 
65  bSizer4->Add( 0, 0, 1, wxEXPAND, 5 );
66 
67  m_button = new wxButton( this, wxID_ANY, _("Install"), wxDefaultPosition, wxDefaultSize, 0 );
68  bSizer4->Add( m_button, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
69 
70 
71  bSizer3->Add( bSizer4, 0, wxEXPAND, 5 );
72 
73 
74  bSizer2->Add( bSizer3, 1, wxEXPAND, 5 );
75 
76 
77  bSizer1->Add( bSizer2, 1, wxEXPAND, 5 );
78 
79 
80  this->SetSizer( bSizer1 );
81  this->Layout();
82  bSizer1->Fit( this );
83 
84  // Connect Events
85  this->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( PANEL_PACKAGE_BASE::OnClick ) );
86  this->Connect( wxEVT_PAINT, wxPaintEventHandler( PANEL_PACKAGE_BASE::OnPaint ) );
87  this->Connect( wxEVT_SIZE, wxSizeEventHandler( PANEL_PACKAGE_BASE::OnSize ) );
88  m_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PACKAGE_BASE::OnButtonClicked ), NULL, this );
89 }
wxStaticBitmap * m_bitmap
wxStaticText * m_name
virtual void OnPaint(wxPaintEvent &event)
virtual void OnClick(wxMouseEvent &event)
#define _(s)
const char * name
Definition: DXF_plotter.cpp:56
virtual void OnButtonClicked(wxCommandEvent &event)
virtual void OnSize(wxSizeEvent &event)
wxStaticText * m_desc

References _, m_bitmap, m_button, m_desc, m_name, OnButtonClicked(), OnClick(), OnPaint(), and OnSize().

◆ ~PANEL_PACKAGE_BASE()

PANEL_PACKAGE_BASE::~PANEL_PACKAGE_BASE ( )

Definition at line 91 of file panel_package_base.cpp.

92 {
93  // Disconnect Events
94  this->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( PANEL_PACKAGE_BASE::OnClick ) );
95  this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( PANEL_PACKAGE_BASE::OnPaint ) );
96  this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PANEL_PACKAGE_BASE::OnSize ) );
97  m_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PACKAGE_BASE::OnButtonClicked ), NULL, this );
98 
99 }
virtual void OnPaint(wxPaintEvent &event)
virtual void OnClick(wxMouseEvent &event)
virtual void OnButtonClicked(wxCommandEvent &event)
virtual void OnSize(wxSizeEvent &event)

References m_button, OnButtonClicked(), OnClick(), OnPaint(), and OnSize().

Member Function Documentation

◆ OnButtonClicked()

virtual void PANEL_PACKAGE_BASE::OnButtonClicked ( wxCommandEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_PACKAGE.

Definition at line 47 of file panel_package_base.h.

47 { event.Skip(); }

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

◆ OnClick()

virtual void PANEL_PACKAGE_BASE::OnClick ( wxMouseEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_PACKAGE.

Definition at line 44 of file panel_package_base.h.

44 { event.Skip(); }

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

◆ OnPaint()

virtual void PANEL_PACKAGE_BASE::OnPaint ( wxPaintEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_PACKAGE.

Definition at line 45 of file panel_package_base.h.

45 { event.Skip(); }

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

◆ OnSize()

virtual void PANEL_PACKAGE_BASE::OnSize ( wxSizeEvent &  event)
inlineprotectedvirtual

Reimplemented in PANEL_PACKAGE.

Definition at line 46 of file panel_package_base.h.

46 { event.Skip(); }

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

Member Data Documentation

◆ m_bitmap

wxStaticBitmap* PANEL_PACKAGE_BASE::m_bitmap
protected

Definition at line 38 of file panel_package_base.h.

Referenced by PANEL_PACKAGE::PANEL_PACKAGE(), and PANEL_PACKAGE_BASE().

◆ m_button

wxButton* PANEL_PACKAGE_BASE::m_button
protected

◆ m_desc

wxStaticText* PANEL_PACKAGE_BASE::m_desc
protected

◆ m_name

wxStaticText* PANEL_PACKAGE_BASE::m_name
protected

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