Re: GNode into a CTree
- From: Lars Hamann <lars gtk org>
- To: Tim Janik <timj gtk org>
- Cc: Gtk+ Developers <gtk-devel-list redhat com>, Gtk+ Devils <gtkdev gtk org>
- Subject: Re: GNode into a CTree
- Date: Sat, 01 Aug 1998 11:24:07 +0200 (CEST)
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]