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 public import gtkc.gdktypes; 31 private import gtkc.gtk; 32 public import gtkc.gtktypes; 33 34 35 public interface PrintOperationPreviewIF{ 36 /** Get the main Gtk struct */ 37 public GtkPrintOperationPreview* getPrintOperationPreviewStruct(); 38 39 /** the main Gtk struct as a void* */ 40 protected void* getStruct(); 41 42 /** 43 */ 44 45 /** 46 * Ends a preview. 47 * 48 * This function must be called to finish a custom print preview. 49 * 50 * Since: 2.10 51 */ 52 public void endPreview(); 53 54 /** 55 * Returns whether the given page is included in the set of pages that 56 * have been selected for printing. 57 * 58 * Params: 59 * pageNr = a page number 60 * 61 * Return: %TRUE if the page has been selected for printing 62 * 63 * Since: 2.10 64 */ 65 public bool isSelected(int pageNr); 66 67 /** 68 * Renders a page to the preview, using the print context that 69 * was passed to the #GtkPrintOperation::preview handler together 70 * with @preview. 71 * 72 * A custom iprint preview should use this function in its ::expose 73 * handler to render the currently selected page. 74 * 75 * Note that this function requires a suitable cairo context to 76 * be associated with the print context. 77 * 78 * Params: 79 * pageNr = the page to render 80 * 81 * Since: 2.10 82 */ 83 public void renderPage(int pageNr); 84 @property void delegate(PrintContext, PageSetup, PrintOperationPreviewIF)[] onGotPageSizeListeners(); 85 /** 86 * The ::got-page-size signal is emitted once for each page 87 * that gets rendered to the preview. 88 * 89 * A handler for this signal should update the @context 90 * according to @page_setup and set up a suitable cairo 91 * context, using gtk_print_context_set_cairo_context(). 92 * 93 * Params: 94 * context = the current #GtkPrintContext 95 * pageSetup = the #GtkPageSetup for the current page 96 */ 97 void addOnGotPageSize(void delegate(PrintContext, PageSetup, PrintOperationPreviewIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); 98 99 @property void delegate(PrintContext, PrintOperationPreviewIF)[] onReadyListeners(); 100 /** 101 * The ::ready signal gets emitted once per preview operation, 102 * before the first page is rendered. 103 * 104 * A handler for this signal can be used for setup tasks. 105 * 106 * Params: 107 * context = the current #GtkPrintContext 108 */ 109 void addOnReady(void delegate(PrintContext, PrintOperationPreviewIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0); 110 111 }