.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. _wx.PreviewCanvas:
==========================================================================================================================================
|phoenix_title| **wx.PreviewCanvas**
==========================================================================================================================================
A preview canvas is the default canvas used by the print preview system to display the preview.
.. seealso:: :ref:`wx.PreviewFrame`, :ref:`wx.PreviewControlBar`, :ref:`wx.PrintPreview`
|
|class_hierarchy| Class Hierarchy
=================================
.. raw:: html

Inheritance diagram for class
PreviewCanvas:
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.PreviewCanvas.__init__` Constructor.
:meth:`~wx.PreviewCanvas.GetClassDefaultAttributes`
:meth:`~wx.PreviewCanvas.OnPaint` Calls :meth:`wx.PrintPreview.PaintPage` to refresh the canvas.
================================================================================ ================================================================================
|
|api| Class API
===============
.. class:: wx.PreviewCanvas(ScrolledWindow)
**Possible constructors**::
PreviewCanvas(preview : PrintPreview, parent : Window, pos:
Point=DefaultPosition, size: Size=DefaultSize, style: int=0, name:
str="canvas") -> None
A preview canvas is the default canvas used by the print preview
system to display the preview.
.. method:: __init__(self, preview : PrintPreview, parent : Window, pos: Point=DefaultPosition, size: Size=DefaultSize, style: int=0, name: str="canvas")
Constructor.
:param `preview`:
:type `preview`: wx.PrintPreview
:param `parent`:
:type `parent`: wx.Window
:param `pos`:
:type `pos`: wx.Point
:param `size`:
:type `size`: wx.Size
:param `style`:
:type `style`: long
:param `name`:
:type `name`: string
:rtype: `None`
.. staticmethod:: GetClassDefaultAttributes(variant: WindowVariant=WINDOW_VARIANT_NORMAL)
:param `variant`:
:type `variant`: wx.WindowVariant
:rtype: :ref:`wx.VisualAttributes`
.. method:: OnPaint(self, event : PaintEvent)
Calls :meth:`wx.PrintPreview.PaintPage` to refresh the canvas.
:param `event`:
:type `event`: wx.PaintEvent
:rtype: `None`