X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5f24651b5c1f73881e89de9f67ecfad696af8d4b..f78e4942ec0f3f6abd2992502e2d6c5c2e8e55f6:/wxPython/src/_listctrl.i?ds=sidebyside diff --git a/wxPython/src/_listctrl.i b/wxPython/src/_listctrl.i index bbb7b19181..0d3269c53f 100644 --- a/wxPython/src/_listctrl.i +++ b/wxPython/src/_listctrl.i @@ -384,17 +384,20 @@ public: } DEC_PYCALLBACK_STRING_LONGLONG(OnGetItemText); - DEC_PYCALLBACK_INT_LONG(OnGetItemImage); DEC_PYCALLBACK_LISTATTR_LONG(OnGetItemAttr); + // use the virtual version to avoid a confusing assert in the base class + DEC_PYCALLBACK_INT_LONG_virtual(OnGetItemImage); + PYPRIVATE; }; IMPLEMENT_ABSTRACT_CLASS(wxPyListCtrl, wxListCtrl); IMP_PYCALLBACK_STRING_LONGLONG(wxPyListCtrl, wxListCtrl, OnGetItemText); -IMP_PYCALLBACK_INT_LONG(wxPyListCtrl, wxListCtrl, OnGetItemImage); IMP_PYCALLBACK_LISTATTR_LONG(wxPyListCtrl, wxListCtrl, OnGetItemAttr); +IMP_PYCALLBACK_INT_LONG_virtual(wxPyListCtrl, wxListCtrl, OnGetItemImage); + %} @@ -403,19 +406,20 @@ IMP_PYCALLBACK_LISTATTR_LONG(wxPyListCtrl, wxListCtrl, OnGetItemAttr); MustHaveApp(wxPyListCtrl); -%name(ListCtrl)class wxPyListCtrl : public wxControl { +%rename(ListCtrl) wxPyListCtrl; +class wxPyListCtrl : public wxControl { public: %pythonAppend wxPyListCtrl "self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl)" %pythonAppend wxPyListCtrl() "" - + wxPyListCtrl(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyListCtrlNameStr); - %name(PreListCtrl)wxPyListCtrl(); + %RenameCtor(PreListCtrl, wxPyListCtrl()); bool Create(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, @@ -426,7 +430,7 @@ public: void _setCallbackInfo(PyObject* self, PyObject* _class); - + // Set the control colours bool SetForegroundColour(const wxColour& col); bool SetBackgroundColour(const wxColour& col); @@ -468,7 +472,7 @@ 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; @@ -491,7 +495,7 @@ public: bool SetItem(wxListItem& info) ; // Sets a string field at a particular column - %name(SetStringItem)long SetItem(long index, int col, const wxString& label, int imageId = -1); + %Rename(SetStringItem, long, SetItem(long index, int col, const wxString& label, int imageId = -1)); // Gets the item state int GetItemState(long item, long stateMask) const ; @@ -586,10 +590,10 @@ public: %apply SWIGTYPE *DISOWN { wxImageList *imageList }; void AssignImageList(wxImageList *imageList, int which); %clear wxImageList *imageList; - + // are we in report mode? bool InReportView() const; - + // returns True if it is a virtual list control bool IsVirtual() const; @@ -634,11 +638,11 @@ public: // Find an item whose data matches this data, starting from the item after 'start' // or the beginning if 'start' is -1. - %name(FindItemData) long FindItem(long start, long data); + %Rename(FindItemData, long, FindItem(long start, long data)); // Find an item nearest this position in the specified direction, starting from // the item after 'start' or the beginning if 'start' is -1. - %name(FindItemAtPos) long FindItem(long start, const wxPoint& pt, int direction); + %Rename(FindItemAtPos, long, FindItem(long start, const wxPoint& pt, int direction)); DocDeclAStr( @@ -652,16 +656,16 @@ details in the second return value (see wxLIST_HITTEST_... flags.)", ""); long InsertItem(wxListItem& info); // Insert a string item - %name(InsertStringItem) long InsertItem(long index, const wxString& label); + %Rename(InsertStringItem, long, InsertItem(long index, const wxString& label)); // Insert an image item - %name(InsertImageItem) long InsertItem(long index, int imageIndex); + %Rename(InsertImageItem, long, InsertItem(long index, int imageIndex)); // Insert an image/string item - %name(InsertImageStringItem) long InsertItem(long index, const wxString& label, int imageIndex); + %Rename(InsertImageStringItem, long, InsertItem(long index, const wxString& label, int imageIndex)); // For list view mode (only), inserts a column. - %name(InsertColumnInfo) long InsertColumn(long col, wxListItem& info); + %Rename(InsertColumnInfo, long, InsertColumn(long col, wxListItem& info)); long InsertColumn(long col, const wxString& heading, @@ -799,7 +803,7 @@ public: long style = wxLC_REPORT, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyListCtrlNameStr); - %name(PreListView)wxListView(); + %RenameCtor(PreListView, wxListView()); bool Create( wxWindow *parent, wxWindowID id = -1,