]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/button.h
build fix for wxGTK/Univ build (#9706)
[wxWidgets.git] / include / wx / gtk1 / button.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
8ef94bfc 2// Name: wx/gtk1/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
c801d85f
KB
13#include "wx/defs.h"
14#include "wx/object.h"
15#include "wx/list.h"
c801d85f
KB
16
17//-----------------------------------------------------------------------------
18// wxButton
19//-----------------------------------------------------------------------------
20
20123d49 21class WXDLLIMPEXP_CORE wxButton: public wxButtonBase
c801d85f 22{
738f9e5a 23public:
fd0eed64 24 wxButton();
5f7bcb48
VS
25 wxButton(wxWindow *parent, wxWindowID id,
26 const wxString& label = wxEmptyString,
6de97a3b
RR
27 const wxPoint& pos = wxDefaultPosition,
28 const wxSize& size = wxDefaultSize, long style = 0,
29 const wxValidator& validator = wxDefaultValidator,
30 const wxString& name = wxButtonNameStr)
31 {
401e3b6e 32 Create(parent, id, label, pos, size, style, validator, name);
6de97a3b 33 }
401e3b6e 34
6b0d8a01
VZ
35 virtual ~wxButton();
36
5f7bcb48
VS
37 bool Create(wxWindow *parent, wxWindowID id,
38 const wxString& label = wxEmptyString,
6de97a3b
RR
39 const wxPoint& pos = wxDefaultPosition,
40 const wxSize& size = wxDefaultSize, long style = 0,
41 const wxValidator& validator = wxDefaultValidator,
42 const wxString& name = wxButtonNameStr);
6b0d8a01 43
94aff5ff 44 virtual wxWindow *SetDefault();
6b0d8a01
VZ
45 virtual void SetLabel( const wxString &label );
46 virtual bool Enable( bool enable = TRUE );
8dbf4589 47
20e05ffb
RR
48 // implementation
49 // --------------
6b0d8a01 50
f40fdaa3 51 void DoApplyWidgetStyle(GtkRcStyle *style);
2b5f62a0 52 bool IsOwnGtkWindow( GdkWindow *window );
6b0d8a01 53
e8e24dfa
RD
54 // Since this wxButton doesn't derive from wxButtonBase (why?) we need
55 // to override this here too...
56 virtual bool ShouldInheritColours() const { return false; }
8ef94bfc 57
9d522606
RD
58 static wxVisualAttributes
59 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
60
db434467
RR
61protected:
62 virtual wxSize DoGetBestSize() const;
63
738f9e5a
RR
64private:
65 DECLARE_DYNAMIC_CLASS(wxButton)
c801d85f
KB
66};
67
68#endif // __GTKBUTTONH__