Re: Havoc's book and browsing GtkCTree



Hi,

> Last question, I want to browse all the elements of a GtkCtree, but the
> procedure make me browse only the visibles elements. What is the right
> way
> to do it... GTK_CTREE_NODE_NEXT is obviously not the right way to do
> it...

I made a little complement :

/* Next */
GtkCTreeNode *gtdk_ctree_next (GtkCTreeNode *node)
{
  GtkCTreeNode *node_parent;

  /* Go ! */
  if (GTK_CTREE_ROW (node)->children)
    return (GTK_CTREE_ROW (node)->children);
  if (GTK_CTREE_ROW (node)->sibling)
    return (GTK_CTREE_ROW (node)->sibling);
  do
    {
      node_parent = GTK_CTREE_ROW (node)->parent;
      if (!node_parent)
	node = NULL;
      else
	if (GTK_CTREE_ROW (node_parent)->sibling == NULL)
	  node = node_parent;
	else
	  node = GTK_CTREE_ROW (node_parent)->sibling;
    }
  while ((node == node_parent) && (node));
  return node;
}



Le sam, 04 nov 2000 23:52:56, Franck Martin a écrit :
> 
> Havoc,
> 
> I'm reading your book on gtk/gnome and I find it particulary useful.
> 
> However it lacks the widget detailed description of the gtk tutorial, but
> that's ok because it is in the gtk tutorial. On the other hand the gtk
> tutorial do not explain the argument procedures that must be included in
> a
> custom widget.
> It lacks also information on when a pointer is freed by the procedure or
> not. I find it sometime difficult to know this information and I have to
> look into the code, which I shouldn't.
> 
> I had recently this problem with the get_data_full and put_data_full
> procedures for instance. May be you could dedicate a paragraph on these
> matters...
> 
> BTW some chapters are missing from the downloadable tarball. I would have
> ordered the book, but from where am I (Fiji), it is much faster to
> download the book than to buy it. (1 hour versus 3 months)
> 
> Last question, I want to browse all the elements of a GtkCtree, but the
> procedure make me browse only the visibles elements. What is the right
> way
> to do it... GTK_CTREE_NODE_NEXT is obviously not the right way to do
> it...
> Or the other option is how do I retreive all the selected items even when
> they are hidden because the branch is collapsed.
> 
> Cheers...
> franck sopac org
> 
> 
> _______________________________________________
> gnome-devel-list mailing list
> gnome-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-devel-list
> 
> 






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]