Re: Does Gtk have a canas-like widget?





On 7/3/06, Paul Davis <paul linuxaudiosystems com> wrote:
On Mon, 2006-07-03 at 17:01 -0400, Christian Convey wrote:
> I'm coming from the Qt world, which has a Canvas / CanvasItem pair of
> classes.  These let you draw arbitrary objects in a rectangular, and
> move them, do hit tests, etc. pretty easily.
>
> How do you guys get similar effects using Gtk?  (Specifically I'm
> using pygtk.  I'm using Python 2.4 and I think Gtk 2.8(?))

Yes. And No. And in-between.

GnomeCanvas is the widget. Don't let the name put you off - it no longer
has any GNOME dependency or linkage or anything above and beyond what
GTK itself does. Its pretty cool. Check out http://ardour.org/ for an
example of a *big* application using it. It comes as its own library,
libgnomecanvas, from the place you got GTK or gnome.org.

OTOH, GnomeCanvas is no longer supported, and although the way forward
is clear (a Canvas that uses Cairo), which of the 5-10 implementations
of "the next Canvas" will eventually win out is anybody's guess right
now.

--p


Thanks Paul, that's very helpful.  Is the Cairo approach really viable at the moment, or would I have to end up building my own Canvas-type library from scratch if I went that way?

Basically my goal is to do this as simply as possible, without much concern of forward/backward compatibility.

- C



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