]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
6b0d8a01 | 2 | // Name: wx/gtk/radiobut.h |
c801d85f KB |
3 | // Purpose: |
4 | // Author: Robert Roebling | |
f96aa4d9 RR |
5 | // Id: $Id$ |
6 | // Copyright: (c) 1998 Robert Roebling | |
6b0d8a01 | 7 | // Licence: wxWindows licence |
c801d85f KB |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
10 | ||
11 | #ifndef __GTKRADIOBUTTONH__ | |
12 | #define __GTKRADIOBUTTONH__ | |
13 | ||
12028905 | 14 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
c801d85f KB |
15 | #pragma interface |
16 | #endif | |
17 | ||
6de97a3b RR |
18 | //----------------------------------------------------------------------------- |
19 | // wxRadioButton | |
20 | //----------------------------------------------------------------------------- | |
21 | ||
22 | class wxRadioButton: public wxControl | |
23 | { | |
953704c1 | 24 | public: |
2b4f3c9f VZ |
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 ) | |
2f073eb2 RR |
34 | { |
35 | Create( parent, id, label, pos, size, style, validator, name ); | |
36 | } | |
2b4f3c9f VZ |
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 | ||
2f073eb2 RR |
47 | virtual void SetLabel(const wxString& label); |
48 | virtual void SetValue(bool val); | |
49 | virtual bool GetValue() const; | |
6b0d8a01 | 50 | virtual bool Enable( bool enable = TRUE ); |
2b4f3c9f | 51 | |
9d522606 RD |
52 | static wxVisualAttributes |
53 | GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); | |
54 | ||
2b4f3c9f VZ |
55 | // implementation |
56 | ||
57 | virtual bool IsRadioButton() const { return TRUE; } | |
58 | ||
2f073eb2 RR |
59 | GSList *m_radioButtonGroup; |
60 | void ApplyWidgetStyle(); | |
61 | bool IsOwnGtkWindow( GdkWindow *window ); | |
62 | void OnInternalIdle(); | |
2b4f3c9f | 63 | |
9864c56d | 64 | bool m_blockEvent; |
2b4f3c9f | 65 | |
db434467 RR |
66 | protected: |
67 | virtual wxSize DoGetBestSize() const; | |
68 | ||
2f073eb2 RR |
69 | private: |
70 | DECLARE_DYNAMIC_CLASS(wxRadioButton) | |
6de97a3b | 71 | }; |
c801d85f KB |
72 | |
73 | #endif // __GTKRADIOBUTTONH__ |