Re: [gtk-list] clist new features
- From: Lars Hamann <lars gtk org>
- To: Bob Lissner <lissnerr ColdSprings net>
- Cc: gtk-list redhat com
- Subject: Re: [gtk-list] clist new features
- Date: Fri, 5 Mar 1999 11:26:58 +0100
On Thu, Mar 04, 1999 at 08:17:46PM -0800, Bob Lissner wrote:
> Our problem is that we would like to be able to make some of the records in the clist invisible. This would occur as a result of the "match" menu
> item, or "filters" or "queries".
>
> I don't see how this can be done with the current clist. Am I missing something?
No that's currently impossible.
> If the feature isn't there, we are thinking of adding it. Would you consider the following commands a valuable addition to clist? Might they become
> part of the toolkit if we do it right?
> Function: void gtk_clist_set_row_invisible (GtkCList *clist, gint row)
>
> Function: void gtk_clist_set_row_visible (GtkCList *clist, gint row)
>
>
> Function: void gtk_clist_set_all_rows_invisible (GtkCList *clist)
>
> Function: void gtk_clist_set_all_rows_visible (GtkCList *clist)
Yes, it would be really nice if you would implement such functions. :)
It would be great I you could find a way to implement a function like
gtk_clist_set_row_row_height (GtkCList *clist, gint row, gint height);
too. (There is a gtk_clist_set_row_height function to set the default
row height and this new function should set the row height of only one
row.)
> Finally, we understand that modifying clist is a major project.
> Would you care to estimate how many hours something like this might take?
These changes are a bit difficult , because currently clist uses macros like
#define ROW_FROM_YPIXEL(clist, y) (((y) - (clist)->voffset) / \
((clist)->row_height + CELL_SPACING))
#define ROW_TOP_YPIXEL(clist, row) (((clist)->row_height * (row)) + \
(((row) + 1) * CELL_SPACING) + \
(clist)->voffset)
all over the place. In general the only change you have to make is to
rewrite these macros and add a visible flag (or a guint row_height entry)
to the GtkClistRow struct. But I think you will run into performance
problems, because the macros have to check the row_list GList then.
If these performance problems are not to serve it could be done within a few
days - I think. ;)
bye,
Lars
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]