Inherits Glib::Object.
Public Member Functions | |
virtual | ~SourcePrintCompositor () |
GtkSourcePrintCompositor* | gobj () |
Provides access to the underlying C GObject. | |
const GtkSourcePrintCompositor* | gobj () const |
Provides access to the underlying C GObject. | |
GtkSourcePrintCompositor* | gobj_copy () |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. | |
Glib::RefPtr< SourceBuffer > | get_buffer () |
Gets the Gtk::SourceBuffer associated with the compositor. | |
Glib::RefPtr< const SourceBuffer > | get_buffer () const |
Gets the Gtk::SourceBuffer associated with the compositor. | |
void | set_tab_width (guint width) |
Sets the width of tabulation in characters for printed text. | |
guint | get_tab_width () const |
Return value: width of tab. | |
void | set_wrap_mode (Gtk::WrapMode wrap_mode) |
Sets the line wrapping mode for the printed text. | |
Gtk::WrapMode | get_wrap_mode () const |
Gets the line wrapping mode for the printed text. | |
void | set_highlight_syntax (bool highlight) |
Sets whether the printed text will be highlighted according to the buffer rules. | |
bool | get_highlight_syntax () const |
Determines whether the printed text will be highlighted according to the buffer rules. | |
void | set_print_line_numbers (guint interval) |
Sets the interval for printed line numbers. | |
guint | get_print_line_numbers () const |
Return value: the interval of printed line numbers. | |
void | set_body_font_name (const Glib::ustring& font_name) |
Sets the default font for the printed text. | |
Glib::ustring | get_body_font_name () const |
Return value: a new string containing the name of the font used to print the. | |
void | set_line_numbers_font_name (const Glib::ustring& font_name) |
Sets the font for printing line numbers on the left margin. | |
Glib::ustring | get_line_numbers_font_name () const |
Return value: a new string containing the name of the font used to print. | |
void | set_header_font_name (const Glib::ustring& font_name) |
Sets the font for printing the page header. | |
Glib::ustring | get_header_font_name () const |
Return value: a new string containing the name of the font used to print. | |
void | set_footer_font_name (const Glib::ustring& font_name) |
Sets the font for printing the page footer. | |
Glib::ustring | get_footer_font_name () const |
Return value: a new string containing the name of the font used to print. | |
void | set_top_margin (double margin, Gtk::Unit unit) |
Sets the top margin used by compositor. | |
double | get_top_margin (Gtk::Unit unit) const |
Gets the top margin in units of unit. | |
void | set_bottom_margin (double margin, Gtk::Unit unit) |
Sets the bottom margin used by compositor. | |
double | get_bottom_margin (Gtk::Unit unit) const |
Gets the bottom margin in units of unit. | |
void | set_left_margin (double margin, Gtk::Unit unit) |
Sets the left margin used by compositor. | |
double | get_left_margin (Gtk::Unit unit) const |
Gets the left margin in units of unit. | |
void | set_right_margin (double margin, Gtk::Unit unit) |
Sets the right margin used by compositor. | |
double | get_right_margin (Gtk::Unit unit) const |
Gets the right margin in units of unit. | |
void | set_print_header (bool print) |
Sets whether you want to print a header in each page. | |
bool | get_print_header () const |
Determines if a header is set to be printed for each page. | |
void | set_print_footer (bool print) |
Sets whether you want to print a footer in each page. | |
bool | get_print_footer () const |
Determines if a footer is set to be printed for each page. | |
void | set_header_format (bool separator, const Glib::ustring& left, const Glib::ustring& center, const Glib::ustring& right) |
Sets strftime like header format strings, to be printed on the left, center and right of the top of each page. | |
void | set_footer_format (bool separator, const Glib::ustring& left, const Glib::ustring& center, const Glib::ustring& right) |
Sets strftime like header format strings, to be printed on the left, center and right of the bottom of each page. | |
int | get_n_pages () const |
Return value: the number of pages in the document or -1 if the. | |
bool | paginate (const Glib::RefPtr< Gtk::PrintContext >& context) |
Paginate the document associated with the compositor. | |
double | get_pagination_process () |
Return value: a fraction from 0.0 to 1.0 inclusive. | |
void | draw_page (const Glib::RefPtr< Gtk::PrintContext >& context, int page_nr) |
Draw page page_nr for printing on the the Cairo context encapsuled in context. | |
Glib::PropertyProxy < Glib::ustring > | property_body_font_name () |
Name of the font to use for the text body (e.g. | |
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_body_font_name () const |
Name of the font to use for the text body (e.g. | |
Glib::PropertyProxy_ReadOnly < Glib::RefPtr< SourceBuffer > > | property_buffer () const |
The GtkSourceBuffer object to print. | |
Glib::PropertyProxy < Glib::ustring > | property_footer_font_name () |
Name of the font to use for the page footer (e.g. | |
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_footer_font_name () const |
Name of the font to use for the page footer (e.g. | |
Glib::PropertyProxy < Glib::ustring > | property_header_font_name () |
Name of the font to use for the page header (e.g. | |
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_header_font_name () const |
Name of the font to use for the page header (e.g. | |
Glib::PropertyProxy< bool > | property_highlight_syntax () |
Whether to print the document with highlighted syntax. | |
Glib::PropertyProxy_ReadOnly < bool > | property_highlight_syntax () const |
Whether to print the document with highlighted syntax. | |
Glib::PropertyProxy < Glib::ustring > | property_line_numbers_font_name () |
Name of the font to use for the line numbers (e.g. | |
Glib::PropertyProxy_ReadOnly < Glib::ustring > | property_line_numbers_font_name () const |
Name of the font to use for the line numbers (e.g. | |
Glib::PropertyProxy_ReadOnly< int > | property_n_pages () const |
The number of pages in the document (-1 means the document has not been completely paginated). | |
Glib::PropertyProxy< bool > | property_print_footer () |
Whether to print a footer in each page. | |
Glib::PropertyProxy_ReadOnly < bool > | property_print_footer () const |
Whether to print a footer in each page. | |
Glib::PropertyProxy< bool > | property_print_header () |
Whether to print a header in each page. | |
Glib::PropertyProxy_ReadOnly < bool > | property_print_header () const |
Whether to print a header in each page. | |
Glib::PropertyProxy< guint > | property_print_line_numbers () |
Interval of printed line numbers (0 means no numbers). | |
Glib::PropertyProxy_ReadOnly < guint > | property_print_line_numbers () const |
Interval of printed line numbers (0 means no numbers). | |
Glib::PropertyProxy< guint > | property_tab_width () |
Width of a tab character expressed in spaces. | |
Glib::PropertyProxy_ReadOnly < guint > | property_tab_width () const |
Width of a tab character expressed in spaces. | |
Glib::PropertyProxy < Gtk::WrapMode > | property_wrap_mode () |
Whether to wrap lines never. | |
Glib::PropertyProxy_ReadOnly < Gtk::WrapMode > | property_wrap_mode () const |
Whether to wrap lines never. | |
Static Public Member Functions | |
static Glib::RefPtr < SourcePrintCompositor > | create (const Glib::RefPtr< SourceBuffer >& buffer) |
static Glib::RefPtr < SourcePrintCompositor > | create (const SourceView& view) |
Protected Member Functions | |
SourcePrintCompositor (const Glib::RefPtr< SourceBuffer >& buffer) | |
SourcePrintCompositor (const SourceView& view) | |
Related Functions | |
(Note that these are not member functions.) | |
Glib::RefPtr < gtksourceview::SourcePrintCompositor > | wrap (GtkSourcePrintCompositor* object, bool take_copy=false) |
A Glib::wrap() method for this object. |
virtual gtksourceview::SourcePrintCompositor::~SourcePrintCompositor | ( | ) | [virtual] |
gtksourceview::SourcePrintCompositor::SourcePrintCompositor | ( | const Glib::RefPtr< SourceBuffer >& | buffer | ) | [explicit, protected] |
gtksourceview::SourcePrintCompositor::SourcePrintCompositor | ( | const SourceView& | view | ) | [explicit, protected] |
static Glib::RefPtr<SourcePrintCompositor> gtksourceview::SourcePrintCompositor::create | ( | const SourceView& | view | ) | [static] |
static Glib::RefPtr<SourcePrintCompositor> gtksourceview::SourcePrintCompositor::create | ( | const Glib::RefPtr< SourceBuffer >& | buffer | ) | [static] |
void gtksourceview::SourcePrintCompositor::draw_page | ( | const Glib::RefPtr< Gtk::PrintContext > & | context, | |
int | page_nr | |||
) |
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 Gtk::PrintOperation::draw_page signal as shown in the following example:
<informalexample><programlisting> // Signal handler for the GtkPrintOperation::draw_page signal
static void draw_page (GtkPrintOperation *operation, GtkPrintContext *context, int
page_nr, gpointer user_data) { GtkSourcePrintCompositor *compositor;
compositor = GTK_SOURCE_PRINT_COMPOSITOR (user_data);
gtk_source_print_compositor_draw_page (compositor, context, page_nr); } </programlisting></informalexample>
context | The Gtk::PrintContext encapsulating the context information that is required when drawing the page for printing. | |
page_nr | The number of the page to print. |
Glib::ustring gtksourceview::SourcePrintCompositor::get_body_font_name | ( | ) | const |
Return value: a new string containing the name of the font used to print the.
double gtksourceview::SourcePrintCompositor::get_bottom_margin | ( | Gtk::Unit | unit | ) | const |
Gets the bottom margin in units of unit.
unit | The unit for the return value. |
Glib::RefPtr<const SourceBuffer> gtksourceview::SourcePrintCompositor::get_buffer | ( | ) | const |
Gets the Gtk::SourceBuffer associated with the compositor.
The returned object reference is owned by the compositor object and should not be unreferenced.
Glib::RefPtr<SourceBuffer> gtksourceview::SourcePrintCompositor::get_buffer | ( | ) |
Gets the Gtk::SourceBuffer associated with the compositor.
The returned object reference is owned by the compositor object and should not be unreferenced.
Glib::ustring gtksourceview::SourcePrintCompositor::get_footer_font_name | ( | ) | const |
Return value: a new string containing the name of the font used to print.
Glib::ustring gtksourceview::SourcePrintCompositor::get_header_font_name | ( | ) | const |
Return value: a new string containing the name of the font used to print.
bool gtksourceview::SourcePrintCompositor::get_highlight_syntax | ( | ) | const |
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.
true
if the printed output will be highlighted.double gtksourceview::SourcePrintCompositor::get_left_margin | ( | Gtk::Unit | unit | ) | const |
Gets the left margin in units of unit.
unit | The unit for the return value. |
Glib::ustring gtksourceview::SourcePrintCompositor::get_line_numbers_font_name | ( | ) | const |
Return value: a new string containing the name of the font used to print.
int gtksourceview::SourcePrintCompositor::get_n_pages | ( | ) | const |
Return value: the number of pages in the document or -1
if the.
-1
if the document has not been completely paginated.double gtksourceview::SourcePrintCompositor::get_pagination_process | ( | ) |
Return value: a fraction from 0.0 to 1.0 inclusive.
bool gtksourceview::SourcePrintCompositor::get_print_footer | ( | ) | const |
Determines if a footer is set to be printed for each page.
A footer will be printed if this function returns true
<emphasis>and</emphasis> some format strings have been specified with set_footer_format().
true
if the footer is set to be printed.bool gtksourceview::SourcePrintCompositor::get_print_header | ( | ) | const |
Determines if a header is set to be printed for each page.
A header will be printed if this function returns true
<emphasis>and</emphasis> some format strings have been specified with set_header_format().
true
if the header is set to be printed.guint gtksourceview::SourcePrintCompositor::get_print_line_numbers | ( | ) | const |
Return value: the interval of printed line numbers.
double gtksourceview::SourcePrintCompositor::get_right_margin | ( | Gtk::Unit | unit | ) | const |
Gets the right margin in units of unit.
unit | The unit for the return value. |
guint gtksourceview::SourcePrintCompositor::get_tab_width | ( | ) | const |
double gtksourceview::SourcePrintCompositor::get_top_margin | ( | Gtk::Unit | unit | ) | const |
Gets the top margin in units of unit.
unit | The unit for the return value. |
Gtk::WrapMode gtksourceview::SourcePrintCompositor::get_wrap_mode | ( | ) | const |
Gets the line wrapping mode for the printed text.
const GtkSourcePrintCompositor* gtksourceview::SourcePrintCompositor::gobj | ( | ) | const [inline] |
Provides access to the underlying C GObject.
Reimplemented from Glib::ObjectBase.
GtkSourcePrintCompositor* gtksourceview::SourcePrintCompositor::gobj | ( | ) | [inline] |
Provides access to the underlying C GObject.
Reimplemented from Glib::ObjectBase.
GtkSourcePrintCompositor* gtksourceview::SourcePrintCompositor::gobj_copy | ( | ) |
Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
bool gtksourceview::SourcePrintCompositor::paginate | ( | const Glib::RefPtr< Gtk::PrintContext > & | context | ) |
Paginate the document associated with the compositor.
In order to support non-blocking pagination, document is paginated in small chunks. Each time paginate() is invoked, a chunk of the document is paginated. To paginate the entire document, 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 Gtk::PrintOperation::paginate signal, as shown in the following example:
<informalexample><programlisting> // Signal handler for the GtkPrintOperation::paginate signal
static bool
paginate (GtkPrintOperation *operation, GtkPrintContext *context, gpointer user_data) { GtkSourcePrintCompositor *compositor;
compositor = GTK_SOURCE_PRINT_COMPOSITOR (user_data);
if (gtk_source_print_compositor_paginate (compositor, context)) { int
n_pages;
n_pages = gtk_source_print_compositor_get_n_pages (compositor); gtk_print_operation_set_n_pages (operation, n_pages);
return true
; }
return false
; } </programlisting></informalexample>
If you don't need to do pagination in chunks, you can simply do it all in the Gtk::PrintOperation::begin-print handler, and set the number of pages from there, like in the following example:
<informalexample><programlisting> // Signal handler for the GtkPrintOperation::begin-print signal
static void begin_print (GtkPrintOperation *operation, GtkPrintContext *context, gpointer user_data) { GtkSourcePrintCompositor *compositor; int
n_pages;
compositor = GTK_SOURCE_PRINT_COMPOSITOR (user_data);
while (!gtk_source_print_compositor_paginate (compositor, context));
n_pages = gtk_source_print_compositor_get_n_pages (compositor); gtk_print_operation_set_n_pages (operation, n_pages); } </programlisting></informalexample>
context | The Gtk::PrintContext whose parameters (e.g. paper size, print margins, etc.) are used by the the compositor to paginate the document. |
true
if the document has been completely paginated, false
otherwise.Glib::PropertyProxy_ReadOnly<Glib::ustring> gtksourceview::SourcePrintCompositor::property_body_font_name | ( | ) | const |
Name of the font to use for the text body (e.g.
'Monospace 10').
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<Glib::ustring> gtksourceview::SourcePrintCompositor::property_body_font_name | ( | ) |
Name of the font to use for the text body (e.g.
'Monospace 10').
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly< Glib::RefPtr<SourceBuffer> > gtksourceview::SourcePrintCompositor::property_buffer | ( | ) | const |
The GtkSourceBuffer object to print.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<Glib::ustring> gtksourceview::SourcePrintCompositor::property_footer_font_name | ( | ) | const |
Name of the font to use for the page footer (e.g.
'Monospace 10').
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<Glib::ustring> gtksourceview::SourcePrintCompositor::property_footer_font_name | ( | ) |
Name of the font to use for the page footer (e.g.
'Monospace 10').
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<Glib::ustring> gtksourceview::SourcePrintCompositor::property_header_font_name | ( | ) | const |
Name of the font to use for the page header (e.g.
'Monospace 10').
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<Glib::ustring> gtksourceview::SourcePrintCompositor::property_header_font_name | ( | ) |
Name of the font to use for the page header (e.g.
'Monospace 10').
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<bool> gtksourceview::SourcePrintCompositor::property_highlight_syntax | ( | ) | const |
Whether to print the document with highlighted syntax.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<bool> gtksourceview::SourcePrintCompositor::property_highlight_syntax | ( | ) |
Whether to print the document with highlighted syntax.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<Glib::ustring> gtksourceview::SourcePrintCompositor::property_line_numbers_font_name | ( | ) | const |
Name of the font to use for the line numbers (e.g.
'Monospace 10').
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<Glib::ustring> gtksourceview::SourcePrintCompositor::property_line_numbers_font_name | ( | ) |
Name of the font to use for the line numbers (e.g.
'Monospace 10').
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<int> gtksourceview::SourcePrintCompositor::property_n_pages | ( | ) | const |
The number of pages in the document (-1 means the document has not been completely paginated).
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<bool> gtksourceview::SourcePrintCompositor::property_print_footer | ( | ) | const |
Whether to print a footer in each page.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<bool> gtksourceview::SourcePrintCompositor::property_print_footer | ( | ) |
Whether to print a footer in each page.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<bool> gtksourceview::SourcePrintCompositor::property_print_header | ( | ) | const |
Whether to print a header in each page.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<bool> gtksourceview::SourcePrintCompositor::property_print_header | ( | ) |
Whether to print a header in each page.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<guint> gtksourceview::SourcePrintCompositor::property_print_line_numbers | ( | ) | const |
Interval of printed line numbers (0 means no numbers).
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<guint> gtksourceview::SourcePrintCompositor::property_print_line_numbers | ( | ) |
Interval of printed line numbers (0 means no numbers).
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<guint> gtksourceview::SourcePrintCompositor::property_tab_width | ( | ) | const |
Width of a tab character expressed in spaces.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<guint> gtksourceview::SourcePrintCompositor::property_tab_width | ( | ) |
Width of a tab character expressed in spaces.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy_ReadOnly<Gtk::WrapMode> gtksourceview::SourcePrintCompositor::property_wrap_mode | ( | ) | const |
Whether to wrap lines never.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
Glib::PropertyProxy<Gtk::WrapMode> gtksourceview::SourcePrintCompositor::property_wrap_mode | ( | ) |
Whether to wrap lines never.
You rarely need to use properties because there are get_ and set_ methods for almost all of them.
void gtksourceview::SourcePrintCompositor::set_body_font_name | ( | const Glib::ustring & | font_name | ) |
Sets the default font for the printed text.
font_name should be a 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 paginate() function.
font_name | The name of the default font for the body text. |
void gtksourceview::SourcePrintCompositor::set_bottom_margin | ( | double | margin, | |
Gtk::Unit | unit | |||
) |
Sets the bottom margin used by compositor.
margin | The new bottom margin in units of unit. | |
unit | The units for margin. |
void gtksourceview::SourcePrintCompositor::set_footer_font_name | ( | const Glib::ustring & | font_name | ) |
Sets the font for printing the page footer.
If 0
is supplied, the default font (i.e. the one being used for the text) will be used instead.
font_name should be a 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 paginate() function.
font_name | The name of the font for the footer text, or 0 . |
void gtksourceview::SourcePrintCompositor::set_footer_format | ( | bool | separator, | |
const Glib::ustring & | left, | |||
const Glib::ustring & | center, | |||
const Glib::ustring & | right | |||
) |
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.
separator specifies if a solid line should be drawn to separate the footer from the document text.
If 0
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 set_print_footer().
This function cannot be called anymore after the first call to the paginate() function.
separator | true if you want a separator line to be printed. | |
left | A format string to print on the left of the footer. | |
center | A format string to print on the center of the footer. | |
right | A format string to print on the right of the footer. |
void gtksourceview::SourcePrintCompositor::set_header_font_name | ( | const Glib::ustring & | font_name | ) |
Sets the font for printing the page header.
If 0
is supplied, the default font (i.e. the one being used for the text) will be used instead.
font_name should be a 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 paginate() function.
font_name | The name of the font for header text, or 0 . |
void gtksourceview::SourcePrintCompositor::set_header_format | ( | bool | separator, | |
const Glib::ustring & | left, | |||
const Glib::ustring & | center, | |||
const Glib::ustring & | right | |||
) |
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.
separator specifies if a solid line should be drawn to separate the header from the document text.
If 0
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 set_print_header().
This function cannot be called anymore after the first call to the paginate() function.
separator | true if you want a separator line to be printed. | |
left | A format string to print on the left of the header. | |
center | A format string to print on the center of the header. | |
right | A format string to print on the right of the header. |
void gtksourceview::SourcePrintCompositor::set_highlight_syntax | ( | bool | highlight | ) |
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 paginate() function.
highlight | Whether syntax should be highlighted. |
void gtksourceview::SourcePrintCompositor::set_left_margin | ( | double | margin, | |
Gtk::Unit | unit | |||
) |
Sets the left margin used by compositor.
margin | The new left margin in units of unit. | |
unit | The units for margin. |
void gtksourceview::SourcePrintCompositor::set_line_numbers_font_name | ( | const Glib::ustring & | font_name | ) |
Sets the font for printing line numbers on the left margin.
If 0
is supplied, the default font (i.e. the one being used for the text) will be used instead.
font_name should be a 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 paginate() function.
font_name | The name of the font for line numbers, or 0 . |
void gtksourceview::SourcePrintCompositor::set_print_footer | ( | bool | ) |
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 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 paginate() function.
true if you want the footer to be printed. |
void gtksourceview::SourcePrintCompositor::set_print_header | ( | bool | ) |
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 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 paginate() function.
true if you want the header to be printed. |
void gtksourceview::SourcePrintCompositor::set_print_line_numbers | ( | guint | interval | ) |
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 paginate() function.
interval | Interval for printed line numbers. |
void gtksourceview::SourcePrintCompositor::set_right_margin | ( | double | margin, | |
Gtk::Unit | unit | |||
) |
Sets the right margin used by compositor.
margin | The new right margin in units of unit. | |
unit | The units for margin. |
void gtksourceview::SourcePrintCompositor::set_tab_width | ( | guint | width | ) |
Sets the width of tabulation in characters for printed text.
This function cannot be called anymore after the first call to the paginate() function.
width | Width of tab in characters. |
void gtksourceview::SourcePrintCompositor::set_top_margin | ( | double | margin, | |
Gtk::Unit | unit | |||
) |
Sets the top margin used by compositor.
margin | The new top margin in units of unit. | |
unit | The units for margin. |
void gtksourceview::SourcePrintCompositor::set_wrap_mode | ( | Gtk::WrapMode | wrap_mode | ) |
Sets the line wrapping mode for the printed text.
This function cannot be called anymore after the first call to the paginate() function.
wrap_mode | A Gtk::WrapMode. |
Glib::RefPtr< gtksourceview::SourcePrintCompositor > wrap | ( | GtkSourcePrintCompositor * | object, | |
bool | take_copy = false | |||
) | [related] |
A Glib::wrap() method for this object.
object | The C instance. | |
take_copy | False if the result should take ownership of the C instance. True if it should take a new copy or ref. |