X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/70d374acb3ea32e591c4ad3ce63a6a1afbfc0ac7..c751d1d73157299da3e2091ed2701d53512b0620:/wxPython/src/_listctrl.i diff --git a/wxPython/src/_listctrl.i b/wxPython/src/_listctrl.i index d53789b681..af9def88fa 100644 --- a/wxPython/src/_listctrl.i +++ b/wxPython/src/_listctrl.i @@ -174,7 +174,7 @@ public: void AssignFrom(const wxListItemAttr& source); - %pythonAppend Destroy "args[0].thisown = 0" + %pythonPrepend Destroy "args[0].this.own(False)" %extend { void Destroy() { delete self; } } %property(BackgroundColour, GetBackgroundColour, SetBackgroundColour, doc="See `GetBackgroundColour` and `SetBackgroundColour`"); @@ -192,9 +192,15 @@ public: // wxListItem: the item or column info, used to exchange data with wxListCtrl class wxListItem : public wxObject { public: + // turn off this typemap + %typemap(out) wxListItem*; + wxListItem(); ~wxListItem(); + // Turn it back on again + %typemap(out) wxListItem* { $result = wxPyMake_wxObject($1, $owner); } + // resetting void Clear(); void ClearAttributes(); @@ -455,6 +461,8 @@ MustHaveApp(wxPyListCtrl); %rename(ListCtrl) wxPyListCtrl; class wxPyListCtrl : public wxControl { public: + // turn off this typemap + %typemap(out) wxPyListCtrl*; %pythonAppend wxPyListCtrl "self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl)" %pythonAppend wxPyListCtrl() "" @@ -467,6 +475,9 @@ public: const wxString& name = wxPyListCtrlNameStr); %RenameCtor(PreListCtrl, wxPyListCtrl()); + // Turn it back on again + %typemap(out) wxPyListCtrl* { $result = wxPyMake_wxObject($1, $owner); } + bool Create(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,