search for: setgraphicseventhandlers

Displaying 10 results from an estimated 10 matches for "setgraphicseventhandlers".

2016 Jun 07
2
getGraphicsEvent on X11 and event queuing
...rom flickering, which restricts me to the "cairo" X11 device. I'd like to be able to add interactivity to the oscilloscope display, for instance to bind a key to save the current plot to a file, or to bind keys for adjusting the time scale etc. However, I ran into two problems: (1) setGraphicsEventHandlers only works on the "Xlib" X11 device, which doesn't support buffering via dev.hold() - it flickers. (2) getGraphicsEvent and friends lack some interface features which are needed to use the functions in an asynchronous fashion. Typically, event listener library functions have a "...
2016 Sep 21
0
Handlers in setGraphicsEventHandlers() can recursively call getGraphicsEvent(). Intended behavior?
Hi Is the correct patch to remove the setting of the gettingEvent flag or would it be better to flip the TRUE/FALSE setting (set to TRUE before handling then reset to FALSE after handling) ? Also, for this patch and for the other two you sent, one difficulty will be with testing the patches. I have no testing code for this, so would need at least a test or two from you (ideally someone
2011 Dec 16
2
Event handling in R
...he event handlers or for a user-interrupt for it to halt (as per the R manual). The only way that I've thought of to make this work is using setTimeLimit to kill the function after a set time - here's a (messy) example: setTimeLimit(cpu = 1) plot(0, 0) eventEnv <- getGraphicsEventEnv() setGraphicsEventHandlers(prompt = 'Test') while(TRUE) { err <- try(q <- getGraphicsEvent(), silent=TRUE) print(err) } # Not run setTimeLimit(cpu = Inf) but setTimeLimit doesn't seem to kill getGraphicsEvent() properly, as running this code just ends up with the repeated returned error of "Err...
2016 Jun 07
0
getGraphicsEvent on X11 and event queuing
... I just realized that setGraphicsEventHandlers or getGraphicsEvent could have an 'onIdle' callback, to be called somewhere in the polling loop of gevents.c:163 - I think this would solve my problem #2 in a minimally disruptive way. On Mon, Jun 06, 2016 at 06:38:45PM -0700, frederik at ofb.net wrote: > Hi R-Devel, > > I've...
2016 Sep 21
1
Handlers in setGraphicsEventHandlers() can recursively call getGraphicsEvent(). Intended behavior?
doKeybd() gets called in CHelpKeyIn() and NHelpKeyIn() in library/grDevices/src/devWindows.c, where the call is encapsulated in an 'if (dd->gettingEvent)' block. So the only times this code ever calls doKeybd() is when gettingEvent is in fact set. Further, it's called in two locations in X11_eventHelper(), in modules/X11/devX11.c, where the state of gettingEvent seems to be moot
2016 Jun 09
3
getGraphicsEvent on X11 and event queuing
Hi Frederik, >>>>> <frederik at ofb.net> >>>>> on Tue, 7 Jun 2016 15:20:05 -0700 writes: > ... I just realized that setGraphicsEventHandlers or > getGraphicsEvent could have an 'onIdle' callback, to be > called somewhere in the polling loop of gevents.c:163 - I > think this would solve my problem #2 in a minimally > disruptive way. I hope you will get some feedback about this by one of the graphics/d...
2016 Sep 17
2
Handlers in setGraphicsEventHandlers() can recursively call getGraphicsEvent(). Intended behavior?
Hey all. As in general it's a bad idea to allow an event handler to generate an event, and as comments in the code seem to suggest this isn't the intention either, I was wondering about recursion in getGraphicsEvent(). In main/gevents.c, both doMouseEvent() and doKeybd() have the following line; dd->gettingEvent = FALSE; /* avoid recursive calls */ And they reset it to TRUE
2020 Aug 09
0
Interactive graphics
...facing as problem already known and linked to the use of getGraphicsEvent(prompt = "Waiting for input", ???????????????? onMouseDown = NULL, onMouseMove = NULL, ???????????????? onMouseUp = NULL, onKeybd = NULL, ???????????????? onIdle = NULL, ???????????????? consolePrompt = prompt) setGraphicsEventHandlers(which = dev.cur(), ...) getGraphicsEventEnv(which = dev.cur()) setGraphicsEventEnv(which = dev.cur(), env) The problem rises when trying to get interrupts generated by pressing mouse buttons and, at the same time, interrupts coming from widgets. The idea is to locate points under a spectrum and...
2010 Oct 15
0
R 2.12.0 is released
...? The startup message now includes the platform and if used, sub-architecture: this is useful where different (sub-)architectures run on the same OS. ? The getGraphicsEvent() mechanism now allows multiple windows to return graphics events, through the new functions setGraphicsEventHandlers(), setGraphicsEventEnv(), and getGraphicsEventEnv(). (Currently implemented in the windows() and X11() devices.) ? tools::texi2dvi() gains an index argument, mainly for use by R CMD Rd2pdf. It avoids the use of texindy by texinfo's texi2dvi >= 1.157, sinc...
2010 Oct 15
0
R 2.12.0 is released
...? The startup message now includes the platform and if used, sub-architecture: this is useful where different (sub-)architectures run on the same OS. ? The getGraphicsEvent() mechanism now allows multiple windows to return graphics events, through the new functions setGraphicsEventHandlers(), setGraphicsEventEnv(), and getGraphicsEventEnv(). (Currently implemented in the windows() and X11() devices.) ? tools::texi2dvi() gains an index argument, mainly for use by R CMD Rd2pdf. It avoids the use of texindy by texinfo's texi2dvi >= 1.157, sinc...