// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "treectrl.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
return;
GtkLabel *l = GTK_LABEL(gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)item), "w_label"));
- gtk_label_set(l, text);
+ gtk_label_set_text(l, text);
}
void wxTreeCtrl::SetItemImage(const wxTreeItemId& item, int image) {
gtk_widget_show(GTK_WIDGET(item));
- gtk_signal_connect(GTK_OBJECT(item), "select",
- GTK_SIGNAL_FUNC(gtk_treeitem_select_callback), (gpointer)this );
-
- gtk_signal_connect(GTK_OBJECT(item), "deselect",
- GTK_SIGNAL_FUNC(gtk_treeitem_select_callback), (gpointer)this );
-
- gtk_signal_connect(GTK_OBJECT(item), "expand",
- GTK_SIGNAL_FUNC(gtk_treeitem_expand_callback), (gpointer)this );
- gtk_signal_connect(GTK_OBJECT(item), "collapse",
- GTK_SIGNAL_FUNC(gtk_treeitem_collapse_callback), (gpointer)this );
+ g_signal_connect (item, "select",
+ G_CALLBACK (gtk_treeitem_select_callback), this);
+ g_signal_connect (item, "deselect",
+ G_CALLBACK (gtk_treeitem_select_callback), this);
+ g_signal_connect (item, "expand",
+ G_CALLBACK (gtk_treeitem_expand_callback), this);
+ g_signal_connect (item, "collapse",
+ G_CALLBACK (gtk_treeitem_collapse_callback), this);
return item;
}
#warning "Need to implement EndEditLabel"
/*
GtkLabel *m_label = (GtkLabel *)gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)m_editItem), "w_label");
- gtk_label_set(m_label, m_textCtrl->GetValue());
+ gtk_label_set_text(m_label, m_textCtrl->GetValue());
gtk_object_remove_data(GTK_OBJECT((GtkTreeItem *)m_editItem), "w_edit");
GtkTreeItem *next = NULL;
p = findGtkTreeItem(item);
- GList *list = gtk_container_children(GTK_CONTAINER(p));
- next = GTK_TREE_ITEM(list->data);;
+ GList *list = gtk_container_get_children(GTK_CONTAINER(p));
+ next = GTK_TREE_ITEM(list->data);
if (next != NULL)
return (long)gtk_object_get_data(GTK_OBJECT(next), "id");
long wxTreeCtrl::GetFirstVisibleItem(void) const {
GtkTreeItem *next = NULL;
- GList *list = gtk_container_children(GTK_CONTAINER(m_anchor));
- next = GTK_TREE_ITEM(list->data);;
+ GList *list = gtk_container_get_children(GTK_CONTAINER(m_anchor));
+ next = GTK_TREE_ITEM(list->data);
// gtk_container_foreach(GTK_CONTAINER(m_anchor), gtk_treectrl_next_visible_callback, &next);
if (next != NULL)
GtkTreeItem *next = NULL;
p = findGtkTreeItem(item);
- GList *list = gtk_container_children(GTK_CONTAINER(p));
- next = GTK_TREE_ITEM(list->data);;
+ GList *list = gtk_container_get_children(GTK_CONTAINER(p));
+ next = GTK_TREE_ITEM(list->data);
// gtk_container_foreach(GTK_CONTAINER(p), gtk_treectrl_next_visible_callback, &next);
if (next != NULL)
gtk_widget_show(GTK_WIDGET(item));
- gtk_signal_connect(GTK_OBJECT(item), "select",
- GTK_SIGNAL_FUNC(gtk_treeitem_select_callback), (gpointer)this );
-
- gtk_signal_connect(GTK_OBJECT(item), "deselect",
- GTK_SIGNAL_FUNC(gtk_treeitem_select_callback), (gpointer)this );
-
- gtk_signal_connect(GTK_OBJECT(item), "expand",
- GTK_SIGNAL_FUNC(gtk_treeitem_expand_callback), (gpointer)this );
- gtk_signal_connect(GTK_OBJECT(item), "collapse",
- GTK_SIGNAL_FUNC(gtk_treeitem_collapse_callback), (gpointer)this );
+ g_signal_connect (item, "select",
+ G_CALLBACK (gtk_treeitem_select_callback), this);
+ g_signal_connect (item, "deselect",
+ G_CALLBACK (gtk_treeitem_select_callback), this);
+ g_signal_connect (item, "expand",
+ G_CALLBACK (gtk_treeitem_expand_callback), this);
+ g_signal_connect (item, "collapse",
+ G_CALLBACK (gtk_treeitem_collapse_callback), this);
return info.m_itemId;
}