KiCad PCB EDA Suite
WX_PANEL Class Reference

#include <wx_panel.h>

Inheritance diagram for WX_PANEL:
APPEARANCE_CONTROLS_BASE HIERARCHY_NAVIG_PANEL PANEL_SELECTION_FILTER_BASE APPEARANCE_CONTROLS PANEL_SELECTION_FILTER

Public Member Functions

 WX_PANEL (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
 ~WX_PANEL ()
 
void SetBorders (bool aLeft, bool aRight, bool aTop, bool aBottom)
 

Private Member Functions

void OnPaint (wxPaintEvent &event)
 

Private Attributes

bool m_leftBorder
 
bool m_rightBorder
 
bool m_topBorder
 
bool m_bottomBorder
 

Detailed Description

Definition at line 29 of file wx_panel.h.

Constructor & Destructor Documentation

◆ WX_PANEL()

WX_PANEL::WX_PANEL ( 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 28 of file wx_panel.cpp.

29 :
30 wxPanel( parent, id, pos, size, style, name ),
31 m_leftBorder( false ),
32 m_rightBorder( false ),
33 m_topBorder( false ),
34 m_bottomBorder( false )
35{
36 this->Connect( wxEVT_PAINT, wxPaintEventHandler( WX_PANEL::OnPaint ) );
37}
const char * name
Definition: DXF_plotter.cpp:56
bool m_topBorder
Definition: wx_panel.h:52
bool m_rightBorder
Definition: wx_panel.h:51
bool m_leftBorder
Definition: wx_panel.h:50
bool m_bottomBorder
Definition: wx_panel.h:53
void OnPaint(wxPaintEvent &event)
Definition: wx_panel.cpp:46

References OnPaint().

◆ ~WX_PANEL()

WX_PANEL::~WX_PANEL ( )

Definition at line 40 of file wx_panel.cpp.

41{
42 this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( WX_PANEL::OnPaint ) );
43}

References OnPaint().

Member Function Documentation

◆ OnPaint()

void WX_PANEL::OnPaint ( wxPaintEvent &  event)
private

Definition at line 46 of file wx_panel.cpp.

47{
48 wxRect rect( wxPoint( 0, 0 ), GetClientSize() );
49 wxPaintDC dc( this );
50
51 dc.SetBrush( wxSystemSettings::GetColour( wxSYS_COLOUR_FRAMEBK ) );
52 dc.SetPen( wxPen( wxSystemSettings::GetColour( wxSYS_COLOUR_ACTIVEBORDER ), 1 ) );
53
54 if( m_leftBorder )
55 dc.DrawLine( rect.GetLeft(), rect.GetTop(), rect.GetLeft(), rect.GetBottom() );
56
57 if( m_rightBorder )
58 dc.DrawLine( rect.GetRight(), rect.GetTop(), rect.GetRight(), rect.GetBottom() );
59
60 if( m_topBorder )
61 dc.DrawLine( rect.GetLeft(), rect.GetTop(), rect.GetRight(), rect.GetTop() );
62
63 if( m_bottomBorder )
64 dc.DrawLine( rect.GetLeft(), rect.GetBottom(), rect.GetRight(), rect.GetBottom() );
65}

References m_bottomBorder, m_leftBorder, m_rightBorder, and m_topBorder.

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

◆ SetBorders()

void WX_PANEL::SetBorders ( bool  aLeft,
bool  aRight,
bool  aTop,
bool  aBottom 
)
inline

Member Data Documentation

◆ m_bottomBorder

bool WX_PANEL::m_bottomBorder
private

Definition at line 53 of file wx_panel.h.

Referenced by OnPaint(), and SetBorders().

◆ m_leftBorder

bool WX_PANEL::m_leftBorder
private

Definition at line 50 of file wx_panel.h.

Referenced by OnPaint(), and SetBorders().

◆ m_rightBorder

bool WX_PANEL::m_rightBorder
private

Definition at line 51 of file wx_panel.h.

Referenced by OnPaint(), and SetBorders().

◆ m_topBorder

bool WX_PANEL::m_topBorder
private

Definition at line 52 of file wx_panel.h.

Referenced by OnPaint(), and SetBorders().


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