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