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 MustHaveApp(wxRadioBox);
26 class wxRadioBox : public wxControl
29 %pythonPrepend wxRadioBox "if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']"
30 %pythonPrepend wxRadioBox() ""
31 %pythonAppend wxRadioBox "self._setOORInfo(self)"
32 %pythonAppend wxRadioBox() ""
34 wxRadioBox(wxWindow* parent, wxWindowID id=-1,
35 const wxString& label = wxPyEmptyString,
36 const wxPoint& pos = wxDefaultPosition,
37 const wxSize& size = wxDefaultSize,
38 //int choices = 0, wxString* choices_array = NULL,
39 const wxArrayString& choices = wxPyEmptyStringArray,
40 int majorDimension = 0,
41 long style = wxRA_HORIZONTAL,
42 const wxValidator& validator = wxDefaultValidator,
43 const wxString& name = wxPyRadioBoxNameStr);
44 %name(PreRadioBox)wxRadioBox();
46 bool Create(wxWindow* parent, wxWindowID id=-1,
47 const wxString& label = wxPyEmptyString,
48 const wxPoint& pos = wxDefaultPosition,
49 const wxSize& size = wxDefaultSize,
50 //int choices = 0, wxString* choices_array = NULL,
51 const wxArrayString& choices = wxPyEmptyStringArray,
52 int majorDimension = 0,
53 long style = wxRA_HORIZONTAL,
54 const wxValidator& validator = wxDefaultValidator,
55 const wxString& name = wxPyRadioBoxNameStr);
57 virtual void SetSelection(int n);
58 virtual int GetSelection() const;
60 virtual wxString GetStringSelection() const;
61 virtual bool SetStringSelection(const wxString& s);
64 virtual int GetCount() const;
65 virtual int FindString(const wxString& s) const;
67 virtual wxString GetString(int n) const;
68 virtual void SetString(int n, const wxString& label);
69 %pythoncode { GetItemLabel = GetString };
70 %pythoncode { SetItemLabel = SetString };
72 // change the individual radio button state
73 %name(EnableItem) virtual void Enable(int n, bool enable = True);
74 %name(ShowItem) virtual void Show(int n, bool show = True);
78 virtual int GetColumnCount() const;
79 virtual int GetRowCount() const;
81 // return the item above/below/to the left/right of the given one
82 int GetNextItem(int item, wxDirection dir, long style) const;
85 int GetColumnCount() const { return -1; }
86 int GetRowCount() const { return -1; }
87 int GetNextItem(int item, wxDirection dir, long style) const { return -1; }
91 static wxVisualAttributes
92 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
96 //---------------------------------------------------------------------------
99 MustHaveApp(wxRadioButton);
101 class wxRadioButton : public wxControl
104 %pythonAppend wxRadioButton "self._setOORInfo(self)"
105 %pythonAppend wxRadioButton() ""
107 wxRadioButton(wxWindow* parent, wxWindowID id=-1,
108 const wxString& label = wxPyEmptyString,
109 const wxPoint& pos = wxDefaultPosition,
110 const wxSize& size = wxDefaultSize,
112 const wxValidator& validator = wxDefaultValidator,
113 const wxString& name = wxPyRadioButtonNameStr);
114 %name(PreRadioButton)wxRadioButton();
116 bool Create(wxWindow* parent, wxWindowID id=-1,
117 const wxString& label = wxPyEmptyString,
118 const wxPoint& pos = wxDefaultPosition,
119 const wxSize& size = wxDefaultSize,
121 const wxValidator& validator = wxDefaultValidator,
122 const wxString& name = wxPyRadioButtonNameStr);
125 void SetValue(bool value);
127 static wxVisualAttributes
128 GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
131 //---------------------------------------------------------------------------
132 //---------------------------------------------------------------------------