]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/bmpbuttn.h
fixed wxComboBox::Clear to clear stored value
[wxWidgets.git] / include / wx / gtk1 / 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 wxString GetLabel() const;
48 virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); }
49
50 virtual void SetDefault();
51 virtual bool Enable(bool enable = TRUE);
52
53 // implementation
54 // --------------
55
56 void HasFocus();
57 void NotFocus();
58 void StartSelect();
59 void EndSelect();
60 void DoApplyWidgetStyle(GtkRcStyle *style);
61
62 bool m_hasFocus:1;
63 bool m_isSelected:1;
64
65 protected:
66 virtual void OnSetBitmap();
67 virtual wxSize DoGetBestSize() const;
68
69 void Init();
70
71 private:
72 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
73 };
74
75 #endif // __BMPBUTTONH__