]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/button.h
wxUSE_BUTTONBAR removed.
[wxWidgets.git] / include / wx / gtk / 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
38class wxButton: public wxControl
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 {
48 Create(parent, id, label, pos, size, style, validator, name);
49 }
6b0d8a01
VZ
50 virtual ~wxButton();
51
6de97a3b
RR
52 bool Create(wxWindow *parent, wxWindowID id, const wxString& label,
53 const wxPoint& pos = wxDefaultPosition,
54 const wxSize& size = wxDefaultSize, long style = 0,
55 const wxValidator& validator = wxDefaultValidator,
56 const wxString& name = wxButtonNameStr);
6b0d8a01 57
42b4e99e 58 virtual void SetDefault();
6b0d8a01
VZ
59 virtual void SetLabel( const wxString &label );
60 virtual bool Enable( bool enable = TRUE );
8dbf4589
RR
61
62 static wxSize GetDefaultSize();
6b0d8a01 63
20e05ffb
RR
64 // implementation
65 // --------------
6b0d8a01 66
f40fdaa3 67 void DoApplyWidgetStyle(GtkRcStyle *style);
2b5f62a0 68 bool IsOwnGtkWindow( GdkWindow *window );
6b0d8a01 69
e8e24dfa
RD
70 // Since this wxButton doesn't derive from wxButtonBase (why?) we need
71 // to override this here too...
72 virtual bool ShouldInheritColours() const { return false; }
73
9d522606
RD
74 static wxVisualAttributes
75 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
76
db434467
RR
77protected:
78 virtual wxSize DoGetBestSize() const;
79
738f9e5a
RR
80private:
81 DECLARE_DYNAMIC_CLASS(wxButton)
c801d85f
KB
82};
83
84#endif // __GTKBUTTONH__