---------------------------------------------------------------------------- -- Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet -- Copyright (C) 2000-2022, AdaCore -- -- This library is free software; you can redistribute it and/or modify it -- under terms of the GNU General Public License as published by the Free -- Software Foundation; either version 3, or (at your option) any later -- version. This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- -- As a special exception under Section 7 of GPL version 3, you are granted -- additional permissions described in the GCC Runtime Library Exception, -- version 3.1, as published by the Free Software Foundation. -- -- You should have received a copy of the GNU General Public License and -- a copy of the GCC Runtime Library Exception along with this program; -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- <http://www.gnu.org/licenses/>. -- -- ----------------------------------------------------------------------------
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 (Preview : Gtk_Print_Operation_Preview)
Ends a preview. This function must be called to finish a custom print preview. Since: gtk+ 2.10
function Get_Type return Glib.GType
type Gtk_Print_Operation_Preview is new Glib.Types.GType_Interface;
function Is_Selected
(Preview : 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. Since: gtk+ 2.10
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)
The ::got-page-size signal is 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 Gtk.Print_Context.Set_Cairo_Context.
Callback parameters: -- @param Context the current Gtk.Print_Context.Gtk_Print_Context -- @param Page_Setup the Gtk.Page_Setup.Gtk_Page_Setup 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)
The ::got-page-size signal is 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 Gtk.Print_Context.Set_Cairo_Context.
Callback parameters: -- @param Context the current Gtk.Print_Context.Gtk_Print_Context -- @param Page_Setup the Gtk.Page_Setup.Gtk_Page_Setup 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
(Preview : Gtk_Print_Operation_Preview;
Page_Nr : Glib.Gint)
Renders a page to the preview, using the print context that was passed to the Gtk.Print_Operation.Gtk_Print_Operation::preview handler together with Preview. A custom iprint preview should use this function in its ::expose handler to render the currently selected page. Note that this function requires a suitable cairo context to be associated with the print context. Since: gtk+ 2.10
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";
The ::got-page-size signal is 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 Gtk.Print_Context.Set_Cairo_Context.
Callback parameters: -- @param Context the current Gtk.Print_Context.Gtk_Print_Context -- @param Page_Setup the Gtk.Page_Setup.Gtk_Page_Setup 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 (Preview : Gtk_Print_Operation_Preview);
Ends a preview. This function must be called to finish a custom print preview. Since: gtk+ 2.10
type Virtual_Got_Page_Size is access procedure
(Preview : Gtk_Print_Operation_Preview;
Context : System.Address;
Page_Setup : System.Address);
type Virtual_Is_Selected is access function
(Preview : 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. Since: gtk+ 2.10
a page number
True if the page has been selected for printing
type Virtual_Ready is access procedure
(Preview : Gtk_Print_Operation_Preview;
Context : System.Address);
type Virtual_Render_Page is access procedure
(Preview : Gtk_Print_Operation_Preview;
Page_Nr : Glib.Gint);
Renders a page to the preview, using the print context that was passed to the Gtk.Print_Operation.Gtk_Print_Operation::preview handler together with Preview. A custom iprint preview should use this function in its ::expose handler to render the currently selected page. Note that this function requires a suitable cairo context to be associated with the print context. Since: gtk+ 2.10
the page to render