]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/bmpbuttn.h
bc3a5cfe162e411998c8453aed1513188f060e71
[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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
15 #pragma interface
16 #endif
17
18 // ----------------------------------------------------------------------------
19 // wxBitmapButton
20 // ----------------------------------------------------------------------------
21
22 class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase
23 {
24 public:
25 wxBitmapButton() { Init(); }
26
27 wxBitmapButton(wxWindow *parent,
28 wxWindowID id,
29 const wxBitmap& bitmap,
30 const wxPoint& pos = wxDefaultPosition,
31 const wxSize& size = wxDefaultSize,
32 long style = wxBU_AUTODRAW,
33 const wxValidator& validator = wxDefaultValidator,
34 const wxString& name = wxButtonNameStr)
35 {
36 Init();
37
38 Create(parent, id, bitmap, pos, size, style, validator, name);
39 }
40
41 bool Create(wxWindow *parent,
42 wxWindowID id,
43 const wxBitmap& bitmap,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 long style = wxBU_AUTODRAW,
47 const wxValidator& validator = wxDefaultValidator,
48 const wxString& name = wxButtonNameStr);
49
50 void SetLabel( const wxString &label );
51 wxString GetLabel() const;
52 virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); }
53
54 virtual void SetDefault();
55 virtual bool Enable(bool enable = TRUE);
56
57 // implementation
58 // --------------
59
60 void HasFocus();
61 void NotFocus();
62 void StartSelect();
63 void EndSelect();
64 void DoApplyWidgetStyle(GtkRcStyle *style);
65
66 bool m_hasFocus:1;
67 bool m_isSelected:1;
68
69 protected:
70 virtual void OnSetBitmap();
71 virtual wxSize DoGetBestSize() const;
72
73 void Init();
74
75 private:
76 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
77 };
78
79 #endif // __BMPBUTTONH__