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 %pythonPrepend wxRadioBox "if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']"
28 %pythonPrepend wxRadioBox() ""
29 %pythonAppend wxRadioBox "self._setOORInfo(self)"
30 %pythonAppend wxRadioBox() ""
32 wxRadioBox(wxWindow* parent, wxWindowID id,
33 const wxString& label,
34 const wxPoint& pos = wxDefaultPosition,
35 const wxSize& size = wxDefaultSize,
36 //int choices = 0, wxString* choices_array = NULL,
37 const wxArrayString& choices = wxPyEmptyStringArray,
38 int majorDimension = 0,
39 long style = wxRA_HORIZONTAL,
40 const wxValidator& validator = wxDefaultValidator,
41 const wxString& name = wxPyRadioBoxNameStr);
42 %name(PreRadioBox)wxRadioBox();
44 bool Create(wxWindow* parent, wxWindowID id,
45 const wxString& label,
46 const wxPoint& pos = wxDefaultPosition,
47 const wxSize& size = wxDefaultSize,
48 //int choices = 0, wxString* choices_array = NULL,
49 const wxArrayString& choices = wxPyEmptyStringArray,
50 int majorDimension = 0,
51 long style = wxRA_HORIZONTAL,
52 const wxValidator& validator = wxDefaultValidator,
53 const wxString& name = wxPyRadioBoxNameStr);
55 virtual void SetSelection(int n);
56 virtual int GetSelection() const;
58 virtual wxString GetStringSelection() const;
59 virtual bool SetStringSelection(const wxString& s);
62 virtual int GetCount() const;
63 virtual int FindString(const wxString& s) const;
65 virtual wxString GetString(int n) const;
66 virtual void SetString(int n, const wxString& label);
67 %pythoncode { GetItemLabel = GetString };
68 %pythoncode { SetItemLabel = SetString };
70 // change the individual radio button state
71 %name(EnableItem) virtual void Enable(int n, bool enable = True);
72 %name(ShowItem) virtual void Show(int n, bool show = True);
76 virtual int GetColumnCount() const;
77 virtual int GetRowCount() const;
79 // return the item above/below/to the left/right of the given one
80 int GetNextItem(int item, wxDirection dir, long style) const;
83 int GetColumnCount() const { return -1; }
84 int GetRowCount() const { return -1; }
85 int GetNextItem(int item, wxDirection dir, long style) const { return -1; }
92 //---------------------------------------------------------------------------
95 class wxRadioButton : public wxControl
98 %pythonAppend wxRadioButton "self._setOORInfo(self)"
99 %pythonAppend wxRadioButton() ""
101 wxRadioButton(wxWindow* parent, wxWindowID id,
102 const wxString& label,
103 const wxPoint& pos = wxDefaultPosition,
104 const wxSize& size = wxDefaultSize,
106 const wxValidator& validator = wxDefaultValidator,
107 const wxString& name = wxPyRadioButtonNameStr);
108 %name(PreRadioButton)wxRadioButton();
110 bool Create(wxWindow* parent, wxWindowID id,
111 const wxString& label,
112 const wxPoint& pos = wxDefaultPosition,
113 const wxSize& size = wxDefaultSize,
115 const wxValidator& validator = wxDefaultValidator,
116 const wxString& name = wxPyRadioButtonNameStr);
119 void SetValue(bool value);
122 //---------------------------------------------------------------------------
123 //---------------------------------------------------------------------------