]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/button.h
wx(Choice/List/Note)book controls send CHANG(ED/ING) events in SetSelection.
[wxWidgets.git] / include / wx / gtk / button.h
... / ...
CommitLineData
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 __GTKBUTTONH__
11#define __GTKBUTTONH__
12
13#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
14#pragma interface
15#endif
16
17#include "wx/defs.h"
18#include "wx/object.h"
19#include "wx/list.h"
20#include "wx/control.h"
21
22//-----------------------------------------------------------------------------
23// classes
24//-----------------------------------------------------------------------------
25
26class wxButton;
27
28//-----------------------------------------------------------------------------
29// global data
30//-----------------------------------------------------------------------------
31
32extern const wxChar *wxButtonNameStr;
33
34//-----------------------------------------------------------------------------
35// wxButton
36//-----------------------------------------------------------------------------
37
38class wxButton: public wxButtonBase
39{
40public:
41 wxButton();
42 wxButton(wxWindow *parent, wxWindowID id,
43 const wxString& label = wxEmptyString,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize, long style = 0,
46 const wxValidator& validator = wxDefaultValidator,
47 const wxString& name = wxButtonNameStr)
48 {
49 Create(parent, id, label, pos, size, style, validator, name);
50 }
51
52 virtual ~wxButton();
53
54 bool Create(wxWindow *parent, wxWindowID id,
55 const wxString& label = wxEmptyString,
56 const wxPoint& pos = wxDefaultPosition,
57 const wxSize& size = wxDefaultSize, long style = 0,
58 const wxValidator& validator = wxDefaultValidator,
59 const wxString& name = wxButtonNameStr);
60
61 virtual void SetDefault();
62 virtual void SetLabel( const wxString &label );
63 virtual bool Enable( bool enable = TRUE );
64
65 // implementation
66 // --------------
67
68 void DoApplyWidgetStyle(GtkRcStyle *style);
69 bool IsOwnGtkWindow( GdkWindow *window );
70
71 // Since this wxButton doesn't derive from wxButtonBase (why?) we need
72 // to override this here too...
73 virtual bool ShouldInheritColours() const { return false; }
74
75 static wxVisualAttributes
76 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
77
78protected:
79 virtual wxSize DoGetBestSize() const;
80
81private:
82 DECLARE_DYNAMIC_CLASS(wxButton)
83};
84
85#endif // __GTKBUTTONH__