1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Denis Pershin
8 // Copyright: (c) Denis Pershin
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "treectrl.h"
16 // For compilers that support precompilation, includes "wx.h".
17 #include "wx/wxprec.h"
27 #include "wx/gtk/treectrl.h"
32 static void wxConvertToGtkTreeItem(wxTreeCtrl
*owner
, wxTreeItem
& info
, GtkTreeItem
**gtkItem
);
33 static void wxConvertFromGtkTreeItem(wxTreeItem
& info
, GtkTreeItem
*gtkItem
);
34 static void gtk_treectrl_count_callback (GtkWidget
*widget
, gpointer data
);
35 // static void gtk_treectrl_next_callback (GtkWidget *widget, gpointer data);
36 // static void gtk_treectrl_next_visible_callback (GtkWidget *widget, gpointer data);
37 // static void gtk_treectrl_next_selected_callback (GtkWidget *widget, gpointer data);
39 static void gtk_treeitem_expand_callback(GtkWidget
*WXUNUSED(widget
), wxTreeItem
*treeitem
);
40 static void gtk_treeitem_collapse_callback( GtkWidget
*WXUNUSED(widget
), wxTreeItem
*treeitem
);
41 static void gtk_treeitem_select_callback( GtkWidget
*WXUNUSED(widget
), wxTreeItem
*treeitem
);
43 static void gtk_treeitem_expand_callback(GtkWidget
*widget
, wxTreeItem
*treeitem
)
45 wxTreeCtrl
*owner
= (wxTreeCtrl
*)gtk_object_get_data(GTK_OBJECT(widget
), "owner");
49 long id
= (long)gtk_object_get_data(GTK_OBJECT(widget
), "id");
50 owner
->SendExpanding(id
);
51 owner
->SendExpanded(id
);
54 static void gtk_treeitem_collapse_callback(GtkWidget
*widget
, wxTreeItem
*treeitem
)
56 wxTreeCtrl
*owner
= (wxTreeCtrl
*)gtk_object_get_data(GTK_OBJECT(widget
), "owner");
60 long id
= (long)gtk_object_get_data(GTK_OBJECT(widget
), "id");
61 owner
->SendCollapsing(id
);
62 owner
->SendCollapsed(id
);
65 static void gtk_treeitem_select_callback(GtkWidget
*widget
, wxTreeItem
*treeitem
)
67 wxTreeCtrl
*owner
= (wxTreeCtrl
*)gtk_object_get_data(GTK_OBJECT(widget
), "owner");
71 long id
= (long)gtk_object_get_data(GTK_OBJECT(widget
), "id");
72 owner
->SendSelChanging(id
);
73 owner
->SendSelChanged(id
);
76 #if !USE_SHARED_LIBRARY
77 IMPLEMENT_DYNAMIC_CLASS(wxTreeCtrl
, wxControl
)
78 IMPLEMENT_DYNAMIC_CLASS(wxTreeItem
, wxObject
)
81 wxTreeCtrl::wxTreeCtrl()
83 m_imageListNormal
= NULL
;
84 m_imageListState
= NULL
;
89 bool wxTreeCtrl::Create(wxWindow
*parent
, wxWindowID id
, const wxPoint
& pos
, const wxSize
& size
,
90 long style
, const wxValidator
& validator
, const wxString
& name
)
92 m_imageListNormal
= NULL
;
93 m_imageListState
= NULL
;
102 m_windowStyle
= style
;
117 PreCreation( parent
, id
, pos
, size
, style
, name
);
119 m_widget
= gtk_scrolled_window_new(NULL
, NULL
);
120 gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(m_widget
),
121 GTK_POLICY_AUTOMATIC
, GTK_POLICY_AUTOMATIC
);
123 m_tree
= GTK_TREE(gtk_tree_new());
125 gtk_container_add(GTK_CONTAINER(m_widget
), GTK_WIDGET(m_tree
));
126 gtk_widget_show(GTK_WIDGET(m_tree
));
128 wxSystemSettings settings
;
129 SetBackgroundColour(settings
.GetSystemColour(wxSYS_COLOUR_WINDOW
));
130 SetForegroundColour(parent
->GetForegroundColour());
133 SetValidator(validator
);
137 gtk_widget_realize(GTK_WIDGET(m_tree
));
144 wxTreeCtrl::~wxTreeCtrl()
146 wxDELETE(m_textCtrl
);
150 static void gtk_treectrl_count_callback (GtkWidget
*widget
, gpointer data
)
152 int count
= (*((int *)data
));
155 if (GTK_IS_CONTAINER(widget
))
156 gtk_container_foreach(GTK_CONTAINER(widget
), gtk_treectrl_count_callback
, data
);
159 int wxTreeCtrl::GetCount() const
163 if (m_anchor
!= NULL
)
164 gtk_container_foreach(GTK_CONTAINER(m_anchor
), gtk_treectrl_count_callback
, &count
);
168 int wxTreeCtrl::GetIndent() const
170 return m_tree
->indent_value
;
173 void wxTreeCtrl::SetIndent(int indent
)
175 m_tree
->indent_value
= indent
;
178 wxImageList
*wxTreeCtrl::GetImageList(int which
) const
180 if (which
== wxIMAGE_LIST_NORMAL
) {
181 return m_imageListNormal
;
184 if (which
== wxIMAGE_LIST_STATE
) {
185 return m_imageListState
;
190 void wxTreeCtrl::SetImageList(wxImageList
*imageList
, int which
)
192 if (which
== wxIMAGE_LIST_NORMAL
)
193 m_imageListNormal
= imageList
;
195 if (which
== wxIMAGE_LIST_STATE
)
196 m_imageListState
= imageList
;
199 long wxTreeCtrl::GetNextItem(long item
, int code
) const
202 case wxTREE_NEXT_CARET
:
203 // flag = TVGN_CARET;
205 case wxTREE_NEXT_CHILD
:
206 // flag = TVGN_CHILD;
208 case wxTREE_NEXT_DROPHILITE
:
209 // flag = TVGN_DROPHILITE;
211 case wxTREE_NEXT_FIRSTVISIBLE
:
212 // flag = TVGN_FIRSTVISIBLE;
214 case wxTREE_NEXT_NEXT
:
217 case wxTREE_NEXT_NEXTVISIBLE
:
218 // flag = TVGN_NEXTVISIBLE;
220 case wxTREE_NEXT_PARENT
:
221 // flag = TVGN_PARENT;
223 case wxTREE_NEXT_PREVIOUS
:
224 // flag = TVGN_PREVIOUS;
226 case wxTREE_NEXT_PREVIOUSVISIBLE
:
227 // flag = TVGN_PREVIOUSVISIBLE;
229 case wxTREE_NEXT_ROOT
:
236 // return (long) TreeView_GetNextItem( (HWND) GetHWND(), (HTREEITEM) item, flag);
240 bool wxTreeCtrl::ItemHasChildren(long item
) const
245 p
= findGtkTreeItem(item
);
247 gtk_container_foreach(GTK_CONTAINER(p
), gtk_treectrl_count_callback
, &count
);
252 static GtkTreeItem
*findItem(GtkTreeItem
*p
, long id
)
256 if (((long)gtk_object_get_data(GTK_OBJECT(p
), "id")) == id
)
259 if (p
->subtree
== NULL
)
262 GtkTree
*tree
= GTK_TREE(p
->subtree
);
264 GList
*list
= gtk_container_children(GTK_CONTAINER(tree
));
265 guint len
= g_list_length(list
);
267 for (guint i
=0; i
<len
;i
++) {
268 GList
*l
= g_list_nth(list
, i
);
269 if (!GTK_IS_TREE_ITEM(l
->data
))
271 q
= GTK_TREE_ITEM(l
->data
);
272 GtkTreeItem
*ret
= findItem(q
, id
);
280 GtkTreeItem
*wxTreeCtrl::findGtkTreeItem(long id
) const
282 return findItem(m_anchor
, id
);
285 long wxTreeCtrl::GetChild(long item
) const
288 GtkTreeItem
*next
= NULL
;
290 p
= findGtkTreeItem(item
);
291 GList
*list
= gtk_container_children(GTK_CONTAINER(p
));
292 next
= GTK_TREE_ITEM(list
->data
);;
295 return (long)gtk_object_get_data(GTK_OBJECT(next
), "id");
300 long wxTreeCtrl::GetParent(long item
) const
304 p
= findGtkTreeItem(item
);
306 return (long)gtk_object_get_data(GTK_OBJECT(p
), "parent");
311 long wxTreeCtrl::GetFirstVisibleItem() const
313 GtkTreeItem
*next
= NULL
;
315 GList
*list
= gtk_container_children(GTK_CONTAINER(m_anchor
));
316 next
= GTK_TREE_ITEM(list
->data
);;
317 // gtk_container_foreach(GTK_CONTAINER(m_anchor), gtk_treectrl_next_visible_callback, &next);
320 return (long)gtk_object_get_data(GTK_OBJECT(next
), "id");
325 long wxTreeCtrl::GetNextVisibleItem(long item
) const
328 GtkTreeItem
*next
= NULL
;
330 p
= findGtkTreeItem(item
);
331 GList
*list
= gtk_container_children(GTK_CONTAINER(p
));
332 next
= GTK_TREE_ITEM(list
->data
);;
333 // gtk_container_foreach(GTK_CONTAINER(p), gtk_treectrl_next_visible_callback, &next);
336 return (long)gtk_object_get_data(GTK_OBJECT(next
), "id");
341 long wxTreeCtrl::GetSelection() const
343 GtkTreeItem
*next
= NULL
;
345 GList
*list
= gtk_container_children(GTK_CONTAINER(m_anchor
));
346 next
= GTK_TREE_ITEM(list
->data
);;
347 // gtk_container_foreach(GTK_CONTAINER(m_anchor), gtk_treectrl_next_selected_callback, &next);
350 return (long)gtk_object_get_data(GTK_OBJECT(next
), "id");
355 long wxTreeCtrl::GetRootItem() const
357 return (long)gtk_object_get_data(GTK_OBJECT(m_anchor
), "id");
360 bool wxTreeCtrl::GetItem(wxTreeItem
& info
) const
364 p
= findGtkTreeItem(info
.m_itemId
);
367 wxLogError("TreeCtrl::GetItem failed.");
371 wxConvertFromGtkTreeItem(info
, p
);
376 bool wxTreeCtrl::SetItem(wxTreeItem
& info
)
380 p
= findGtkTreeItem(info
.m_itemId
);
383 wxLogError("TreeCtrl::SetItem failed.");
387 wxConvertToGtkTreeItem(this, info
, &p
);
392 int wxTreeCtrl::GetItemState(long item
, long stateMask
) const
396 info
.m_mask
= wxTREE_MASK_STATE
;
397 info
.m_stateMask
= stateMask
;
398 info
.m_itemId
= item
;
406 bool wxTreeCtrl::SetItemState(long item
, long state
, long stateMask
)
410 info
.m_mask
= wxTREE_MASK_STATE
;
411 info
.m_state
= state
;
412 info
.m_stateMask
= stateMask
;
413 info
.m_itemId
= item
;
415 return SetItem(info
);
418 bool wxTreeCtrl::SetItemImage(long item
, int image
, int selImage
)
422 info
.m_mask
= wxTREE_MASK_IMAGE
;
423 info
.m_image
= image
;
425 info
.m_selectedImage
= selImage
;
426 info
.m_mask
|= wxTREE_MASK_SELECTED_IMAGE
;
428 info
.m_itemId
= item
;
430 return SetItem(info
);
433 wxString
wxTreeCtrl::GetItemText(long item
) const
437 info
.m_mask
= wxTREE_MASK_TEXT
;
438 info
.m_itemId
= item
;
445 void wxTreeCtrl::SetItemText(long item
, const wxString
& str
)
449 info
.m_mask
= wxTREE_MASK_TEXT
;
450 info
.m_itemId
= item
;
456 long wxTreeCtrl::GetItemData(long item
) const
460 info
.m_mask
= wxTREE_MASK_DATA
;
461 info
.m_itemId
= item
;
468 bool wxTreeCtrl::SetItemData(long item
, long data
)
472 info
.m_mask
= wxTREE_MASK_DATA
;
473 info
.m_itemId
= item
;
476 return SetItem(info
);
479 bool wxTreeCtrl::GetItemRect(long item
, wxRectangle
& rect
, bool textOnly
) const
484 *(HTREEITEM*)& rect2 = (HTREEITEM) item;
485 bool success = (::SendMessage((HWND) GetHWND(), TVM_GETITEMRECT, (WPARAM)textOnly,
486 (LPARAM)&rect2) != 0);
490 rect.width = rect2.right - rect2.left;
491 rect.height = rect2.bottom - rect2.left;
494 wxFAIL_MSG("Not implemented");
499 wxTextCtrl
* wxTreeCtrl::GetEditControl() const
505 bool wxTreeCtrl::DeleteItem(long item
)
509 p
= findGtkTreeItem(item
);
513 GtkTreeItem
*parent
= GTK_TREE_ITEM(GTK_WIDGET(p
)->parent
);
517 gtk_container_remove(GTK_CONTAINER(parent
), GTK_WIDGET(p
));
522 bool wxTreeCtrl::DeleteChildren(long item
)
526 p
= findGtkTreeItem(item
);
530 gtk_tree_item_remove_subtree(GTK_TREE_ITEM(p
));
535 bool wxTreeCtrl::ExpandItem(long item
, int action
)
539 p
= findGtkTreeItem(item
);
545 case wxTREE_EXPAND_EXPAND
:
546 gtk_tree_item_expand(GTK_TREE_ITEM(p
));
549 case wxTREE_EXPAND_COLLAPSE
:
550 gtk_tree_item_collapse(GTK_TREE_ITEM(p
));
553 case wxTREE_EXPAND_COLLAPSE_RESET
:
554 gtk_tree_item_collapse(GTK_TREE_ITEM(p
));
555 gtk_tree_item_remove_subtree(GTK_TREE_ITEM(p
));
558 case wxTREE_EXPAND_TOGGLE
:
560 gtk_tree_item_collapse(GTK_TREE_ITEM(p
));
562 gtk_tree_item_expand(GTK_TREE_ITEM(p
));
566 wxFAIL_MSG("unknown action in wxTreeCtrl::ExpandItem");
572 long wxTreeCtrl::InsertItem(long parent
, wxTreeItem
& info
, long insertAfter
)
575 GtkTreeItem
*item
= NULL
;
577 info
.m_itemId
= m_curitemId
;
580 wxConvertToGtkTreeItem(this, info
, &item
);
583 p
= findGtkTreeItem(parent
);
584 if (p
->subtree
== NULL
) {
585 GtkTree
*tree
= GTK_TREE(gtk_tree_new());
586 gtk_tree_item_set_subtree(GTK_TREE_ITEM(p
), GTK_WIDGET(tree
));
587 gtk_widget_show(GTK_WIDGET(tree
));
591 gtk_container_add(GTK_CONTAINER(p
->subtree
), GTK_WIDGET(item
));
594 gtk_container_add(GTK_CONTAINER(m_tree
), GTK_WIDGET(item
));
597 if ((info
.m_mask
& wxTREE_MASK_CHILDREN
) != 0) {
598 GtkTree
*tree
= GTK_TREE(gtk_tree_new());
599 gtk_tree_item_set_subtree(GTK_TREE_ITEM(item
), GTK_WIDGET(tree
));
600 gtk_widget_show(GTK_WIDGET(tree
));
603 gtk_widget_show(GTK_WIDGET(item
));
605 gtk_signal_connect(GTK_OBJECT(item
), "select",
606 GTK_SIGNAL_FUNC(gtk_treeitem_select_callback
), (gpointer
)this );
608 gtk_signal_connect(GTK_OBJECT(item
), "deselect",
609 GTK_SIGNAL_FUNC(gtk_treeitem_select_callback
), (gpointer
)this );
611 gtk_signal_connect(GTK_OBJECT(item
), "expand",
612 GTK_SIGNAL_FUNC(gtk_treeitem_expand_callback
), (gpointer
)this );
613 gtk_signal_connect(GTK_OBJECT(item
), "collapse",
614 GTK_SIGNAL_FUNC(gtk_treeitem_collapse_callback
), (gpointer
)this );
616 return info
.m_itemId
;
619 long wxTreeCtrl::InsertItem(long parent
, const wxString
& label
, int image
,
620 int selImage
, long insertAfter
) {
624 info
.m_mask
= wxTREE_MASK_TEXT
;
626 info
.m_mask
|= wxTREE_MASK_IMAGE
| wxTREE_MASK_SELECTED_IMAGE
;
627 info
.m_image
= image
;
629 info
.m_selectedImage
= image
;
631 info
.m_selectedImage
= selImage
;
634 return InsertItem(parent
, info
, insertAfter
);
637 bool wxTreeCtrl::SelectItem(long item
)
641 p
= findGtkTreeItem(item
);
645 gtk_tree_item_select(p
);
649 bool wxTreeCtrl::ScrollTo(long item
)
651 wxFAIL_MSG("Not implemented");
653 return FALSE
; // Still unimplemented
656 bool wxTreeCtrl::DeleteAllItems()
658 gtk_tree_item_remove_subtree(m_anchor
);
662 wxTextCtrl
* wxTreeCtrl::EditLabel(long item
, wxClassInfo
* textControlClass
)
664 wxASSERT( (textControlClass
->IsKindOf(CLASSINFO(wxTextCtrl
))) );
667 HWND hWnd = (HWND) TreeView_EditLabel((HWND) GetHWND(), item);
671 m_textCtrl->UnsubclassWin();
672 m_textCtrl->SetHWND(0);
677 m_textCtrl = (wxTextCtrl*) textControlClass->CreateObject();
678 m_textCtrl->SetHWND((WXHWND) hWnd);
679 m_textCtrl->SubclassWin((WXHWND) hWnd);
682 wxFAIL_MSG("Not implemented");
687 // End label editing, optionally cancelling the edit
688 bool wxTreeCtrl::EndEditLabel(bool cancel
)
691 bool success = (TreeView_EndEditLabelNow((HWND) GetHWND(), cancel) != 0);
695 m_textCtrl->UnsubclassWin();
696 m_textCtrl->SetHWND(0);
702 wxFAIL_MSG("Not implemented");
707 long wxTreeCtrl::HitTest(const wxPoint
& point
, int& flags
)
710 TV_HITTESTINFO hitTestInfo;
711 hitTestInfo.pt.x = (int) point.x;
712 hitTestInfo.pt.y = (int) point.y;
714 TreeView_HitTest((HWND) GetHWND(), & hitTestInfo);
717 if ( hitTestInfo.flags & TVHT_ABOVE )
718 flags |= wxTREE_HITTEST_ABOVE;
719 if ( hitTestInfo.flags & TVHT_BELOW )
720 flags |= wxTREE_HITTEST_BELOW;
721 if ( hitTestInfo.flags & TVHT_NOWHERE )
722 flags |= wxTREE_HITTEST_NOWHERE;
723 if ( hitTestInfo.flags & TVHT_ONITEMBUTTON )
724 flags |= wxTREE_HITTEST_ONITEMBUTTON;
725 if ( hitTestInfo.flags & TVHT_ONITEMICON )
726 flags |= wxTREE_HITTEST_ONITEMICON;
727 if ( hitTestInfo.flags & TVHT_ONITEMINDENT )
728 flags |= wxTREE_HITTEST_ONITEMINDENT;
729 if ( hitTestInfo.flags & TVHT_ONITEMLABEL )
730 flags |= wxTREE_HITTEST_ONITEMLABEL;
731 if ( hitTestInfo.flags & TVHT_ONITEMRIGHT )
732 flags |= wxTREE_HITTEST_ONITEMRIGHT;
733 if ( hitTestInfo.flags & TVHT_ONITEMSTATEICON )
734 flags |= wxTREE_HITTEST_ONITEMSTATEICON;
735 if ( hitTestInfo.flags & TVHT_TOLEFT )
736 flags |= wxTREE_HITTEST_TOLEFT;
737 if ( hitTestInfo.flags & TVHT_TORIGHT )
738 flags |= wxTREE_HITTEST_TORIGHT;
740 return (long) hitTestInfo.hItem ;
742 wxFAIL_MSG("Not implemented");
748 wxImageList *wxTreeCtrl::CreateDragImage(long item)
753 bool wxTreeCtrl::SortChildren(long item
)
755 wxFAIL_MSG("Not implemented");
757 return FALSE
; // Still unimplemented
760 bool wxTreeCtrl::EnsureVisible(long item
)
762 wxFAIL_MSG("Not implemented");
764 return FALSE
; // Still unimplemented
767 void wxTreeCtrl::SendExpanding(long item
)
769 wxTreeEvent
event(wxEVT_COMMAND_TREE_ITEM_EXPANDING
, GetId());
770 event
.SetEventObject(this);
774 void wxTreeCtrl::SendExpanded(long item
)
776 wxTreeEvent
event(wxEVT_COMMAND_TREE_ITEM_EXPANDED
, GetId());
777 event
.SetEventObject(this);
781 void wxTreeCtrl::SendCollapsing(long item
)
783 wxTreeEvent
event(wxEVT_COMMAND_TREE_ITEM_COLLAPSING
, GetId());
784 event
.SetEventObject(this);
788 void wxTreeCtrl::SendCollapsed(long item
)
790 wxTreeEvent
event(wxEVT_COMMAND_TREE_ITEM_COLLAPSED
, GetId());
791 event
.SetEventObject(this);
795 void wxTreeCtrl::SendSelChanging(long item
)
797 wxTreeEvent
event(wxEVT_COMMAND_TREE_SEL_CHANGED
, GetId());
798 event
.SetEventObject(this);
802 void wxTreeCtrl::SendSelChanged(long item
)
804 wxTreeEvent
event(wxEVT_COMMAND_TREE_SEL_CHANGING
, GetId());
805 event
.SetEventObject(this);
809 // Tree item structure
810 wxTreeItem::wxTreeItem()
817 m_selectedImage
= -1;
822 // If getFullInfo is TRUE, we explicitly query for more info if we haven't got it all.
824 static void wxConvertFromGtkTreeItem(wxTreeItem
& info
, GtkTreeItem
*gtkItem
)
829 info
.m_data
= (long)gtk_object_get_data(GTK_OBJECT(gtkItem
), "data");
830 info
.m_itemId
= (long)gtk_object_get_data(GTK_OBJECT(gtkItem
), "id");
831 info
.m_image
= (int)gtk_object_get_data(GTK_OBJECT(gtkItem
), "image");
832 info
.m_selectedImage
= (int)gtk_object_get_data(GTK_OBJECT(gtkItem
), "selectedImage");
836 info
.m_stateMask
= 0;
837 l
= GTK_LABEL(gtk_object_get_data(GTK_OBJECT(gtkItem
), "label"));
838 gtk_label_get(l
, &t
);
842 static void wxConvertToGtkTreeItem(wxTreeCtrl
*owner
, wxTreeItem
& info
, GtkTreeItem
**gtkItem
)
844 GtkTreeItem
*item
= (*gtkItem
);
847 item
= GTK_TREE_ITEM(gtk_tree_item_new());
849 GtkHBox
*m_box
= GTK_HBOX(gtk_hbox_new(FALSE
, 0));
850 gtk_container_add (GTK_CONTAINER (item
), GTK_WIDGET(m_box
));
852 gtk_object_set_data(GTK_OBJECT(item
), "box", m_box
);
855 const wxImageList
*list
;
857 if ((list
= owner
->GetImageList(wxIMAGE_LIST_NORMAL
)) != NULL
)
858 if ((bmp
= list
->GetBitmap(info
.m_image
)) != NULL
)
860 GdkBitmap
*mask
= NULL
;
862 mask
= bmp
->GetMask()->GetBitmap();
863 GtkPixmap
*m_image_widget
= GTK_PIXMAP(gtk_pixmap_new(bmp
->GetPixmap(), mask
));
864 gtk_misc_set_alignment (GTK_MISC (m_image_widget
), 0.0, 0.5);
865 gtk_box_pack_start(GTK_BOX(m_box
), GTK_WIDGET(m_image_widget
), FALSE
, FALSE
, 0);
866 gtk_object_set_data(GTK_OBJECT(item
), "image", m_image_widget
);
867 gtk_widget_show (GTK_WIDGET(m_image_widget
));
870 GtkLabel
*m_label_widget
= GTK_LABEL(gtk_label_new ((char *)(const char *)info
.m_text
));
871 gtk_misc_set_alignment (GTK_MISC (m_label_widget
), 0.5, 0.5);
873 gtk_box_pack_start(GTK_BOX(m_box
), GTK_WIDGET(m_label_widget
), FALSE
, FALSE
, 0);
874 gtk_object_set_data(GTK_OBJECT(item
), "label", m_label_widget
);
876 gtk_widget_show (GTK_WIDGET(m_label_widget
));
878 gtk_widget_show(GTK_WIDGET(m_box
));
879 gtk_object_set_data(GTK_OBJECT(item
), "id", (gpointer
)info
.m_itemId
);
880 gtk_object_set_data(GTK_OBJECT(item
), "owner", owner
);
886 IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent
, wxCommandEvent
)
888 wxTreeEvent::wxTreeEvent(wxEventType commandType
, int id
)
889 : wxCommandEvent(commandType
, id
)