]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/bmpbuttn.h
cleanup - added whitespace around operators, some blank lines, fixed comment typos...
[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 void SetDefault();
50 virtual bool Enable(bool enable = TRUE);
51
52 // implementation
53 // --------------
54
55 void HasFocus();
56 void NotFocus();
57 void StartSelect();
58 void EndSelect();
59
60 bool m_hasFocus:1;
61 bool m_isSelected:1;
62
63 protected:
64 virtual void OnSetBitmap();
65 virtual wxSize DoGetBestSize() const;
66 void DoApplyWidgetStyle(GtkRcStyle *style);
67
68 void Init();
69
70 private:
71 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
72 };
73
74 #endif // __BMPBUTTONH__