PageRenderTime 27ms CodeModel.GetById 23ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/wrappers/gtk/library/gtk_print_operation_preview.e

http://github.com/tybor/Liberty
Specman e | 60 lines | 39 code | 12 blank | 9 comment | 2 complexity | 90ea43596f7e8172366aab9f1e781a31 MD5 | raw file
 1indexing
 2	description: "."
 3	copyright: "[
 4					Copyright (C) 2006 Paolo Redaelli, GTK+ team
 5					
 6					This library is free software; you can redistribute it and/or
 7					modify it under the terms of the GNU Lesser General Public License
 8					as published by the Free Software Foundation; either version 2.1 of
 9					the License, or (at your option) any later version.
10					
11					This library is distributed in the hopeOA that it will be useful, but
12					WITHOUT ANY WARRANTY; without even the implied warranty of
13					MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14					Lesser General Public License for more details.
15
16					You should have received a copy of the GNU Lesser General Public
17					License along with this library; if not, write to the Free Software
18					Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19					02110-1301 USA
20			]"
21
22deferred class GTK_PRINT_OPERATION_PREVIEW
23
24inherit G_OBJECT
25
26insert GTK_PRINT_OPERATION_PREVIEW_EXTERNALS
27
28feature -- Creation
29	end_preview is
30			-- Ends a preview. This function must be called to finish a custom
31			-- print preview.
32		do
33			gtk_print_operation_preview_end_preview(handle)
34		end
35
36	is_selected (a_page_number: INTEGER): BOOLEAN is
37			-- Has the given page is included in the set of pages that have been
38			-- selected for printing?
39		do
40			Result:=gtk_print_operation_preview_is_selected(handle,a_page_number).to_boolean
41		end
42
43	render_page (a_page_number: INTEGER) is
44			-- Renders a page to the preview, using the print context that was
45			-- passed to the GtkPrintOperation::preview handler together with
46			-- preview.
47
48			-- Note that this function requires a suitable cairo context to be
49			-- associated with the print context.
50		do
51			gtk_print_operation_preview_render_page(handle,a_page_number)
52		end
53
54feature -- size
55	struct_size: INTEGER is
56		external "C inline use <gtk/gtk.h>"
57		alias "sizeof(GtkPrintOperationPreview)"
58		end
59
60end -- class GTK_PRINT_OPERATION_PREVIEW