Displaying 5 results from an estimated 5 matches for "gsignalconnect".
2007 Mar 13
2
gtk button: how to create signal handler?
Hi
Kindly correct me if I am posting a wrong query in the forum.
I am trying to handle my "button:clicked" event. But not able to proceed
further. Please help.
Following is my code:
library(RGtk2)
win <- gtkWindowNew(type = NULL, show = TRUE)
butt <- gtkButtonNewWithLabel("Submit", show = TRUE)
win$Add(butt)
Now I want to do something when my button is clicked. How
2008 Aug 06
1
RGtk2 on linux: "stack smashing detected"
...s base
>
> other attached packages:
> [1] RGtk2_2.12.1
> > stop("hello")
> Error: hello
> > foo <- GtkWindow()
> Error: could not find function "GtkWindow"
> > foo <- gtkWindow()
> > butt <- gtkButton("error")
> > gSignalConnect(butt, "clicked", function(...) stop("hello"))
> clicked
> 16
> attr(,"class")
> [1] "CallbackID"
> > foo$add(butt)
> ## click button
> > Error in function (...) : hello
> *** stack smashing detected ***: /usr/lib/R/bin/exec/...
2012 Mar 08
3
"figure margins too large" in RGtk2 drawing area as cairo device - why?
When using a gtkDrawingArea as a Cairo device I very often encounter the error: "figure margins too large"
Even for the below "getting started" example from http://www.ggobi.org/rgtk2/ this is the case.
> win = gtkWindow()
> da = gtkDrawingArea()
> win$add(da)
> asCairoDevice(da)
[1] TRUE
> plot(1:10)
Fehler in plot.new() : Grafikr?nder zu gro?
>
Also
2009 Dec 22
1
RGtk2 - retrieve ggraphics mouse coordinates during drag-and-drop event
...er = function(h,...) {
print(c("focus g"))
})
addHandlerClicked(g, handler = function(h,...) {
x <- h$x; y <- h$y
xStart <<- x; yStart <<- y
pressed <<- TRUE
print(c("pressed at:", c(x,y)))
})
da <- g at widget@widget
callbackID <- gSignalConnect(da,"button-release-event", function
(w,e,...) {
allocation = w$GetAllocation()
xclick = e$GetX()
yclick = e$GetY()
x = xclick/allocation$width
y = (allocation$height - yclick)/allocation$height
xyCoordsRelease <- pltToUsr(x,y)
print(c("released at:", pltToUsr(x,y)))...
2009 Jul 09
2
How to Populate List
...) # create a color to change
message('initial color value')
print(color)# print it out
gtkColorButtonGetColor(b,color) # this function should change 'color'
message('after gtkColorButtonGetColor()... on my machine the color is
unchanged:')
print(color)
}
gSignalConnect(b, 'color-set',changeColor)
Best,
-Justin
--
Justin Donaldson
PhD Candidate, Informatics
Indiana University
http://www.scwn.net
aim: iujjd
[[alternative HTML version deleted]]
------------------------------
Message: 100
Date: Wed, 08 Jul 2009 22:57:36 +0200
From: Uwe Ligges <...