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 45 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 37 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 64 of file std_bitmap_button.cpp.
References OnKillFocus(), OnLeftButtonDown(), OnLeftButtonUp(), OnMouseEnter(), OnMouseLeave(), OnPaint(), and onThemeChanged().
|
override |
Definition at line 260 of file std_bitmap_button.cpp.
References m_bIsEnable, m_stateButton, and Refresh().
Referenced by DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_PAGES_SETTINGS::EnableWksFileNamePicker(), DIALOG_SYMBOL_FIELDS_TABLE::OnFieldsCtrlSelectionChanged(), DIALOG_MIGRATE_SETTINGS::OnPrevVerSelected(), DIALOG_SYMBOL_FIELDS_TABLE::OnRemoveField(), PANEL_FP_PROPERTIES_3D_MODEL::OnUpdateUI(), PANEL_COMMON_SETTINGS::setPdfViewerPathState(), and PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow().
|
protected |
Definition at line 113 of file std_bitmap_button.cpp.
References m_stateButton, and Refresh().
Referenced by STD_BITMAP_BUTTON(), and ~STD_BITMAP_BUTTON().
|
protected |
Definition at line 170 of file std_bitmap_button.cpp.
References m_stateButton, and Refresh().
Referenced by STD_BITMAP_BUTTON(), and ~STD_BITMAP_BUTTON().
|
protected |
Definition at line 149 of file std_bitmap_button.cpp.
References m_stateButton, and Refresh().
Referenced by STD_BITMAP_BUTTON(), and ~STD_BITMAP_BUTTON().
|
protected |
Definition at line 137 of file std_bitmap_button.cpp.
References m_stateButton, and Refresh().
Referenced by STD_BITMAP_BUTTON(), and ~STD_BITMAP_BUTTON().
|
protected |
Definition at line 125 of file std_bitmap_button.cpp.
References m_stateButton, and Refresh().
Referenced by STD_BITMAP_BUTTON(), and ~STD_BITMAP_BUTTON().
|
protected |
Definition at line 179 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 78 of file std_bitmap_button.cpp.
References Refresh().
Referenced by STD_BITMAP_BUTTON(), and ~STD_BITMAP_BUTTON().
void STD_BITMAP_BUTTON::SetBitmap | ( | const wxBitmapBundle & | aBmp | ) |
Definition at line 84 of file std_bitmap_button.cpp.
References m_bitmap, and minSize.
Referenced by DIALOG_BOM::DIALOG_BOM(), DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS(), DIALOG_CONFIG_EQUFILES::DIALOG_CONFIG_EQUFILES(), DIALOG_CONFIGURE_PATHS::DIALOG_CONFIGURE_PATHS(), DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS(), DIALOG_EXPORT_2581::DIALOG_EXPORT_2581(), DIALOG_EXPORT_ODBPP::DIALOG_EXPORT_ODBPP(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), DIALOG_EXPORT_SVG::DIALOG_EXPORT_SVG(), DIALOG_FOOTPRINT_PROPERTIES::DIALOG_FOOTPRINT_PROPERTIES(), DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR(), DIALOG_GROUP_PROPERTIES::DIALOG_GROUP_PROPERTIES(), DIALOG_IMPORT_GFX_SCH::DIALOG_IMPORT_GFX_SCH(), DIALOG_IMPORT_GRAPHICS::DIALOG_IMPORT_GRAPHICS(), DIALOG_IMPORT_NETLIST::DIALOG_IMPORT_NETLIST(), DIALOG_IMPORT_SETTINGS::DIALOG_IMPORT_SETTINGS(), DIALOG_JOB_OUTPUT::DIALOG_JOB_OUTPUT(), 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_PAGES_SETTINGS::DIALOG_PAGES_SETTINGS(), DIALOG_PIN_PROPERTIES::DIALOG_PIN_PROPERTIES(), DIALOG_PLOT::DIALOG_PLOT(), DIALOG_PLOT_SCHEMATIC::DIALOG_PLOT_SCHEMATIC(), DIALOG_PLUGIN_OPTIONS::DIALOG_PLUGIN_OPTIONS(), DIALOG_SCH_IMPORT_SETTINGS::DIALOG_SCH_IMPORT_SETTINGS(), DIALOG_SHEET_PROPERTIES::DIALOG_SHEET_PROPERTIES(), DIALOG_SIM_MODEL< T >::DIALOG_SIM_MODEL(), DIALOG_SYMBOL_FIELDS_TABLE::DIALOG_SYMBOL_FIELDS_TABLE(), DIALOG_SYMBOL_PROPERTIES::DIALOG_SYMBOL_PROPERTIES(), DIALOG_TEMPLATE_SELECTOR::DIALOG_TEMPLATE_SELECTOR(), DIALOG_USER_DEFINED_SIGNALS::DIALOG_USER_DEFINED_SIGNALS(), EDA_REORDERABLE_LIST_DIALOG::EDA_REORDERABLE_LIST_DIALOG(), DIALOG_FIELD_PROPERTIES::init(), DIALOG_PLOT::init_Dialog(), DIALOG_GEN_FOOTPRINT_POSITION::initDialog(), DIALOG_GENDRILL::InitDisplayParams(), LIB_TREE::LIB_TREE(), PANEL_BOM_PRESETS::PANEL_BOM_PRESETS(), PANEL_COMMON_SETTINGS::PANEL_COMMON_SETTINGS(), PANEL_DESIGN_BLOCK_LIB_TABLE::PANEL_DESIGN_BLOCK_LIB_TABLE(), PANEL_EMBEDDED_FILES::PANEL_EMBEDDED_FILES(), PANEL_FP_LIB_TABLE::PANEL_FP_LIB_TABLE(), PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL(), PANEL_GIT_REPOS::PANEL_GIT_REPOS(), PANEL_GRID_SETTINGS::PANEL_GRID_SETTINGS(), PANEL_PCBNEW_ACTION_PLUGINS::PANEL_PCBNEW_ACTION_PLUGINS(), PANEL_PREVIEW_3D_MODEL::PANEL_PREVIEW_3D_MODEL(), PANEL_RF_ATTENUATORS::PANEL_RF_ATTENUATORS(), PANEL_SETUP_BUSES::PANEL_SETUP_BUSES(), PANEL_SETUP_NETCLASSES::PANEL_SETUP_NETCLASSES(), PANEL_SETUP_RULES::PANEL_SETUP_RULES(), 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 69 of file std_bitmap_button.h.
|
private |
Definition at line 70 of file std_bitmap_button.h.
Referenced by OnPaint(), and SetBitmap().
|
private |
Definition at line 68 of file std_bitmap_button.h.
Referenced by Enable(), OnKillFocus(), OnLeftButtonDown(), OnLeftButtonUp(), OnMouseEnter(), OnMouseLeave(), and OnPaint().