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 wxBitmap &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 |
wxBitmap | 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 44 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 36 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 65 of file std_bitmap_button.cpp.
|
override |
Definition at line 220 of file std_bitmap_button.cpp.
References m_bIsEnable, m_stateButton, and Refresh().
Referenced by DIALOG_PAGES_SETTINGS::EnableWksFileNamePicker(), DIALOG_MIGRATE_SETTINGS::OnPrevVerSelected(), DIALOG_NET_INSPECTOR::onSelChanged(), PANEL_FP_PROPERTIES_3D_MODEL::OnUpdateUI(), PANEL_COMMON_SETTINGS::setPdfViewerPathState(), and PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow().
|
protected |
Definition at line 84 of file std_bitmap_button.cpp.
References m_stateButton, and Refresh().
Referenced by STD_BITMAP_BUTTON().
|
protected |
Definition at line 141 of file std_bitmap_button.cpp.
References m_stateButton, and Refresh().
Referenced by STD_BITMAP_BUTTON().
|
protected |
Definition at line 120 of file std_bitmap_button.cpp.
References m_stateButton, and Refresh().
Referenced by STD_BITMAP_BUTTON().
|
protected |
Definition at line 108 of file std_bitmap_button.cpp.
References m_stateButton, and Refresh().
Referenced by STD_BITMAP_BUTTON().
|
protected |
Definition at line 96 of file std_bitmap_button.cpp.
References m_stateButton, and Refresh().
Referenced by STD_BITMAP_BUTTON().
|
protected |
Definition at line 150 of file std_bitmap_button.cpp.
References KIPLATFORM::UI::IsDarkTheme(), m_bIsEnable, m_bitmap, and m_stateButton.
Referenced by STD_BITMAP_BUTTON().
|
protected |
Definition at line 70 of file std_bitmap_button.cpp.
References Refresh().
Referenced by STD_BITMAP_BUTTON().
void STD_BITMAP_BUTTON::SetBitmap | ( | const wxBitmap & | aBmp | ) |
Definition at line 76 of file std_bitmap_button.cpp.
References m_bitmap.
Referenced by DIALOG_BOM::DIALOG_BOM(), DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_FP_PLUGIN_OPTIONS::DIALOG_FP_PLUGIN_OPTIONS(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX(), DIALOG_IMPORT_NETLIST::DIALOG_IMPORT_NETLIST(), DIALOG_IMPORT_SETTINGS::DIALOG_IMPORT_SETTINGS(), DIALOG_LABEL_PROPERTIES::DIALOG_LABEL_PROPERTIES(), DIALOG_LIB_EDIT_PIN_TABLE::DIALOG_LIB_EDIT_PIN_TABLE(), DIALOG_LIB_SYMBOL_PROPERTIES::DIALOG_LIB_SYMBOL_PROPERTIES(), DIALOG_MANAGE_REPOSITORIES::DIALOG_MANAGE_REPOSITORIES(), DIALOG_MIGRATE_SETTINGS::DIALOG_MIGRATE_SETTINGS(), DIALOG_NET_INSPECTOR::DIALOG_NET_INSPECTOR(), DIALOG_PAD_PRIMITIVE_POLY_PROPS::DIALOG_PAD_PRIMITIVE_POLY_PROPS(), DIALOG_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_SCH_IMPORT_SETTINGS::DIALOG_SCH_IMPORT_SETTINGS(), DIALOG_SHEET_PROPERTIES::DIALOG_SHEET_PROPERTIES(), DIALOG_SIM_MODEL< T_symbol, T_field >::DIALOG_SIM_MODEL(), DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES(), DIALOG_TEMPLATE_SELECTOR::DIALOG_TEMPLATE_SELECTOR(), DIALOG_USER_DEFINED_SIGNALS::DIALOG_USER_DEFINED_SIGNALS(), DIALOG_PLOT::init_Dialog(), DIALOG_GEN_FOOTPRINT_POSITION::initDialog(), DIALOG_GENDRILL::InitDisplayParams(), PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS(), PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE(), PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL(), PANEL_PCBNEW_ACTION_PLUGINS::PANEL_PCBNEW_ACTION_PLUGINS(), PANEL_RF_ATTENUATORS::PANEL_RF_ATTENUATORS(), PANEL_SETUP_BUSES::PANEL_SETUP_BUSES(), PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES(), PANEL_SETUP_TRACKS_AND_VIAS::PANEL_SETUP_TRACKS_AND_VIAS(), PANEL_SYM_LIB_TABLE::PANEL_SYM_LIB_TABLE(), PANEL_TEMPLATE_FIELDNAMES::PANEL_TEMPLATE_FIELDNAMES(), PANEL_TEXT_VARIABLES::PANEL_TEXT_VARIABLES(), PANEL_TRANSLINE::PANEL_TRANSLINE(), PANEL_FP_EDITOR_DEFAULTS::Show(), PANEL_RF_ATTENUATORS::ThemeChanged(), PANEL_TRANSLINE::ThemeChanged(), and TUNER_SLIDER::TUNER_SLIDER().
|
private |
Definition at line 68 of file std_bitmap_button.h.
|
private |
Definition at line 69 of file std_bitmap_button.h.
Referenced by OnPaint(), and SetBitmap().
|
private |
Definition at line 67 of file std_bitmap_button.h.
Referenced by Enable(), OnKillFocus(), OnLeftButtonDown(), OnLeftButtonUp(), OnMouseEnter(), OnMouseLeave(), and OnPaint().