X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d14a1e28567de23c586bc80017073d0c39f8d18f..b7aef858828222a05e57671fa01d3cac78aee3ac:/wxPython/src/_radio.i diff --git a/wxPython/src/_radio.i b/wxPython/src/_radio.i index e3d02a71a1..c70ce8c11c 100644 --- a/wxPython/src/_radio.i +++ b/wxPython/src/_radio.i @@ -15,10 +15,8 @@ //--------------------------------------------------------------------------- -%{ - DECLARE_DEF_STRING(RadioBoxNameStr); - DECLARE_DEF_STRING(RadioButtonNameStr); -%} +MAKE_CONST_WXSTRING(RadioBoxNameStr); +MAKE_CONST_WXSTRING(RadioButtonNameStr); //--------------------------------------------------------------------------- %newgroup @@ -26,14 +24,17 @@ class wxRadioBox : public wxControl { public: - %addtofunc wxRadioBox "self._setOORInfo(self)" - %addtofunc wxRadioBox() "" + %pythonPrepend wxRadioBox "if kwargs.has_key('point'): kwargs['pos'] = kwargs['point'];del kwargs['point']" + %pythonPrepend wxRadioBox() "" + %pythonAppend wxRadioBox "self._setOORInfo(self)" + %pythonAppend wxRadioBox() "" wxRadioBox(wxWindow* parent, wxWindowID id, const wxString& label, - const wxPoint& point = wxDefaultPosition, + const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - int choices = 0, wxString* choices_array = NULL, + //int choices = 0, wxString* choices_array = NULL, + const wxArrayString& choices = wxPyEmptyStringArray, int majorDimension = 0, long style = wxRA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, @@ -41,14 +42,15 @@ public: %name(PreRadioBox)wxRadioBox(); bool Create(wxWindow* parent, wxWindowID id, - const wxString& label, - const wxPoint& point = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int choices = 0, wxString* choices_array = NULL, - int majorDimension = 0, - long style = wxRA_HORIZONTAL, - const wxValidator& validator = wxDefaultValidator, - const wxString& name = wxPyRadioBoxNameStr); + const wxString& label, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + //int choices = 0, wxString* choices_array = NULL, + const wxArrayString& choices = wxPyEmptyStringArray, + int majorDimension = 0, + long style = wxRA_HORIZONTAL, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxPyRadioBoxNameStr); virtual void SetSelection(int n); virtual int GetSelection() const; @@ -66,8 +68,8 @@ public: %pythoncode { SetItemLabel = SetString }; // change the individual radio button state - %name(EnableItem) virtual void Enable(int n, bool enable = TRUE); - %name(ShowItem) virtual void Show(int n, bool show = TRUE); + %name(EnableItem) virtual void Enable(int n, bool enable = True); + %name(ShowItem) virtual void Show(int n, bool show = True); #ifndef __WXGTK__ // layout parameters @@ -84,6 +86,8 @@ public: } #endif + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); }; @@ -93,8 +97,8 @@ public: class wxRadioButton : public wxControl { public: - %addtofunc wxRadioButton "self._setOORInfo(self)" - %addtofunc wxRadioButton() "" + %pythonAppend wxRadioButton "self._setOORInfo(self)" + %pythonAppend wxRadioButton() "" wxRadioButton(wxWindow* parent, wxWindowID id, const wxString& label, @@ -115,6 +119,9 @@ public: bool GetValue(); void SetValue(bool value); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); }; //---------------------------------------------------------------------------