The interface that is used to implement print preview.
A GtkPrintOperationPreview object is passed to the [signalGtk.PrintOperation::preview] signal by [classGtk.PrintOperation].
function "+" (W : Gtk_Print_Operation_Preview) return Gtk_Print_Operation_Preview
type Cb_GObject_Gtk_Print_Context_Gtk_Page_Setup_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
Context : not null access Gtk.Print_Context.Gtk_Print_Context_Record'Class;
Page_Setup : not null access Gtk.Page_Setup.Gtk_Page_Setup_Record'Class);
type Cb_GObject_Gtk_Print_Context_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
Context : not null access Gtk.Print_Context.Gtk_Print_Context_Record'Class);
type Cb_Gtk_Print_Operation_Preview_Gtk_Print_Context_Gtk_Page_Setup_Void is not null access procedure
(Self : Gtk_Print_Operation_Preview;
Context : not null access Gtk.Print_Context.Gtk_Print_Context_Record'Class;
Page_Setup : not null access Gtk.Page_Setup.Gtk_Page_Setup_Record'Class);
type Cb_Gtk_Print_Operation_Preview_Gtk_Print_Context_Void is not null access procedure
(Self : Gtk_Print_Operation_Preview;
Context : not null access Gtk.Print_Context.Gtk_Print_Context_Record'Class);
procedure End_Preview (Self : Gtk_Print_Operation_Preview)
Ends a preview. This function must be called to finish a custom print preview.
function Get_Type return Glib.GType
type Gtk_Print_Operation_Preview is new Glib.Types.GType_Interface;
function Is_Selected
(Self : Gtk_Print_Operation_Preview;
Page_Nr : Glib.Gint) return Boolean
Returns whether the given page is included in the set of pages that have been selected for printing.
a page number
True if the page has been selected for printing
Null_Gtk_Print_Operation_Preview : constant Gtk_Print_Operation_Preview;
procedure On_Got_Page_Size
(Self : Gtk_Print_Operation_Preview;
Call : Cb_GObject_Gtk_Print_Context_Gtk_Page_Setup_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted once for each page that gets rendered to the preview.
A handler for this signal should update the Context according to Page_Setup and set up a suitable cairo context, using [methodGtk.PrintContext.set_cairo_context].
Callback parameters: -- @param Context the current GtkPrintContext -- @param Page_Setup the GtkPageSetup for the current page
procedure On_Got_Page_Size
(Self : Gtk_Print_Operation_Preview;
Call : Cb_Gtk_Print_Operation_Preview_Gtk_Print_Context_Gtk_Page_Setup_Void;
After : Boolean := False)
Emitted once for each page that gets rendered to the preview.
A handler for this signal should update the Context according to Page_Setup and set up a suitable cairo context, using [methodGtk.PrintContext.set_cairo_context].
Callback parameters: -- @param Context the current GtkPrintContext -- @param Page_Setup the GtkPageSetup for the current page
procedure On_Ready
(Self : Gtk_Print_Operation_Preview;
Call : Cb_GObject_Gtk_Print_Context_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
The ::ready signal gets emitted once per preview operation, before the first page is rendered.
A handler for this signal can be used for setup tasks.
procedure On_Ready
(Self : Gtk_Print_Operation_Preview;
Call : Cb_Gtk_Print_Operation_Preview_Gtk_Print_Context_Void;
After : Boolean := False)
The ::ready signal gets emitted once per preview operation, before the first page is rendered.
A handler for this signal can be used for setup tasks.
subtype Print_Operation_Preview_Interface_Descr is Glib.Object.Interface_Description;
procedure Render_Page
(Self : Gtk_Print_Operation_Preview;
Page_Nr : Glib.Gint)
Renders a page to the preview. This is using the print context that was passed to the [signalGtk.PrintOperation::preview] handler together with Preview. A custom print preview should use this function to render the currently selected page. Note that this function requires a suitable cairo context to be associated with the print context.
the page to render
procedure Set_End_Preview
(Self : Print_Operation_Preview_Interface_Descr;
Handler : Virtual_End_Preview)
procedure Set_Got_Page_Size
(Self : Print_Operation_Preview_Interface_Descr;
Handler : Virtual_Got_Page_Size)
procedure Set_Is_Selected
(Self : Print_Operation_Preview_Interface_Descr;
Handler : Virtual_Is_Selected)
procedure Set_Ready
(Self : Print_Operation_Preview_Interface_Descr;
Handler : Virtual_Ready)
procedure Set_Render_Page
(Self : Print_Operation_Preview_Interface_Descr;
Handler : Virtual_Render_Page)
See Glib.Object.Add_Interface
Signal_Got_Page_Size : constant Glib.Signal_Name := "got-page-size";
Emitted once for each page that gets rendered to the preview.
A handler for this signal should update the Context according to Page_Setup and set up a suitable cairo context, using [methodGtk.PrintContext.set_cairo_context].
Callback parameters: -- @param Context the current GtkPrintContext -- @param Page_Setup the GtkPageSetup for the current page
Signal_Ready : constant Glib.Signal_Name := "ready";
The ::ready signal gets emitted once per preview operation, before the first page is rendered.
A handler for this signal can be used for setup tasks.
type Virtual_End_Preview is access procedure (Self : Gtk_Print_Operation_Preview);
Ends a preview. This function must be called to finish a custom print preview.
type Virtual_Got_Page_Size is access procedure
(Self : Gtk_Print_Operation_Preview;
Context : System.Address;
Page_Setup : System.Address);
type Virtual_Is_Selected is access function
(Self : Gtk_Print_Operation_Preview;
Page_Nr : Glib.Gint) return Glib.Gboolean;
Returns whether the given page is included in the set of pages that have been selected for printing.
a page number
True if the page has been selected for printing
type Virtual_Ready is access procedure
(Self : Gtk_Print_Operation_Preview;
Context : System.Address);
type Virtual_Render_Page is access procedure (Self : Gtk_Print_Operation_Preview; Page_Nr : Glib.Gint);
Renders a page to the preview. This is using the print context that was passed to the [signalGtk.PrintOperation::preview] handler together with Preview. A custom print preview should use this function to render the currently selected page. Note that this function requires a suitable cairo context to be associated with the print context.
the page to render