Re: [gtk-list] Re: GtkCList: how to get row number from row data?



> This stuff HAS to get documented!  Last week several people agreed that
> GTK_CLIST(clist)->rows  didn't exist and you had to keep track yourself!

Well, I knew it was there ;)

One "messy" thing about GTK is that a lot of useful information is
conained in the widget structures.  People from the C++ world are use to
getting all information from class methods, and all varibles are private
to the class.  This isn't the case with GTK.  There's a lot to be with
regard to this, but I'm pretty neutral on the idea of providing a function
call for every "public" pice of information in a widget.  That's the kind
of decision that needs to be made and implimented on the entire toolkit.

The implimentation is more difficult than the decision though, a function
that returns the number of rows in a CList is trivial; but for a function
that returns a list of all the children in a container there are all kinds
of memory management issues involved with the returned list (ie, do we
just return the list that is actually used by the widget *dangrous*, or do
we allocate a new list *has to be freed by the user*).  I'd be worried it
would happen both ways and be confusing.


Jay Painter



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