Re: GtkTreeView strong problems



On Sat, Jul 06, 2002 at 01:52:40AM -0400, Havoc Pennington wrote:
> 
> 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.

Anything is possible, but is that the right way?


> > 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.

Then there should be a GtkTreeView in the situations where you want a
tree just to view it (or > 10K rows), and a GtkTree* when you want
all the functionality (and < 100 rows).


-- 
Felipe Contreras



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