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