KiCad PCB EDA Suite
|
#include <split_button.h>
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 wxBitmap &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 |
const int | m_arrowButtonWidth = 20 |
int | m_widthPadding = 20 |
bool | m_bLButtonDown = false |
wxString | m_label |
wxMenu * | m_pMenu = nullptr |
wxBitmap | m_bitmap |
wxSize | m_unadjustedMinSize |
Definition at line 34 of file split_button.h.
SPLIT_BUTTON::SPLIT_BUTTON | ( | wxWindow * | aParent, |
wxWindowID | aId, | ||
const wxString & | aLabel, | ||
const wxPoint & | aPos = wxDefaultPosition , |
||
const wxSize & | aSize = wxDefaultSize |
||
) |
Definition at line 36 of file split_button.cpp.
References defaultSize(), m_label, m_pMenu, OnKillFocus(), OnLeftButtonDown(), OnLeftButtonUp(), OnMouseEnter(), OnMouseLeave(), OnPaint(), onThemeChanged(), and SetMinSize().
SPLIT_BUTTON::~SPLIT_BUTTON | ( | ) |
Definition at line 68 of file split_button.cpp.
References m_pMenu.
|
overrideprotected |
Definition at line 323 of file split_button.cpp.
References m_bIsEnable, m_stateButton, m_stateMenu, and Refresh().
wxMenu * SPLIT_BUTTON::GetSplitButtonMenu | ( | ) |
Definition at line 114 of file split_button.cpp.
References m_pMenu.
Referenced by DIALOG_MANAGE_REPOSITORIES::DIALOG_MANAGE_REPOSITORIES(), PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE(), PANEL_PACKAGE::PANEL_PACKAGE(), and PANEL_PACKAGE::SetState().
|
protected |
Definition at line 120 of file split_button.cpp.
References m_stateButton, m_stateMenu, and Refresh().
Referenced by SPLIT_BUTTON().
|
protected |
Definition at line 190 of file split_button.cpp.
References m_arrowButtonWidth, m_bLButtonDown, m_pMenu, m_stateButton, m_stateMenu, and Refresh().
Referenced by SPLIT_BUTTON().
|
protected |
Definition at line 159 of file split_button.cpp.
References m_arrowButtonWidth, m_bLButtonDown, m_stateButton, m_stateMenu, and Refresh().
Referenced by SPLIT_BUTTON().
|
protected |
Definition at line 146 of file split_button.cpp.
References m_stateButton, m_stateMenu, and Refresh().
Referenced by SPLIT_BUTTON().
|
protected |
Definition at line 133 of file split_button.cpp.
References m_stateButton, m_stateMenu, and Refresh().
Referenced by SPLIT_BUTTON().
|
protected |
Definition at line 224 of file split_button.cpp.
References KIPLATFORM::UI::IsDarkTheme(), m_arrowButtonWidth, m_bIsEnable, m_bitmap, m_label, m_stateButton, and m_stateMenu.
Referenced by SPLIT_BUTTON().
|
protected |
void SPLIT_BUTTON::SetBitmap | ( | const wxBitmap & | aBmp | ) |
Definition at line 96 of file split_button.cpp.
References m_bitmap, and SetMinSize().
Referenced by DIALOG_MANAGE_REPOSITORIES::DIALOG_MANAGE_REPOSITORIES(), and PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE().
|
override |
Definition at line 104 of file split_button.cpp.
References m_label, and Refresh().
Referenced by PANEL_PACKAGE::PANEL_PACKAGE(), and PANEL_PACKAGE::SetState().
|
override |
Definition at line 81 of file split_button.cpp.
References m_arrowButtonWidth, m_unadjustedMinSize, and m_widthPadding.
Referenced by DIALOG_MANAGE_REPOSITORIES::DIALOG_MANAGE_REPOSITORIES(), PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE(), SetBitmap(), SetWidthPadding(), and SPLIT_BUTTON().
void SPLIT_BUTTON::SetWidthPadding | ( | int | aPadding | ) |
Definition at line 89 of file split_button.cpp.
References m_unadjustedMinSize, m_widthPadding, and SetMinSize().
Referenced by DIALOG_MANAGE_REPOSITORIES::DIALOG_MANAGE_REPOSITORIES(), and PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE().
|
private |
Definition at line 63 of file split_button.h.
Referenced by OnLeftButtonDown(), OnLeftButtonUp(), OnPaint(), and SetMinSize().
|
private |
Definition at line 62 of file split_button.h.
|
private |
Definition at line 68 of file split_button.h.
Referenced by OnPaint(), and SetBitmap().
|
private |
Definition at line 65 of file split_button.h.
Referenced by OnLeftButtonDown(), and OnLeftButtonUp().
|
private |
Definition at line 66 of file split_button.h.
Referenced by OnPaint(), SetLabel(), and SPLIT_BUTTON().
|
private |
Definition at line 67 of file split_button.h.
Referenced by GetSplitButtonMenu(), OnLeftButtonDown(), SPLIT_BUTTON(), and ~SPLIT_BUTTON().
|
private |
Definition at line 60 of file split_button.h.
Referenced by Enable(), OnKillFocus(), OnLeftButtonDown(), OnLeftButtonUp(), OnMouseEnter(), OnMouseLeave(), and OnPaint().
|
private |
Definition at line 61 of file split_button.h.
Referenced by Enable(), OnKillFocus(), OnLeftButtonDown(), OnLeftButtonUp(), OnMouseEnter(), OnMouseLeave(), and OnPaint().
|
private |
Definition at line 69 of file split_button.h.
Referenced by SetMinSize(), and SetWidthPadding().
|
private |
Definition at line 64 of file split_button.h.
Referenced by SetMinSize(), and SetWidthPadding().