]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/bmpbuttn.h
Fixed to work with the new wxMacControl system.
[wxWidgets.git] / include / wx / gtk1 / bmpbuttn.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
29149a64 2// Name: wx/gtk/bmpbutton.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
dbf858b5 5// Id: $Id$
01111366 6// Copyright: (c) 1998 Robert Roebling
65571936 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __BMPBUTTONH__
12#define __BMPBUTTONH__
13
12028905 14#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
c801d85f
KB
15#pragma interface
16#endif
17
1e6feb95 18// ----------------------------------------------------------------------------
c801d85f 19// wxBitmapButton
1e6feb95 20// ----------------------------------------------------------------------------
c801d85f 21
1e6feb95 22class wxBitmapButton: public wxBitmapButtonBase
151ccd11 23{
43a18898 24public:
c3dfaa10
VZ
25 wxBitmapButton() { Init(); }
26
1e6feb95
VZ
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)
738f9e5a 35 {
c3dfaa10
VZ
36 Init();
37
738f9e5a
RR
38 Create(parent, id, bitmap, pos, size, style, validator, name);
39 }
c3dfaa10 40
1e6feb95
VZ
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
738f9e5a
RR
50 void SetLabel( const wxString &label );
51 wxString GetLabel() const;
52 virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); }
29149a64 53
c3dfaa10
VZ
54 virtual void SetDefault();
55 virtual bool Enable(bool enable = TRUE);
56
20e05ffb
RR
57 // implementation
58 // --------------
29149a64 59
738f9e5a
RR
60 void HasFocus();
61 void NotFocus();
62 void StartSelect();
63 void EndSelect();
f40fdaa3 64 void DoApplyWidgetStyle(GtkRcStyle *style);
29149a64 65
c3dfaa10
VZ
66 bool m_hasFocus:1;
67 bool m_isSelected:1;
29149a64 68
f6bcfd97 69protected:
1e6feb95 70 virtual void OnSetBitmap();
178a1220 71 virtual wxSize DoGetBestSize() const;
f6bcfd97 72
c3dfaa10
VZ
73 void Init();
74
738f9e5a
RR
75private:
76 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
151ccd11 77};
43a18898 78
c801d85f 79#endif // __BMPBUTTONH__