]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/radiobut.h
Upported combobox changes and another fix.
[wxWidgets.git] / include / wx / gtk / radiobut.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/radiobut.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10
11 #ifndef __GTKRADIOBUTTONH__
12 #define __GTKRADIOBUTTONH__
13
14 #if defined(__GNUG__) && !defined(__APPLE__)
15 #pragma interface
16 #endif
17
18 //-----------------------------------------------------------------------------
19 // wxRadioButton
20 //-----------------------------------------------------------------------------
21
22 class wxRadioButton: public wxControl
23 {
24 public:
25 wxRadioButton() { }
26 wxRadioButton( wxWindow *parent,
27 wxWindowID id,
28 const wxString& label,
29 const wxPoint& pos = wxDefaultPosition,
30 const wxSize& size = wxDefaultSize,
31 long style = 0,
32 const wxValidator& validator = wxDefaultValidator,
33 const wxString& name = wxRadioButtonNameStr )
34 {
35 Create( parent, id, label, pos, size, style, validator, name );
36 }
37
38 bool Create( wxWindow *parent,
39 wxWindowID id,
40 const wxString& label,
41 const wxPoint& pos = wxDefaultPosition,
42 const wxSize& size = wxDefaultSize,
43 long style = 0,
44 const wxValidator& validator = wxDefaultValidator,
45 const wxString& name = wxRadioButtonNameStr );
46
47 virtual void SetLabel(const wxString& label);
48 virtual void SetValue(bool val);
49 virtual bool GetValue() const;
50 virtual bool Enable( bool enable = TRUE );
51
52 // implementation
53
54 virtual bool IsRadioButton() const { return TRUE; }
55
56 GSList *m_radioButtonGroup;
57 void ApplyWidgetStyle();
58 bool IsOwnGtkWindow( GdkWindow *window );
59 void OnInternalIdle();
60
61 bool m_blockEvent;
62
63 protected:
64 virtual wxSize DoGetBestSize() const;
65
66 private:
67 DECLARE_DYNAMIC_CLASS(wxRadioButton)
68 };
69
70 #endif // __GTKRADIOBUTTONH__