]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/bmpbuttn.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / gtk1 / bmpbuttn.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
8ef94bfc 2// Name: wx/gtk1/bmpbutton.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
01111366 5// Copyright: (c) 1998 Robert Roebling
65571936 6// Licence: wxWindows licence
c801d85f
KB
7/////////////////////////////////////////////////////////////////////////////
8
9
10#ifndef __BMPBUTTONH__
11#define __BMPBUTTONH__
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,
27 long style = wxBU_AUTODRAW,
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,
41 long style = wxBU_AUTODRAW,
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
c3dfaa10
VZ
48 virtual bool Enable(bool enable = TRUE);
49
20e05ffb
RR
50 // implementation
51 // --------------
29149a64 52
d1b8a743
VZ
53 void GTKSetHasFocus();
54 void GTKSetNotFocus();
738f9e5a
RR
55 void StartSelect();
56 void EndSelect();
f40fdaa3 57 void DoApplyWidgetStyle(GtkRcStyle *style);
29149a64 58
c3dfaa10
VZ
59 bool m_hasFocus:1;
60 bool m_isSelected:1;
29149a64 61
f6bcfd97 62protected:
1e6feb95 63 virtual void OnSetBitmap();
e0aeebed 64 virtual wxSize DoGetBestSize() const;
f6bcfd97 65
c3dfaa10
VZ
66 void Init();
67
738f9e5a
RR
68private:
69 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
151ccd11 70};
43a18898 71
c801d85f 72#endif // __BMPBUTTONH__