1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/button.h
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef _WX_GTK_BUTTON_H_
11 #define _WX_GTK_BUTTON_H_
13 //-----------------------------------------------------------------------------
15 //-----------------------------------------------------------------------------
17 class WXDLLIMPEXP_CORE wxButton
: public wxButtonBase
21 wxButton(wxWindow
*parent
, wxWindowID id
,
22 const wxString
& label
= wxEmptyString
,
23 const wxPoint
& pos
= wxDefaultPosition
,
24 const wxSize
& size
= wxDefaultSize
, long style
= 0,
25 const wxValidator
& validator
= wxDefaultValidator
,
26 const wxString
& name
= wxButtonNameStr
)
28 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
33 bool Create(wxWindow
*parent
, wxWindowID id
,
34 const wxString
& label
= wxEmptyString
,
35 const wxPoint
& pos
= wxDefaultPosition
,
36 const wxSize
& size
= wxDefaultSize
, long style
= 0,
37 const wxValidator
& validator
= wxDefaultValidator
,
38 const wxString
& name
= wxButtonNameStr
);
40 virtual void SetDefault();
41 virtual void SetLabel( const wxString
&label
);
42 virtual bool Enable( bool enable
= TRUE
);
47 // Since this wxButton doesn't derive from wxButtonBase (why?) we need
48 // to override this here too...
49 virtual bool ShouldInheritColours() const { return false; }
51 static wxVisualAttributes
52 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
54 // helper to allow access to protected member from GTK callback
55 void MoveWindow(int x
, int y
, int width
, int height
) { DoMoveWindow(x
, y
, width
, height
); }
58 virtual wxSize
DoGetBestSize() const;
59 virtual void DoApplyWidgetStyle(GtkRcStyle
*style
);
61 virtual GdkWindow
*GTKGetWindow(wxArrayGdkWindows
& windows
) const;
64 DECLARE_DYNAMIC_CLASS(wxButton
)
67 #endif // _WX_GTK_BUTTON_H_