File: gsvg.Rd

package info (click to toggle)
r-cran-gwidgets 0.0-54.2-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 2,360 kB
  • sloc: sh: 13; makefile: 2
file content (48 lines) | stat: -rw-r--r-- 1,413 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
\name{gsvg}
\alias{gsvg}
\title{Constructor for widget to show SVG files}
\description{
  Some toolkit packages provide a widget to display an SVG file. This
  widget allows this to be embedded within a gWidgets window.
}
\usage{
gsvg( filename="", width=480, height=480,
                 handler=NULL, action=NULL,
                 container = NULL, ... ,
                 toolkit=guiToolkit())
}
\arguments{
  \item{filename}{SVG file}
  \item{width}{width in pixels of widget}
  \item{height}{height in pixels of widget}
  \item{handler}{Called on click event}
  \item{action}{Used to parameterize callback specified by handler}
  \item{container}{Container to attach widget to}
  \item{\dots}{
    Passed to add method of container. }
  \item{toolkit}{Which GUI toolkit to use}
}
\details{
	
The \code{svalue} method returns the current filename.

The \code{svalue<-} method can be used to set a new file to display.

The \code{addhandlerclicked(obj, handler, action, ...)} method where handler has
first argument \code{h} has the additional values \code{h\$x} and
\code{h\$y} where these are pixel values for where the mouse click occurred.
}
% \value{}
% \author{}
\note{This is implemented in Qt only (and gWidgetsWWW).}
\examples{
\dontrun{
f = tempfile()
svg(f)
hist(rnorm(100))
dev.off()
win <- gwindow("Graphics example")
gsvg(f, container=win)
}
}
\keyword{interface}% at least one, from doc/KEYWORDS