KiCad PCB EDA Suite
Loading...
Searching...
No Matches
SPLIT_BUTTON Class Reference

#include <split_button.h>

Inheritance diagram for SPLIT_BUTTON:

Public Member Functions

 SPLIT_BUTTON (wxWindow *aParent, wxWindowID aId, const wxString &aLabel, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxDefaultSize)
 
 ~SPLIT_BUTTON ()
 
wxMenu * GetSplitButtonMenu ()
 
void SetBitmap (const wxBitmapBundle &aBmp)
 
void SetMinSize (const wxSize &aSize) override
 
void SetWidthPadding (int aPadding)
 
void SetLabel (const wxString &aLabel) override
 

Protected Member Functions

void OnKillFocus (wxFocusEvent &aEvent)
 
void OnMouseLeave (wxMouseEvent &aEvent)
 
void OnMouseEnter (wxMouseEvent &aEvent)
 
void OnLeftButtonUp (wxMouseEvent &aEvent)
 
void OnLeftButtonDown (wxMouseEvent &aEvent)
 
void OnPaint (wxPaintEvent &WXUNUSED(aEvent))
 
void onThemeChanged (wxSysColourChangedEvent &aEvent)
 
bool Enable (bool aEnable=true) override
 

Private Attributes

int m_stateButton = 0
 
int m_stateMenu = 0
 
bool m_bIsEnable = true
 
int m_arrowButtonWidth
 
int m_widthPadding
 
bool m_bLButtonDown = false
 
wxString m_label
 
wxMenu * m_pMenu = nullptr
 
wxBitmapBundle m_bitmap
 
wxSize m_unadjustedMinSize
 

Detailed Description

Definition at line 34 of file split_button.h.

Constructor & Destructor Documentation

◆ SPLIT_BUTTON()

SPLIT_BUTTON::SPLIT_BUTTON ( wxWindow *  aParent,
wxWindowID  aId,
const wxString &  aLabel,
const wxPoint &  aPos = wxDefaultPosition,
const wxSize &  aSize = wxDefaultSize 
)

◆ ~SPLIT_BUTTON()

SPLIT_BUTTON::~SPLIT_BUTTON ( )

Definition at line 66 of file split_button.cpp.

References m_pMenu.

Member Function Documentation

◆ Enable()

bool SPLIT_BUTTON::Enable ( bool  aEnable = true)
overrideprotected

Definition at line 331 of file split_button.cpp.

References m_bIsEnable, m_stateButton, m_stateMenu, and Refresh().

◆ GetSplitButtonMenu()

◆ OnKillFocus()

void SPLIT_BUTTON::OnKillFocus ( wxFocusEvent &  aEvent)
protected

Definition at line 122 of file split_button.cpp.

References m_stateButton, m_stateMenu, and Refresh().

Referenced by SPLIT_BUTTON().

◆ OnLeftButtonDown()

void SPLIT_BUTTON::OnLeftButtonDown ( wxMouseEvent &  aEvent)
protected

Definition at line 192 of file split_button.cpp.

References m_arrowButtonWidth, m_bLButtonDown, m_pMenu, m_stateButton, m_stateMenu, and Refresh().

Referenced by SPLIT_BUTTON().

◆ OnLeftButtonUp()

void SPLIT_BUTTON::OnLeftButtonUp ( wxMouseEvent &  aEvent)
protected

Definition at line 161 of file split_button.cpp.

References m_arrowButtonWidth, m_bLButtonDown, m_stateButton, m_stateMenu, and Refresh().

Referenced by SPLIT_BUTTON().

◆ OnMouseEnter()

void SPLIT_BUTTON::OnMouseEnter ( wxMouseEvent &  aEvent)
protected

Definition at line 148 of file split_button.cpp.

References m_stateButton, m_stateMenu, and Refresh().

Referenced by SPLIT_BUTTON().

◆ OnMouseLeave()

void SPLIT_BUTTON::OnMouseLeave ( wxMouseEvent &  aEvent)
protected

Definition at line 135 of file split_button.cpp.

References m_stateButton, m_stateMenu, and Refresh().

Referenced by SPLIT_BUTTON().

◆ OnPaint()

void SPLIT_BUTTON::OnPaint ( wxPaintEvent &  WXUNUSEDaEvent)
protected

◆ onThemeChanged()

void SPLIT_BUTTON::onThemeChanged ( wxSysColourChangedEvent &  aEvent)
protected

Definition at line 73 of file split_button.cpp.

References Refresh().

Referenced by SPLIT_BUTTON().

◆ SetBitmap()

void SPLIT_BUTTON::SetBitmap ( const wxBitmapBundle &  aBmp)

◆ SetLabel()

void SPLIT_BUTTON::SetLabel ( const wxString &  aLabel)
override

Definition at line 106 of file split_button.cpp.

References m_label, and Refresh().

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

◆ SetMinSize()

void SPLIT_BUTTON::SetMinSize ( const wxSize &  aSize)
override

◆ SetWidthPadding()

void SPLIT_BUTTON::SetWidthPadding ( int  aPadding)

Member Data Documentation

◆ m_arrowButtonWidth

int SPLIT_BUTTON::m_arrowButtonWidth
private

Definition at line 63 of file split_button.h.

Referenced by OnLeftButtonDown(), OnLeftButtonUp(), OnPaint(), SetMinSize(), and SPLIT_BUTTON().

◆ m_bIsEnable

bool SPLIT_BUTTON::m_bIsEnable = true
private

Definition at line 62 of file split_button.h.

Referenced by Enable(), and OnPaint().

◆ m_bitmap

wxBitmapBundle SPLIT_BUTTON::m_bitmap
private

Definition at line 68 of file split_button.h.

Referenced by OnPaint(), and SetBitmap().

◆ m_bLButtonDown

bool SPLIT_BUTTON::m_bLButtonDown = false
private

Definition at line 65 of file split_button.h.

Referenced by OnLeftButtonDown(), and OnLeftButtonUp().

◆ m_label

wxString SPLIT_BUTTON::m_label
private

Definition at line 66 of file split_button.h.

Referenced by OnPaint(), SetLabel(), and SPLIT_BUTTON().

◆ m_pMenu

wxMenu* SPLIT_BUTTON::m_pMenu = nullptr
private

Definition at line 67 of file split_button.h.

Referenced by GetSplitButtonMenu(), OnLeftButtonDown(), SPLIT_BUTTON(), and ~SPLIT_BUTTON().

◆ m_stateButton

int SPLIT_BUTTON::m_stateButton = 0
private

◆ m_stateMenu

int SPLIT_BUTTON::m_stateMenu = 0
private

◆ m_unadjustedMinSize

wxSize SPLIT_BUTTON::m_unadjustedMinSize
private

Definition at line 69 of file split_button.h.

Referenced by SetMinSize(), and SetWidthPadding().

◆ m_widthPadding

int SPLIT_BUTTON::m_widthPadding
private

Definition at line 64 of file split_button.h.

Referenced by SetMinSize(), SetWidthPadding(), and SPLIT_BUTTON().


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