.. include:: headings.inc .. _PreviewControlBar: ========================================================================================================================================== |phoenix_title| **PreviewControlBar** ========================================================================================================================================== This is the default implementation of the preview control bar, a panel with buttons and a zoom control. You can derive a new class from this and override some or all member functions to change the behaviour and appearance; or you can leave it as it is. .. seealso:: :ref:`PreviewFrame`, :ref:`PreviewCanvas`, :ref:`PrintPreview` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **PreviewControlBar** .. raw:: html

Inheritance diagram of PreviewControlBar

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~PreviewControlBar.__init__` Constructor. :meth:`~PreviewControlBar.CreateButtons` Creates buttons, according to value of the button style flags. :meth:`~PreviewControlBar.GetPrintPreview` Gets the print preview object associated with the control bar. :meth:`~PreviewControlBar.GetZoomControl` Gets the current zoom setting in percent. :meth:`~PreviewControlBar.SetZoomControl` Sets the zoom control. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~PreviewControlBar.PrintPreview` See :meth:`~PreviewControlBar.GetPrintPreview` :attr:`~PreviewControlBar.ZoomControl` See :meth:`~PreviewControlBar.GetZoomControl` and :meth:`~PreviewControlBar.SetZoomControl` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: PreviewControlBar(Panel) This is the default implementation of the preview control bar, a panel with buttons and a zoom control. **Possible constructors**:: PreviewControlBar(preview, buttons, parent, pos=DefaultPosition, size=DefaultSize, style=0, name="panel") .. method:: __init__(self, preview, buttons, parent, pos=DefaultPosition, size=DefaultSize, style=0, name="panel") Constructor. The `buttons` parameter may be a combination of the following, using the bitwise 'or' operator: - ``PREVIEW_PRINT``: Create a print button. - ``PREVIEW_NEXT``: Create a next page button. - ``PREVIEW_PREVIOUS``: Create a previous page button. - ``PREVIEW_ZOOM``: Create a zoom control. - ``PREVIEW_DEFAULT``: Equivalent to a combination of ``PREVIEW_PREVIOUS`` , ``PREVIEW_NEXT`` and ``PREVIEW_ZOOM`` . :param `preview`: :type `preview`: PrintPreview :param `buttons`: :type `buttons`: long :param `parent`: :type `parent`: Window :param `pos`: :type `pos`: Point :param `size`: :type `size`: Size :param `style`: :type `style`: long :param `name`: :type `name`: string .. method:: CreateButtons(self) Creates buttons, according to value of the button style flags. .. todo:: which flags?? .. method:: GetPrintPreview(self) Gets the print preview object associated with the control bar. :rtype: :ref:`PrintPreview` .. method:: GetZoomControl(self) Gets the current zoom setting in percent. :rtype: `int` .. method:: SetZoomControl(self, percent) Sets the zoom control. :param `percent`: :type `percent`: int .. attribute:: PrintPreview See :meth:`~PreviewControlBar.GetPrintPreview` .. attribute:: ZoomControl See :meth:`~PreviewControlBar.GetZoomControl` and :meth:`~PreviewControlBar.SetZoomControl`