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