1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface defs for wxRadioButton and wxRadioBox
7 // Created: 10-June-1998
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
16 //---------------------------------------------------------------------------
18 MAKE_CONST_WXSTRING(RadioBoxNameStr);
19 MAKE_CONST_WXSTRING(RadioButtonNameStr);
21 //---------------------------------------------------------------------------
24 class wxRadioBox : public wxControl
27 %addtofunc wxRadioBox "self._setOORInfo(self)"
28 %addtofunc wxRadioBox() ""
30 wxRadioBox(wxWindow* parent, wxWindowID id,
31 const wxString& label,
32 const wxPoint& point = wxDefaultPosition,
33 const wxSize& size = wxDefaultSize,
34 int choices = 0, wxString* choices_array = NULL,
35 int majorDimension = 0,
36 long style = wxRA_HORIZONTAL,
37 const wxValidator& validator = wxDefaultValidator,
38 const wxString& name = wxPyRadioBoxNameStr);
39 %name(PreRadioBox)wxRadioBox();
41 bool Create(wxWindow* parent, wxWindowID id,
42 const wxString& label,
43 const wxPoint& point = wxDefaultPosition,
44 const wxSize& size = wxDefaultSize,
45 int choices = 0, wxString* choices_array = NULL,
46 int majorDimension = 0,
47 long style = wxRA_HORIZONTAL,
48 const wxValidator& validator = wxDefaultValidator,
49 const wxString& name = wxPyRadioBoxNameStr);
51 virtual void SetSelection(int n);
52 virtual int GetSelection() const;
54 virtual wxString GetStringSelection() const;
55 virtual bool SetStringSelection(const wxString& s);
58 virtual int GetCount() const;
59 virtual int FindString(const wxString& s) const;
61 virtual wxString GetString(int n) const;
62 virtual void SetString(int n, const wxString& label);
63 %pythoncode { GetItemLabel = GetString };
64 %pythoncode { SetItemLabel = SetString };
66 // change the individual radio button state
67 %name(EnableItem) virtual void Enable(int n, bool enable = True);
68 %name(ShowItem) virtual void Show(int n, bool show = True);
72 virtual int GetColumnCount() const;
73 virtual int GetRowCount() const;
75 // return the item above/below/to the left/right of the given one
76 int GetNextItem(int item, wxDirection dir, long style) const;
79 int GetColumnCount() const { return -1; }
80 int GetRowCount() const { return -1; }
81 int GetNextItem(int item, wxDirection dir, long style) const { return -1; }
88 //---------------------------------------------------------------------------
91 class wxRadioButton : public wxControl
94 %addtofunc wxRadioButton "self._setOORInfo(self)"
95 %addtofunc wxRadioButton() ""
97 wxRadioButton(wxWindow* parent, wxWindowID id,
98 const wxString& label,
99 const wxPoint& pos = wxDefaultPosition,
100 const wxSize& size = wxDefaultSize,
102 const wxValidator& validator = wxDefaultValidator,
103 const wxString& name = wxPyRadioButtonNameStr);
104 %name(PreRadioButton)wxRadioButton();
106 bool Create(wxWindow* parent, wxWindowID id,
107 const wxString& label,
108 const wxPoint& pos = wxDefaultPosition,
109 const wxSize& size = wxDefaultSize,
111 const wxValidator& validator = wxDefaultValidator,
112 const wxString& name = wxPyRadioButtonNameStr);
115 void SetValue(bool value);
118 //---------------------------------------------------------------------------
119 //---------------------------------------------------------------------------