]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/bmpbuttn.h
some changes to make wxHtmlHelpController easier to subclass
[wxWidgets.git] / include / wx / gtk / bmpbuttn.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: bmpbutton.h
3// Purpose:
4// Author: Robert Roebling
dbf858b5 5// Id: $Id$
01111366 6// Copyright: (c) 1998 Robert Roebling
c801d85f
KB
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10
11#ifndef __BMPBUTTONH__
12#define __BMPBUTTONH__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include "wx/defs.h"
dcf924a3
RR
19
20#if wxUSE_BMPBUTTON
21
c801d85f
KB
22#include "wx/object.h"
23#include "wx/list.h"
24#include "wx/control.h"
ac57418f 25#include "wx/bitmap.h"
42b4e99e 26#include "wx/button.h"
c801d85f
KB
27
28//-----------------------------------------------------------------------------
29// classes
30//-----------------------------------------------------------------------------
31
32class wxBitmapButton;
33
151ccd11
RR
34//-----------------------------------------------------------------------------
35// global data
36//-----------------------------------------------------------------------------
37
c980c992 38extern const wxChar *wxButtonNameStr;
151ccd11 39
c801d85f
KB
40//-----------------------------------------------------------------------------
41// wxBitmapButton
42//-----------------------------------------------------------------------------
43
42b4e99e 44class wxBitmapButton: public wxButton
151ccd11
RR
45{
46 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
47
43a18898
RR
48public:
49 wxBitmapButton();
50 inline wxBitmapButton( wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
51 const wxPoint& pos = wxDefaultPosition,
52 const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
53 const wxValidator& validator = wxDefaultValidator,
54 const wxString& name = wxButtonNameStr )
55 {
6de97a3b 56 Create(parent, id, bitmap, pos, size, style, validator, name);
43a18898
RR
57 }
58 bool Create( wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
59 const wxPoint& pos = wxDefaultPosition,
60 const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
61 const wxValidator& validator = wxDefaultValidator,
62 const wxString& name = wxButtonNameStr);
42b4e99e 63 virtual void SetDefault();
151ccd11 64
43a18898
RR
65 void SetLabel( const wxString &label );
66 wxString GetLabel() const;
67 virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); }
58614078 68
43a18898
RR
69 wxBitmap& GetBitmapDisabled() const { return (wxBitmap&) m_disabled; }
70 wxBitmap& GetBitmapFocus() const { return (wxBitmap&) m_focus; }
71 wxBitmap& GetBitmapLabel() const { return (wxBitmap&) m_bitmap; }
72 wxBitmap& GetBitmapSelected() const { return (wxBitmap&) m_selected; }
73
74 void SetBitmapDisabled( const wxBitmap& bitmap );
75 void SetBitmapFocus( const wxBitmap& bitmap );
76 void SetBitmapLabel( const wxBitmap& bitmap );
77 void SetBitmapSelected( const wxBitmap& bitmap );
151ccd11 78
c693edf3 79 virtual bool Enable(bool enable);
43a18898
RR
80
81// implementation
82
83 void HasFocus();
84 void NotFocus();
85 void StartSelect();
86 void EndSelect();
87 void SetBitmap();
88 void ApplyWidgetStyle();
89
90 bool m_hasFocus;
91 bool m_isSelected;
92 wxBitmap m_bitmap;
93 wxBitmap m_disabled;
94 wxBitmap m_focus;
95 wxBitmap m_selected;
151ccd11 96};
43a18898 97
dcf924a3
RR
98#endif
99
c801d85f 100#endif // __BMPBUTTONH__