]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/button.h
fixed wxImage->wxBitmap conversion for images with alpha channel
[wxWidgets.git] / include / wx / gtk1 / button.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
6b0d8a01 2// Name: wx/gtk/button.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
c801d85f
KB
10#ifndef __GTKBUTTONH__
11#define __GTKBUTTONH__
12
12028905 13#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
c801d85f
KB
14#pragma interface
15#endif
16
17#include "wx/defs.h"
18#include "wx/object.h"
19#include "wx/list.h"
20#include "wx/control.h"
21
22//-----------------------------------------------------------------------------
23// classes
24//-----------------------------------------------------------------------------
25
26class wxButton;
27
28//-----------------------------------------------------------------------------
29// global data
30//-----------------------------------------------------------------------------
31
c980c992 32extern const wxChar *wxButtonNameStr;
c801d85f
KB
33
34//-----------------------------------------------------------------------------
35// wxButton
36//-----------------------------------------------------------------------------
37
401e3b6e 38class wxButton: public wxButtonBase
c801d85f 39{
738f9e5a 40public:
fd0eed64 41 wxButton();
6b0d8a01 42 wxButton(wxWindow *parent, wxWindowID id, const wxString& label,
6de97a3b
RR
43 const wxPoint& pos = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize, long style = 0,
45 const wxValidator& validator = wxDefaultValidator,
46 const wxString& name = wxButtonNameStr)
47 {
401e3b6e 48 Create(parent, id, label, pos, size, style, validator, name);
6de97a3b 49 }
401e3b6e
VS
50
51 wxButton(wxWindow *parent, wxWindowID id, wxStockItemID stock,
52 const wxString& descriptiveLabel = wxEmptyString,
53 const wxPoint& pos = wxDefaultPosition,
54 long style = 0,
55 const wxValidator& validator = wxDefaultValidator,
56 const wxString& name = wxButtonNameStr)
57 {
58 Create(parent, id, stock, descriptiveLabel, pos, style, validator, name);
59 }
60
6b0d8a01
VZ
61 virtual ~wxButton();
62
6de97a3b
RR
63 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
64 const wxPoint& pos = wxDefaultPosition,
65 const wxSize& size = wxDefaultSize, long style = 0,
66 const wxValidator& validator = wxDefaultValidator,
67 const wxString& name = wxButtonNameStr);
401e3b6e
VS
68
69 bool Create(wxWindow *parent, wxWindowID id, wxStockItemID stock,
70 const wxString& descriptiveLabel = wxEmptyString,
71 const wxPoint& pos = wxDefaultPosition,
72 long style = 0,
73 const wxValidator& validator = wxDefaultValidator,
74 const wxString& name = wxButtonNameStr);
6b0d8a01 75
42b4e99e 76 virtual void SetDefault();
6b0d8a01
VZ
77 virtual void SetLabel( const wxString &label );
78 virtual bool Enable( bool enable = TRUE );
8dbf4589 79
20e05ffb
RR
80 // implementation
81 // --------------
6b0d8a01 82
f40fdaa3 83 void DoApplyWidgetStyle(GtkRcStyle *style);
2b5f62a0 84 bool IsOwnGtkWindow( GdkWindow *window );
6b0d8a01 85
e8e24dfa
RD
86 // Since this wxButton doesn't derive from wxButtonBase (why?) we need
87 // to override this here too...
88 virtual bool ShouldInheritColours() const { return false; }
89
9d522606
RD
90 static wxVisualAttributes
91 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
92
db434467
RR
93protected:
94 virtual wxSize DoGetBestSize() const;
95
738f9e5a
RR
96private:
97 DECLARE_DYNAMIC_CLASS(wxButton)
c801d85f
KB
98};
99
100#endif // __GTKBUTTONH__