]>
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 wxControl
42 wxButton(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
43 const wxPoint
& pos
= wxDefaultPosition
,
44 const wxSize
& size
= wxDefaultSize
, long style
= 0,
45 const wxValidator
& validator
= wxDefaultValidator
,
46 const wxString
& name
= wxButtonNameStr
)
48 Create(parent
, id
, label
, pos
, size
, style
, validator
, name
);
52 bool Create(wxWindow
*parent
, wxWindowID id
, const wxString
& label
,
53 const wxPoint
& pos
= wxDefaultPosition
,
54 const wxSize
& size
= wxDefaultSize
, long style
= 0,
55 const wxValidator
& validator
= wxDefaultValidator
,
56 const wxString
& name
= wxButtonNameStr
);
58 virtual void SetDefault();
59 virtual void SetLabel( const wxString
&label
);
60 virtual bool Enable( bool enable
= TRUE
);
62 static wxSize
GetDefaultSize();
67 void DoApplyWidgetStyle(GtkRcStyle
*style
);
68 bool IsOwnGtkWindow( GdkWindow
*window
);
70 // Since this wxButton doesn't derive from wxButtonBase (why?) we need
71 // to override this here too...
72 virtual bool ShouldInheritColours() const { return false; }
74 static wxVisualAttributes
75 GetClassDefaultAttributes(wxWindowVariant variant
= wxWINDOW_VARIANT_NORMAL
);
78 virtual wxSize
DoGetBestSize() const;
81 DECLARE_DYNAMIC_CLASS(wxButton
)
84 #endif // __GTKBUTTONH__