]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
8ef94bfc | 2 | // Name: wx/gtk1/button.h |
c801d85f KB |
3 | // Purpose: |
4 | // Author: Robert Roebling | |
01111366 | 5 | // Copyright: (c) 1998 Robert Roebling |
65571936 | 6 | // Licence: wxWindows licence |
c801d85f KB |
7 | ///////////////////////////////////////////////////////////////////////////// |
8 | ||
c801d85f KB |
9 | #ifndef __GTKBUTTONH__ |
10 | #define __GTKBUTTONH__ | |
11 | ||
c801d85f KB |
12 | #include "wx/defs.h" |
13 | #include "wx/object.h" | |
14 | #include "wx/list.h" | |
c801d85f KB |
15 | |
16 | //----------------------------------------------------------------------------- | |
17 | // wxButton | |
18 | //----------------------------------------------------------------------------- | |
19 | ||
20123d49 | 20 | class WXDLLIMPEXP_CORE wxButton: public wxButtonBase |
c801d85f | 21 | { |
738f9e5a | 22 | public: |
fd0eed64 | 23 | wxButton(); |
5f7bcb48 VS |
24 | wxButton(wxWindow *parent, wxWindowID id, |
25 | const wxString& label = wxEmptyString, | |
6de97a3b RR |
26 | const wxPoint& pos = wxDefaultPosition, |
27 | const wxSize& size = wxDefaultSize, long style = 0, | |
28 | const wxValidator& validator = wxDefaultValidator, | |
29 | const wxString& name = wxButtonNameStr) | |
30 | { | |
401e3b6e | 31 | Create(parent, id, label, pos, size, style, validator, name); |
6de97a3b | 32 | } |
401e3b6e | 33 | |
6b0d8a01 VZ |
34 | virtual ~wxButton(); |
35 | ||
5f7bcb48 VS |
36 | bool Create(wxWindow *parent, wxWindowID id, |
37 | const wxString& label = wxEmptyString, | |
6de97a3b RR |
38 | const wxPoint& pos = wxDefaultPosition, |
39 | const wxSize& size = wxDefaultSize, long style = 0, | |
40 | const wxValidator& validator = wxDefaultValidator, | |
41 | const wxString& name = wxButtonNameStr); | |
6b0d8a01 | 42 | |
94aff5ff | 43 | virtual wxWindow *SetDefault(); |
6b0d8a01 VZ |
44 | virtual void SetLabel( const wxString &label ); |
45 | virtual bool Enable( bool enable = TRUE ); | |
8dbf4589 | 46 | |
20e05ffb RR |
47 | // implementation |
48 | // -------------- | |
6b0d8a01 | 49 | |
f40fdaa3 | 50 | void DoApplyWidgetStyle(GtkRcStyle *style); |
2b5f62a0 | 51 | bool IsOwnGtkWindow( GdkWindow *window ); |
6b0d8a01 | 52 | |
e8e24dfa RD |
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; } | |
8ef94bfc | 56 | |
9d522606 RD |
57 | static wxVisualAttributes |
58 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
59 | ||
db434467 RR |
60 | protected: |
61 | virtual wxSize DoGetBestSize() const; | |
62 | ||
738f9e5a RR |
63 | private: |
64 | DECLARE_DYNAMIC_CLASS(wxButton) | |
c801d85f KB |
65 | }; |
66 | ||
67 | #endif // __GTKBUTTONH__ |