GObject.Object
GtkSource.PrintCompositor
Import line: | GtkSource = imports.gi.GtkSource; |
GIR File: | GtkSource-2.0.gir |
C documentation: | GtkSourcePrintCompositor |
Class : | PrintCompositor |
Extends: | GObject.Object |
Show / Hide Inherited methods, properties and signals |
Properties | Defined By | |
---|---|---|
body_font_name : String
|
GtkSource.PrintCompositor | |
buffer : GtkSource.Buffer
|
GtkSource.PrintCompositor | |
footer_font_name : String
|
GtkSource.PrintCompositor | |
header_font_name : String
|
GtkSource.PrintCompositor | |
highlight_syntax : Boolean
|
GtkSource.PrintCompositor | |
line_numbers_font_name : String
|
GtkSource.PrintCompositor | |
n_pages : Number
read only
|
GtkSource.PrintCompositor | |
parent_instance : GObject.Object
read only
|
GtkSource.PrintCompositor | |
print_footer : Boolean
|
GtkSource.PrintCompositor | |
print_header : Boolean
|
GtkSource.PrintCompositor | |
print_line_numbers : Number
|
GtkSource.PrintCompositor | |
priv : GtkSource.PrintCompositorPrivate
read only
|
GtkSource.PrintCompositor | |
tab_width : Number
|
GtkSource.PrintCompositor | |
wrap_mode : Gtk.WrapMode
|
GtkSource.PrintCompositor |
Method / Constructor | Defined By | |
---|---|---|
new GtkSource.PrintCompositor
(Object properties)
Create a new GtkSource.PrintCompositor
Create a new GtkSource.PrintCompositor
|
||
Create a new GtkSource.PrintCompositor
Create a new GtkSource.PrintCompositor
|
||
Create a new GtkSource.PrintCompositor
Create a new GtkSource.PrintCompositor
|
||
draw_page
(PrintContext context, Number page_nr)
:
none
Draw page page_nr for printing on the the Cairo context encapsuled in context.
Draw page page_nr for printing on the the Cairo context encapsuled in context. This method has been designed to be called in the handler of the GtkPrintOperation::draw_page signal as shown in the following example:
|
GtkSource.PrintCompositor | |
get_body_font_name
()
:
String
Returns the name of the font used to print the text body.
Returns the name of the font used to print the text body. The returned string must be freed with g_free(). text body.
|
GtkSource.PrintCompositor | |
GtkSource.PrintCompositor | ||
get_buffer
()
:
GtkSource.Buffer
Gets the GtkSourceBuffer associated with the compositor.
Gets the GtkSourceBuffer associated with the compositor. The returned object reference is owned by the compositor object and should not be unreferenced.
|
GtkSource.PrintCompositor | |
get_footer_font_name
()
:
String
Returns the name of the font used to print the page footer.
Returns the name of the font used to print the page footer. The returned string must be freed with g_free(). the page footer.
|
GtkSource.PrintCompositor | |
get_header_font_name
()
:
String
Returns the name of the font used to print the page header.
Returns the name of the font used to print the page header. The returned string must be freed with g_free(). the page header.
|
GtkSource.PrintCompositor | |
get_highlight_syntax
()
:
Boolean
Determines whether the printed text will be highlighted according to the buffer rules.
Determines whether the printed text will be highlighted according to the buffer rules. Note that highlighting will happen only if the buffer to print has highlighting activated.
|
GtkSource.PrintCompositor | |
GtkSource.PrintCompositor | ||
get_line_numbers_font_name
()
:
String
Returns the name of the font used to print line numbers on the left margin.
Returns the name of the font used to print line numbers on the left margin. The returned string must be freed with g_free(). line numbers on the left margin.
|
GtkSource.PrintCompositor | |
get_n_pages
()
:
Number
Returns the number of pages in the document or
-1 if the document has not been completely paginated.
Returns the number of pages in the document or
-1 if the document has not been completely paginated. document has not been completely paginated.
|
GtkSource.PrintCompositor | |
get_pagination_progress
()
:
Number
Returns the current fraction of the document pagination that has been completed.
Returns the current fraction of the document pagination that has been completed.
|
GtkSource.PrintCompositor | |
get_print_footer
()
:
Boolean
Determines if a footer is set to be printed for each page.
Determines if a footer is set to be printed for each page. A footer will be printed if this function returns TRUE
|
GtkSource.PrintCompositor | |
get_print_header
()
:
Boolean
Determines if a header is set to be printed for each page.
Determines if a header is set to be printed for each page. A header will be printed if this function returns TRUE
|
GtkSource.PrintCompositor | |
get_print_line_numbers
()
:
Number
Returns the interval used for line number printing.
Returns the interval used for line number printing. If the value is 0, no line numbers will be printed. The default value is 1 (i.e. numbers printed in all lines).
|
GtkSource.PrintCompositor | |
GtkSource.PrintCompositor | ||
get_tab_width
()
:
Number
Returns the width of tabulation in characters for printed text.
Returns the width of tabulation in characters for printed text.
|
GtkSource.PrintCompositor | |
GtkSource.PrintCompositor | ||
get_wrap_mode
()
:
Gtk.WrapMode
Gets the line wrapping mode for the printed text.
Gets the line wrapping mode for the printed text.
|
GtkSource.PrintCompositor | |
paginate
(PrintContext context)
:
Boolean
Paginate the document associated with the compositor.
Paginate the document associated with the compositor. In order to support non-blocking pagination, document is paginated in small chunks. Each time gtk_source_print_compositor_paginate() is invoked, a chunk of the document is paginated. To paginate the entire document, gtk_source_print_compositor_paginate() must be invoked multiple times. It returns TRUE if the document has been completely paginated, otherwise it returns FALSE. This method has been designed to be invoked in the handler of the GtkPrintOperation::paginate signal, as shown in the following example:
|
GtkSource.PrintCompositor | |
set_body_font_name
(String font_name)
:
none
Sets the default font for the printed text.
Sets the default font for the printed text. string representation of a font description Pango can understand. (e.g. "Monospace 10"). See pango_font_description_from_string() for a description of the format of the string representation. This function cannot be called anymore after the first call to the gtk_source_print_compositor_paginate() function.
|
GtkSource.PrintCompositor | |
GtkSource.PrintCompositor | ||
set_footer_font_name
(String font_name)
:
none
Sets the font for printing the page footer.
Sets the font for printing the page footer. If NULL is supplied, the default font (i.e. the one being used for the text) will be used instead. string representation of a font description Pango can understand. (e.g. "Monospace 10"). See pango_font_description_from_string() for a description of the format of the string representation. This function cannot be called anymore after the first call to the gtk_source_print_compositor_paginate() function.
|
GtkSource.PrintCompositor | |
Sets strftime like header format strings, to be printed on the left, center and right of the bottom of each page.
Sets strftime like header format strings, to be printed on the left, center and right of the bottom of each page. The strings may include strftime(3) codes which will be expanded at print time. All strftime() codes are accepted, with the addition of N for the page number and Q for the page count. the footer from the document text. If NULL is given for any of the three arguments, that particular string will not be printed. For the footer to be printed, in addition to specifying format strings, you need to enable footer printing with gtk_source_print_compositor_set_print_footer(). This function cannot be called anymore after the first call to the gtk_source_print_compositor_paginate() function.
|
GtkSource.PrintCompositor | |
set_header_font_name
(String font_name)
:
none
Sets the font for printing the page header.
Sets the font for printing the page header. If NULL is supplied, the default font (i.e. the one being used for the text) will be used instead. string representation of a font description Pango can understand. (e.g. "Monospace 10"). See pango_font_description_from_string() for a description of the format of the string representation. This function cannot be called anymore after the first call to the gtk_source_print_compositor_paginate() function.
|
GtkSource.PrintCompositor | |
Sets strftime like header format strings, to be printed on the left, center and right of the top of each page.
Sets strftime like header format strings, to be printed on the left, center and right of the top of each page. The strings may include strftime(3) codes which will be expanded at print time. All strftime() codes are accepted, with the addition of N for the page number and Q for the page count. the header from the document text. If NULL is given for any of the three arguments, that particular string will not be printed. For the header to be printed, in addition to specifying format strings, you need to enable header printing with gtk_source_print_compositor_set_print_header(). This function cannot be called anymore after the first call to the gtk_source_print_compositor_paginate() function.
|
GtkSource.PrintCompositor | |
set_highlight_syntax
(Boolean highlight)
:
none
Sets whether the printed text will be highlighted according to the buffer rules.
Sets whether the printed text will be highlighted according to the buffer rules. Both color and font style are applied. This function cannot be called anymore after the first call to the gtk_source_print_compositor_paginate() function.
|
GtkSource.PrintCompositor | |
GtkSource.PrintCompositor | ||
set_line_numbers_font_name
(String font_name)
:
none
Sets the font for printing line numbers on the left margin.
Sets the font for printing line numbers on the left margin. If NULL is supplied, the default font (i.e. the one being used for the text) will be used instead. string representation of a font description Pango can understand. (e.g. "Monospace 10"). See pango_font_description_from_string() for a description of the format of the string representation. This function cannot be called anymore after the first call to the gtk_source_print_compositor_paginate() function.
|
GtkSource.PrintCompositor | |
set_print_footer
(Boolean print)
:
none
Sets whether you want to print a footer in each page.
Sets whether you want to print a footer in each page. The footer consists of three pieces of text and an optional line separator, configurable with gtk_source_print_compositor_set_footer_format(). Note that by default the footer format is unspecified, and if it's empty it will not be printed, regardless of this setting. This function cannot be called anymore after the first call to the gtk_source_print_compositor_paginate() function.
|
GtkSource.PrintCompositor | |
set_print_header
(Boolean print)
:
none
Sets whether you want to print a header in each page.
Sets whether you want to print a header in each page. The header consists of three pieces of text and an optional line separator, configurable with gtk_source_print_compositor_set_header_format(). Note that by default the header format is unspecified, and if it's empty it will not be printed, regardless of this setting. This function cannot be called anymore after the first call to the gtk_source_print_compositor_paginate() function.
|
GtkSource.PrintCompositor | |
set_print_line_numbers
(Number interval)
:
none
Sets the interval for printed line numbers.
Sets the interval for printed line numbers. If interval is 0 no numbers will be printed. If greater than 0, a number will be printed every interval lines (i.e. 1 will print all line numbers). Maximum accepted value for interval is 100. This function cannot be called anymore after the first call to the gtk_source_print_compositor_paginate() function.
|
GtkSource.PrintCompositor | |
GtkSource.PrintCompositor | ||
set_tab_width
(Number width)
:
none
Sets the width of tabulation in characters for printed text.
Sets the width of tabulation in characters for printed text. This function cannot be called anymore after the first call to the gtk_source_print_compositor_paginate() function.
|
GtkSource.PrintCompositor | |
GtkSource.PrintCompositor | ||
set_wrap_mode
(WrapMode wrap_mode)
:
none
Sets the line wrapping mode for the printed text.
Sets the line wrapping mode for the printed text. This function cannot be called anymore after the first call to the gtk_source_print_compositor_paginate() function.
|
GtkSource.PrintCompositor |
None |