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