- bool __eq__(const wxTreeItemId* other) { return other ? (*self == *other) : False; }
- bool __ne__(const wxTreeItemId* other) { return other ? (*self != *other) : True; }
+ bool __eq__(const wxTreeItemId* other) { return other ? (*self == *other) : false; }
+ bool __ne__(const wxTreeItemId* other) { return other ? (*self != *other) : true; }
// Python code should rarely be neccessary. Just use the GetItemPyData and
// SetItemPyData tree methods instead of the GetItemData and SetItemData
// methods.
// Python code should rarely be neccessary. Just use the GetItemPyData and
// SetItemPyData tree methods instead of the GetItemData and SetItemData
// methods.
%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_END_DRAG;
%constant wxEventType wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK;
%constant wxEventType wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP;
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_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)
bool found;
bool blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "OnCompareItems"))) {
bool found;
bool blocked = wxPyBeginBlockThreads();
if ((found = wxPyCBH_findCallback(m_myInst, "OnCompareItems"))) {
- PyObject *o1 = wxPyConstructObject((void*)&item1, wxT("wxTreeItemId"), False);
- PyObject *o2 = wxPyConstructObject((void*)&item2, wxT("wxTreeItemId"), False);
+ PyObject *o1 = wxPyConstructObject((void*)&item1, wxT("wxTreeItemId"), false);
+ PyObject *o2 = wxPyConstructObject((void*)&item2, wxT("wxTreeItemId"), false);
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)",o1,o2));
Py_DECREF(o1);
Py_DECREF(o2);
rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)",o1,o2));
Py_DECREF(o1);
Py_DECREF(o2);
public:
%pythonAppend wxPyTreeCtrl "self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl)"
%pythonAppend wxPyTreeCtrl() ""
public:
%pythonAppend wxPyTreeCtrl "self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl)"
%pythonAppend wxPyTreeCtrl() ""
wxPyTreeCtrl(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
wxPyTreeCtrl(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
long style = wxTR_DEFAULT_STYLE,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxPyTreeCtrlNameStr);
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); }
bool Create(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
bool Create(wxWindow *parent, wxWindowID id = -1,
const wxPoint& pos = wxDefaultPosition,
// allow the user to expand the items which don't have any children now
// - but instead add them only when needed, thus minimizing memory
// usage and loading time.
// allow the user to expand the items which don't have any children now
// - but instead add them only when needed, thus minimizing memory
// usage and loading time.
// set the items text colour
void SetItemTextColour(const wxTreeItemId& item, const wxColour& col);
// set the items text colour
void SetItemTextColour(const wxTreeItemId& item, const wxColour& col);
// if 'recursively' is False, only immediate children count, otherwise
// the returned number is the number of all items in this branch
size_t GetChildrenCount(const wxTreeItemId& item,
// if 'recursively' is False, only immediate children count, otherwise
// the returned number is the number of all items in this branch
size_t GetChildrenCount(const wxTreeItemId& item,
num = self->GetSelections(array);
for (x=0; x < num; x++) {
wxTreeItemId *tii = new wxTreeItemId(array.Item(x));
num = self->GetSelections(array);
for (x=0; x < num; x++) {
wxTreeItemId *tii = new wxTreeItemId(array.Item(x));
wxTreeItemId* ritem = new wxTreeItemId(self->GetFirstChild(item, cookie));
bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2);
wxTreeItemId* ritem = new wxTreeItemId(self->GetFirstChild(item, cookie));
bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2);
- PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), True));
+ PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true));
PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void")));
wxPyEndBlockThreads(blocked);
return tup;
PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void")));
wxPyEndBlockThreads(blocked);
return tup;
wxTreeItemId* ritem = new wxTreeItemId(self->GetNextChild(item, cookie));
bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2);
wxTreeItemId* ritem = new wxTreeItemId(self->GetNextChild(item, cookie));
bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2);
- PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), True));
+ PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(ritem, wxT("wxTreeItemId"), true));
PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void")));
wxPyEndBlockThreads(blocked);
return tup;
PyTuple_SET_ITEM(tup, 1, wxPyMakeSwigPtr(cookie, wxT("void")));
wxPyEndBlockThreads(blocked);
return tup;
- %name(InsertItemBefore)
- wxTreeItemId InsertItem(const wxTreeItemId& parent,
+ %Rename(InsertItemBefore,
+ wxTreeItemId, InsertItem(const wxTreeItemId& parent,
// insert a new item in as the last child of the parent
wxTreeItemId AppendItem(const wxTreeItemId& parent,
// insert a new item in as the last child of the parent
wxTreeItemId AppendItem(const wxTreeItemId& parent,
wxRect rect;
if (self->GetBoundingRect(item, rect, textOnly)) {
bool blocked = wxPyBeginBlockThreads();
wxRect* r = new wxRect(rect);
wxRect rect;
if (self->GetBoundingRect(item, rect, textOnly)) {
bool blocked = wxPyBeginBlockThreads();
wxRect* r = new wxRect(rect);