]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/button.h
Don't use wxCriticalSection in wxWakeUpPipeMT if wxUSE_THREADS==0.
[wxWidgets.git] / include / wx / gtk1 / button.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/button.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef __GTKBUTTONH__
11 #define __GTKBUTTONH__
12
13 #include "wx/defs.h"
14 #include "wx/object.h"
15 #include "wx/list.h"
16
17 //-----------------------------------------------------------------------------
18 // wxButton
19 //-----------------------------------------------------------------------------
20
21 class WXDLLIMPEXP_CORE wxButton: public wxButtonBase
22 {
23 public:
24 wxButton();
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)
31 {
32 Create(parent, id, label, pos, size, style, validator, name);
33 }
34
35 virtual ~wxButton();
36
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);
43
44 virtual wxWindow *SetDefault();
45 virtual void SetLabel( const wxString &label );
46 virtual bool Enable( bool enable = TRUE );
47
48 // implementation
49 // --------------
50
51 void DoApplyWidgetStyle(GtkRcStyle *style);
52 bool IsOwnGtkWindow( GdkWindow *window );
53
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; }
57
58 static wxVisualAttributes
59 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
60
61 protected:
62 virtual wxSize DoGetBestSize() const;
63
64 private:
65 DECLARE_DYNAMIC_CLASS(wxButton)
66 };
67
68 #endif // __GTKBUTTONH__