Part of the playwith Application Programming Interface.
Usage
playPrompt(playState, text = NULL)
playFreezeGUI(playState)
playThawGUI(playState)
blockRedraws(expr, playState = playDevCur())
Arguments
playState
a playState object representing the plot, window and device.
text
text to display to the user, or NULL to hide the prompt.
expr
an expression to evaluate without redrawing or resizing the plot.
Value
nothing interesting.
Details
The playwith plot window can show a simple plot to the user. It is shown in the place
normally occupied by the "call toolbar" (the top-most toolbar in the window).
When the prompt is shown, all the toolbars and controls in the window are disabled.
When the prompt is removed, the toolbars and controls are restored.
When a plot is redrawn (with playReplot), the prompt is automatically removed.
The other functions described here are only rarely useful:
playFreezeGUI disables all the toolbars and controls, and
playThawGUI restores them.
blockRedraws is a wrapper around code that prevents the plot from being redrawn
(typically as a result of resizing the plot area).
if (interactive()) {
playwith(plot(1:10))
playPrompt(playDevCur(), "Click to place a new point.")
points(locator(n=1), col=2)
playPrompt(playDevCur(), NULL)
}