// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "treectrl.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#include "wx/wx.h"
#endif
-#include "wx/gtk/treectrl.h"
+#include "wx/gtk1/treectrl.h"
#include "wx/textctrl.h"
#include "wx/log.h"
gtk_container_foreach(GTK_CONTAINER(widget), gtk_treectrl_count_callback, data);
}
-size_t wxTreeCtrl::GetCount() const {
- int count = 0;
+unsigned int wxTreeCtrl::GetCount() const
+{
+ int count = 0;
+
+ if (m_anchor != NULL)
+ gtk_treectrl_count_callback(GTK_WIDGET(m_anchor), &count);
- if (m_anchor != NULL)
- gtk_treectrl_count_callback(GTK_WIDGET(m_anchor), &count);
- return count;
+ return (unsigned int)count;
}
unsigned int wxTreeCtrl::GetIndent() const {
return p;
}
-wxTreeItemId wxTreeCtrl::GetParent(const wxTreeItemId& item) const {
+wxTreeItemId wxTreeCtrl::GetItemParent(const wxTreeItemId& item) const {
if (item.IsOk())
return (GtkTreeItem *)gtk_object_get_data(GTK_OBJECT((GtkTreeItem *)item), "parent");
const wxBitmap *bmp;
const wxImageList *list;
if ((list = GetImageList(wxIMAGE_LIST_NORMAL)) != NULL)
- if ((bmp = list->GetBitmap(image)) != NULL)
+ if ((bmp = list->GetBitmapPtr(image)) != NULL)
if (bmp->Ok()) {
GdkBitmap *mask = NULL;
if (bmp->GetMask())
p = findGtkTreeItem(item);
GList *list = gtk_container_children(GTK_CONTAINER(p));
- next = GTK_TREE_ITEM(list->data);;
+ next = GTK_TREE_ITEM(list->data);
if (next != NULL)
return (long)gtk_object_get_data(GTK_OBJECT(next), "id");
GtkTreeItem *next = NULL;
GList *list = gtk_container_children(GTK_CONTAINER(m_anchor));
- next = GTK_TREE_ITEM(list->data);;
+ next = GTK_TREE_ITEM(list->data);
// gtk_container_foreach(GTK_CONTAINER(m_anchor), gtk_treectrl_next_visible_callback, &next);
if (next != NULL)
p = findGtkTreeItem(item);
GList *list = gtk_container_children(GTK_CONTAINER(p));
- next = GTK_TREE_ITEM(list->data);;
+ next = GTK_TREE_ITEM(list->data);
// gtk_container_foreach(GTK_CONTAINER(p), gtk_treectrl_next_visible_callback, &next);
if (next != NULL)