Re: Drawing area feature?
- From: CALMELS Clement <calmels_clement stna dgac fr>
- To: James Eagan <eaganj bazza com>
- Cc: CALMELS Clement <calmels_clement stna dgac fr>, gtk-app-devel-list gnome org
- Subject: Re: Drawing area feature?
- Date: Thu, 19 Apr 2001 10:00:35 +0200
Yes It's exactly what I want. But even if the gnomecanvas is the best
widget for my purpose, I will probably had to only use Gtk.
You said "traverse your list of objects to see which one was clicked".
There is no way to do this with a smart trick? With a "mask color" for
example? Or something else... any idea?
James Eagan wrote:
On Wed, Apr 18, 2001 at 05:43:39PM +0200, CALMELS Clement wrote:
I want to select an element of a drawing area (rectangle, arc...). How I
could do that?
Am I correctly interpreting your question as: you want to be able to draw
objects to the drawing area (i.e. rectangles, circles, whatever), and be able
to later grab that object and manipulate it in some fashion (i.e. user clicks
in rectangle, so border changes colour)?
There are a couple of ways to do this: if you don't mind using the
gnome-libs, you might want to check out the gnomecanvas. It behaves in this
manner "for free." Otherwise, you'll probably have to do the bookkeeping
yourself: have some rectangle object. When you get a click event, traverse
your list of objects to see which one was clicked. Redraw with the
appropriate changes made to the desired object.
James
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]