From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11248 invoked by alias); 20 Feb 2002 17:48:59 -0000 Mailing-List: contact guile-gtk-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: guile-gtk-owner@sources.redhat.com Received: (qmail 11135 invoked from network); 20 Feb 2002 17:48:58 -0000 Received: from unknown (HELO smtpgw.bnl.gov) (130.199.3.16) by sources.redhat.com with SMTP; 20 Feb 2002 17:48:58 -0000 Received: from bnl.gov ([130.199.128.163]) by smtpgw.bnl.gov with esmtp (Exim 3.32 #1 ) id 16darP-0001ss-00; Wed, 20 Feb 2002 12:48:55 -0500 Received: from minos (minos.phy.bnl.gov [130.199.36.108]) by bnl.gov (8.9.2/8.9.2) with ESMTP id MAA02176; Wed, 20 Feb 2002 12:48:55 -0500 (EST) Received: from bviren by minos with local (Exim 3.34 #1 (Debian)) id 16darP-00074E-00; Wed, 20 Feb 2002 12:48:55 -0500 From: Brett Viren MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15475.57735.94661.657028@minos.phy.bnl.gov> Date: Wed, 20 Feb 2002 09:48:00 -0000 To: Alex Kim Cc: Bo Forslund , guile-gtk@sources.redhat.com, guile-user@gnu.org Subject: Re: Newbie pleading for help... In-Reply-To: <20020220172011.35235.qmail@web20407.mail.yahoo.com> References: <3C73B6EF.D482F76C@abc.se> <20020220172011.35235.qmail@web20407.mail.yahoo.com> X-Mailer: VM 7.00 under 21.4 (patch 6) "Common Lisp" XEmacs Lucid Reply-To: Brett Viren X-SW-Source: 2002-q1/txt/msg00033.txt.bz2 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.