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