public inbox for guile-gtk@sourceware.org
 help / color / mirror / Atom feed
From: Brett Viren <bv@bnl.gov>
To: Alex Kim <theseven222@yahoo.com>
Cc: Bo Forslund <bo.forslund@abc.se>,
	guile-gtk@sources.redhat.com, guile-user@gnu.org
Subject: Re: Newbie pleading for help...
Date: Wed, 20 Feb 2002 09:48:00 -0000	[thread overview]
Message-ID: <15475.57735.94661.657028@minos.phy.bnl.gov> (raw)
In-Reply-To: <20020220172011.35235.qmail@web20407.mail.yahoo.com>

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	other threads:[~2002-02-20 17:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3C73B6EF.D482F76C@abc.se>
2002-02-20  9:20 ` Alex Kim
2002-02-20  9:48   ` Brett Viren [this message]
2002-02-20 12:46     ` Alex Kim
2002-02-20 13:02       ` Brett Viren
2002-02-23 23:48         ` Alex Kim
2002-02-20 13:13   ` Neil Jerram
2002-02-21  1:56   ` Hilaire Fernandes
2002-02-19 20:55 Alex Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15475.57735.94661.657028@minos.phy.bnl.gov \
    --to=bv@bnl.gov \
    --cc=bo.forslund@abc.se \
    --cc=guile-gtk@sources.redhat.com \
    --cc=guile-user@gnu.org \
    --cc=theseven222@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).