1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/bmpbutton.h
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_GTK_BMPBUTTON_H_
11 #define _WX_GTK_BMPBUTTON_H_
13 // ----------------------------------------------------------------------------
15 // ----------------------------------------------------------------------------
17 class WXDLLIMPEXP_CORE wxBitmapButton
: public wxBitmapButtonBase
20 wxBitmapButton() { Init(); }
22 wxBitmapButton(wxWindow
*parent
,
24 const wxBitmap
& bitmap
,
25 const wxPoint
& pos
= wxDefaultPosition
,
26 const wxSize
& size
= wxDefaultSize
,
27 long style
= wxBU_AUTODRAW
,
28 const wxValidator
& validator
= wxDefaultValidator
,
29 const wxString
& name
= wxButtonNameStr
)
33 Create(parent
, id
, bitmap
, pos
, size
, style
, validator
, name
);
36 bool Create(wxWindow
*parent
,
38 const wxBitmap
& bitmap
,
39 const wxPoint
& pos
= wxDefaultPosition
,
40 const wxSize
& size
= wxDefaultSize
,
41 long style
= wxBU_AUTODRAW
,
42 const wxValidator
& validator
= wxDefaultValidator
,
43 const wxString
& name
= wxButtonNameStr
);
45 void SetLabel( const wxString
&label
);
46 virtual void SetLabel( const wxBitmap
& bitmap
) { SetBitmapLabel(bitmap
); }
48 virtual bool Enable(bool enable
= true);
53 void GTKMouseEnters();
54 void GTKMouseLeaves();
59 virtual void OnSetBitmap();
60 virtual wxSize
DoGetBestSize() const;
61 void DoApplyWidgetStyle(GtkRcStyle
*style
);
66 void OnFocusChange(wxFocusEvent
& event
);
68 // true iff mouse hovers over the button
70 // true iff the button is in pressed state
73 DECLARE_DYNAMIC_CLASS(wxBitmapButton
)
77 #endif // _WX_GTK_BMPBUTTON_H_