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 private import std.algorithm; 34 35 36 /** */ 37 public interface PrintOperationPreviewIF{ 38 /** Get the main Gtk struct */ 39 public GtkPrintOperationPreview* getPrintOperationPreviewStruct(); 40 41 /** the main Gtk struct as a void* */ 42 protected void* getStruct(); 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 /** 85 * The ::got-page-size signal is emitted once for each page 86 * that gets rendered to the preview. 87 * 88 * A handler for this signal should update the @context 89 * according to @page_setup and set up a suitable cairo 90 * context, using gtk_print_context_set_cairo_context(). 91 * 92 * Params: 93 * context = the current #GtkPrintContext 94 * pageSetup = the #GtkPageSetup for the current page 95 */ 96 gulong addOnGotPageSize(void delegate(PrintContext, PageSetup, PrintOperationPreviewIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 97 ; 98 99 /** 100 * The ::ready signal gets emitted once per preview operation, 101 * before the first page is rendered. 102 * 103 * A handler for this signal can be used for setup tasks. 104 * 105 * Params: 106 * context = the current #GtkPrintContext 107 */ 108 gulong addOnReady(void delegate(PrintContext, PrintOperationPreviewIF) dlg, ConnectFlags connectFlags=cast(ConnectFlags)0) 109 ; 110 111 }