class wxPyTreeItemData {
public:
wxPyTreeItemData(PyObject* obj = NULL);
-
+ ~wxPyTreeItemData();
+
PyObject* GetData();
void SetData(PyObject* obj);
const wxTreeItemId& GetId();
void SetId(const wxTreeItemId& id);
+ %pythonAppend Destroy "args[0].thisown = 0"
%extend { void Destroy() { delete self; } }
};
wxTreeItemAttr(const wxColour& colText = wxNullColour,
const wxColour& colBack = wxNullColour,
const wxFont& font = wxNullFont);
-
+ ~wxTreeItemAttr();
+
// setters
void SetTextColour(const wxColour& colText);
void SetBackgroundColour(const wxColour& colBack);
wxColour GetBackgroundColour();
wxFont GetFont();
+ %pythonAppend Destroy "args[0].thisown = 0"
%extend { void Destroy() { delete self; } }
};
%constant wxEventType wxEVT_COMMAND_TREE_ITEM_MENU;
%pythoncode {
-
EVT_TREE_BEGIN_DRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_BEGIN_DRAG , 1)
EVT_TREE_BEGIN_RDRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_BEGIN_RDRAG , 1)
EVT_TREE_BEGIN_LABEL_EDIT = wx.PyEventBinder(wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT , 1)
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)
+EVT_TREE_ITEM_MENU = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_MENU, 1)
}
%{ // C++ version of Python aware wxTreeCtrl
class wxPyTreeCtrl : public wxTreeCtrl {
- DECLARE_ABSTRACT_CLASS(wxPyTreeCtrl);
+ DECLARE_ABSTRACT_CLASS(wxPyTreeCtrl)
public:
wxPyTreeCtrl() : wxTreeCtrl() {}
wxPyTreeCtrl(wxWindow *parent, wxWindowID id,
void SetImageList(wxImageList *imageList);
void SetStateImageList(wxImageList *imageList);
- %apply SWIGTYPE *DISOWN { wxImageList *imageList };
+ %disownarg( wxImageList *imageList );
void AssignImageList(wxImageList *imageList);
void AssignStateImageList(wxImageList *imageList);
- %clear wxImageList *imageList;
+ %cleardisown( wxImageList *imageList );
// retrieve items label
%extend {
// associate a wxPyTreeItemData with the tree item
+ %disownarg( wxPyTreeItemData* data );
void SetItemData(const wxTreeItemId& item, wxPyTreeItemData* data) {
data->SetId(item); // set the id
self->SetItemData(item, data);
}
+ %cleardisown( wxPyTreeItemData* data );
// associate a Python object with the tree item
void SetItemPyData(const wxTreeItemId& item, PyObject* obj) {
wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const;
+ %disownarg( wxPyTreeItemData* data );
// add the root node to the tree
wxTreeItemId AddRoot(const wxString& text,
wxPyTreeItemData *data = NULL);
-
+ %cleardisown( wxPyTreeItemData* data );
+
// delete this item and associated data if any
void Delete(const wxTreeItemId& item);