]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/bmpbuttn.h
*** empty log message ***
[wxWidgets.git] / include / wx / gtk1 / 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"
c801d85f
KB
26
27//-----------------------------------------------------------------------------
28// classes
29//-----------------------------------------------------------------------------
30
31class wxBitmapButton;
32
151ccd11
RR
33//-----------------------------------------------------------------------------
34// global data
35//-----------------------------------------------------------------------------
36
c980c992 37extern const wxChar *wxButtonNameStr;
151ccd11 38
c801d85f
KB
39//-----------------------------------------------------------------------------
40// wxBitmapButton
41//-----------------------------------------------------------------------------
42
151ccd11
RR
43class wxBitmapButton: public wxControl
44{
45 DECLARE_DYNAMIC_CLASS(wxBitmapButton)
46
43a18898
RR
47public:
48 wxBitmapButton();
49 inline wxBitmapButton( wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
50 const wxPoint& pos = wxDefaultPosition,
51 const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
52 const wxValidator& validator = wxDefaultValidator,
53 const wxString& name = wxButtonNameStr )
54 {
6de97a3b 55 Create(parent, id, bitmap, pos, size, style, validator, name);
43a18898
RR
56 }
57 bool Create( wxWindow *parent, wxWindowID id, const wxBitmap& bitmap,
58 const wxPoint& pos = wxDefaultPosition,
59 const wxSize& size = wxDefaultSize, long style = wxBU_AUTODRAW,
60 const wxValidator& validator = wxDefaultValidator,
61 const wxString& name = wxButtonNameStr);
62 void SetDefault();
151ccd11 63
43a18898
RR
64 void SetLabel( const wxString &label );
65 wxString GetLabel() const;
66 virtual void SetLabel( const wxBitmap& bitmap ) { SetBitmapLabel(bitmap); }
58614078 67
43a18898
RR
68 wxBitmap& GetBitmapDisabled() const { return (wxBitmap&) m_disabled; }
69 wxBitmap& GetBitmapFocus() const { return (wxBitmap&) m_focus; }
70 wxBitmap& GetBitmapLabel() const { return (wxBitmap&) m_bitmap; }
71 wxBitmap& GetBitmapSelected() const { return (wxBitmap&) m_selected; }
72
73 void SetBitmapDisabled( const wxBitmap& bitmap );
74 void SetBitmapFocus( const wxBitmap& bitmap );
75 void SetBitmapLabel( const wxBitmap& bitmap );
76 void SetBitmapSelected( const wxBitmap& bitmap );
151ccd11 77
c693edf3 78 virtual bool Enable(bool enable);
43a18898
RR
79
80// implementation
81
82 void HasFocus();
83 void NotFocus();
84 void StartSelect();
85 void EndSelect();
86 void SetBitmap();
87 void ApplyWidgetStyle();
88
89 bool m_hasFocus;
90 bool m_isSelected;
91 wxBitmap m_bitmap;
92 wxBitmap m_disabled;
93 wxBitmap m_focus;
94 wxBitmap m_selected;
151ccd11 95};
43a18898 96
dcf924a3
RR
97#endif
98
c801d85f 99#endif // __BMPBUTTONH__