[prev in list] [next in list] [prev in thread] [next in thread]
List: gtk
Subject: Re: Canvas basics
From: Jean =?ISO-8859-1?Q?Br=E9fort?= <jean.brefort () normalesup ! org>
Date: 2004-12-23 17:00:44
Message-ID: 1103821143.423.14.camel () gericom ! brefort ! fr
[Download RAW message or body]
Le mer 22/12/2004 à 16:22, Roger Leigh a écrit :
> [I originally posted this to gtk-app-devel-list, but I'm not sure that's
> the best place.]
>
> Is the Canvas on-topic for this list? If so, I have a few basic
> questions about it, which I hope are simple :)
>
> Firstly, which Canvas implementation should I be using? I've tried
> libgnomecanvas2, but I see there's also a FooCanvas, and a GtkCanvas
> (GTK+ 1.2 only?). Is the AA canvas still experimental and not
> recommended?
I don't think there is still some development on the Gnome Canvas but it
seems there are some projects to rewrite it using Cairo.
Nonetheless, I have used the AA canvas in GCHemPaint for a while with
only some minor problems, essentially with the rich text item.
> I've been looking at George Lebl's "Piskvorky" canvas tutorial.
> (ftp://ftp.5z.com/pub/unix/gnome-piskvorky-1.tar.gz) After
> tweaking the Makefile to use pkg-config, this built fine with
> GTK+ 2.4/GNOME 2.8. However, I did find a problem: if I resize the
> window, the canvas viewable area becomes centred in the canvas widget,
> but the coordinates of button presses are still relative to the top left
> corner of the canvas widget, rather than the canvas view itself. How
> should I compensate for this in the code? Or is this a canvas bug,
> since the events are outside the drawable area?
>
> What I really want to do with the canvas is create a grid display
> system, similar to Gnumeric, but probably much simpler. What I want to
> do is achieve the same scroll behaviour as Gnumeric: the row and column
> labels scroll with the canvas, and scrolling is in discrete steps. How
> should I do this. I thought of two possible methods:
> - packing four canvas widgets into viewports in a GtkTable and tying
> their adjustments to the same scrollbars.
> - overlaying the row/column headings on top of the canvas relative
> to the scroll position.
> How does Gnumeric do this? I had a look, but couldn't find the
> relevant source files.
Have a look at gnumeric-pane.c. I'm not quite sure it's the right file.
Jody should be able to tell you more about that when he'll be back from
sunny countries.
Regards,
Jean
_______________________________________________
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic