Re: TreeView: set_fixed_height_mode v TREE_VIEW_COLUMN_FIXED
- From: Kristian Rietveld <kris gtk org>
- To: Dr. David Alan Gilbert <gilbertd treblig org>
- Cc: gtk-devel-list gnome org
- Subject: Re: TreeView: set_fixed_height_mode v TREE_VIEW_COLUMN_FIXED
- Date: Sun, 27 Dec 2009 22:49:26 +0100
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.
> 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.
regards,
-kris.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]