X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b8c7ba607a15a2ff8a04448138df9ffff7df6c5..ee45c548e61fa0ce1f8adbcf29d7678769f2c0ed:/wxPython/src/_listctrl.i?ds=inline diff --git a/wxPython/src/_listctrl.i b/wxPython/src/_listctrl.i index 0d3269c53f..15b4ef2b3a 100644 --- a/wxPython/src/_listctrl.i +++ b/wxPython/src/_listctrl.i @@ -19,7 +19,7 @@ #include %} -MAKE_CONST_WXSTRING2(ListCtrlNameStr, _T("wxListCtrl")); +MAKE_CONST_WXSTRING(ListCtrlNameStr); //--------------------------------------------------------------------------- %newgroup @@ -288,8 +288,6 @@ public: %constant wxEventType wxEVT_COMMAND_LIST_END_LABEL_EDIT; %constant wxEventType wxEVT_COMMAND_LIST_DELETE_ITEM; %constant wxEventType wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS; -%constant wxEventType wxEVT_COMMAND_LIST_GET_INFO; -%constant wxEventType wxEVT_COMMAND_LIST_SET_INFO; %constant wxEventType wxEVT_COMMAND_LIST_ITEM_SELECTED; %constant wxEventType wxEVT_COMMAND_LIST_ITEM_DESELECTED; %constant wxEventType wxEVT_COMMAND_LIST_KEY_DOWN; @@ -305,6 +303,9 @@ public: %constant wxEventType wxEVT_COMMAND_LIST_COL_END_DRAG; %constant wxEventType wxEVT_COMMAND_LIST_ITEM_FOCUSED; +// WXWIN_COMPATIBILITY_2_4 +%constant wxEventType wxEVT_COMMAND_LIST_GET_INFO; +%constant wxEventType wxEVT_COMMAND_LIST_SET_INFO; %pythoncode { @@ -344,7 +345,7 @@ EVT_LIST_SET_INFO = wx._deprecated(EVT_LIST_SET_INFO) static int wxCALLBACK wxPyListCtrl_SortItems(long item1, long item2, long funcPtr) { int retval = 0; PyObject* func = (PyObject*)funcPtr; - bool blocked = wxPyBeginBlockThreads(); + wxPyBlock_t blocked = wxPyBeginBlockThreads(); PyObject* args = Py_BuildValue("(ii)", item1, item2); PyObject* result = PyEval_CallObject(func, args); @@ -649,7 +650,7 @@ public: long, HitTest(const wxPoint& point, int& OUTPUT), "HitTest(Point point) -> (item, where)", "Determines which item (if any) is at the specified point, giving -details in the second return value (see wxLIST_HITTEST_... flags.)", ""); +details in the second return value (see wx.LIST_HITTEST flags.)", ""); // Inserts an item, returning the index of the new item if successful, // -1 otherwise. @@ -665,7 +666,8 @@ details in the second return value (see wxLIST_HITTEST_... flags.)", ""); %Rename(InsertImageStringItem, long, InsertItem(long index, const wxString& label, int imageIndex)); // For list view mode (only), inserts a column. - %Rename(InsertColumnInfo, long, InsertColumn(long col, wxListItem& info)); + %Rename(InsertColumnItem, long, InsertColumn(long col, wxListItem& info)); + %pythoncode { InsertColumnInfo = InsertColumnItem } long InsertColumn(long col, const wxString& heading, @@ -716,7 +718,7 @@ details in the second return value (see wxLIST_HITTEST_... flags.)", ""); def IsSelected(self, idx): '''return True if the item is selected''' - return self.GetItemState(idx, wx.LIST_STATE_SELECTED) != 0 + return (self.GetItemState(idx, wx.LIST_STATE_SELECTED) & wx.LIST_STATE_SELECTED) != 0 def SetColumnImage(self, col, image): item = self.GetColumn(col)