X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce914f7319a5946f49da4c06e95be94dcd49611e..8262f9aecb42cefb62a6c574812a2db3dcc33661:/wxPython/src/controls2.i diff --git a/wxPython/src/controls2.i b/wxPython/src/controls2.i index 5e4c8aff58..5f0077a7bf 100644 --- a/wxPython/src/controls2.i +++ b/wxPython/src/controls2.i @@ -421,7 +421,22 @@ public: bool SetBackgroundColour(const wxColour& col); // Gets information about this column - bool GetColumn(int col, wxListItem& item) const; + // bool GetColumn(int col, wxListItem& item) const; + %addmethods { + %new wxListItem* GetColumn(int col) { + wxListItem item; + if (self->GetColumn(col, item)) + return new wxListItem(item); + else + return NULL; + } + } // The OOR typemaps don't know what to do with the %new, so fix it up. + %pragma(python) addtoclass = " + def GetItem(self, *_args, **_kwargs): + val = apply(controls2c.wxListCtrl_GetColumn,(self,) + _args, _kwargs) + if val is not None: val.thisown = 1 + return val + " // Sets information about this column bool SetColumn(int col, wxListItem& item) ; @@ -1308,11 +1323,11 @@ class wxGenericDirCtrl: public wxControl { public: wxGenericDirCtrl(wxWindow *parent, const wxWindowID id = -1, - const wxString &dir = wxDirDialogDefaultFolderStr, + const char* dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, - const wxString& filter = wxEmptyString, + const char* filter = wxEmptyString, int defaultFilter = 0, const char* name = "dirCtrl" ); %name(wxPreGenericDirCtrl)wxGenericDirCtrl(); @@ -1321,11 +1336,11 @@ public: %pragma(python) addtomethod = "wxPreGenericDirCtrl:val._setOORInfo(val)" bool Create(wxWindow *parent, const wxWindowID id = -1, - const wxString &dir = wxDirDialogDefaultFolderStr, + const char* dir = wxDirDialogDefaultFolderStr, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDIRCTRL_3D_INTERNAL|wxSUNKEN_BORDER, - const wxString& filter = wxEmptyString, + const char* filter = wxEmptyString, int defaultFilter = 0, const char* name = "dirCtrl" );