1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface file for wxTreeCtrl and related classes
7 // Created: 10-June-1998
9 // Copyright: (c) 2002 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
16 //---------------------------------------------------------------------------
19 #include <wx/treectrl.h>
20 #include "wx/wxPython/pytree.h"
22 const wxChar* wx_TreeCtrlNameStr = _T("wxTreeCtrl");
23 DECLARE_DEF_STRING(_TreeCtrlNameStr);
26 //---------------------------------------------------------------------------
40 wxTR_HAS_VARIABLE_ROW_HEIGHT,
46 wxTR_FULL_ROW_HIGHLIGHT,
57 wxTreeItemIcon_Normal, // not selected, not expanded
58 wxTreeItemIcon_Selected, // selected, not expanded
59 wxTreeItemIcon_Expanded, // not selected, expanded
60 wxTreeItemIcon_SelectedExpanded, // selected, expanded
65 // constants for HitTest
69 wxTREE_HITTEST_NOWHERE,
70 wxTREE_HITTEST_ONITEMBUTTON,
71 wxTREE_HITTEST_ONITEMICON,
72 wxTREE_HITTEST_ONITEMINDENT,
73 wxTREE_HITTEST_ONITEMLABEL,
74 wxTREE_HITTEST_ONITEMRIGHT,
75 wxTREE_HITTEST_ONITEMSTATEICON,
76 wxTREE_HITTEST_TOLEFT,
77 wxTREE_HITTEST_TORIGHT,
78 wxTREE_HITTEST_ONITEMUPPERPART,
79 wxTREE_HITTEST_ONITEMLOWERPART,
83 //---------------------------------------------------------------------------
86 typedef void *wxTreeItemIdValue;
88 // wxTreeItemId identifies an element of the tree. In this implementation, it's
89 // just a trivial wrapper around Win32 HTREEITEM or a pointer to some private
90 // data structure in the generic version. It's opaque for the application and
91 // the only method which can be used by user code is IsOk().
97 // is this a valid tree item?
101 bool operator==(const wxTreeItemId* other) {
102 if (!other) return False;
103 return *self == *other;
106 bool operator!=(const wxTreeItemId* other) {
107 if (!other) return True;
108 return *self != *other;
112 wxTreeItemIdValue m_pItem;
117 def __nonzero__(self): return self.IsOk() }
123 // wxTreeItemData is some (arbitrary) user data associated with some tree
124 // item. The Python version is just a simple wrapper around a Python object
125 // that knows how to handle references properly. Using this class directly in
126 // Python code should rarely be neccessary. Just use the GetItemPyData and
127 // SetItemPyData tree methods instead of the GetItemData and SetItemData
129 %name(TreeItemData) class wxPyTreeItemData {
131 wxPyTreeItemData(PyObject* obj = NULL);
134 void SetData(PyObject* obj);
136 const wxTreeItemId& GetId();
137 void SetId(const wxTreeItemId& id);
139 %extend { void Destroy() { delete self; } }
144 #if 0 // it's not currently used anywhere...
146 // wxTreeItemAttr: a structure containing the visual attributes of an item
151 //wxTreeItemAttr() { }
152 wxTreeItemAttr(const wxColour& colText = wxNullColour,
153 const wxColour& colBack = wxNullColour,
154 const wxFont& font = wxNullFont);
157 void SetTextColour(const wxColour& colText);
158 void SetBackgroundColour(const wxColour& colBack);
159 void SetFont(const wxFont& font);
162 bool HasTextColour();
163 bool HasBackgroundColour();
166 wxColour GetTextColour();
167 wxColour GetBackgroundColour();
170 %extend { void Destroy() { delete self; } }
176 //---------------------------------------------------------------------------
179 /* Tree control event types */
180 %constant wxEventType wxEVT_COMMAND_TREE_BEGIN_DRAG;
181 %constant wxEventType wxEVT_COMMAND_TREE_BEGIN_RDRAG;
182 %constant wxEventType wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT;
183 %constant wxEventType wxEVT_COMMAND_TREE_END_LABEL_EDIT;
184 %constant wxEventType wxEVT_COMMAND_TREE_DELETE_ITEM;
185 %constant wxEventType wxEVT_COMMAND_TREE_GET_INFO;
186 %constant wxEventType wxEVT_COMMAND_TREE_SET_INFO;
187 %constant wxEventType wxEVT_COMMAND_TREE_ITEM_EXPANDED;
188 %constant wxEventType wxEVT_COMMAND_TREE_ITEM_EXPANDING;
189 %constant wxEventType wxEVT_COMMAND_TREE_ITEM_COLLAPSED;
190 %constant wxEventType wxEVT_COMMAND_TREE_ITEM_COLLAPSING;
191 %constant wxEventType wxEVT_COMMAND_TREE_SEL_CHANGED;
192 %constant wxEventType wxEVT_COMMAND_TREE_SEL_CHANGING;
193 %constant wxEventType wxEVT_COMMAND_TREE_KEY_DOWN;
194 %constant wxEventType wxEVT_COMMAND_TREE_ITEM_ACTIVATED;
195 %constant wxEventType wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK;
196 %constant wxEventType wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK;
197 %constant wxEventType wxEVT_COMMAND_TREE_END_DRAG;
198 %constant wxEventType wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK;
204 EVT_TREE_BEGIN_DRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_BEGIN_DRAG , 1)
205 EVT_TREE_BEGIN_RDRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_BEGIN_RDRAG , 1)
206 EVT_TREE_BEGIN_LABEL_EDIT = wx.PyEventBinder(wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT , 1)
207 EVT_TREE_END_LABEL_EDIT = wx.PyEventBinder(wxEVT_COMMAND_TREE_END_LABEL_EDIT , 1)
208 EVT_TREE_DELETE_ITEM = wx.PyEventBinder(wxEVT_COMMAND_TREE_DELETE_ITEM , 1)
209 EVT_TREE_GET_INFO = wx.PyEventBinder(wxEVT_COMMAND_TREE_GET_INFO , 1)
210 EVT_TREE_SET_INFO = wx.PyEventBinder(wxEVT_COMMAND_TREE_SET_INFO , 1)
211 EVT_TREE_ITEM_EXPANDED = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_EXPANDED , 1)
212 EVT_TREE_ITEM_EXPANDING = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_EXPANDING , 1)
213 EVT_TREE_ITEM_COLLAPSED = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_COLLAPSED , 1)
214 EVT_TREE_ITEM_COLLAPSING = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_COLLAPSING , 1)
215 EVT_TREE_SEL_CHANGED = wx.PyEventBinder(wxEVT_COMMAND_TREE_SEL_CHANGED , 1)
216 EVT_TREE_SEL_CHANGING = wx.PyEventBinder(wxEVT_COMMAND_TREE_SEL_CHANGING , 1)
217 EVT_TREE_KEY_DOWN = wx.PyEventBinder(wxEVT_COMMAND_TREE_KEY_DOWN , 1)
218 EVT_TREE_ITEM_ACTIVATED = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_ACTIVATED , 1)
219 EVT_TREE_ITEM_RIGHT_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK , 1)
220 EVT_TREE_ITEM_MIDDLE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, 1)
221 EVT_TREE_END_DRAG = wx.PyEventBinder(wxEVT_COMMAND_TREE_END_DRAG , 1)
222 EVT_TREE_STATE_IMAGE_CLICK = wx.PyEventBinder(wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, 1)
228 // wxTreeEvent is a special class for all events associated with tree controls
230 // NB: note that not all accessors make sense for all events, see the event
231 // descriptions below
232 class wxTreeEvent : public wxNotifyEvent {
234 wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
236 // get the item on which the operation was performed or the newly
237 // selected item for wxEVT_COMMAND_TREE_SEL_CHANGED/ING events
238 wxTreeItemId GetItem() const;
239 void SetItem(const wxTreeItemId& item);
241 // for wxEVT_COMMAND_TREE_SEL_CHANGED/ING events, get the previously
243 wxTreeItemId GetOldItem() const;
244 void SetOldItem(const wxTreeItemId& item);
246 // the point where the mouse was when the drag operation started (for
247 // wxEVT_COMMAND_TREE_BEGIN_(R)DRAG events only) or click position
248 wxPoint GetPoint() const;
249 void SetPoint(const wxPoint& pt);
251 // keyboard data (for wxEVT_COMMAND_TREE_KEY_DOWN only)
252 const wxKeyEvent& GetKeyEvent() const;
253 int GetKeyCode() const;
254 void SetKeyEvent(const wxKeyEvent& evt);
256 // label (for EVT_TREE_{BEGIN|END}_LABEL_EDIT only)
257 const wxString& GetLabel() const;
258 void SetLabel(const wxString& label);
260 // edit cancel flag (for EVT_TREE_{BEGIN|END}_LABEL_EDIT only)
261 bool IsEditCancelled() const;
262 void SetEditCanceled(bool editCancelled);
266 //---------------------------------------------------------------------------
269 %{ // C++ version of Python aware wxTreeCtrl
270 class wxPyTreeCtrl : public wxTreeCtrl {
271 DECLARE_ABSTRACT_CLASS(wxPyTreeCtrl);
273 wxPyTreeCtrl() : wxTreeCtrl() {}
274 wxPyTreeCtrl(wxWindow *parent, wxWindowID id,
278 const wxValidator& validator,
279 const wxString& name) :
280 wxTreeCtrl(parent, id, pos, size, style, validator, name) {}
282 bool Create(wxWindow *parent, wxWindowID id,
286 const wxValidator& validator,
287 const wxString& name) {
288 return wxTreeCtrl::Create(parent, id, pos, size, style, validator, name);
292 int OnCompareItems(const wxTreeItemId& item1,
293 const wxTreeItemId& item2) {
296 wxPyBeginBlockThreads();
297 if ((found = wxPyCBH_findCallback(m_myInst, "OnCompareItems"))) {
298 PyObject *o1 = wxPyConstructObject((void*)&item1, wxT("wxTreeItemId"), False);
299 PyObject *o2 = wxPyConstructObject((void*)&item2, wxT("wxTreeItemId"), False);
300 rval = wxPyCBH_callCallback(m_myInst, Py_BuildValue("(OO)",o1,o2));
304 wxPyEndBlockThreads();
306 rval = wxTreeCtrl::OnCompareItems(item1, item2);
312 IMPLEMENT_ABSTRACT_CLASS(wxPyTreeCtrl, wxTreeCtrl);
319 %name(TreeCtrl)class wxPyTreeCtrl : public wxControl {
321 %addtofunc wxPyTreeCtrl "self._setOORInfo(self);self._setCallbackInfo(self, TreeCtrl)"
322 %addtofunc wxPyTreeCtrl() ""
324 wxPyTreeCtrl(wxWindow *parent, wxWindowID id = -1,
325 const wxPoint& pos = wxDefaultPosition,
326 const wxSize& size = wxDefaultSize,
327 long style = wxTR_DEFAULT_STYLE,
328 const wxValidator& validator = wxDefaultValidator,
329 const wxString& name = wxPy_TreeCtrlNameStr);
330 %name(PreTreeCtrl)wxPyTreeCtrl();
332 bool Create(wxWindow *parent, wxWindowID id = -1,
333 const wxPoint& pos = wxDefaultPosition,
334 const wxSize& size = wxDefaultSize,
335 long style = wxTR_DEFAULT_STYLE,
336 const wxValidator& validator = wxDefaultValidator,
337 const wxString& name = wxPy_TreeCtrlNameStr);
339 void _setCallbackInfo(PyObject* self, PyObject* _class);
342 // get the total number of items in the control
343 size_t GetCount() const;
345 // indent is the number of pixels the children are indented relative to
346 // the parents position. SetIndent() also redraws the control
348 unsigned int GetIndent() const;
349 void SetIndent(unsigned int indent);
351 // spacing is the number of pixels between the start and the Text
352 // not implemented under wxMSW
353 unsigned int GetSpacing() const;
354 void SetSpacing(unsigned int spacing);
357 // image list: these functions allow to associate an image list with
358 // the control and retrieve it. Note that the control does _not_ delete
359 // the associated image list when it's deleted in order to allow image
360 // lists to be shared between different controls.
362 // The normal image list is for the icons which correspond to the
363 // normal tree item state (whether it is selected or not).
364 // Additionally, the application might choose to show a state icon
365 // which corresponds to an app-defined item state (for example,
366 // checked/unchecked) which are taken from the state image list.
367 wxImageList *GetImageList() const;
368 wxImageList *GetStateImageList() const;
370 void SetImageList(wxImageList *imageList);
371 void SetStateImageList(wxImageList *imageList);
373 %addtofunc AssignImageList "args[1].thisown = 0";
374 %addtofunc AssignStateImageList "args[1].thisown = 0";
375 void AssignImageList(wxImageList *imageList);
376 void AssignStateImageList(wxImageList *imageList);
379 // retrieve items label
380 wxString GetItemText(const wxTreeItemId& item) const;
382 // get one of the images associated with the item (normal by default)
383 int GetItemImage(const wxTreeItemId& item,
384 wxTreeItemIcon which = wxTreeItemIcon_Normal) const;
387 // get the wxPyTreeItemData associated with the tree item
388 wxPyTreeItemData* GetItemData(const wxTreeItemId& item) {
389 wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item);
391 data = new wxPyTreeItemData();
392 data->SetId(item); // set the id
393 self->SetItemData(item, data);
397 // Get the Python object associated with the tree item
398 PyObject* GetItemPyData(const wxTreeItemId& item) {
399 wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item);
401 data = new wxPyTreeItemData();
402 data->SetId(item); // set the id
403 self->SetItemData(item, data);
405 return data->GetData();
408 %pythoncode { GetPyData = GetItemPyData }
411 // get the item's text colour
412 wxColour GetItemTextColour(const wxTreeItemId& item) const;
414 // get the item's background colour
415 wxColour GetItemBackgroundColour(const wxTreeItemId& item) const;
417 // get the item's font
418 wxFont GetItemFont(const wxTreeItemId& item) const;
423 void SetItemText(const wxTreeItemId& item, const wxString& text);
425 // get one of the images associated with the item (normal by default)
426 void SetItemImage(const wxTreeItemId& item, int image,
427 wxTreeItemIcon which = wxTreeItemIcon_Normal);
430 // associate a wxPyTreeItemData with the tree item
431 void SetItemData(const wxTreeItemId& item, wxPyTreeItemData* data) {
432 data->SetId(item); // set the id
433 self->SetItemData(item, data);
436 // associate a Python object with the tree item
437 void SetItemPyData(const wxTreeItemId& item, PyObject* obj) {
438 wxPyTreeItemData* data = (wxPyTreeItemData*)self->GetItemData(item);
440 data = new wxPyTreeItemData(obj);
441 data->SetId(item); // set the id
442 self->SetItemData(item, data);
447 %pythoncode { SetPyData = SetItemPyData }
450 // force appearance of [+] button near the item. This is useful to
451 // allow the user to expand the items which don't have any children now
452 // - but instead add them only when needed, thus minimizing memory
453 // usage and loading time.
454 void SetItemHasChildren(const wxTreeItemId& item, bool has = True);
456 // the item will be shown in bold
457 void SetItemBold(const wxTreeItemId& item, bool bold = True);
460 // the item will be shown with a drop highlight
461 void SetItemDropHighlight(const wxTreeItemId& item, bool highlight = True);
464 // set the items text colour
465 void SetItemTextColour(const wxTreeItemId& item, const wxColour& col);
467 // set the items background colour
468 void SetItemBackgroundColour(const wxTreeItemId& item, const wxColour& col);
470 // set the items font (should be of the same height for all items)
471 void SetItemFont(const wxTreeItemId& item, const wxFont& font);
474 // is the item visible (it might be outside the view or not expanded)?
475 bool IsVisible(const wxTreeItemId& item) const;
477 // does the item has any children?
478 bool ItemHasChildren(const wxTreeItemId& item) const;
480 // is the item expanded (only makes sense if HasChildren())?
481 bool IsExpanded(const wxTreeItemId& item) const;
483 // is this item currently selected (the same as has focus)?
484 bool IsSelected(const wxTreeItemId& item) const;
486 // is item text in bold font?
487 bool IsBold(const wxTreeItemId& item) const;
490 // if 'recursively' is False, only immediate children count, otherwise
491 // the returned number is the number of all items in this branch
492 size_t GetChildrenCount(const wxTreeItemId& item,
493 bool recursively = True) /*const*/;
497 // get the root tree item
498 // wxTreeItemId.IsOk() will return False if there is no such item
499 wxTreeItemId GetRootItem() const;
501 // get the item currently selected
502 // wxTreeItemId.IsOk() will return False if there is no such item
503 wxTreeItemId GetSelection() const;
506 // get the items currently selected, return the number of such item
508 // NB: this operation is expensive and can take a long time for a
509 // control with a lot of items (~ O(number of items)).
510 PyObject* GetSelections() {
511 wxPyBeginBlockThreads();
512 PyObject* rval = PyList_New(0);
513 wxArrayTreeItemIds array;
515 num = self->GetSelections(array);
516 for (x=0; x < num; x++) {
517 wxTreeItemId *tii = new wxTreeItemId(array.Item(x));
518 PyObject* item = wxPyConstructObject((void*)tii, wxT("wxTreeItemId"), True);
519 PyList_Append(rval, item);
521 wxPyEndBlockThreads();
526 // get the parent of this item
527 // wxTreeItemId.IsOk() will return False if there is no such item
528 wxTreeItemId GetItemParent(const wxTreeItemId& item) const;
532 // Get the first child of this item. Returns a wxTreeItemId and an
533 // opaque "cookie" value that should be passed to GetNextChild in
534 // order to continue the search.
535 PyObject* GetFirstChild(const wxTreeItemId& item) {
536 wxTreeItemIdValue cookie = 0;
537 wxTreeItemId ritem = self->GetFirstChild(item, cookie);
538 wxPyBeginBlockThreads();
539 PyObject* tup = PyTuple_New(2);
540 PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(&ritem, wxT("wxTreeItemId"), True));
541 PyTuple_SET_ITEM(tup, 1, wxPyConstructObject(cookie, wxT("wxTreeItemIdValue"), True));
542 wxPyEndBlockThreads();
547 // Get the next child of this item. The cookie parameter is the 2nd
548 // value returned from GetFirstChild or the previous GetNextChild.
549 // Returns a wxTreeItemId and an opaque "cookie" value that should be
550 // passed to GetNextChild in order to continue the search.
551 PyObject* GetNextChild(const wxTreeItemId& item, wxTreeItemIdValue& cookie) {
552 wxTreeItemId ritem = self->GetNextChild(item, cookie);
553 wxPyBeginBlockThreads();
554 PyObject* tup = PyTuple_New(2);
555 PyTuple_SET_ITEM(tup, 0, wxPyConstructObject(&ritem, wxT("wxTreeItemId"), True));
556 PyTuple_SET_ITEM(tup, 1, wxPyConstructObject(cookie, wxT("wxTreeItemIdValue"), True));
557 wxPyEndBlockThreads();
562 // get the last child of this item
563 wxTreeItemId GetLastChild(const wxTreeItemId& item) const;
565 // get the next sibling of this item
566 wxTreeItemId GetNextSibling(const wxTreeItemId& item) const;
568 // get the previous sibling
569 wxTreeItemId GetPrevSibling(const wxTreeItemId& item) const;
571 // get first visible item
572 wxTreeItemId GetFirstVisibleItem() const;
574 // get the next visible item: item must be visible itself!
575 // see IsVisible() and wxTreeCtrl::GetFirstVisibleItem()
576 wxTreeItemId GetNextVisible(const wxTreeItemId& item) const;
578 // get the previous visible item: item must be visible itself!
579 wxTreeItemId GetPrevVisible(const wxTreeItemId& item) const;
583 // add the root node to the tree
584 wxTreeItemId AddRoot(const wxString& text,
585 int image = -1, int selectedImage = -1,
586 wxPyTreeItemData *data = NULL);
588 // insert a new item in as the first child of the parent
589 wxTreeItemId PrependItem(const wxTreeItemId& parent,
590 const wxString& text,
591 int image = -1, int selectedImage = -1,
592 wxPyTreeItemData *data = NULL);
594 // insert a new item after a given one
595 wxTreeItemId InsertItem(const wxTreeItemId& parent,
596 const wxTreeItemId& idPrevious,
597 const wxString& text,
598 int image = -1, int selectedImage = -1,
599 wxPyTreeItemData *data = NULL);
601 // insert a new item before the one with the given index
602 %name(InsertItemBefore)
603 wxTreeItemId InsertItem(const wxTreeItemId& parent,
605 const wxString& text,
606 int image = -1, int selectedImage = -1,
607 wxPyTreeItemData *data = NULL);
609 // insert a new item in as the last child of the parent
610 wxTreeItemId AppendItem(const wxTreeItemId& parent,
611 const wxString& text,
612 int image = -1, int selectedImage = -1,
613 wxPyTreeItemData *data = NULL);
617 // delete this item and associated data if any
618 void Delete(const wxTreeItemId& item);
620 // delete all children (but don't delete the item itself)
621 // NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events
622 void DeleteChildren(const wxTreeItemId& item);
624 // delete all items from the tree
625 // NB: this won't send wxEVT_COMMAND_TREE_ITEM_DELETED events
626 void DeleteAllItems();
630 void Expand(const wxTreeItemId& item);
632 // collapse the item without removing its children
633 void Collapse(const wxTreeItemId& item);
635 // collapse the item and remove all children
636 void CollapseAndReset(const wxTreeItemId& item);
638 // toggles the current state
639 void Toggle(const wxTreeItemId& item);
642 // remove the selection from currently selected item (if any)
645 // unselect all items (only makes sense for multiple selection control)
649 void SelectItem(const wxTreeItemId& item);
651 // make sure this item is visible (expanding the parent item and/or
652 // scrolling to this item if necessary)
653 void EnsureVisible(const wxTreeItemId& item);
655 // scroll to this item (but don't expand its parent)
656 void ScrollTo(const wxTreeItemId& item);
660 // start editing the item label: this (temporarily) replaces the item
661 // with a one line edit control. The item will be selected if it hadn't
663 /**wxTextCtrl* */ void EditLabel(const wxTreeItemId& item);
665 // returns the same pointer as StartEdit() if the item is being edited,
666 // NULL otherwise (it's assumed that no more than one item may be
667 // edited simultaneously)
668 wxTextCtrl* GetEditControl() const;
671 // end editing and accept or discard the changes to item label
672 void EndEditLabel(const wxTreeItemId& item, bool discardChanges = False);
676 // Sort the children of this item using OnCompareItems, a member function
677 // that is called to compare 2 items and should return -1, 0 or +1 if the
678 // first item is less than, equal to or greater than the second one. The
679 // base class version performs alphabetic comparaison of item labels
681 void SortChildren(const wxTreeItemId& item);
686 wxTreeItemId, HitTest(const wxPoint& point, int& OUTPUT),
687 "HitTest(Point point) -> (item, where)",
688 "Determine which item (if any) belongs the given point. The\n"
689 "coordinates specified are relative to the client area of tree ctrl\n"
690 "and the where return value is set to a bitmask of wxTREE_HITTEST_xxx\n"
695 // get the bounding rectangle of the item (or of its label only)
696 PyObject* GetBoundingRect(const wxTreeItemId& item, bool textOnly = False) {
698 if (self->GetBoundingRect(item, rect, textOnly)) {
699 wxPyBeginBlockThreads();
700 wxRect* r = new wxRect(rect);
701 PyObject* val = wxPyConstructObject((void*)r, wxT("wxRect"), True);
702 wxPyEndBlockThreads();
714 //---------------------------------------------------------------------------
716 // Map renamed classes back to their common name for OOR
717 wxPyPtrTypeMap_Add("wxTreeItemData", "wxPyTreeItemData");
718 wxPyPtrTypeMap_Add("wxTreeCtrl", "wxPyTreeCtrl");
720 //---------------------------------------------------------------------------