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 //---------------------------------------------------------------------------
19 DECLARE_DEF_STRING(RadioBoxNameStr);
20 DECLARE_DEF_STRING(RadioButtonNameStr);
23 //---------------------------------------------------------------------------
26 class wxRadioBox : public wxControl
29 %addtofunc wxRadioBox "self._setOORInfo(self)"
30 %addtofunc wxRadioBox() ""
32 wxRadioBox(wxWindow* parent, wxWindowID id,
33 const wxString& label,
34 const wxPoint& point = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize,
36 int choices = 0, wxString* choices_array = NULL,
37 int majorDimension = 0,
38 long style = wxRA_HORIZONTAL,
39 const wxValidator& validator = wxDefaultValidator,
40 const wxString& name = wxPyRadioBoxNameStr);
41 %name(PreRadioBox)wxRadioBox();
43 bool Create(wxWindow* parent, wxWindowID id,
44 const wxString& label,
45 const wxPoint& point = wxDefaultPosition,
46 const wxSize& size = wxDefaultSize,
47 int choices = 0, wxString* choices_array = NULL,
48 int majorDimension = 0,
49 long style = wxRA_HORIZONTAL,
50 const wxValidator& validator = wxDefaultValidator,
51 const wxString& name = wxPyRadioBoxNameStr);
53 virtual void SetSelection(int n);
54 virtual int GetSelection() const;
56 virtual wxString GetStringSelection() const;
57 virtual bool SetStringSelection(const wxString& s);
60 virtual int GetCount() const;
61 virtual int FindString(const wxString& s) const;
63 virtual wxString GetString(int n) const;
64 virtual void SetString(int n, const wxString& label);
65 %pythoncode { GetItemLabel = GetString };
66 %pythoncode { SetItemLabel = SetString };
68 // change the individual radio button state
69 %name(EnableItem) virtual void Enable(int n, bool enable = True);
70 %name(ShowItem) virtual void Show(int n, bool show = True);
74 virtual int GetColumnCount() const;
75 virtual int GetRowCount() const;
77 // return the item above/below/to the left/right of the given one
78 int GetNextItem(int item, wxDirection dir, long style) const;
81 int GetColumnCount() const { return -1; }
82 int GetRowCount() const { return -1; }
83 int GetNextItem(int item, wxDirection dir, long style) const { return -1; }
90 //---------------------------------------------------------------------------
93 class wxRadioButton : public wxControl
96 %addtofunc wxRadioButton "self._setOORInfo(self)"
97 %addtofunc wxRadioButton() ""
99 wxRadioButton(wxWindow* parent, wxWindowID id,
100 const wxString& label,
101 const wxPoint& pos = wxDefaultPosition,
102 const wxSize& size = wxDefaultSize,
104 const wxValidator& validator = wxDefaultValidator,
105 const wxString& name = wxPyRadioButtonNameStr);
106 %name(PreRadioButton)wxRadioButton();
108 bool Create(wxWindow* parent, wxWindowID id,
109 const wxString& label,
110 const wxPoint& pos = wxDefaultPosition,
111 const wxSize& size = wxDefaultSize,
113 const wxValidator& validator = wxDefaultValidator,
114 const wxString& name = wxPyRadioButtonNameStr);
117 void SetValue(bool value);
120 //---------------------------------------------------------------------------
121 //---------------------------------------------------------------------------