Class
GtkSourcePrintCompositor
Description [src]
class GtkSource.PrintCompositor : GObject.Object
{
/* No available fields */
}
Compose a GtkSourceBuffer
for printing.
The GtkSourcePrintCompositor
object is used to compose a GtkSourceBuffer
for printing. You can set various configuration options to customize the
printed output. GtkSourcePrintCompositor
is designed to be used with the
high-level printing API of gtk+, i.e. GtkPrintOperation
.
The margins specified in this object are the layout margins: they define the
blank space bordering the printed area of the pages. They must not be
confused with the “print margins”, i.e. the parts of the page that the
printer cannot print on, defined in the GtkPageSetup
objects. If the
specified layout margins are smaller than the “print margins”, the latter
ones are used as a fallback by the GtkSourcePrintCompositor
object, so that
the printed area is not clipped.
Constructors
gtk_source_print_compositor_new_from_view
Creates a new print compositor that can be used to print the buffer
associated with view
.
Instance methods
gtk_source_print_compositor_draw_page
Draw page page_nr
for printing on the the Cairo context encapsuled in context
.
gtk_source_print_compositor_get_body_font_name
Returns the name of the font used to print the text body.
gtk_source_print_compositor_get_footer_font_name
Returns the name of the font used to print the page footer.
gtk_source_print_compositor_get_header_font_name
Returns the name of the font used to print the page header.
gtk_source_print_compositor_get_highlight_syntax
Determines whether the printed text will be highlighted according to the buffer rules.
gtk_source_print_compositor_get_line_numbers_font_name
Returns the name of the font used to print line numbers on the left margin.
gtk_source_print_compositor_get_n_pages
Returns the number of pages in the document or -1
if the
document has not been completely paginated.
gtk_source_print_compositor_get_pagination_progress
Returns the current fraction of the document pagination that has been completed.
gtk_source_print_compositor_get_print_footer
Determines if a footer is set to be printed for each page.
gtk_source_print_compositor_get_print_header
Determines if a header is set to be printed for each page.
gtk_source_print_compositor_get_print_line_numbers
Returns the interval used for line number printing.
gtk_source_print_compositor_get_tab_width
Returns the width of tabulation in characters for printed text.
gtk_source_print_compositor_ignore_tag
Specifies a tag whose style should be ignored when compositing the document to the printable page.
since: 5.2
gtk_source_print_compositor_set_footer_format
See gtk_source_print_compositor_set_header_format()
for more information
about the parameters.
gtk_source_print_compositor_set_header_format
Sets strftime like header format strings, to be printed on the left, center and right of the top of each page.
gtk_source_print_compositor_set_highlight_syntax
Sets whether the printed text will be highlighted according to the buffer rules. Both color and font style are applied.
gtk_source_print_compositor_set_line_numbers_font_name
Sets the font for printing line numbers on the left margin.
gtk_source_print_compositor_set_tab_width
Sets the width of tabulation in characters for printed text.
Properties
GtkSource.PrintCompositor:footer-font-name
Name of the font used to print page footer. If this property is unspecified, the text body font is used.
GtkSource.PrintCompositor:header-font-name
Name of the font used to print page header. If this property is unspecified, the text body font is used.
GtkSource.PrintCompositor:line-numbers-font-name
Name of the font used to print line numbers on the left margin. If this property is unspecified, the text body font is used.
GtkSource.PrintCompositor:n-pages
The number of pages in the document or -1
if the
document has not been completely paginated.
GtkSource.PrintCompositor:wrap-mode
Whether to wrap lines never, at word boundaries, or at character boundaries.
Signals
Signals inherited from GObject (1)
GObject::notify
The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.