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