Re: GNode into a CTree



Something else I was thinking about, was needing the ability to make these
into menu's, etc.  This most likely needs the same thing that CTree does out
of GNode to make this work, so it probibly won't be much of an issue.  If I
can traverse the tree and have some way of telling whats what, I'll be happy
:-)

Ok, thanks.


On Sat, Aug 01, 1998 at 11:24:07AM +0200, Lars Hamann wrote:
> On Sat, Aug 01, 1998 at 05:48:20AM +0200, Tim Janik wrote:
> 
> > ok, after some ramblings with pavlov on irc, i guess we should provide
> > a recursive function gtk_ctree_insert_gnode() which will walk a GNode
> > tree and call a user defined handler function to construct the columns
> > contents from a GNode tree.
> 
> Sounds reasonable. 
> 
> > /* the arguments of GtkCTreeGNodeFunc are mostly taken from
> >  * gtk_ctree_insert(), but passed by reference, so they can
> >  * (and should) be modified by an implementation of
> >  * GtkCTreeGNodeFunc.
> >  *
> >  * notes:
> >  * - `n_columns' specifies the maximum index + 1 for text[].
> >  * -  the `is_leaf' argument can be determined automatically
> >  *    through G_NODE_IS_LEAF (node), and thus doesn't need
> >  *    to be passed to GtkCTreeGNodeFunc.
> 
> G_NODE_IS_LEAF is not enough, because you can't distinguish between
> an empty container and a real leaf, which can't hold some other node.
> (This distinction at least is needed for the reorder ability of CTree) 
> 
> >  * -  `ctree_depth' is provided to give the GtkCTreeGNodeFunc
> >  *    function a hint to determing the value for `*expanded'.
> >  * -  the gboolean return value determines whether a GtkCTreeNode
> >  *    should actually be created from this GNode.
> > */
> 
> [...]
> 
> > i guess, that's enough for people to get the basic idea. i'm curious to
> > hear comments on this issue, especially from lars ;)
> 
> The rest looks very good. :)
> I'll try to use GNodes in CTree too, but those changes could take some time.
> 
> > i'll most probably be out of town until sunday evening, so don't expect
> > me to reply too fast ;)
> 
> dito. ;) 
> 
> bye,
>   Lars
> 
> 
> -- 
>          To unsubscribe: mail gtk-devel-list-request@redhat.com with 
>                        "unsubscribe" as the Subject.

-- 
pavlov@pavlov.net
http://www.pavlov.net/

"Experimental dog, Salivating dog, Good dog, dinner bell
dinner bell do the bell thing, dinner bell dinner bell
ring..."  - They Might Be Giants



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