]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/button.h
removed operator>>(istream&, wxString&) -- it's better to not have it at all than...
[wxWidgets.git] / include / wx / gtk / button.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
6b0d8a01 2// Name: wx/gtk/button.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
dbf858b5 5// Id: $Id$
01111366 6// Copyright: (c) 1998 Robert Roebling
65571936 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
0416c418
PC
10#ifndef _WX_GTK_BUTTON_H_
11#define _WX_GTK_BUTTON_H_
c801d85f
KB
12
13//-----------------------------------------------------------------------------
14// wxButton
15//-----------------------------------------------------------------------------
16
20123d49 17class WXDLLIMPEXP_CORE wxButton: public wxButtonBase
c801d85f 18{
738f9e5a 19public:
fd0eed64 20 wxButton();
5f7bcb48
VS
21 wxButton(wxWindow *parent, wxWindowID id,
22 const wxString& label = wxEmptyString,
6de97a3b
RR
23 const wxPoint& pos = wxDefaultPosition,
24 const wxSize& size = wxDefaultSize, long style = 0,
25 const wxValidator& validator = wxDefaultValidator,
26 const wxString& name = wxButtonNameStr)
27 {
401e3b6e 28 Create(parent, id, label, pos, size, style, validator, name);
6de97a3b 29 }
401e3b6e 30
6b0d8a01
VZ
31 virtual ~wxButton();
32
5f7bcb48
VS
33 bool Create(wxWindow *parent, wxWindowID id,
34 const wxString& label = wxEmptyString,
6de97a3b
RR
35 const wxPoint& pos = wxDefaultPosition,
36 const wxSize& size = wxDefaultSize, long style = 0,
37 const wxValidator& validator = wxDefaultValidator,
38 const wxString& name = wxButtonNameStr);
6b0d8a01 39
42b4e99e 40 virtual void SetDefault();
6b0d8a01
VZ
41 virtual void SetLabel( const wxString &label );
42 virtual bool Enable( bool enable = TRUE );
8dbf4589 43
20e05ffb
RR
44 // implementation
45 // --------------
6b0d8a01 46
e8e24dfa
RD
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
9d522606
RD
51 static wxVisualAttributes
52 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
53
6f02a879
VZ
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
db434467
RR
57protected:
58 virtual wxSize DoGetBestSize() const;
ef5c70f9
VZ
59 virtual void DoApplyWidgetStyle(GtkRcStyle *style);
60
61 virtual GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const;
db434467 62
738f9e5a
RR
63private:
64 DECLARE_DYNAMIC_CLASS(wxButton)
c801d85f
KB
65};
66
0416c418 67#endif // _WX_GTK_BUTTON_H_