type Gtkada_Print_Operation_Record is new Gtk_Print_Operation_Record with private;
type Gtkada_Print_Operation is access all Gtkada_Print_Operation_Record;
procedure Gtk_New
( | Op | : out Gtkada_Print_Operation); |
procedure Initialize
( | Widget | : access Gtkada_Print_Operation_Record'Class); |
function Connect_And_Run
( | Op | : access Gtkada_Print_Operation_Record'Class; |
Action | : Gtk_Print_Operation_Action; | |
Parent | : access Gtk_Window_Record'Class; | |
Error | : Glib.Error.GError := null) return Gtk_Print_Operation_Result; |
procedure Draw_Page
( | Op | : access Gtkada_Print_Operation_Record; |
Context | : Gtk_Print_Context; | |
Page_Number | : Gint); |
procedure Begin_Print
( | Op | : access Gtkada_Print_Operation_Record; |
Context | : Gtk_Print_Context); |
procedure Done
( | Op | : access Gtkada_Print_Operation_Record; |
Result | : Gtk_Print_Operation_Result); |
procedure End_Print
( | Op | : access Gtkada_Print_Operation_Record; |
Context | : Gtk_Print_Context); |
function Paginate
( | Op | : access Gtkada_Print_Operation_Record; |
Context | : Gtk_Print_Context) return Boolean; |
function Preview
( | Op | : access Gtkada_Print_Operation_Record; |
Preview | : Gtk_Print_Operation_Preview; | |
Context | : Gtk_Print_Context; | |
Parent | : Gtk_Window) return Boolean; |
procedure Request_Page_Setup
( | Op | : access Gtkada_Print_Operation_Record; |
Context | : Gtk_Print_Context; | |
Page_Number | : Gint; | |
Setup | : Gtk_Page_Setup); |
procedure Status_Changed
( | Op | : access Gtkada_Print_Operation_Record); |
This package provides a ready-to-use high level printing object.
Use functionality from Gtk.Print_Operation to manipulate the printing object, and the functionality in this package to provide the handlers for the printing operation.
Typically, to use this high-level printing API: - derive from the Gtkada_Print_Operation_Record object - override the Draw_Page operation - (optional) override any other operation useful to you - start the print operation by - first setting the number of pages through Set_N_Pages - then calling Connect_And_Run.
A dialog will be displayed, letting the user select a printer and options.
When the user finishes the dialog, various signals will be emitted on the Gtkada_Print_Operation, which will call the operations on your object.
Note: on UNIX/Linux, Gtk+ is loading at run-time the libraries for printing support. You will need to point the environment variable GTK_EXE_PREFIX to the root directory of your Gtk+ install before calling Connect_And_Run.