Re: GtkGrid design document



On Mon, Apr 19, 2004 at 04:49:13PM -0400, Jonathan Blandford wrote:
> > > On the other hand, there are certainly cases where you want something
> > > different from GtkTreeView:
> > > 
> > >  - Efficient handling of many columns and sparse data
> > Do you mean here that the header shouldn't be made from GtkButtons and
> > only made of a regular gdkwindow? I guess that would allow to have 10k
> > columns without memory worries.
> 
> Not necessarily the headers, but more importantly handling a sheet with
> a large number of rows/columns, but only partially filled in.  You don't
> want to needlessly allocate memory for the entire area.  But perhaps
> this is more of a data-model issue.  I haven't really thought through
> the issues with this widget.

That is pretty much what we do in gnumeric.
There is a single canvas item for the col header, another for the
row headers, and a set of 1-4 for the grid depending on whether or
not there are frozen panes.

The amount of data can get staggeringly large very very quickly.
We use hash tables and quadtrees to keep it somewhat manageable.
Even so there are lots of issues to content with.  Do you see a need
to support spans or merged regions ?  Will it be possible to have
arbitrary col/row sizes ?  You'll need to be smart about cacheing
positions to avoid kspread level behavior when selecting near the
bottom of your document.
 



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