A canvas is a subwindow onto which graphics and text can be drawn, and mouse and keyboard input can be intercepted. At present, panel items cannot be placed on a canvas.
When you draw onto a canvas, you are really drawing onto a device context (see wx:dc%, wx:canvas-dc%). Although you can use the members of wx:canvas% for drawing, it is much better to get the device context from the canvas (see get-dc) and draw into it. Then, code which can draw into one device context can be reused for others, such as PostScript or memory device contexts (see wx:post-script-dc% and wx:memory-dc%).
If x, y, width or height is -1, a default position/size is selected. The default may be platform-specific.
The style argument is a bitwise-ior combination of the following flags:
The name argument is used to associate a name with the canvas, allowing the application user to set X Windows resource values for each individual canvas.