Re: New widget - API



Well,
you've certainly given me a few things to think about - the bigger picture.

What I'll look at doing is seeing how the gtktreemodel currently works and get
some ideas as to how one might implement a GtkSheetModel interface.

I will no doubt be asking you a few questions here and there on it and hopefully
figure out a plan and a basic structure for you to comment on.

Cheers

Joe

Quoting Jonathan Blandford <jrb redhat com>:

> Matthias Clasen <maclas gmx de> writes:
>
> > I think the pre-2.0 plan was that somebody would eventually write a
> > model-view replacement for gtktable which could then reuse some of the
> > treeview technology, e.g. cell renderers.
>
> That was indeed the main idea of the CellRenderers.  We wanted to write
> them in such a way that they could be used by both a sheet widget
> (GtkSheetView?) as well as the GtkTreeView.  Additionally, we wanted to
> have a GtkSheetModel interface that could be implemented by
> GtkListStore, so you could put that object in both widgets.
>
> > This would certainly be a major project, though.  The treeview code is
> > approx. 28000 lines currently and still growing...
>
> Regretfully, it's closer to 38KLOC.  Another close match in
> functionality is ETable which is almost 50KLOC.
>
> Still, this is really an exciting widget to write, and it wouldn't be
> that much code initially.  Additionally, between Chris Lahey, Kristian
> Rietveld, Jody Goldberg and I[1], there's a lot of experience writing
> these kind of widgets.  If you do want to try to write it, please post
> ideas to the list so that we can comment on them.
>
> One thing I wouldn't do is to start with GtkTable, because although it
> superficially seems similar to a sheet widget, it really is quite
> different.
>
> Good luck!
> -Jonathan
>
> [1] ...and the plenty of other people on this list who've had the good
> fortune to play with GtkTreeView's code.
>
>


--
Linux Madman



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