]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/button.h
Only account for WM frame extents in tlw size if WM supports _NET_FRAME_EXTENTS....
[wxWidgets.git] / include / wx / gtk / button.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/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 _WX_GTK_BUTTON_H_
11 #define _WX_GTK_BUTTON_H_
12
13 //-----------------------------------------------------------------------------
14 // wxButton
15 //-----------------------------------------------------------------------------
16
17 class WXDLLIMPEXP_CORE wxButton: public wxButtonBase
18 {
19 public:
20 wxButton();
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)
27 {
28 Create(parent, id, label, pos, size, style, validator, name);
29 }
30
31 virtual ~wxButton();
32
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);
39
40 virtual wxWindow *SetDefault();
41 virtual void SetLabel( const wxString &label );
42 virtual bool Enable( bool enable = TRUE );
43
44 // implementation
45 // --------------
46
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; }
50
51 static wxVisualAttributes
52 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
53
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); }
56
57 protected:
58 virtual wxSize DoGetBestSize() const;
59 virtual void DoApplyWidgetStyle(GtkRcStyle *style);
60
61 virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
62
63 private:
64 DECLARE_DYNAMIC_CLASS(wxButton)
65 };
66
67 #endif // _WX_GTK_BUTTON_H_