class | ||||||||||||||
|
to draw the canvas’s content to a backing store dc ~var, where data_val is the value of Obs.peek(data) when data is an observable. The draw function is called to update the canvas content when data is an observable and its value changes.
When a mouse or key event is received by a rendered canvas, the mouse or key function is called with a MouseEvent or KeyEvent, respectively, and a CanvasContext.
interface | |
| |
property | |
|
#'border: Gives the canvas a thin border.
#'control_border: Gives the canvas a thick border like EditorCanvas.
#'choice: Gives the canvas a popup button that is like an Input with a ~choices list. This style is intended for use with #'control_border and not with #'hscroll or #'vscroll.
#'hscroll: Enables horizontal scrolling (initially visible, but inactive).
#'vscroll: Enables vertical scrolling (initially visible, but inactive).
#'resize_corner: Leaves room for a resize control at the canvas’s bottom right when only one scrollbar is visible.
#'gl: Creates a canvas for OpenGL drawing instead of (or in addition to) normal draw.DC drawing. This style is usually combined with #'no_autoclear.
#'no_autoclear: Prevents automatic erasing of the canvas by the windowing system.
#'transparent: The canvas is “erased” by the windowing system by letting its parent show through.
#'no_focus: Prevents the canvas from accepting the keyboard focus when the canvas is clicked or when the WindowChildView.focus method is called.
