Re: Using GParam in GtkTLCell.
- From: Mikael Hermansson <mikeh bahnhof se>
- To: jrb redhat com
- Cc: gtk-devel-list gnome org
- Subject: Re: Using GParam in GtkTLCell.
- Date: Fri, 1 Sep 2000 04:41:40 +0200
This is not an answer to your Question but when you talk about
this I came up with another idea.(Well I'm mean Havoc's idea :-)
Do you have any plans to implement an TAG parser like the one Havoc suggested
to
use in GtkLabel?
for example "<underline>text</underline>"?
Because it would be great to have this syntax also in TLView cells.
If I'm correct there are plans to add Havoc's parser routines to glib?
Greats
Mikael
On Thu, 31 Aug 2000 18:40:09 you wrote:
>
> <This email is mostly directed to Tim, but I'm posting it here for
> posterity's sake>
>
> I've been contemplating using GParam's in the cell renderers for
> GtkTLView. In particular, I'd like to have the following behavior:
>
> * Have renderers have a number of parameters that are setable by the
> user. For example, a text renderer could have "text", "fg color",
> "bg color", "font", "underline", and "strikethrough" attributes. I
> could create a renderer for a column that had a default font, etc.
>
> * You can map an attribute to a column in the model. For the example
> given previously, I could create a column in the view where the
> "text" attribute comes from column 1, and the "fg_color" attribute
> comes from column 5.
>
> I had a few questions about this.
>
> 1) I will be doing this every expose event, and in the initial
> calculation of height stage. I assumed (perhaps incorrectly) that
> measuring/rendering text and the model lookup would be the slow step,
> but given that I may doing a number of g_object_set_param's per cell,
> I'd like to get an idea of how fast it is. Tim, could you check in
> your modified copy of Havoc's benchmark program so we could add some
> tests of this.
>
> 2) Tim, why is GValue:
>
> struct _GValue
> {
> /*< private >*/
> GType g_type;
>
> /* public for GTypeValueTable methods */
> union {
> gint v_int;
> ...
> gpointer v_pointer;
> } data[4];
> };
> ^ an array of size 4?
>
> Am I missing something here? You only seem to use the first one. The
> reason I ask is that I would like to have the model fill in a GValue
> when queried. As a result, I was going to store the data for the model
> as the data field of the GValue, but would rather not have it be any
> bigger then it has to be.
>
> Thanks,
> -Jonathan
>
> _______________________________________________
> gtk-devel-list mailing list
> gtk-devel-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtk-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]