X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d1679124ae303fb78561ee2b0c56b5831fd0fafe..0e980f91092ded629a7b014ff0d2238b1c8940c5:/wxPython/src/controls2.i diff --git a/wxPython/src/controls2.i b/wxPython/src/controls2.i index 1ca0a09bb9..77ae496ebc 100644 --- a/wxPython/src/controls2.i +++ b/wxPython/src/controls2.i @@ -19,6 +19,7 @@ #endif #include #include +#include %} //---------------------------------------------------------------------- @@ -111,6 +112,30 @@ enum { wxEVT_COMMAND_LIST_ITEM_MIDDLE_CLICK, }; +enum { + /* Style flags */ + wxLC_ICON, + wxLC_SMALL_ICON, + wxLC_LIST, + wxLC_REPORT, + wxLC_ALIGN_TOP, + wxLC_ALIGN_LEFT, + wxLC_AUTOARRANGE, + wxLC_USER_TEXT, + wxLC_EDIT_LABELS, + wxLC_NO_HEADER, + wxLC_NO_SORT_HEADER, + wxLC_SINGLE_SEL, + wxLC_SORT_ASCENDING, + wxLC_SORT_DESCENDING, + wxLC_MASK_TYPE, + wxLC_MASK_ALIGN, + wxLC_MASK_SORT, + wxLC_HRULES, + wxLC_VRULES, + wxLC_VIRTUAL, +}; + class wxListItemAttr @@ -139,7 +164,7 @@ public: }; -class wxListItem { +class wxListItem : public wxObject { public: wxListItem(); ~wxListItem(); @@ -241,6 +266,7 @@ public: bool Arrange(int flag = wxLIST_ALIGN_DEFAULT); void AssignImageList(wxImageList* imageList, int which); + %pragma(python) addtomethod = "AssignImageList:_args[0].thisown = 0" bool DeleteItem(long item); bool DeleteAllItems(); bool DeleteColumn(int col); @@ -464,7 +490,7 @@ public: -%name(wxTreeItemData) class wxPyTreeItemData { +%name(wxTreeItemData) class wxPyTreeItemData : public wxObject { public: wxPyTreeItemData(PyObject* obj = NULL); @@ -490,6 +516,7 @@ public: %{ class wxPyTreeCtrl : public wxTreeCtrl { + DECLARE_ABSTRACT_CLASS(wxPyTreeCtrl); public: wxPyTreeCtrl(wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -499,7 +526,6 @@ public: char* name) : wxTreeCtrl(parent, id, pos, size, style, validator, name) {} - int OnCompareItems(const wxTreeItemId& item1, const wxTreeItemId& item2) { int rval = 0; @@ -517,6 +543,8 @@ public: PYPRIVATE; }; +IMPLEMENT_ABSTRACT_CLASS(wxPyTreeCtrl, wxTreeCtrl); + %} // These are for the GetFirstChild/GetNextChild methods below @@ -538,6 +566,7 @@ public: %pragma(python) addtomethod = "__init__:self._setSelf(self, wxTreeCtrl)" void AssignImageList(wxImageList* imageList); + %pragma(python) addtomethod = "AssignImageList:_args[0].thisown = 0" size_t GetCount(); unsigned int GetIndent(); void SetIndent(unsigned int indent); @@ -808,4 +837,11 @@ public: //---------------------------------------------------------------------- +%init %{ + wxPyPtrTypeMap_Add("wxTreeItemData", "wxPyTreeItemData"); + wxPyPtrTypeMap_Add("wxTreeCtrl", "wxPyTreeCtrl"); +%} + +//---------------------------------------------------------------------- +