25#ifndef BITMAP_BUTTON_H_
26#define BITMAP_BUTTON_H_
29#include <wx/bmpbndl.h>
44 BITMAP_BUTTON( wxWindow* aParent, wxWindowID aId,
const wxPoint& aPos = wxDefaultPosition,
45 const wxSize& aSize = wxDefaultSize,
46 int aStyles = wxBORDER_NONE | wxTAB_TRAVERSAL );
49 BITMAP_BUTTON( wxWindow* aParent, wxWindowID aId,
const wxBitmap& aDummyBitmap,
50 const wxPoint& aPos = wxDefaultPosition,
const wxSize& aSize = wxDefaultSize,
51 int aStyles = wxBORDER_NONE | wxTAB_TRAVERSAL );
60 void SetPadding(
int aPadding );
67 void SetBitmap(
const wxBitmapBundle& aBmp );
74 void SetDisabledBitmap(
const wxBitmapBundle& aBmp );
79 bool Enable(
bool aEnable =
true )
override;
84 void SetIsCheckButton();
86 void SetIsRadioButton();
91 void Check(
bool aCheck =
true );
93 bool IsChecked()
const;
100 void SetIsSeparator();
107 void AcceptDragInAsClick(
bool aAcceptDragIn =
true );
113 void SetBadgeColors(
const wxColor& aBadgeColor,
const wxColor& aBadgeTextColor )
115 m_badgeColor = aBadgeColor;
116 m_badgeTextColor = aBadgeTextColor;
121 m_centerBitmap = aCentered;
130 void OnMouseLeave( wxEvent& aEvent );
131 void OnMouseEnter( wxEvent& aEvent );
132 void OnKillFocus( wxEvent& aEvent );
133 void OnSetFocus( wxEvent& aEvent );
134 void OnLeftButtonUp( wxMouseEvent& aEvent );
135 void OnLeftButtonDown( wxMouseEvent& aEvent );
136 void OnPaint( wxPaintEvent& aEvent );
137 void OnDPIChanged( wxDPIChangedEvent& aEvent );
139 virtual wxSize DoGetBestSize()
const override;
143 m_buttonState |= aFlag;
148 m_buttonState &= ~aFlag;
153 return m_buttonState & aFlag;
156 void invalidateBestSize();