Re: GtkTreeView strong problems
- From: Havoc Pennington <hp redhat com>
- To: Felipe Contreras <al593181 mail mty itesm mx>
- Cc: gtk-list gnome org
- Subject: Re: GtkTreeView strong problems
- Date: 06 Jul 2002 01:52:40 -0400
Felipe Contreras <al593181 mail mty itesm mx> writes:
>
> Basically I want to do 2 things with a GtkTreeView:
>
> 1. Add a tooltip to each cell or row.
> 2. Connect some cells to a click signal.
>
> These two things are extremely important, and they can be done easily for
> widgets, but why someone had to think that cells are not widgets, I don't get
> it, now these two things seems imposible to do.
They should certainly be possible; the whole treeview is a
widget. There are functions to see which cell is at a given coordinate
(get_path_at_pos, etc). Put those together.
> I think GtkTreeView has to be retinked, if you ask me cells should
> be widgets.
A GtkWidget is 60 bytes in the struct alone, so low estimate. A
4-column list, with 1000 rows, would use 60*4*1000 = 234K. 10K rows =
2340K. That's assuming the cell widgets add no extra fields; if they
were say a GtkLabel, 112 bytes for the label struct, plus the text the
label points to, plus the PangoLayout the label points to, plus some
other stuff; total 5-6 times a plain GtkWidget, at least 10 megabytes
to store 10K rows. Or if you use a widget with a GdkWindow so you can
get events and add tooltips, add a lot more to that. You could easily
get a 30-megabyte totally unusable tree.
But memory aside, it woudl be _slooowww_ as in really slow. Just
creating 40,000 widgets would take many seconds. That many X windows
would blow up your X server, too. It would not even think about
working.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]