X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4617be085fb55acce74f4d4687b098918dc9d107..15648073358dd875cc5fc28a13da50aee173b69d:/wxPython/src/_listctrl.i diff --git a/wxPython/src/_listctrl.i b/wxPython/src/_listctrl.i index 01d62edc5e..d8f320f29b 100644 --- a/wxPython/src/_listctrl.i +++ b/wxPython/src/_listctrl.i @@ -153,7 +153,7 @@ public: wxListItemAttr(const wxColour& colText = wxNullColour, const wxColour& colBack = wxNullColour, const wxFont& font = wxNullFont); - + ~wxListItemAttr(); // setters void SetTextColour(const wxColour& colText); @@ -169,6 +169,9 @@ public: wxColour GetBackgroundColour(); wxFont GetFont(); + void AssignFrom(const wxListItemAttr& source); + + %pythonAppend Destroy "args[0].thisown = 0" %extend { void Destroy() { delete self; } } }; @@ -393,6 +396,7 @@ public: // use the virtual version to avoid a confusing assert in the base class DEC_PYCALLBACK_INT_LONG_virtual(OnGetItemImage); + DEC_PYCALLBACK_INT_LONGLONG(OnGetItemColumnImage); PYPRIVATE; }; @@ -402,7 +406,8 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyListCtrl, wxListCtrl); IMP_PYCALLBACK_STRING_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemText); IMP_PYCALLBACK_LISTATTR_LONG(wxPyListCtrl, wxListCtrl, OnGetItemAttr); IMP_PYCALLBACK_INT_LONG_virtual(wxPyListCtrl, wxListCtrl, OnGetItemImage); - +IMP_PYCALLBACK_INT_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemColumnImage); + %} @@ -478,10 +483,8 @@ public: // return the total area occupied by all the items (icon/small icon only) wxRect GetViewRect() const; -#ifdef __WXMSW__ // Gets the edit control for editing labels. wxTextCtrl* GetEditControl() const; -#endif // Gets information about the item %pythonAppend GetItem "if val is not None: val.thisown = 1"; // %newobject doesn't work with OOR typemap @@ -510,6 +513,7 @@ public: // Sets the item image bool SetItemImage(long item, int image, int selImage=-1) ; + bool SetItemColumnImage( long item, long column, int image ); // Gets the item text wxString GetItemText(long item) const ; @@ -554,9 +558,11 @@ public: // get the horizontal and vertical components of the item spacing wxSize GetItemSpacing() const; + %pythoncode { GetItemSpacing = wx._deprecated(GetItemSpacing) } #ifndef __WXMSW__ void SetItemSpacing( int spacing, bool isSmall = false ); + %pythoncode { SetItemSpacing = wx._deprecated(SetItemSpacing) } #endif // Gets the number of selected items in the list control @@ -590,11 +596,9 @@ public: // Sets the image list void SetImageList(wxImageList *imageList, int which); - // is there a way to tell SWIG to disown this??? - - %apply SWIGTYPE *DISOWN { wxImageList *imageList }; + %disownarg( wxImageList *imageList ); void AssignImageList(wxImageList *imageList, int which); - %clear wxImageList *imageList; + %cleardisown( wxImageList *imageList ); // are we in report mode? bool InReportView() const;