X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a72f4631fe5ab7ebeefdacf8ec9c826ea962133f..42f8298f6f42d5d63bb3caf65682b7d9d9f8b702:/wxPython/src/_treectrl.i diff --git a/wxPython/src/_treectrl.i b/wxPython/src/_treectrl.i index 50830f0e57..e9f9f741dd 100644 --- a/wxPython/src/_treectrl.i +++ b/wxPython/src/_treectrl.i @@ -117,7 +117,8 @@ public: // Python code should rarely be neccessary. Just use the GetItemPyData and // SetItemPyData tree methods instead of the GetItemData and SetItemData // methods. -%name(TreeItemData) class wxPyTreeItemData { +%rename(TreeItemData) wxPyTreeItemData; +class wxPyTreeItemData { public: wxPyTreeItemData(PyObject* obj = NULL); @@ -188,7 +189,7 @@ public: %constant wxEventType wxEVT_COMMAND_TREE_END_DRAG; %constant wxEventType wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK; %constant wxEventType wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP; - +%constant wxEventType wxEVT_COMMAND_TREE_ITEM_MENU; %pythoncode { @@ -212,6 +213,7 @@ EVT_TREE_ITEM_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLI EVT_TREE_END_DRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_END_DRAG , 1) EVT_TREE_STATE_IMAGE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, 1) EVT_TREE_ITEM_GETTOOLTIP = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, 1) +EVT_COMMAND_TREE_ITEM_MENU = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_MENU, 1) } @@ -311,7 +313,8 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyTreeCtrl, wxTreeCtrl); MustHaveApp(wxPyTreeCtrl); -%name(TreeCtrl)class wxPyTreeCtrl : public wxControl { +%rename(TreeCtrl) wxPyTreeCtrl; +class wxPyTreeCtrl : public wxControl { public: %pythonAppend wxPyTreeCtrl "self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl)" %pythonAppend wxPyTreeCtrl() "" @@ -323,7 +326,7 @@ public: long style = wxTR_DEFAULT_STYLE, const wxValidator& validator = wxDefaultValidator, const wxString& name = wxPyTreeCtrlNameStr); - %name(PreTreeCtrl)wxPyTreeCtrl(); + %RenameCtor(PreTreeCtrl, wxPyTreeCtrl()); // Turn it back on again %typemap(out) wxPyTreeCtrl* { $result = wxPyMake_wxObject($1, $owner); } @@ -455,10 +458,8 @@ public: // the item will be shown in bold void SetItemBold(const wxTreeItemId& item, bool bold = true); -#ifdef __WXMSW__ // the item will be shown with a drop highlight void SetItemDropHighlight(const wxTreeItemId& item, bool highlight = true); -#endif // set the items text colour void SetItemTextColour(const wxTreeItemId& item, const wxColour& col); @@ -601,12 +602,12 @@ public: wxPyTreeItemData *data = NULL); // insert a new item before the one with the given index - %name(InsertItemBefore) - wxTreeItemId InsertItem(const wxTreeItemId& parent, + %Rename(InsertItemBefore, + wxTreeItemId, InsertItem(const wxTreeItemId& parent, size_t index, const wxString& text, int image = -1, int selectedImage = -1, - wxPyTreeItemData *data = NULL); + wxPyTreeItemData *data = NULL)); // insert a new item in as the last child of the parent wxTreeItemId AppendItem(const wxTreeItemId& parent,