1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/button.h
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef __GTKBUTTONH__
11 #define __GTKBUTTONH__
14 #include "wx/object.h"
17 //-----------------------------------------------------------------------------
19 //-----------------------------------------------------------------------------
21 class WXDLLIMPEXP_CORE wxButton
: public wxButtonBase
25 wxButton(wxWindow
*parent
, wxWindowID id
,
26 const wxString
& label
= wxEmptyString
,
27 const wxPoint
& pos
= wxDefaultPosition
,
28 const wxSize
& size
= wxDefaultSize
, long style
= 0,
29 const wxValidator
& validator
= wxDefaultValidator
,
30 const wxString
& name
= wxButtonNameStr
)
32 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
37 bool Create(wxWindow
*parent
, wxWindowID id
,
38 const wxString
& label
= wxEmptyString
,
39 const wxPoint
& pos
= wxDefaultPosition
,
40 const wxSize
& size
= wxDefaultSize
, long style
= 0,
41 const wxValidator
& validator
= wxDefaultValidator
,
42 const wxString
& name
= wxButtonNameStr
);
44 virtual wxWindow
*SetDefault();
45 virtual void SetLabel( const wxString
&label
);
46 virtual bool Enable( bool enable
= TRUE
);
51 void DoApplyWidgetStyle(GtkRcStyle
*style
);
52 bool IsOwnGtkWindow( GdkWindow
*window
);
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; }
58 static wxVisualAttributes
59 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
62 virtual wxSize
DoGetBestSize() const;
65 DECLARE_DYNAMIC_CLASS(wxButton
)
68 #endif // __GTKBUTTONH__