Gtk.Print_Operation_Preview

Entities

Simple Types

Access Types

Subtypes

Constants

Subprograms

Description

---------------------------------------------------------------------------- -- 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
Parameters
W
Return Value

Cb_GObject_Gtk_Print_Context_Gtk_Page_Setup_Void

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);
Parameters
Self
Context
Page_Setup

Cb_GObject_Gtk_Print_Context_Void

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);
Parameters
Self
Context

Cb_Gtk_Print_Operation_Preview_Gtk_Print_Context_Gtk_Page_Setup_Void

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);
Parameters
Self
Context
Page_Setup

Cb_Gtk_Print_Operation_Preview_Gtk_Print_Context_Void

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);
Parameters
Self
Context

End_Preview

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

Parameters
Preview

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_Print_Operation_Preview

type Gtk_Print_Operation_Preview is new Glib.Types.GType_Interface;

Is_Selected

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

Parameters
Preview
Page_Nr

a page number

Return Value

True if the page has been selected for printing

Null_Gtk_Print_Operation_Preview

Null_Gtk_Print_Operation_Preview : constant Gtk_Print_Operation_Preview;

On_Got_Page_Size

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

Parameters
Self
Call
Slot
After

On_Got_Page_Size

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

Parameters
Self
Call
After

On_Ready

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.

Parameters
Self
Call
Slot
After

On_Ready

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.

Parameters
Self
Call
After

Print_Operation_Preview_Interface_Descr

subtype Print_Operation_Preview_Interface_Descr is Glib.Object.Interface_Description;

Render_Page

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

Parameters
Preview
Page_Nr

the page to render

Set_End_Preview

procedure Set_End_Preview
  (Self    : Print_Operation_Preview_Interface_Descr;
   Handler : Virtual_End_Preview)
Parameters
Self
Handler

Set_Got_Page_Size

procedure Set_Got_Page_Size
  (Self    : Print_Operation_Preview_Interface_Descr;
   Handler : Virtual_Got_Page_Size)
Parameters
Self
Handler

Set_Is_Selected

procedure Set_Is_Selected
  (Self    : Print_Operation_Preview_Interface_Descr;
   Handler : Virtual_Is_Selected)
Parameters
Self
Handler

Set_Ready

procedure Set_Ready
  (Self    : Print_Operation_Preview_Interface_Descr;
   Handler : Virtual_Ready)
Parameters
Self
Handler

Set_Render_Page

procedure Set_Render_Page
  (Self    : Print_Operation_Preview_Interface_Descr;
   Handler : Virtual_Render_Page)

See Glib.Object.Add_Interface

Parameters
Self
Handler

Signal_Got_Page_Size

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

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.

Virtual_End_Preview

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

Parameters
Preview

Virtual_Got_Page_Size

type Virtual_Got_Page_Size is access procedure
  (Preview    : Gtk_Print_Operation_Preview;
   Context    : System.Address;
   Page_Setup : System.Address);
Parameters
Preview
Context
Page_Setup

Virtual_Is_Selected

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

Parameters
Preview
Page_Nr

a page number

Return Value

True if the page has been selected for printing

Virtual_Ready

type Virtual_Ready is access procedure
  (Preview : Gtk_Print_Operation_Preview;
   Context : System.Address);
Parameters
Preview
Context

Virtual_Render_Page

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

Parameters
Preview
Page_Nr

the page to render