Draggable Targets
- From: Tim Corio <tcorio rochester rr com>
- To: GTK App Developers List <gtk-app-devel-list gnome org>
- Subject: Draggable Targets
- Date: Wed, 13 Jan 2010 13:08:15 -0500
I have another newbie question. I'm grateful that this list has been
very indulgent of my recent questions.
I want to let the user place a target (either a cross-hair or a circle)
on an image and then be able to drag it to a new location. This seems
like common functionality that GTK+ might directly support. How do I
implement this functionality?
The underlying image is in a Drawing Area which is inside a Scrolled
Window.
My first thought was to place a small image (of the cross-hair) on top
of the image. I would need to specify the x/y offset of the target
image inside the Scrolled Window, but I don't see how that is supported
in GTK+,
My second thought is to draw the target directly in the Drawing Area,
then redraw then create the drag effect in the motion_event callback by
redrawing the background where the target used to be, and drawing the
target where is now.
Thanks,
Tim
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]