(make-object wx:media-canvas% parent x y width height name style scrolls-per-page buffer) -> wx:media-canvas% object
parent : wx:frame% object or wx:panel% object
x = -1 : small integer
y = -1 : small integer
width = -1 : small integer
height = -1 : small integer
name = "" : string
style = 0 : small integer
scrolls-per-page = 100 : small integer
buffer = null : wx:media-buffer% object or null
Most of the arguments here are as with
wx:canvas%. Only the last three
arguments are specific to wx:media-canvas%.
The style flag is a bitwise combination of
- wx:const-mcanvas-no-h-scroll -- doesn't allow horizontal scrolling
- wx:const-mcanvas-no-v-scroll -- does't allow vertical scrolling
- wx:const-mcanvas-hide-h-scroll -- allows horizontal scrolling with the caret, but doesn't show a horizontal scrollbar
- wx:const-mcanvas-hide-v-scroll -- allows vertical scrolling with the caret, but doesn't show a vertical scrollbar
While vertical scrolling of editor buffers is based on lines,
horizontal scrolling and pasteboard vertical scrolling is based on a
fixed number of steps per horizontal page. The scrollsPerPage
argument sets this value.
If the canvas is initialized with null for buffer, a buffer
can be installed with
set-media.