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; } }
};
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);