]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/bmpbuttn.h
added GtkUpdateScrollbar; folded some code duplicated for horz/vert orientations...
[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
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
RR
46 void SetLabel( const wxString &label );
47 wxString GetLabel() const;
48 virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); }
29149a64 49
c3dfaa10
VZ
50 virtual void SetDefault();
51 virtual bool Enable(bool enable = TRUE);
52
20e05ffb
RR
53 // implementation
54 // --------------
29149a64 55
738f9e5a
RR
56 void HasFocus();
57 void NotFocus();
58 void StartSelect();
59 void EndSelect();
f40fdaa3 60 void DoApplyWidgetStyle(GtkRcStyle *style);
29149a64 61
c3dfaa10
VZ
62 bool m_hasFocus:1;
63 bool m_isSelected:1;
29149a64 64
f6bcfd97 65protected:
1e6feb95 66 virtual void OnSetBitmap();
e0aeebed 67 virtual wxSize DoGetBestSize() const;
f6bcfd97 68
c3dfaa10
VZ
69 void Init();
70
738f9e5a
RR
71private:
72 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
151ccd11 73};
43a18898 74
c801d85f 75#endif // __BMPBUTTONH__