X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd9f7fea29e3f8bb61861f52984b7943512346ac..83cbb9e995edca4f729aab005df43f23be8f3261:/wxPython/src/_listctrl.i?ds=sidebyside diff --git a/wxPython/src/_listctrl.i b/wxPython/src/_listctrl.i index 600cc79758..afb29a1ea2 100644 --- a/wxPython/src/_listctrl.i +++ b/wxPython/src/_listctrl.i @@ -18,9 +18,8 @@ %{ #include - const wxChar* wxListCtrlNameStr = _T("wxListCtrl"); - DECLARE_DEF_STRING(ListCtrlNameStr); %} +MAKE_CONST_WXSTRING2(ListCtrlNameStr, _T("wxListCtrl")); //--------------------------------------------------------------------------- %newgroup @@ -266,7 +265,7 @@ public: long GetIndex(); int GetColumn(); wxPoint GetPoint(); - %pythoncode { GetPostiion = GetPoint } + %pythoncode { GetPosition = GetPoint } const wxString& GetLabel(); const wxString& GetText(); int GetImage(); @@ -402,8 +401,8 @@ IMP_PYCALLBACK_LISTATTR_LONG(wxPyListCtrl, wxListCtrl, OnGetItemAttr); %name(ListCtrl)class wxPyListCtrl : public wxControl { public: - %addtofunc wxPyListCtrl "self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl)" - %addtofunc wxPyListCtrl() "" + %pythonAppend wxPyListCtrl "self._setOORInfo(self);self._setCallbackInfo(self, ListCtrl)" + %pythonAppend wxPyListCtrl() "" wxPyListCtrl(wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, @@ -428,7 +427,7 @@ public: bool SetBackgroundColour(const wxColour& col); // Gets information about this column - %addtofunc GetColumn "if val is not None: val.thisown = 1"; // %newobject doesn't work with OOR typemap + %pythonAppend GetColumn "if val is not None: val.thisown = 1"; // %newobject doesn't work with OOR typemap %extend { wxListItem* GetColumn(int col) { wxListItem item; @@ -471,7 +470,7 @@ public: #endif // Gets information about the item - %addtofunc GetItem "if val is not None: val.thisown = 1"; // %newobject doesn't work with OOR typemap + %pythonAppend GetItem "if val is not None: val.thisown = 1"; // %newobject doesn't work with OOR typemap %extend { wxListItem* GetItem(long itemId, int col=0) { wxListItem* info = new wxListItem; @@ -579,9 +578,13 @@ public: // is there a way to tell SWIG to disown this??? - %addtofunc AssignImageList "args[1].thisown = 0"; + %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; @@ -632,9 +635,12 @@ public: // the item after 'start' or the beginning if 'start' is -1. %name(FindItemAtPos) long FindItem(long start, const wxPoint& pt, int direction); - // Determines which item (if any) is at the specified point, - // giving details in the second return value (see wxLIST_HITTEST_... flags above) - long HitTest(const wxPoint& point, int& OUTPUT); + + DocDeclAStr( + long, HitTest(const wxPoint& point, int& OUTPUT), + "HitTest(Point point) -> (item, where)", + "Determines which item (if any) is at the specified point,\n" + "giving details in the second return value (see wxLIST_HITTEST_... flags.)"); // Inserts an item, returning the index of the new item if successful, // -1 otherwise. @@ -773,8 +779,8 @@ public: class wxListView : public wxPyListCtrl { public: - %addtofunc wxListView "self._setOORInfo(self)" - %addtofunc wxListView() "" + %pythonAppend wxListView "self._setOORInfo(self)" + %pythonAppend wxListView() "" wxListView( wxWindow *parent, wxWindowID id = -1,