]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/bmpbuttn.h
added support for 2 extra mouse buttons (patch 1757630)
[wxWidgets.git] / include / wx / gtk / bmpbuttn.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/bmpbutton.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10
11 #ifndef __BMPBUTTONH__
12 #define __BMPBUTTONH__
13
14 // ----------------------------------------------------------------------------
15 // wxBitmapButton
16 // ----------------------------------------------------------------------------
17
18 class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase
19 {
20 public:
21 wxBitmapButton() { Init(); }
22
23 wxBitmapButton(wxWindow *parent,
24 wxWindowID id,
25 const wxBitmap& bitmap,
26 const wxPoint& pos = wxDefaultPosition,
27 const wxSize& size = wxDefaultSize,
28 long style = wxBU_AUTODRAW,
29 const wxValidator& validator = wxDefaultValidator,
30 const wxString& name = wxButtonNameStr)
31 {
32 Init();
33
34 Create(parent, id, bitmap, pos, size, style, validator, name);
35 }
36
37 bool Create(wxWindow *parent,
38 wxWindowID id,
39 const wxBitmap& bitmap,
40 const wxPoint& pos = wxDefaultPosition,
41 const wxSize& size = wxDefaultSize,
42 long style = wxBU_AUTODRAW,
43 const wxValidator& validator = wxDefaultValidator,
44 const wxString& name = wxButtonNameStr);
45
46 void SetLabel( const wxString &label );
47 virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); }
48
49 virtual bool Enable(bool enable = TRUE);
50
51 // implementation
52 // --------------
53
54 void HasFocus();
55 void NotFocus();
56 void StartSelect();
57 void EndSelect();
58
59 bool m_hasFocus:1;
60 bool m_isSelected:1;
61
62 protected:
63 virtual void OnSetBitmap();
64 virtual wxSize DoGetBestSize() const;
65 void DoApplyWidgetStyle(GtkRcStyle *style);
66
67 void Init();
68
69 private:
70 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
71 };
72
73 #endif // __BMPBUTTONH__