1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19 
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 
25 module gtk.PrintOperationPreviewIF;
26 
27 private import gobject.Signals;
28 private import gtk.PageSetup;
29 private import gtk.PrintContext;
30 private import gtk.c.functions;
31 public  import gtk.c.types;
32 public  import gtkc.gtktypes;
33 private import std.algorithm;
34 
35 
36 /** */
37 public interface PrintOperationPreviewIF{
38 	/** Get the main Gtk struct */
39 	public GtkPrintOperationPreview* getPrintOperationPreviewStruct(bool transferOwnership = false);
40 
41 	/** the main Gtk struct as a void* */
42 	protected void* getStruct();
43 
44 
45 	/** */
46 	public static GType getType()
47 	{
48 		return gtk_print_operation_preview_get_type();
49 	}
50 
51 	/**
52 	 * Ends a preview.
53 	 *
54 	 * This function must be called to finish a custom print preview.
55 	 *
56 	 * Since: 2.10
57 	 */
58 	public void endPreview();
59 
60 	/**
61 	 * Returns whether the given page is included in the set of pages that
62 	 * have been selected for printing.
63 	 *
64 	 * Params:
65 	 *     pageNr = a page number
66 	 *
67 	 * Returns: %TRUE if the page has been selected for printing
68 	 *
69 	 * Since: 2.10
70 	 */
71 	public bool isSelected(int pageNr);
72 
73 	/**
74 	 * Renders a page to the preview, using the print context that
75 	 * was passed to the #GtkPrintOperation::preview handler together
76 	 * with @preview.
77 	 *
78 	 * A custom iprint preview should use this function in its ::expose
79 	 * handler to render the currently selected page.
80 	 *
81 	 * Note that this function requires a suitable cairo context to
82 	 * be associated with the print context.
83 	 *
84 	 * Params:
85 	 *     pageNr = the page to render
86 	 *
87 	 * Since: 2.10
88 	 */
89 	public void renderPage(int pageNr);
90 
91 	/**
92 	 * The ::got-page-size signal is emitted once for each page
93 	 * that gets rendered to the preview.
94 	 *
95 	 * A handler for this signal should update the @context
96 	 * according to @page_setup and set up a suitable cairo
97 	 * context, using gtk_print_context_set_cairo_context().
98 	 *
99 	 * Params:
100 	 *     context = the current #GtkPrintContext
101 	 *     pageSetup = the #GtkPageSetup for the current page
102 	 */
103 	gulong addOnGotPageSize(void delegate(PrintContext, PageSetup, PrintOperationPreviewIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
104 
105 	/**
106 	 * The ::ready signal gets emitted once per preview operation,
107 	 * before the first page is rendered.
108 	 *
109 	 * A handler for this signal can be used for setup tasks.
110 	 *
111 	 * Params:
112 	 *     context = the current #GtkPrintContext
113 	 */
114 	gulong addOnReady(void delegate(PrintContext, PrintOperationPreviewIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
115 }