playPrompt {playwith}R Documentation

Show a message to the playwith user

Description

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.

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).

Value

nothing interesting.

Author(s)

Felix Andrews felix@nfrac.org

See Also

playwith.API

Examples

if (interactive()) {

playwith(plot(1:10))
playPrompt(playDevCur(), "Click to place a new point.")
points(locator(n=1), col=2)
playPrompt(playDevCur(), NULL)

}

[Package playwith version 0.8.51 Index]