Re: GtkCanvas requirements?



On 4/19/07, Havoc Pennington <hp redhat com> wrote:
Hi,

Carlos Garnacho wrote:
> First of all we need to specify the feature requirements for the
> canvas.

I'd step back first and do use-cases instead, and also talk about at a
high level what the canvas is for and when it would be used, i.e.:

  - when is a canvas item used vs. a widget? what current widgets would
    be "replicated" as canvas items?
  - when is a canvas used vs. just drawing to a drawable with Cairo and
    Pango?
  - is the canvas essentially a fixed-up replacement for
    GtkWidget/GtkContainer (the GTK widget core) or does it have some
    other purpose? If it has another purpose, what is it?
  - can a list of use cases be spelled out?
  - how are existing canvases being used? which apps seem to be
    using canvases and why and for what?

I bet everyone would think more clearly if we put a bullet in the word
"canvas" and instead thought about "next-gen widget system core" or
"simplified drawing API" or something of that nature. If you start
thinking this way, perhaps there's even more than one new API that's
needed, i.e. maybe there's a next-gen widget core, but *also* a
simplified drawing API used to *write* complex widgets/canvas-items.
I don't know.

The word "canvas" is especially misleading because GnomeCanvas is such a
bad model; the big problems GnomeCanvas used to solve no longer exist,
so the GnomeCanvas design really has little or nothing to do with
anything. GnomeCanvas was based on TkCanvas, which has even less to
offer as a model I'd say.


I can think about 3 main uses cases:

1 Free form views(html like).
2 Make it easier to implement complex controls (more powerful drawing API)
3 Next generation controls framework (gtk replacement)

In Sugar we are going to use hippo for 1 and probably for 2 (the concern there being the lack of accessibility support). We considered using it for 3 but dropped the idea because it would require resources we don't have and break compatibility with gtk.

Marco


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