]> git.saurik.com Git - wxWidgets.git/blob - wxPython/src/_radio.i
reSWIGged
[wxWidgets.git] / wxPython / src / _radio.i
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: _radio.i
3 // Purpose: SWIG interface defs for wxRadioButton and wxRadioBox
4 //
5 // Author: Robin Dunn
6 //
7 // Created: 10-June-1998
8 // RCS-ID: $Id$
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
12
13 // Not a %module
14
15
16 //---------------------------------------------------------------------------
17
18 %{
19 DECLARE_DEF_STRING(RadioBoxNameStr);
20 DECLARE_DEF_STRING(RadioButtonNameStr);
21 %}
22
23 //---------------------------------------------------------------------------
24 %newgroup
25
26 class wxRadioBox : public wxControl
27 {
28 public:
29 %addtofunc wxRadioBox "self._setOORInfo(self)"
30 %addtofunc wxRadioBox() ""
31
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();
42
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);
52
53 virtual void SetSelection(int n);
54 virtual int GetSelection() const;
55
56 virtual wxString GetStringSelection() const;
57 virtual bool SetStringSelection(const wxString& s);
58
59 // string access
60 virtual int GetCount() const;
61 virtual int FindString(const wxString& s) const;
62
63 virtual wxString GetString(int n) const;
64 virtual void SetString(int n, const wxString& label);
65 %pythoncode { GetItemLabel = GetString };
66 %pythoncode { SetItemLabel = SetString };
67
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);
71
72 #ifndef __WXGTK__
73 // layout parameters
74 virtual int GetColumnCount() const;
75 virtual int GetRowCount() const;
76
77 // return the item above/below/to the left/right of the given one
78 int GetNextItem(int item, wxDirection dir, long style) const;
79 #else
80 %extend {
81 int GetColumnCount() const { return -1; }
82 int GetRowCount() const { return -1; }
83 int GetNextItem(int item, wxDirection dir, long style) const { return -1; }
84 }
85 #endif
86
87 };
88
89
90 //---------------------------------------------------------------------------
91 %newgroup
92
93 class wxRadioButton : public wxControl
94 {
95 public:
96 %addtofunc wxRadioButton "self._setOORInfo(self)"
97 %addtofunc wxRadioButton() ""
98
99 wxRadioButton(wxWindow* parent, wxWindowID id,
100 const wxString& label,
101 const wxPoint& pos = wxDefaultPosition,
102 const wxSize& size = wxDefaultSize,
103 long style = 0,
104 const wxValidator& validator = wxDefaultValidator,
105 const wxString& name = wxPyRadioButtonNameStr);
106 %name(PreRadioButton)wxRadioButton();
107
108 bool Create(wxWindow* parent, wxWindowID id,
109 const wxString& label,
110 const wxPoint& pos = wxDefaultPosition,
111 const wxSize& size = wxDefaultSize,
112 long style = 0,
113 const wxValidator& validator = wxDefaultValidator,
114 const wxString& name = wxPyRadioButtonNameStr);
115
116 bool GetValue();
117 void SetValue(bool value);
118 };
119
120 //---------------------------------------------------------------------------
121 //---------------------------------------------------------------------------