QNX Developer Support
Display a custom modal dialog for selecting print options
int PtPrintSelect( PtWidget_t *parent, const char *title, PtPrintSelectionInfo_t *info );
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
An integer that indicates which button was pressed:
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.