|
KiCad PCB EDA Suite
|
A bitmap button widget that behaves like a standard dialog button except with an icon. More...
#include <std_bitmap_button.h>
Public Member Functions | |
| STD_BITMAP_BUTTON (wxWindow *aParent, wxWindowID aId, const wxBitmap &aDummyBitmap, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxDefaultSize, int aStyle=0) | |
| ~STD_BITMAP_BUTTON () | |
| void | SetBitmap (const wxBitmapBundle &aBmp) |
| bool | Enable (bool aEnable=true) 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) |
Private Attributes | |
| int | m_stateButton = 0 |
| bool | m_bIsEnable = true |
| wxBitmapBundle | m_bitmap |
A bitmap button widget that behaves like a standard dialog button except with an icon.
Specifically:
In wxWidgets 3.2 the native button control is used on Mac for wxBitmapButton with or without text. Said widget has margins that are more than twice what previous versions had. This class allows our bitmap buttons to match the layout of our SPLIT_BUTTON.
Definition at line 41 of file std_bitmap_button.h.
| STD_BITMAP_BUTTON::STD_BITMAP_BUTTON | ( | wxWindow * | aParent, |
| wxWindowID | aId, | ||
| const wxBitmap & | aDummyBitmap, | ||
| const wxPoint & | aPos = wxDefaultPosition, | ||
| const wxSize & | aSize = wxDefaultSize, | ||
| int | aStyle = 0 ) |
Definition at line 33 of file std_bitmap_button.cpp.
References defaultSize(), OnKillFocus(), OnLeftButtonDown(), OnLeftButtonUp(), OnMouseEnter(), OnMouseLeave(), OnPaint(), and onThemeChanged().
| STD_BITMAP_BUTTON::~STD_BITMAP_BUTTON | ( | ) |
Definition at line 61 of file std_bitmap_button.cpp.
References OnKillFocus(), OnLeftButtonDown(), OnLeftButtonUp(), OnMouseEnter(), OnMouseLeave(), OnPaint(), and onThemeChanged().
|
override |
Definition at line 255 of file std_bitmap_button.cpp.
References m_bIsEnable, and m_stateButton.
|
protected |
Definition at line 110 of file std_bitmap_button.cpp.
References m_stateButton.
Referenced by STD_BITMAP_BUTTON(), and ~STD_BITMAP_BUTTON().
|
protected |
Definition at line 167 of file std_bitmap_button.cpp.
References m_stateButton.
Referenced by STD_BITMAP_BUTTON(), and ~STD_BITMAP_BUTTON().
|
protected |
Definition at line 146 of file std_bitmap_button.cpp.
References m_stateButton.
Referenced by STD_BITMAP_BUTTON(), and ~STD_BITMAP_BUTTON().
|
protected |
Definition at line 134 of file std_bitmap_button.cpp.
References m_stateButton.
Referenced by STD_BITMAP_BUTTON(), and ~STD_BITMAP_BUTTON().
|
protected |
Definition at line 122 of file std_bitmap_button.cpp.
References m_stateButton.
Referenced by STD_BITMAP_BUTTON(), and ~STD_BITMAP_BUTTON().
|
protected |
Definition at line 176 of file std_bitmap_button.cpp.
References KIPLATFORM::UI::IsDarkTheme(), m_bIsEnable, m_bitmap, and m_stateButton.
Referenced by STD_BITMAP_BUTTON(), and ~STD_BITMAP_BUTTON().
|
protected |
Definition at line 75 of file std_bitmap_button.cpp.
Referenced by STD_BITMAP_BUTTON(), and ~STD_BITMAP_BUTTON().
| void STD_BITMAP_BUTTON::SetBitmap | ( | const wxBitmapBundle & | aBmp | ) |
Definition at line 81 of file std_bitmap_button.cpp.
|
private |
Definition at line 65 of file std_bitmap_button.h.
|
private |
Definition at line 66 of file std_bitmap_button.h.
Referenced by OnPaint(), and SetBitmap().
|
private |
Definition at line 64 of file std_bitmap_button.h.
Referenced by Enable(), OnKillFocus(), OnLeftButtonDown(), OnLeftButtonUp(), OnMouseEnter(), OnMouseLeave(), and OnPaint().