From sgerber at cs.utah.edu  Tue Dec 20 05:44:27 2011
From: sgerber at cs.utah.edu (sgerber)
Date: Mon, 19 Dec 2011 21:44:27 -0700
Subject: [Rd]  graphics device event handling
In-Reply-To: <53686490-D5D0-4F62-A780-B9A448B5A9B9@r-project.org>
References: <CAF42j23bq2nm8aD7RP9oHhDYostOw=ogr1-xtxfcwLskX9O2Fw@mail.gmail.com>
	<CDE00E64-F91A-4508-AC59-43668557DB63@r-project.org>
	<CAF42j20UoFQSWiPy55xzWxLE9xfskkANXceU9YXV0Mkf4ddsAg@mail.gmail.com>
	<53686490-D5D0-4F62-A780-B9A448B5A9B9@r-project.org>
Message-ID: <08c69b703d92bb168aa16f0e600ef38e@cs.utah.edu>

Hi All

I run across the following situation quite frequently and was wondering if
there exists a simple solution that I missed.

Situation:
I develop some graphical display using the nice basic R graphical
functions (plots, lines, images, histogramm ...).
Now I would like to add a few simple user interaction capabilities.

Problem:
There seems to be no simple callback type event handling for
mouse/keyboard events for the basic graphics devices.
The setGraphicsEventHandlers only work on X11 (on MAC) which doesn't look
nearly as nice as the basic quartz device and doesn't support transparency.

Question:
Is there a way to add graphics event handling to the CairoX11 or quartz
interface in a similar simple fashion as the setGraphicsEventHandlers
framework without requiring packages such as Rgtk and deviceCairo which can
get fairly large and seem somewhat overkill for adding few simple
interactions to existing R plot compositions.


Kind Regards
Sam



[Rd] graphics device event handling
sgerber