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  * Conversion parameters:
26  * inFile  = 
27  * outPack = gtk
28  * outFile = PrintOperationPreviewIF
29  * strct   = GtkPrintOperationPreview
30  * realStrct=
31  * ctorStrct=
32  * clss    = PrintOperationPreviewT
33  * interf  = PrintOperationPreviewIF
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * extend  = 
38  * implements:
39  * prefixes:
40  * 	- gtk_print_operation_preview_
41  * omit structs:
42  * omit prefixes:
43  * omit code:
44  * omit signals:
45  * 	- begin-print
46  * 	- create-custom-widget
47  * 	- custom-widget-apply
48  * 	- done
49  * 	- draw-page
50  * 	- end-print
51  * 	- paginate
52  * 	- preview
53  * 	- request-page-setup
54  * 	- status-changed
55  * 	- update-custom-widget
56  * imports:
57  * 	- gtk.PageSetup
58  * 	- gtk.PrintContext
59  * structWrap:
60  * 	- GtkPageSetup* -> PageSetup
61  * 	- GtkPrintContext* -> PrintContext
62  * module aliases:
63  * local aliases:
64  * overrides:
65  */
66 
67 module gtk.PrintOperationPreviewIF;
68 
69 public  import gtkc.gtktypes;
70 
71 private import gtkc.gtk;
72 private import glib.ConstructionException;
73 private import gobject.ObjectG;
74 
75 private import gobject.Signals;
76 public  import gtkc.gdktypes;
77 
78 private import gtk.PageSetup;
79 private import gtk.PrintContext;
80 
81 
82 
83 
84 /**
85  * GtkPrintOperation is the high-level, portable printing API.
86  * It looks a bit different than other GTK+ dialogs such as the
87  * GtkFileChooser, since some platforms don't expose enough
88  * infrastructure to implement a good print dialog. On such
89  * platforms, GtkPrintOperation uses the native print dialog.
90  * On platforms which do not provide a native print dialog, GTK+
91  * uses its own, see GtkPrintUnixDialog.
92  *
93  * The typical way to use the high-level printing API is to create
94  * a GtkPrintOperation object with gtk_print_operation_new() when
95  * the user selects to print. Then you set some properties on it,
96  * e.g. the page size, any GtkPrintSettings from previous print
97  * operations, the number of pages, the current page, etc.
98  *
99  * Then you start the print operation by calling gtk_print_operation_run().
100  * It will then show a dialog, let the user select a printer and
101  * options. When the user finished the dialog various signals will
102  * be emitted on the GtkPrintOperation, the main one being
103  * "draw-page", which you are supposed to catch
104  * and render the page on the provided GtkPrintContext using Cairo.
105  *
106  * $(DDOC_COMMENT example)
107  *
108  * By default GtkPrintOperation uses an external application to do
109  * print preview. To implement a custom print preview, an application
110  * must connect to the preview signal. The functions
111  * gtk_print_operation_preview_render_page(),
112  * gtk_print_operation_preview_end_preview() and
113  * gtk_print_operation_preview_is_selected()
114  * are useful when implementing a print preview.
115  */
116 public interface PrintOperationPreviewIF
117 {
118 	
119 	
120 	public GtkPrintOperationPreview* getPrintOperationPreviewTStruct();
121 	
122 	/** the main Gtk struct as a void* */
123 	protected void* getStruct();
124 	
125 	
126 	/**
127 	 */
128 	
129 	@property void delegate(PrintContext, PageSetup, PrintOperationPreviewIF)[] onGotPageSizeListeners();
130 	/**
131 	 * The ::got-page-size signal is emitted once for each page
132 	 * that gets rendered to the preview.
133 	 * A handler for this signal should update the context
134 	 * according to page_setup and set up a suitable cairo
135 	 * context, using gtk_print_context_set_cairo_context().
136 	 */
137 	void addOnGotPageSize(void delegate(PrintContext, PageSetup, PrintOperationPreviewIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
138 	@property void delegate(PrintContext, PrintOperationPreviewIF)[] onReadyListeners();
139 	/**
140 	 * The ::ready signal gets emitted once per preview operation,
141 	 * before the first page is rendered.
142 	 * A handler for this signal can be used for setup tasks.
143 	 * See Also
144 	 * GtkPrintContext, GtkPrintUnixDialog
145 	 */
146 	void addOnReady(void delegate(PrintContext, PrintOperationPreviewIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0);
147 	
148 	/**
149 	 * Ends a preview.
150 	 * This function must be called to finish a custom print preview.
151 	 * Since 2.10
152 	 */
153 	public void endPreview();
154 	
155 	/**
156 	 * Returns whether the given page is included in the set of pages that
157 	 * have been selected for printing.
158 	 * Since 2.10
159 	 * Params:
160 	 * pageNr = a page number
161 	 * Returns: TRUE if the page has been selected for printing
162 	 */
163 	public int isSelected(int pageNr);
164 	
165 	/**
166 	 * Renders a page to the preview, using the print context that
167 	 * was passed to the "preview" handler together
168 	 * with preview.
169 	 * A custom iprint preview should use this function in its ::expose
170 	 * handler to render the currently selected page.
171 	 * Note that this function requires a suitable cairo context to
172 	 * be associated with the print context.
173 	 * Since 2.10
174 	 * Params:
175 	 * pageNr = the page to render
176 	 */
177 	public void renderPage(int pageNr);
178 }