]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/bmpbuttn.h
GetSocketManager() has no GUI-specific version under Darwin finally
[wxWidgets.git] / include / wx / gtk / bmpbuttn.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
29149a64 2// Name: wx/gtk/bmpbutton.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
dbf858b5 5// Id: $Id$
01111366 6// Copyright: (c) 1998 Robert Roebling
65571936 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
6fba6c78
VS
10#ifndef _WX_GTK_BMPBUTTON_H_
11#define _WX_GTK_BMPBUTTON_H_
c801d85f 12
1e6feb95 13// ----------------------------------------------------------------------------
c801d85f 14// wxBitmapButton
1e6feb95 15// ----------------------------------------------------------------------------
c801d85f 16
20123d49 17class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase
151ccd11 18{
43a18898 19public:
c3dfaa10
VZ
20 wxBitmapButton() { Init(); }
21
1e6feb95
VZ
22 wxBitmapButton(wxWindow *parent,
23 wxWindowID id,
24 const wxBitmap& bitmap,
25 const wxPoint& pos = wxDefaultPosition,
26 const wxSize& size = wxDefaultSize,
60854f1a 27 long style = wxBU_AUTODRAW,
1e6feb95
VZ
28 const wxValidator& validator = wxDefaultValidator,
29 const wxString& name = wxButtonNameStr)
738f9e5a 30 {
c3dfaa10
VZ
31 Init();
32
738f9e5a
RR
33 Create(parent, id, bitmap, pos, size, style, validator, name);
34 }
c3dfaa10 35
1e6feb95
VZ
36 bool Create(wxWindow *parent,
37 wxWindowID id,
38 const wxBitmap& bitmap,
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize,
60854f1a 41 long style = wxBU_AUTODRAW,
1e6feb95
VZ
42 const wxValidator& validator = wxDefaultValidator,
43 const wxString& name = wxButtonNameStr);
44
738f9e5a 45 void SetLabel( const wxString &label );
738f9e5a 46 virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); }
29149a64 47
60854f1a 48 virtual bool Enable(bool enable = true);
c3dfaa10 49
20e05ffb
RR
50 // implementation
51 // --------------
29149a64 52
6fba6c78
VS
53 void GTKMouseEnters();
54 void GTKMouseLeaves();
55 void GTKPressed();
56 void GTKReleased();
29149a64 57
f6bcfd97 58protected:
1e6feb95 59 virtual void OnSetBitmap();
e0aeebed 60 virtual wxSize DoGetBestSize() const;
6f02a879 61 void DoApplyWidgetStyle(GtkRcStyle *style);
f6bcfd97 62
c3dfaa10
VZ
63 void Init();
64
738f9e5a 65private:
6fba6c78
VS
66 void OnFocusChange(wxFocusEvent& event);
67
68 // true iff mouse hovers over the button
69 bool m_mouseHovers;
70 // true iff the button is in pressed state
71 bool m_isPressed;
72
738f9e5a 73 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
6fba6c78 74 DECLARE_EVENT_TABLE()
151ccd11 75};
43a18898 76
6fba6c78 77#endif // _WX_GTK_BMPBUTTON_H_