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 gsv.SourcePrintCompositor;
26 
27 private import glib.ConstructionException;
28 private import glib.Str;
29 private import gobject.ObjectG;
30 private import gsv.SourceBuffer;
31 private import gsv.SourceView;
32 private import gsvc.gsv;
33 public  import gsvc.gsvtypes;
34 private import gtk.PrintContext;
35 
36 
37 /** */
38 public class SourcePrintCompositor : ObjectG
39 {
40 	/** the main Gtk struct */
41 	protected GtkSourcePrintCompositor* gtkSourcePrintCompositor;
42 
43 	/** Get the main Gtk struct */
44 	public GtkSourcePrintCompositor* getSourcePrintCompositorStruct()
45 	{
46 		return gtkSourcePrintCompositor;
47 	}
48 
49 	/** the main Gtk struct as a void* */
50 	protected override void* getStruct()
51 	{
52 		return cast(void*)gtkSourcePrintCompositor;
53 	}
54 
55 	protected override void setStruct(GObject* obj)
56 	{
57 		gtkSourcePrintCompositor = cast(GtkSourcePrintCompositor*)obj;
58 		super.setStruct(obj);
59 	}
60 
61 	/**
62 	 * Sets our main struct and passes it to the parent class.
63 	 */
64 	public this (GtkSourcePrintCompositor* gtkSourcePrintCompositor, bool ownedRef = false)
65 	{
66 		this.gtkSourcePrintCompositor = gtkSourcePrintCompositor;
67 		super(cast(GObject*)gtkSourcePrintCompositor, ownedRef);
68 	}
69 
70 
71 	/** */
72 	public static GType getType()
73 	{
74 		return gtk_source_print_compositor_get_type();
75 	}
76 
77 	/**
78 	 * Creates a new print compositor that can be used to print @buffer.
79 	 *
80 	 * Params:
81 	 *     buffer = the #GtkSourceBuffer to print.
82 	 *
83 	 * Return: a new print compositor object.
84 	 *
85 	 * Since: 2.2
86 	 *
87 	 * Throws: ConstructionException GTK+ fails to create the object.
88 	 */
89 	public this(SourceBuffer buffer)
90 	{
91 		auto p = gtk_source_print_compositor_new((buffer is null) ? null : buffer.getSourceBufferStruct());
92 		
93 		if(p is null)
94 		{
95 			throw new ConstructionException("null returned by new");
96 		}
97 		
98 		this(cast(GtkSourcePrintCompositor*) p, true);
99 	}
100 
101 	/**
102 	 * Creates a new print compositor that can be used to print the buffer
103 	 * associated with @view.
104 	 * This constructor sets some configuration properties to make the
105 	 * printed output match @view as much as possible.  The properties set are
106 	 * #GtkSourcePrintCompositor:tab-width, #GtkSourcePrintCompositor:highlight-syntax,
107 	 * #GtkSourcePrintCompositor:wrap-mode, #GtkSourcePrintCompositor:body-font-name and
108 	 * #GtkSourcePrintCompositor:print-line-numbers.
109 	 *
110 	 * Params:
111 	 *     view = a #GtkSourceView to get configuration from.
112 	 *
113 	 * Return: a new print compositor object.
114 	 *
115 	 * Since: 2.2
116 	 *
117 	 * Throws: ConstructionException GTK+ fails to create the object.
118 	 */
119 	public this(SourceView view)
120 	{
121 		auto p = gtk_source_print_compositor_new_from_view((view is null) ? null : view.getSourceViewStruct());
122 		
123 		if(p is null)
124 		{
125 			throw new ConstructionException("null returned by new_from_view");
126 		}
127 		
128 		this(cast(GtkSourcePrintCompositor*) p, true);
129 	}
130 
131 	/**
132 	 * Draw page @page_nr for printing on the the Cairo context encapsuled in @context.
133 	 *
134 	 * This method has been designed to be called in the handler of the #GtkPrintOperation::draw_page signal
135 	 * as shown in the following example:
136 	 *
137 	 * <informalexample><programlisting>
138 	 * // Signal handler for the GtkPrintOperation::draw_page signal
139 	 *
140 	 * static void
141 	 * draw_page (GtkPrintOperation *operation,
142 	 * GtkPrintContext   *context,
143 	 * gint               page_nr,
144 	 * gpointer           user_data)
145 	 * {
146 	 * GtkSourcePrintCompositor *compositor;
147 	 *
148 	 * compositor = GTK_SOURCE_PRINT_COMPOSITOR (user_data);
149 	 *
150 	 * gtk_source_print_compositor_draw_page (compositor,
151 	 * context,
152 	 * page_nr);
153 	 * }
154 	 * </programlisting></informalexample>
155 	 *
156 	 * Params:
157 	 *     context = the #GtkPrintContext encapsulating the context information that is required when
158 	 *         drawing the page for printing.
159 	 *     pageNr = the number of the page to print.
160 	 */
161 	public void drawPage(PrintContext context, int pageNr)
162 	{
163 		gtk_source_print_compositor_draw_page(gtkSourcePrintCompositor, (context is null) ? null : context.getPrintContextStruct(), pageNr);
164 	}
165 
166 	/**
167 	 * Returns the name of the font used to print the text body. The returned string
168 	 * must be freed with g_free().
169 	 *
170 	 * Return: a new string containing the name of the font used to print the
171 	 *     text body.
172 	 *
173 	 * Since: 2.2
174 	 */
175 	public string getBodyFontName()
176 	{
177 		return Str.toString(gtk_source_print_compositor_get_body_font_name(gtkSourcePrintCompositor));
178 	}
179 
180 	/**
181 	 * Gets the bottom margin in units of @unit.
182 	 *
183 	 * Params:
184 	 *     unit = the unit for the return value.
185 	 *
186 	 * Return: the bottom margin.
187 	 *
188 	 * Since: 2.2
189 	 */
190 	public double getBottomMargin(GtkUnit unit)
191 	{
192 		return gtk_source_print_compositor_get_bottom_margin(gtkSourcePrintCompositor, unit);
193 	}
194 
195 	/**
196 	 * Gets the #GtkSourceBuffer associated with the compositor. The returned
197 	 * object reference is owned by the compositor object and
198 	 * should not be unreferenced.
199 	 *
200 	 * Return: the #GtkSourceBuffer associated with the compositor.
201 	 *
202 	 * Since: 2.2
203 	 */
204 	public SourceBuffer getBuffer()
205 	{
206 		auto p = gtk_source_print_compositor_get_buffer(gtkSourcePrintCompositor);
207 		
208 		if(p is null)
209 		{
210 			return null;
211 		}
212 		
213 		return ObjectG.getDObject!(SourceBuffer)(cast(GtkSourceBuffer*) p);
214 	}
215 
216 	/**
217 	 * Returns the name of the font used to print the page footer.
218 	 * The returned string must be freed with g_free().
219 	 *
220 	 * Return: a new string containing the name of the font used to print
221 	 *     the page footer.
222 	 *
223 	 * Since: 2.2
224 	 */
225 	public string getFooterFontName()
226 	{
227 		return Str.toString(gtk_source_print_compositor_get_footer_font_name(gtkSourcePrintCompositor));
228 	}
229 
230 	/**
231 	 * Returns the name of the font used to print the page header.
232 	 * The returned string must be freed with g_free().
233 	 *
234 	 * Return: a new string containing the name of the font used to print
235 	 *     the page header.
236 	 *
237 	 * Since: 2.2
238 	 */
239 	public string getHeaderFontName()
240 	{
241 		return Str.toString(gtk_source_print_compositor_get_header_font_name(gtkSourcePrintCompositor));
242 	}
243 
244 	/**
245 	 * Determines whether the printed text will be highlighted according to the
246 	 * buffer rules.  Note that highlighting will happen
247 	 * only if the buffer to print has highlighting activated.
248 	 *
249 	 * Return: %TRUE if the printed output will be highlighted.
250 	 *
251 	 * Since: 2.2
252 	 */
253 	public bool getHighlightSyntax()
254 	{
255 		return gtk_source_print_compositor_get_highlight_syntax(gtkSourcePrintCompositor) != 0;
256 	}
257 
258 	/**
259 	 * Gets the left margin in units of @unit.
260 	 *
261 	 * Params:
262 	 *     unit = the unit for the return value.
263 	 *
264 	 * Return: the left margin
265 	 *
266 	 * Since: 2.2
267 	 */
268 	public double getLeftMargin(GtkUnit unit)
269 	{
270 		return gtk_source_print_compositor_get_left_margin(gtkSourcePrintCompositor, unit);
271 	}
272 
273 	/**
274 	 * Returns the name of the font used to print line numbers on the left margin.
275 	 * The returned string must be freed with g_free().
276 	 *
277 	 * Return: a new string containing the name of the font used to print
278 	 *     line numbers on the left margin.
279 	 *
280 	 * Since: 2.2
281 	 */
282 	public string getLineNumbersFontName()
283 	{
284 		return Str.toString(gtk_source_print_compositor_get_line_numbers_font_name(gtkSourcePrintCompositor));
285 	}
286 
287 	/**
288 	 * Returns the number of pages in the document or <code>-1</code> if the
289 	 * document has not been completely paginated.
290 	 *
291 	 * Return: the number of pages in the document or <code>-1</code> if the
292 	 *     document has not been completely paginated.
293 	 *
294 	 * Since: 2.2
295 	 */
296 	public int getNPages()
297 	{
298 		return gtk_source_print_compositor_get_n_pages(gtkSourcePrintCompositor);
299 	}
300 
301 	/**
302 	 * Returns the current fraction of the document pagination that has been completed.
303 	 *
304 	 * Return: a fraction from 0.0 to 1.0 inclusive.
305 	 *
306 	 * Since: 2.2
307 	 */
308 	public double getPaginationProgress()
309 	{
310 		return gtk_source_print_compositor_get_pagination_progress(gtkSourcePrintCompositor);
311 	}
312 
313 	/**
314 	 * Determines if a footer is set to be printed for each page.  A
315 	 * footer will be printed if this function returns %TRUE
316 	 * <emphasis>and</emphasis> some format strings have been specified
317 	 * with gtk_source_print_compositor_set_footer_format().
318 	 *
319 	 * Return: %TRUE if the footer is set to be printed.
320 	 *
321 	 * Since: 2.2
322 	 */
323 	public bool getPrintFooter()
324 	{
325 		return gtk_source_print_compositor_get_print_footer(gtkSourcePrintCompositor) != 0;
326 	}
327 
328 	/**
329 	 * Determines if a header is set to be printed for each page.  A
330 	 * header will be printed if this function returns %TRUE
331 	 * <emphasis>and</emphasis> some format strings have been specified
332 	 * with gtk_source_print_compositor_set_header_format().
333 	 *
334 	 * Return: %TRUE if the header is set to be printed.
335 	 *
336 	 * Since: 2.2
337 	 */
338 	public bool getPrintHeader()
339 	{
340 		return gtk_source_print_compositor_get_print_header(gtkSourcePrintCompositor) != 0;
341 	}
342 
343 	/**
344 	 * Returns the interval used for line number printing.  If the
345 	 * value is 0, no line numbers will be printed.  The default value is
346 	 * 1 (i.e. numbers printed in all lines).
347 	 *
348 	 * Return: the interval of printed line numbers.
349 	 *
350 	 * Since: 2.2
351 	 */
352 	public uint getPrintLineNumbers()
353 	{
354 		return gtk_source_print_compositor_get_print_line_numbers(gtkSourcePrintCompositor);
355 	}
356 
357 	/**
358 	 * Gets the right margin in units of @unit.
359 	 *
360 	 * Params:
361 	 *     unit = the unit for the return value.
362 	 *
363 	 * Return: the right margin.
364 	 *
365 	 * Since: 2.2
366 	 */
367 	public double getRightMargin(GtkUnit unit)
368 	{
369 		return gtk_source_print_compositor_get_right_margin(gtkSourcePrintCompositor, unit);
370 	}
371 
372 	/**
373 	 * Returns the width of tabulation in characters for printed text.
374 	 *
375 	 * Return: width of tab.
376 	 *
377 	 * Since: 2.2
378 	 */
379 	public uint getTabWidth()
380 	{
381 		return gtk_source_print_compositor_get_tab_width(gtkSourcePrintCompositor);
382 	}
383 
384 	/**
385 	 * Gets the top margin in units of @unit.
386 	 *
387 	 * Params:
388 	 *     unit = the unit for the return value.
389 	 *
390 	 * Return: the top margin.
391 	 *
392 	 * Since: 2.2
393 	 */
394 	public double getTopMargin(GtkUnit unit)
395 	{
396 		return gtk_source_print_compositor_get_top_margin(gtkSourcePrintCompositor, unit);
397 	}
398 
399 	/**
400 	 * Gets the line wrapping mode for the printed text.
401 	 *
402 	 * Return: the line wrap mode.
403 	 *
404 	 * Since: 2.2
405 	 */
406 	public GtkWrapMode getWrapMode()
407 	{
408 		return gtk_source_print_compositor_get_wrap_mode(gtkSourcePrintCompositor);
409 	}
410 
411 	/**
412 	 * Paginate the document associated with the @compositor.
413 	 *
414 	 * In order to support non-blocking pagination, document is paginated in small chunks.
415 	 * Each time gtk_source_print_compositor_paginate() is invoked, a chunk of the document
416 	 * is paginated. To paginate the entire document, gtk_source_print_compositor_paginate()
417 	 * must be invoked multiple times.
418 	 * It returns %TRUE if the document has been completely paginated, otherwise it returns %FALSE.
419 	 *
420 	 * This method has been designed to be invoked in the handler of the #GtkPrintOperation::paginate signal,
421 	 * as shown in the following example:
422 	 *
423 	 * <informalexample><programlisting>
424 	 * // Signal handler for the GtkPrintOperation::paginate signal
425 	 *
426 	 * static gboolean
427 	 * paginate (GtkPrintOperation *operation,
428 	 * GtkPrintContext   *context,
429 	 * gpointer           user_data)
430 	 * {
431 	 * GtkSourcePrintCompositor *compositor;
432 	 *
433 	 * compositor = GTK_SOURCE_PRINT_COMPOSITOR (user_data);
434 	 *
435 	 * if (gtk_source_print_compositor_paginate (compositor, context))
436 	 * {
437 	 * gint n_pages;
438 	 *
439 	 * n_pages = gtk_source_print_compositor_get_n_pages (compositor);
440 	 * gtk_print_operation_set_n_pages (operation, n_pages);
441 	 *
442 	 * return TRUE;
443 	 * }
444 	 *
445 	 * return FALSE;
446 	 * }
447 	 * </programlisting></informalexample>
448 	 *
449 	 * If you don't need to do pagination in chunks, you can simply do it all in the
450 	 * #GtkPrintOperation::begin-print handler, and set the number of pages from there, like
451 	 * in the following example:
452 	 *
453 	 * <informalexample><programlisting>
454 	 * // Signal handler for the GtkPrintOperation::begin-print signal
455 	 *
456 	 * static void
457 	 * begin_print (GtkPrintOperation *operation,
458 	 * GtkPrintContext   *context,
459 	 * gpointer           user_data)
460 	 * {
461 	 * GtkSourcePrintCompositor *compositor;
462 	 * gint n_pages;
463 	 *
464 	 * compositor = GTK_SOURCE_PRINT_COMPOSITOR (user_data);
465 	 *
466 	 * while (!gtk_source_print_compositor_paginate (compositor, context));
467 	 *
468 	 * n_pages = gtk_source_print_compositor_get_n_pages (compositor);
469 	 * gtk_print_operation_set_n_pages (operation, n_pages);
470 	 * }
471 	 * </programlisting></informalexample>
472 	 *
473 	 * Params:
474 	 *     context = the #GtkPrintContext whose parameters (e.g. paper size, print margins, etc.)
475 	 *         are used by the the @compositor to paginate the document.
476 	 *
477 	 * Return: %TRUE if the document has been completely paginated, %FALSE otherwise.
478 	 *
479 	 * Since: 2.2
480 	 */
481 	public bool paginate(PrintContext context)
482 	{
483 		return gtk_source_print_compositor_paginate(gtkSourcePrintCompositor, (context is null) ? null : context.getPrintContextStruct()) != 0;
484 	}
485 
486 	/**
487 	 * Sets the default font for the printed text.
488 	 *
489 	 * @font_name should be a
490 	 * string representation of a font description Pango can understand.
491 	 * (e.g. &quot;Monospace 10&quot;). See pango_font_description_from_string()
492 	 * for a description of the format of the string representation.
493 	 *
494 	 * This function cannot be called anymore after the first call to the
495 	 * gtk_source_print_compositor_paginate() function.
496 	 *
497 	 * Params:
498 	 *     fontName = the name of the default font for the body text.
499 	 *
500 	 * Since: 2.2
501 	 */
502 	public void setBodyFontName(string fontName)
503 	{
504 		gtk_source_print_compositor_set_body_font_name(gtkSourcePrintCompositor, Str.toStringz(fontName));
505 	}
506 
507 	/**
508 	 * Sets the bottom margin used by @compositor.
509 	 *
510 	 * Params:
511 	 *     margin = the new bottom margin in units of @unit.
512 	 *     unit = the units for @margin.
513 	 *
514 	 * Since: 2.2
515 	 */
516 	public void setBottomMargin(double margin, GtkUnit unit)
517 	{
518 		gtk_source_print_compositor_set_bottom_margin(gtkSourcePrintCompositor, margin, unit);
519 	}
520 
521 	/**
522 	 * Sets the font for printing the page footer. If
523 	 * %NULL is supplied, the default font (i.e. the one being used for the
524 	 * text) will be used instead.
525 	 *
526 	 * @font_name should be a
527 	 * string representation of a font description Pango can understand.
528 	 * (e.g. &quot;Monospace 10&quot;). See pango_font_description_from_string()
529 	 * for a description of the format of the string representation.
530 	 *
531 	 * This function cannot be called anymore after the first call to the
532 	 * gtk_source_print_compositor_paginate() function.
533 	 *
534 	 * Params:
535 	 *     fontName = the name of the font for the footer text, or %NULL.
536 	 *
537 	 * Since: 2.2
538 	 */
539 	public void setFooterFontName(string fontName)
540 	{
541 		gtk_source_print_compositor_set_footer_font_name(gtkSourcePrintCompositor, Str.toStringz(fontName));
542 	}
543 
544 	/**
545 	 * See gtk_source_print_compositor_set_header_format() for more information
546 	 * about the parameters.
547 	 *
548 	 * Params:
549 	 *     separator = %TRUE if you want a separator line to be printed.
550 	 *     left = a format string to print on the left of the footer.
551 	 *     center = a format string to print on the center of the footer.
552 	 *     right = a format string to print on the right of the footer.
553 	 *
554 	 * Since: 2.2
555 	 */
556 	public void setFooterFormat(bool separator, string left, string center, string right)
557 	{
558 		gtk_source_print_compositor_set_footer_format(gtkSourcePrintCompositor, separator, Str.toStringz(left), Str.toStringz(center), Str.toStringz(right));
559 	}
560 
561 	/**
562 	 * Sets the font for printing the page header. If
563 	 * %NULL is supplied, the default font (i.e. the one being used for the
564 	 * text) will be used instead.
565 	 *
566 	 * @font_name should be a
567 	 * string representation of a font description Pango can understand.
568 	 * (e.g. &quot;Monospace 10&quot;). See pango_font_description_from_string()
569 	 * for a description of the format of the string representation.
570 	 *
571 	 * This function cannot be called anymore after the first call to the
572 	 * gtk_source_print_compositor_paginate() function.
573 	 *
574 	 * Params:
575 	 *     fontName = the name of the font for header text, or %NULL.
576 	 *
577 	 * Since: 2.2
578 	 */
579 	public void setHeaderFontName(string fontName)
580 	{
581 		gtk_source_print_compositor_set_header_font_name(gtkSourcePrintCompositor, Str.toStringz(fontName));
582 	}
583 
584 	/**
585 	 * Sets strftime like header format strings, to be printed on the
586 	 * left, center and right of the top of each page.  The strings may
587 	 * include strftime(3) codes which will be expanded at print time.
588 	 * A subset of strftime() codes are accepted, see g_date_time_format()
589 	 * for more details on the accepted format specifiers.
590 	 * Additionally the following format specifiers are accepted:
591 	 * - #N: the page number
592 	 * - #Q: the page count.
593 	 *
594 	 * @separator specifies if a solid line should be drawn to separate
595 	 * the header from the document text.
596 	 *
597 	 * If %NULL is given for any of the three arguments, that particular
598 	 * string will not be printed.
599 	 *
600 	 * For the header to be printed, in
601 	 * addition to specifying format strings, you need to enable header
602 	 * printing with gtk_source_print_compositor_set_print_header().
603 	 *
604 	 * This function cannot be called anymore after the first call to the
605 	 * gtk_source_print_compositor_paginate() function.
606 	 *
607 	 * Params:
608 	 *     separator = %TRUE if you want a separator line to be printed.
609 	 *     left = a format string to print on the left of the header.
610 	 *     center = a format string to print on the center of the header.
611 	 *     right = a format string to print on the right of the header.
612 	 *
613 	 * Since: 2.2
614 	 */
615 	public void setHeaderFormat(bool separator, string left, string center, string right)
616 	{
617 		gtk_source_print_compositor_set_header_format(gtkSourcePrintCompositor, separator, Str.toStringz(left), Str.toStringz(center), Str.toStringz(right));
618 	}
619 
620 	/**
621 	 * Sets whether the printed text will be highlighted according to the
622 	 * buffer rules.  Both color and font style are applied.
623 	 *
624 	 * This function cannot be called anymore after the first call to the
625 	 * gtk_source_print_compositor_paginate() function.
626 	 *
627 	 * Params:
628 	 *     highlight = whether syntax should be highlighted.
629 	 *
630 	 * Since: 2.2
631 	 */
632 	public void setHighlightSyntax(bool highlight)
633 	{
634 		gtk_source_print_compositor_set_highlight_syntax(gtkSourcePrintCompositor, highlight);
635 	}
636 
637 	/**
638 	 * Sets the left margin used by @compositor.
639 	 *
640 	 * Params:
641 	 *     margin = the new left margin in units of @unit.
642 	 *     unit = the units for @margin.
643 	 *
644 	 * Since: 2.2
645 	 */
646 	public void setLeftMargin(double margin, GtkUnit unit)
647 	{
648 		gtk_source_print_compositor_set_left_margin(gtkSourcePrintCompositor, margin, unit);
649 	}
650 
651 	/**
652 	 * Sets the font for printing line numbers on the left margin.  If
653 	 * %NULL is supplied, the default font (i.e. the one being used for the
654 	 * text) will be used instead.
655 	 *
656 	 * @font_name should be a
657 	 * string representation of a font description Pango can understand.
658 	 * (e.g. &quot;Monospace 10&quot;). See pango_font_description_from_string()
659 	 * for a description of the format of the string representation.
660 	 *
661 	 * This function cannot be called anymore after the first call to the
662 	 * gtk_source_print_compositor_paginate() function.
663 	 *
664 	 * Params:
665 	 *     fontName = the name of the font for line numbers, or %NULL.
666 	 *
667 	 * Since: 2.2
668 	 */
669 	public void setLineNumbersFontName(string fontName)
670 	{
671 		gtk_source_print_compositor_set_line_numbers_font_name(gtkSourcePrintCompositor, Str.toStringz(fontName));
672 	}
673 
674 	/**
675 	 * Sets whether you want to print a footer in each page.  The
676 	 * footer consists of three pieces of text and an optional line
677 	 * separator, configurable with
678 	 * gtk_source_print_compositor_set_footer_format().
679 	 *
680 	 * Note that by default the footer format is unspecified, and if it's
681 	 * empty it will not be printed, regardless of this setting.
682 	 *
683 	 * This function cannot be called anymore after the first call to the
684 	 * gtk_source_print_compositor_paginate() function.
685 	 *
686 	 * Params:
687 	 *     print = %TRUE if you want the footer to be printed.
688 	 *
689 	 * Since: 2.2
690 	 */
691 	public void setPrintFooter(bool print)
692 	{
693 		gtk_source_print_compositor_set_print_footer(gtkSourcePrintCompositor, print);
694 	}
695 
696 	/**
697 	 * Sets whether you want to print a header in each page.  The
698 	 * header consists of three pieces of text and an optional line
699 	 * separator, configurable with
700 	 * gtk_source_print_compositor_set_header_format().
701 	 *
702 	 * Note that by default the header format is unspecified, and if it's
703 	 * empty it will not be printed, regardless of this setting.
704 	 *
705 	 * This function cannot be called anymore after the first call to the
706 	 * gtk_source_print_compositor_paginate() function.
707 	 *
708 	 * Params:
709 	 *     print = %TRUE if you want the header to be printed.
710 	 *
711 	 * Since: 2.2
712 	 */
713 	public void setPrintHeader(bool print)
714 	{
715 		gtk_source_print_compositor_set_print_header(gtkSourcePrintCompositor, print);
716 	}
717 
718 	/**
719 	 * Sets the interval for printed line numbers.  If @interval is 0 no
720 	 * numbers will be printed.  If greater than 0, a number will be
721 	 * printed every @interval lines (i.e. 1 will print all line numbers).
722 	 *
723 	 * Maximum accepted value for @interval is 100.
724 	 *
725 	 * This function cannot be called anymore after the first call to the
726 	 * gtk_source_print_compositor_paginate() function.
727 	 *
728 	 * Params:
729 	 *     interval = interval for printed line numbers.
730 	 *
731 	 * Since: 2.2
732 	 */
733 	public void setPrintLineNumbers(uint interval)
734 	{
735 		gtk_source_print_compositor_set_print_line_numbers(gtkSourcePrintCompositor, interval);
736 	}
737 
738 	/**
739 	 * Sets the right margin used by @compositor.
740 	 *
741 	 * Params:
742 	 *     margin = the new right margin in units of @unit.
743 	 *     unit = the units for @margin.
744 	 *
745 	 * Since: 2.2
746 	 */
747 	public void setRightMargin(double margin, GtkUnit unit)
748 	{
749 		gtk_source_print_compositor_set_right_margin(gtkSourcePrintCompositor, margin, unit);
750 	}
751 
752 	/**
753 	 * Sets the width of tabulation in characters for printed text.
754 	 *
755 	 * This function cannot be called anymore after the first call to the
756 	 * gtk_source_print_compositor_paginate() function.
757 	 *
758 	 * Params:
759 	 *     width = width of tab in characters.
760 	 *
761 	 * Since: 2.2
762 	 */
763 	public void setTabWidth(uint width)
764 	{
765 		gtk_source_print_compositor_set_tab_width(gtkSourcePrintCompositor, width);
766 	}
767 
768 	/**
769 	 * Sets the top margin used by @compositor.
770 	 *
771 	 * Params:
772 	 *     margin = the new top margin in units of @unit
773 	 *     unit = the units for @margin
774 	 *
775 	 * Since: 2.2
776 	 */
777 	public void setTopMargin(double margin, GtkUnit unit)
778 	{
779 		gtk_source_print_compositor_set_top_margin(gtkSourcePrintCompositor, margin, unit);
780 	}
781 
782 	/**
783 	 * Sets the line wrapping mode for the printed text.
784 	 *
785 	 * This function cannot be called anymore after the first call to the
786 	 * gtk_source_print_compositor_paginate() function.
787 	 *
788 	 * Params:
789 	 *     wrapMode = a #GtkWrapMode.
790 	 *
791 	 * Since: 2.2
792 	 */
793 	public void setWrapMode(GtkWrapMode wrapMode)
794 	{
795 		gtk_source_print_compositor_set_wrap_mode(gtkSourcePrintCompositor, wrapMode);
796 	}
797 }