Rev 120 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
\name{asGtkDevice}\alias{asGtkDevice}\title{Use Gtk drawing area widget as new R graphics device}\description{This allows one to create a new R Gtk graphics device thatdraws on the specified Gtk drawing area widget. The widget can becreated separately from the device and hence embedded within anarbitrary graphical interface.}\usage{asGtkDevice(widget, width=300, height=300, pointsize=12)}\arguments{\item{widget}{an object of class \code{GtkDrawingArea}typically created using the \link[RGtk]{gtkDrawingArea} functionin the \url{http://www.omegahat.org/RGtk} package.This should have a simple structure, being an external pointerobject containing the address of the \code{GtkWidget}and having a class vector attribute containing \code{"GtkDrawingArea"}.}\item{width}{a value giving a `hint' for the number of pixels in thehorizontal dimension. The device will typically determine this when it first draws on thewidget. Note this is in pixels, not inches as with the \code{\link{gtk}} device.}\item{height}{a value giving a `hint' for the number of pixels in thevertical dimension.The device will typically determine this when it first draws on thewidget.}\item{pointsize}{the default pointsize to be used.}}\details{}\value{Currently, a logical value indicating whether thecreation of the new device was successful or not.}\references{\url{http://www.gtk.org},\url{http://www.omegahat.org/RGtk}\url{http://www.omegahat.org/gtk}}\author{Duncan Temple Lang}\note{It may be possible to compile this on Windowsin the near future.}\seealso{\code{\link{gtk}}\code{\link[RGtk]{gtkDrawingArea}}\code{\link{x11}}}\examples{\dontrun{library(RGtk)win <- gtkWindow(show=FALSE)d <- gtkDrawingArea()asGtkDevice(d)win$Add(d)plot(rnorm(100))}}\keyword{device}\keyword{interface}