Display a modal dialog for selecting print options
int PtPrintSelection( PtWidget_t *parent, PhPoint_t const *pos, const char *title, PpPrintContext_t *context, unsigned flags);
This function displays a modal dialog allowing the user to select print options and initiate printing. 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 dialog is positioned according to the pos parameter: if NULL, the dialog is centered on the screen; if parent is NULL, the dialog is placed at the absolute coordinates of pos; otherwise it's placed at the relative offset of pos within parent.
The title of the dialog is given by title; if this is NULL a default title of "Select Printer" is used.
The context parameter is a Print Context that was created by the PpPrintCreatePC() function. This context must be supplied and is filled in with details of the selected printer:
The flags parameter is used to enable or disable parts of the user interface. Valid flags are:
You can OR the flags together to obtain a suitable mask.
The user may click one of these buttons:
An integer that indicates which button was pressed:
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.
See PpPrintStart().
Photon
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
PpPrintClose(), PpPrintCreatePC(), PpPrintGetPC(), PpPrintNewPage(), PpPrintOpen(), PpPrintReleasePC(), PpPrintSetPC(), PpPrintStart(), PpPrintStop(), PpPrintWidget()