* Kristian Rietveld ([email protected]) wrote: > On Dec 27, 2009, at 1:48 AM, Dr. David Alan Gilbert wrote: > > COLUMN_FIXED seems to be defined as 'Columns are a fixed numbers of pixels > > wide.' > > but what has that got to do with height? > > The COLUMN_FIXED setting is more about what should happen with the > width of the column in response to changes in the model. The main point > is that with fixed height mode, we speed things up by not measuring the > size required for a cell and its attributes to draw itself; instead we > assume a fixed height. Because we don't measure at all, we also do not > measure width. This renders the COLUMN_AUTOSIZE unusable, as well as > COLUMN_GROW_ONLY (we would have to measure a row as soon as it is added > (even when it is not visible), but we don't do that). We are left with > the FIXED option.
> FIXED does not mean fully fixed; a FIXED column can be set to be resizable by > the user of the program. > > A solution for the future will be to sample the widths of a set of > rows/columns. This will be an additional mode, as it does not comply with > the strict rules for AUTOSIZE/GROW_ONLY. The other way to look at this is instead of asserting when you find a colume that isn't marked fixed, then you just measure those rather than all cells. That way you don't need any new modes anywhere as far as the API is concerned. > > In this case there is a big treeview with a thousand rows or so, > > all the same height but where the width of at least one of the columns > > varies - this doesn't sound an uncommon situation, but is causing > > call backs for ~5000 data functions for every cell in the tree > > on every redraw. > > On a redraw, only the data functions for cells that are visible on the screen > should be called. 5000 calls to data functions seems unlikely to me. I'm not sure, but I think the problem is that until you've measured all the rows above you, then you can't be sure what it is that's currently visible. Dave -----Open up your eyes, open up your mind, open up your code ------- / Dr. David Alan Gilbert | Running GNU/Linux on Alpha,68K| Happy \ \ gro.gilbert @ treblig.org | MIPS,x86,ARM,SPARC,PPC & HPPA | In Hex / \ _________________________|_____ http://www.treblig.org |_______/ _______________________________________________ gtk-devel-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtk-devel-list
