]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/button.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/button.h
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef __GTKBUTTONH__
11 #define __GTKBUTTONH__
13 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
18 #include "wx/object.h"
20 #include "wx/control.h"
22 //-----------------------------------------------------------------------------
24 //-----------------------------------------------------------------------------
28 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 extern const wxChar
*wxButtonNameStr
;
34 //-----------------------------------------------------------------------------
36 //-----------------------------------------------------------------------------
38 class wxButton
: public wxButtonBase
42 wxButton(wxWindow
*parent
, wxWindowID id
,
43 const wxString
& label
= wxEmptyString
,
44 const wxPoint
& pos
= wxDefaultPosition
,
45 const wxSize
& size
= wxDefaultSize
, long style
= 0,
46 const wxValidator
& validator
= wxDefaultValidator
,
47 const wxString
& name
= wxButtonNameStr
)
49 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
54 bool Create(wxWindow
*parent
, wxWindowID id
,
55 const wxString
& label
= wxEmptyString
,
56 const wxPoint
& pos
= wxDefaultPosition
,
57 const wxSize
& size
= wxDefaultSize
, long style
= 0,
58 const wxValidator
& validator
= wxDefaultValidator
,
59 const wxString
& name
= wxButtonNameStr
);
61 virtual void SetDefault();
62 virtual void SetLabel( const wxString
&label
);
63 virtual bool Enable( bool enable
= TRUE
);
68 void DoApplyWidgetStyle(GtkRcStyle
*style
);
69 bool IsOwnGtkWindow( GdkWindow
*window
);
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; }
75 static wxVisualAttributes
76 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
79 virtual wxSize
DoGetBestSize() const;
82 DECLARE_DYNAMIC_CLASS(wxButton
)
85 #endif // __GTKBUTTONH__