1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/button.h
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
10 #define __GTKBUTTONH__
13 #include "wx/object.h"
16 //-----------------------------------------------------------------------------
18 //-----------------------------------------------------------------------------
20 class WXDLLIMPEXP_CORE wxButton
: public wxButtonBase
24 wxButton(wxWindow
*parent
, wxWindowID id
,
25 const wxString
& label
= wxEmptyString
,
26 const wxPoint
& pos
= wxDefaultPosition
,
27 const wxSize
& size
= wxDefaultSize
, long style
= 0,
28 const wxValidator
& validator
= wxDefaultValidator
,
29 const wxString
& name
= wxButtonNameStr
)
31 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
36 bool Create(wxWindow
*parent
, wxWindowID id
,
37 const wxString
& label
= wxEmptyString
,
38 const wxPoint
& pos
= wxDefaultPosition
,
39 const wxSize
& size
= wxDefaultSize
, long style
= 0,
40 const wxValidator
& validator
= wxDefaultValidator
,
41 const wxString
& name
= wxButtonNameStr
);
43 virtual wxWindow
*SetDefault();
44 virtual void SetLabel( const wxString
&label
);
45 virtual bool Enable( bool enable
= TRUE
);
50 void DoApplyWidgetStyle(GtkRcStyle
*style
);
51 bool IsOwnGtkWindow( GdkWindow
*window
);
53 // Since this wxButton doesn't derive from wxButtonBase (why?) we need
54 // to override this here too...
55 virtual bool ShouldInheritColours() const { return false; }
57 static wxVisualAttributes
58 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
61 virtual wxSize
DoGetBestSize() const;
64 DECLARE_DYNAMIC_CLASS(wxButton
)
67 #endif // __GTKBUTTONH__