]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/bmpbuttn.h
gtk spinctrl code simplification
[wxWidgets.git] / include / wx / gtk / 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
1e6feb95 14// ----------------------------------------------------------------------------
c801d85f 15// wxBitmapButton
1e6feb95 16// ----------------------------------------------------------------------------
c801d85f 17
20123d49 18class WXDLLIMPEXP_CORE wxBitmapButton: public wxBitmapButtonBase
151ccd11 19{
43a18898 20public:
c3dfaa10
VZ
21 wxBitmapButton() { Init(); }
22
1e6feb95
VZ
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)
738f9e5a 31 {
c3dfaa10
VZ
32 Init();
33
738f9e5a
RR
34 Create(parent, id, bitmap, pos, size, style, validator, name);
35 }
c3dfaa10 36
1e6feb95
VZ
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
738f9e5a 46 void SetLabel( const wxString &label );
738f9e5a 47 virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); }
29149a64 48
c3dfaa10
VZ
49 virtual void SetDefault();
50 virtual bool Enable(bool enable = TRUE);
51
20e05ffb
RR
52 // implementation
53 // --------------
29149a64 54
738f9e5a
RR
55 void HasFocus();
56 void NotFocus();
57 void StartSelect();
58 void EndSelect();
29149a64 59
c3dfaa10
VZ
60 bool m_hasFocus:1;
61 bool m_isSelected:1;
29149a64 62
f6bcfd97 63protected:
1e6feb95 64 virtual void OnSetBitmap();
e0aeebed 65 virtual wxSize DoGetBestSize() const;
6f02a879 66 void DoApplyWidgetStyle(GtkRcStyle *style);
f6bcfd97 67
c3dfaa10
VZ
68 void Init();
69
738f9e5a
RR
70private:
71 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
151ccd11 72};
43a18898 73
c801d85f 74#endif // __BMPBUTTONH__