1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/bmpbuttn.h
3 // Purpose: wxBitmapButton class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_BMPBUTTN_H_
13 #define _WX_BMPBUTTN_H_
15 #include "wx/button.h"
16 #include "wx/bitmap.h"
19 class WXDLLIMPEXP_CORE wxBitmapButton
: public wxBitmapButtonBase
22 wxBitmapButton() { Init(); }
24 wxBitmapButton(wxWindow
*parent
,
26 const wxBitmap
& bitmap
,
27 const wxPoint
& pos
= wxDefaultPosition
,
28 const wxSize
& size
= wxDefaultSize
,
29 long style
= wxBU_AUTODRAW
,
30 const wxValidator
& validator
= wxDefaultValidator
,
31 const wxString
& name
= wxButtonNameStr
)
35 Create(parent
, id
, bitmap
, pos
, size
, style
, validator
, name
);
38 bool Create(wxWindow
*parent
,
40 const wxBitmap
& bitmap
,
41 const wxPoint
& pos
= wxDefaultPosition
,
42 const wxSize
& size
= wxDefaultSize
,
43 long style
= wxBU_AUTODRAW
,
44 const wxValidator
& validator
= wxDefaultValidator
,
45 const wxString
& name
= wxButtonNameStr
);
48 // common part of all ctors
52 m_hoverSetByUser
= false;
55 // reimplement some base class virtuals
56 virtual void DoSetBitmap(const wxBitmap
& bitmap
, State which
);
58 // true if disabled bitmap was set by user, false if we created it
59 // ourselves from the normal one
60 bool m_disabledSetByUser
;
62 // true if hover bitmap was set by user, false if it was set from focused
64 bool m_hoverSetByUser
;
68 DECLARE_DYNAMIC_CLASS_NO_COPY(wxBitmapButton
)
71 #endif // _WX_BMPBUTTN_H_