.. include:: headings.inc .. _PrintDialog: ========================================================================================================================================== |phoenix_title| **PrintDialog** ========================================================================================================================================== This class represents the print and print setup common dialogs. You may obtain a :ref:`PrinterDC` device context from a successfully dismissed print dialog. .. seealso:: :ref:`Printing Framework Overview `, :ref:`PrintDialog Overview ` | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **PrintDialog** .. raw:: html

Inheritance diagram of PrintDialog

| |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~PrintDialog.__init__` Constructor. :meth:`~PrintDialog.GetPrintDC` Returns the device context created by the print dialog, if any. :meth:`~PrintDialog.GetPrintData` Returns the :ref:`print data ` associated with the print dialog. :meth:`~PrintDialog.GetPrintDialogData` Returns the :ref:`print dialog data ` associated with the print dialog. :meth:`~PrintDialog.ShowModal` Shows the dialog, returning ``ID_OK`` if the user pressed ``OK``, and ``ID_CANCEL`` otherwise. ================================================================================ ================================================================================ | |property_summary| Properties Summary ===================================== ================================================================================ ================================================================================ :attr:`~PrintDialog.PrintDC` See :meth:`~PrintDialog.GetPrintDC` :attr:`~PrintDialog.PrintData` See :meth:`~PrintDialog.GetPrintData` :attr:`~PrintDialog.PrintDialogData` See :meth:`~PrintDialog.GetPrintDialogData` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: PrintDialog(Object) This class represents the print and print setup common dialogs. **Possible constructors**:: PrintDialog(parent, data=None) PrintDialog(parent, data) .. method:: __init__(self, *args, **kw) |overload| **Overloaded Implementations**: **~~~** **__init__** `(self, parent, data=None)` Constructor. Pass a parent window, and optionally a pointer to a block of print data, which will be copied to the print dialog's print data. :param `parent`: :type `parent`: Window :param `data`: :type `data`: PrintDialogData .. seealso:: :ref:`PrintDialogData` **~~~** **__init__** `(self, parent, data)` :param `parent`: :type `parent`: Window :param `data`: :type `data`: PrintData **~~~** .. method:: GetPrintDC(self) Returns the device context created by the print dialog, if any. When this function has been called, the ownership of the device context is transferred to the application, so it must then be deleted explicitly. :rtype: :ref:`DC` .. method:: GetPrintData(self) Returns the :ref:`print data ` associated with the print dialog. :rtype: :ref:`PrintData` .. method:: GetPrintDialogData(self) Returns the :ref:`print dialog data ` associated with the print dialog. :rtype: :ref:`PrintDialogData` .. method:: ShowModal(self) Shows the dialog, returning ``ID_OK`` if the user pressed ``OK``, and ``ID_CANCEL`` otherwise. After this function is called, a device context may be retrievable using :meth:`GetPrintDC` . :rtype: `int` .. attribute:: PrintDC See :meth:`~PrintDialog.GetPrintDC` .. attribute:: PrintData See :meth:`~PrintDialog.GetPrintData` .. attribute:: PrintDialogData See :meth:`~PrintDialog.GetPrintDialogData`