]> git.saurik.com Git - wxWidgets.git/blame - include/wx/motif/radiobut.h
Keep wxPalmOS buildable after changes in wxConvAuto.
[wxWidgets.git] / include / wx / motif / radiobut.h
CommitLineData
9b6dbb09
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: radiobut.h
3// Purpose: wxRadioButton class
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
8// Copyright: (c) Julian Smart
65571936 9// Licence: wxWindows licence
9b6dbb09
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_RADIOBUT_H_
13#define _WX_RADIOBUT_H_
14
9b6dbb09
JS
15class WXDLLEXPORT wxRadioButton: public wxControl
16{
a4294b78 17 DECLARE_DYNAMIC_CLASS(wxRadioButton)
a4294b78
JS
18public:
19 wxRadioButton();
f37907ff
MB
20 ~wxRadioButton() { RemoveFromCycle(); }
21
a4294b78 22 inline wxRadioButton(wxWindow *parent, wxWindowID id,
83df96d6
JS
23 const wxString& label,
24 const wxPoint& pos = wxDefaultPosition,
25 const wxSize& size = wxDefaultSize, long style = 0,
26 const wxValidator& validator = wxDefaultValidator,
27 const wxString& name = wxRadioButtonNameStr)
a4294b78
JS
28 {
29 Create(parent, id, label, pos, size, style, validator, name);
30 }
83df96d6 31
a4294b78 32 bool Create(wxWindow *parent, wxWindowID id,
83df96d6
JS
33 const wxString& label,
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize, long style = 0,
36 const wxValidator& validator = wxDefaultValidator,
37 const wxString& name = wxRadioButtonNameStr);
38
a4294b78
JS
39 virtual void SetValue(bool val);
40 virtual bool GetValue() const ;
83df96d6 41
a4294b78 42 void Command(wxCommandEvent& event);
83df96d6
JS
43
44 // Implementation
0d57be45 45 virtual void ChangeBackgroundColour();
f37907ff
MB
46
47 // *this function is an implementation detail*
f96b10c2 48 // clears the selection in the radiobuttons in the cycle
f37907ff
MB
49 // and returns the old selection (if any)
50 wxRadioButton* ClearSelections();
51private:
52 wxRadioButton* AddInCycle(wxRadioButton* cycle);
53 void RemoveFromCycle();
54 wxRadioButton* NextInCycle() { return m_cycle; }
55
56 wxRadioButton *m_cycle;
9b6dbb09
JS
57};
58
9b6dbb09 59#endif
83df96d6 60// _WX_RADIOBUT_H_