X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b2dc104421c340091342156d6b01f61f1ccff438..716a5baa6ecd0d5d0c31914567e4da3165ca6ff0:/wxPython/src/_radio.i diff --git a/wxPython/src/_radio.i b/wxPython/src/_radio.i index aaced88af9..5d5b97c547 100644 --- a/wxPython/src/_radio.i +++ b/wxPython/src/_radio.i @@ -21,32 +21,36 @@ MAKE_CONST_WXSTRING(RadioButtonNameStr); //--------------------------------------------------------------------------- %newgroup +MustHaveApp(wxRadioBox); + class wxRadioBox : public wxControl { public: - %addtofunc wxRadioBox "self._setOORInfo(self)" - %addtofunc wxRadioBox() "" - - wxRadioBox(wxWindow* parent, wxWindowID id, - const wxString& label, - const wxPoint& point = wxDefaultPosition, + %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=-1, + const wxString& label = wxPyEmptyString, + const wxPoint& pos = 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); - %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, + const wxArrayString& choices = wxPyEmptyStringArray, int majorDimension = 0, long style = wxRA_HORIZONTAL, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyRadioBoxNameStr); + %RenameCtor(PreRadioBox, wxRadioBox()); + + bool Create(wxWindow* parent, wxWindowID id=-1, + const wxString& label = wxPyEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + 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; @@ -64,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); + %Rename(EnableItem, virtual void, Enable(int n, bool enable = true)); + %Rename(ShowItem, virtual void, Show(int n, bool show = true)); #ifndef __WXGTK__ // layout parameters @@ -81,30 +85,36 @@ public: int GetNextItem(int item, wxDirection dir, long style) const { return -1; } } #endif + +// bool IsValid(int n) const; ** not public + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); }; //--------------------------------------------------------------------------- %newgroup +MustHaveApp(wxRadioButton); + 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, + wxRadioButton(wxWindow* parent, wxWindowID id=-1, + const wxString& label = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyRadioButtonNameStr); - %name(PreRadioButton)wxRadioButton(); + %RenameCtor(PreRadioButton, wxRadioButton()); - bool Create(wxWindow* parent, wxWindowID id, - const wxString& label, + bool Create(wxWindow* parent, wxWindowID id=-1, + const wxString& label = wxPyEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, @@ -113,6 +123,9 @@ public: bool GetValue(); void SetValue(bool value); + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); }; //---------------------------------------------------------------------------