PrintOperation.connectPreview

Connect to Preview signal.

Gets emitted when a preview is requested from the native dialog.

The default handler for this signal uses an external viewer application to preview.

To implement a custom print preview, an application must return true from its handler for this signal. In order to use the provided context for the preview implementation, it must be given a suitable cairo context with gtk.print_context.PrintContext.setCairoContext.

The custom preview implementation can use gtk.print_operation_preview.PrintOperationPreview.isSelected and gtk.print_operation_preview.PrintOperationPreview.renderPage to find pages which are selected for print and render them. The preview must be finished by calling gtk.print_operation_preview.PrintOperationPreview.endPreview (typically in response to the user clicking a close button).

class PrintOperation
ulong
connectPreview
(
T
)
(,
Flag!"After" after = No.After
)
if (
isCallable!T &&
is(ReturnType!T == bool)
&&
(
Parameters!T.length < 1 ||
(
ParameterStorageClassTuple!T[0] == ParameterStorageClass.none &&
)
)
&&
(
Parameters!T.length < 2 ||
(
ParameterStorageClassTuple!T[1] == ParameterStorageClass.none &&
)
)
&&
(
Parameters!T.length < 3 ||
(
ParameterStorageClassTuple!T[2] == ParameterStorageClass.none &&
is(Parameters!T[2] : gtk.window.Window)
)
)
&&
(
Parameters!T.length < 4 ||
(
ParameterStorageClassTuple!T[3] == ParameterStorageClass.none &&
)
)
&&
Parameters!T.length < 5
)

Parameters

callback T

signal callback delegate or function to connect

bool callback(gtk.print_operation_preview.PrintOperationPreview preview, gtk.print_context.PrintContext context, gtk.window.Window parent, gtk.print_operation.PrintOperation printOperation)

preview the gtk.print_operation_preview.PrintOperationPreview for the current operation (optional)

context the gtk.print_context.PrintContext that will be used (optional)

parent the gtk.window.Window to use as window parent (optional)

printOperation the instance the signal is connected to (optional)

Returns true if the listener wants to take over control of the preview

after Flag!"After"

Yes.After to execute callback after default handler, No.After to execute before (default)

Return Value

Type: ulong

Signal ID