guile-user
[Top][All Lists]
Advanced

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

Re: Newbie pleading for help...


From: Brett Viren
Subject: Re: Newbie pleading for help...
Date: Wed, 20 Feb 2002 12:48:55 -0500

Alex Kim writes:
 > Then, I wanted to add event processing loop for the
 > GUI itself to respond to the mouse interaction so
 > that I can interactively modify the lines as needed.

Consider doing everything in guile-gnome using the Gnome Canvas widget
for the drawings.  You'll be hard pressed to find a better way to draw
and manipulate graphical objects.

See 

  http://superk.physics.sunysb.edu/~bviren/play/gtkin/gtkin.scm 

for *partial* inspiration.  I wrote this a long time ago but it still
runs with libguilegtk/libguilegnome v0.20 (which is the latest on my
Debian system).

This little toy doesn't have any interaction between the canvas
objects and the mouse pointer like you want, but it does show how to
use the gnome canvas with guile and how to manipulate the graphical
objects with some sliders.

But, going further, canvas objects can receive events just like
regular widgets.  (At least this is true in the underlying C canvas,
never tried with the guile bindings.)  By attaching to these events,
you can add the interactivity you want.  How to do that is left as an
exercise to the reader ('cause I don't know).

-Brett.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]