Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ PtPrintSelect

Media Vault

Software Library

Restoration Projects

Artifacts Sought

PtPrintSelect

[Previous] [Contents] [Index] [Next]

PtPrintSelect()

Display a custom modal dialog for selecting print options

Synopsis:

int PtPrintSelect( 
        PtWidget_t *parent, 
        const char *title,
        PtPrintSelectionInfo_t *info );

Library:

ph

Description:

This function displays a modal dialog that lets you select print options and initiate printing. This function is similar to PtPrintSelection(), but PtPrintSelect() lets you customize the appearance and function of the dialog and the underlying PtPrintSel widget.

The dialog is parented off the parent widget, which may be NULL; if non-NULL, that parent widget is blocked and its cursor is changed to reflect this.

The title of the dialog is given by title; if this is NULL a default title of "Select Printer" is used.

The user may click one of these buttons:

  • Print--initiate printing
  • Preview--view the material to be printed
  • Cancel--cancel the operation

Returns:

An integer that indicates which button was pressed:

  • Pt_PRINTSEL_PRINT
  • Pt_PRINTSEL_PREVIEW
  • Pt_PRINTSEL_CANCEL

or Pt_PRINTSEL_ERROR, which indicates that an error was made in custom_args.

The do_preview member of the print context is also set to indicate whether Print or Preview was selected. This means that the context can be passed to the printing function, which will spawn the print-preview application if necessary.

Classification:

Photon

Safety:
Interrupt handler No
Signal handler No
Thread No

See also:

PpContinueJob(), PpCreatePC(), PpEndJob(), PpGetPC(), PpPrintNewPage(), PpReleasePC(), PpPrintWidget(), PpSetPC(), PpStartJob(), PpSuspendJob(), PtPrintSelection(), PtSetResources()

Printing chapter, and "Setting resources" in the Manipulating Resources in Application Code chapter of the Photon Programmer's Guide


[Previous] [Contents] [Index] [Next]

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026