struct Gtk::PrintOperation::PreviewSignal
- Gtk::PrintOperation::PreviewSignal
- GObject::Signal
- Struct
- Value
- Object
Overview
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::PrintContext#cairo_::context=
.
The custom preview implementation can use
Gtk::PrintOperationPreview#is_selected?
and
Gtk::PrintOperationPreview#render_page
to find pages which
are selected for print and render them. The preview must be
finished by calling Gtk::PrintOperationPreview#end_preview
(typically in response to the user clicking a close button).
Defined in:
lib/gi-crystal/src/auto/gtk-4.0/print_operation.crInstance Method Summary
- #connect(*, after : Bool = false, &block : Proc(Gtk::PrintOperationPreview, Gtk::PrintContext, Gtk::Window?, Bool)) : GObject::SignalConnection
- #connect(handler : Proc(Gtk::PrintOperationPreview, Gtk::PrintContext, Gtk::Window?, Bool), *, after : Bool = false) : GObject::SignalConnection
- #connect(handler : Proc(Gtk::PrintOperation, Gtk::PrintOperationPreview, Gtk::PrintContext, Gtk::Window?, Bool), *, after : Bool = false) : GObject::SignalConnection
- #emit(preview : Gtk::PrintOperationPreview, context : Gtk::PrintContext, parent : Gtk::Window?) : Nil
-
#name : String
The signal name
Instance methods inherited from struct GObject::Signal
[](detail : String) : self
[],
name : String
name
Constructor methods inherited from struct GObject::Signal
new(source : GObject::Object, detail : String? = nil)
new
Instance Method Detail
def connect(*, after : Bool = false, &block : Proc(Gtk::PrintOperationPreview, Gtk::PrintContext, Gtk::Window?, Bool)) : GObject::SignalConnection
#
def connect(handler : Proc(Gtk::PrintOperationPreview, Gtk::PrintContext, Gtk::Window?, Bool), *, after : Bool = false) : GObject::SignalConnection
#
def connect(handler : Proc(Gtk::PrintOperation, Gtk::PrintOperationPreview, Gtk::PrintContext, Gtk::Window?, Bool), *, after : Bool = false) : GObject::SignalConnection
#
def emit(preview : Gtk::PrintOperationPreview, context : Gtk::PrintContext, parent : Gtk::Window?) : Nil
#