1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/motif/bmpbuttn.h
3 // Purpose: wxBitmapButton class
4 // Author: Julian Smart
7 // Copyright: (c) Julian Smart
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef _WX_BMPBUTTN_H_
12 #define _WX_BMPBUTTN_H_
14 #include "wx/motif/bmpmotif.h"
16 #define wxDEFAULT_BUTTON_MARGIN 4
18 class WXDLLIMPEXP_CORE wxBitmapButton
: public wxBitmapButtonBase
22 virtual ~wxBitmapButton();
23 wxBitmapButton(wxWindow
*parent
, wxWindowID id
, const wxBitmap
& bitmap
,
24 const wxPoint
& pos
= wxDefaultPosition
,
25 const wxSize
& size
= wxDefaultSize
, long style
= wxBU_AUTODRAW
,
26 const wxValidator
& validator
= wxDefaultValidator
,
27 const wxString
& name
= wxButtonNameStr
)
29 Create(parent
, id
, bitmap
, pos
, size
, style
, validator
, name
);
32 bool Create(wxWindow
*parent
, wxWindowID id
, const wxBitmap
& bitmap
,
33 const wxPoint
& pos
= wxDefaultPosition
,
34 const wxSize
& size
= wxDefaultSize
, long style
= wxBU_AUTODRAW
,
35 const wxValidator
& validator
= wxDefaultValidator
,
36 const wxString
& name
= wxButtonNameStr
);
39 virtual void ChangeBackgroundColour();
42 virtual wxSize
DoGetBestSize() const;
44 virtual void DoSetBitmap(const wxBitmap
& bitmap
, State which
);
45 virtual void OnSetBitmap();
47 // original bitmaps may be different from the ones we were initialized with
48 // if they were changed to reflect button background colour
49 wxBitmap m_bitmapsOriginal
[State_Max
];
51 wxBitmapCache m_bitmapCache
;
53 WXPixmap m_insensPixmap
;
55 DECLARE_DYNAMIC_CLASS(wxBitmapButton
)
58 #endif // _WX_BMPBUTTN_H_