X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3b3ab7f6f3594c70ac071c072b5d667fa8f01fe2..53663be8a5ea8e1c6f178839209b67e8228e4642:/wxPython/src/controls.i?ds=sidebyside diff --git a/wxPython/src/controls.i b/wxPython/src/controls.i index 96ca6cb7b4..f6146b9e27 100644 --- a/wxPython/src/controls.i +++ b/wxPython/src/controls.i @@ -323,7 +323,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& val = wxDefaultValidator, + const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyCheckBoxNameStr); %name(wxPreCheckBox)wxCheckBox(); @@ -331,13 +331,14 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxValidator& val = wxDefaultValidator, + const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyCheckBoxNameStr); %pragma(python) addtomethod = "__init__:self._setOORInfo(self)" %pragma(python) addtomethod = "wxPreCheckBox:val._setOORInfo(val)" bool GetValue(); + bool IsChecked(); void SetValue(const bool state); }; @@ -380,11 +381,11 @@ public: //---------------------------------------------------------------------- -// wxGTK's wxComboBox doesn't derive from wxChoice like wxMSW, or -// even wxControlWithItems, so we have to duplicate the methods -// here... +// wxGTK's wxComboBox doesn't derive from wxChoice like wxMSW, or even +// wxControlWithItems, so we have to duplicate the methods here... +// wxMac's inheritace is weird too so we'll fake it with this one too. -#ifdef __WXGTK__ +#ifndef __WXMSW__ class wxComboBox : public wxControl { public: @@ -476,8 +477,8 @@ public: -#else // For all but wxGTK - +#else +// MSW's version derives from wxChoice class wxComboBox : public wxChoice { public: @@ -1003,18 +1004,15 @@ public: int FindString(const wxString& string); wxString GetString(int n); - -#ifdef __WXGTK__ - %name(GetItemLabel)wxString GetLabel( int item ); - %name(SetItemLabel)void SetLabel( int item, const wxString& label ); -#else void SetString(int n, const wxString& label); %pragma(python) addtoclass = " GetItemLabel = GetString SetItemLabel = SetString " +#ifndef __WXGTK__ int GetColumnCount(); int GetRowCount(); + int GetNextItem(int item, wxDirection dir, long style); #endif int GetSelection(); @@ -1133,7 +1131,14 @@ public: int GetValue(); void SetRange(int min, int max); void SetValue(int value); - +#ifdef __WXGTK__ + %addmethods { + void SetSelection(long from, long to) { + } + } +#else + void SetSelection(long from, long to); +#endif };