gtksource.print_compositor
Module for [PrintCompositor] class
Types 3
Methods
PrintCompositor self()Returns `this`, for use in `with` statements.PrintCompositorGidBuilder builder()Get builder for [gtksource.print_compositor.PrintCompositor] Returns: New builder objectstring bodyFontName() @propertyGet `bodyFontName` property. Returns: Name of the font used for the text body.void bodyFontName(string propval) @propertySet `bodyFontName` property. Params: propval = Name of the font used for the text body.gtksource.buffer.Buffer buffer() @propertyGet `buffer` property. Returns: The GtkSourceBuffer object to print.string footerFontName() @propertyGet `footerFontName` property. Returns: Name of the font used to print page footer. If this property is unspecified, the text body font is used.void footerFontName(string propval) @propertySet `footerFontName` property. Params: propval = Name of the font used to print page footer. If this property is unspecified, the text body font is used.string headerFontName() @propertyGet `headerFontName` property. Returns: Name of the font used to print page header. If this property is unspecified, the text body font is used.void headerFontName(string propval) @propertySet `headerFontName` property. Params: propval = Name of the font used to print page header. If this property is unspecified, the text body font is used.bool highlightSyntax() @propertyGet `highlightSyntax` property. Returns: Whether to print the document with highlighted syntax.void highlightSyntax(bool propval) @propertySet `highlightSyntax` property. Params: propval = Whether to print the document with highlighted syntax.string lineNumbersFontName() @propertyGet `lineNumbersFontName` property. Returns: Name of the font used to print line numbers on the left margin. If this property is unspecified, the text body font is used.void lineNumbersFontName(string propval) @propertySet `lineNumbersFontName` property. Params: propval = Name of the font used to print line numbers on the left margin. If this property is unspecified, the text body font is used.int nPages() @propertyGet `nPages` property. Returns: The number of pages in the document or <code>-1</code> if the document has not been completely paginated.bool printFooter() @propertyGet `printFooter` property. Returns: Whether to print a footer in each page.void printFooter(bool propval) @propertySet `printFooter` property. Params: propval = Whether to print a footer in each page.bool printHeader() @propertyGet `printHeader` property. Returns: Whether to print a header in each page.void printHeader(bool propval) @propertySet `printHeader` property. Params: propval = Whether to print a header in each page.uint printLineNumbers() @propertyGet `printLineNumbers` property. Returns: Interval of printed line numbers. If this property is set to 0 no numbers will be printed. If greater than 0, a number will be printed every "print-line-n...void printLineNumbers(uint propval) @propertySet `printLineNumbers` property. Params: propval = Interval of printed line numbers. If this property is set to 0 no numbers will be printed. If greater than 0, a number will be printed every "pri...uint tabWidth() @propertyGet `tabWidth` property. Returns: Width of a tab character expressed in spaces.void tabWidth(uint propval) @propertySet `tabWidth` property. Params: propval = Width of a tab character expressed in spaces.gtk.types.WrapMode wrapMode() @propertyGet `wrapMode` property. Returns: Whether to wrap lines never, at word boundaries, or at character boundaries.void wrapMode(gtk.types.WrapMode propval) @propertySet `wrapMode` property. Params: propval = Whether to wrap lines never, at word boundaries, or at character boundaries.gtksource.print_compositor.PrintCompositor newFromView(gtksource.view.View view)Creates a new print compositor that can be used to print the buffer associated with view. This constructor sets some configuration properties to make the printed output match view as much as possib...void drawPage(gtk.print_context.PrintContext context, int pageNr)Draw page page_nr for printing on the the Cairo context encapsuled in context.string getBodyFontName()Returns the name of the font used to print the text body. The returned string must be freed with [glib.global.gfree]. Returns: a new string containing the name of the font used to print the text body.double getBottomMargin(gtk.types.Unit unit)Gets the bottom margin in units of unit.gtksource.buffer.Buffer getBuffer()Gets the #GtkSourceBuffer associated with the compositor. The returned object reference is owned by the compositor object and should not be unreferenced. Returns: the #GtkSourceBuffer associated wi...string getFooterFontName()Returns the name of the font used to print the page footer. The returned string must be freed with [glib.global.gfree]. Returns: a new string containing the name of the font used to print the page ...string getHeaderFontName()Returns the name of the font used to print the page header. The returned string must be freed with [glib.global.gfree]. Returns: a new string containing the name of the font used to print the page ...bool getHighlightSyntax()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. Returns: true if t...double getLeftMargin(gtk.types.Unit unit)Gets the left margin in units of unit.string getLineNumbersFontName()Returns the name of the font used to print line numbers on the left margin. The returned string must be freed with [glib.global.gfree]. Returns: a new string containing the name of the font used to...int getNPages()Returns the number of pages in the document or <code>-1</code> if the document has not been completely paginated. Returns: the number of pages in the document or <code>-1</code> if the document has...double getPaginationProgress()Returns the current fraction of the document pagination that has been completed. Returns: a fraction from 0.0 to 1.0 inclusive.bool getPrintFooter()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 [gtksource.p...bool getPrintHeader()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 [gtksource.p...uint getPrintLineNumbers()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). Returns: the interval of printe...double getRightMargin(gtk.types.Unit unit)Gets the right margin in units of unit.uint getTabWidth()Returns the width of tabulation in characters for printed text. Returns: width of tab.double getTopMargin(gtk.types.Unit unit)Gets the top margin in units of unit.gtk.types.WrapMode getWrapMode()Gets the line wrapping mode for the printed text. Returns: the line wrap mode.bool paginate(gtk.print_context.PrintContext context)Paginate the document associated with the compositor.void setBodyFontName(string fontName)Sets the default font for the printed text.void setBottomMargin(double margin, gtk.types.Unit unit)Sets the bottom margin used by compositor.void setFooterFontName(string fontName = null)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.void setFooterFormat(bool separator, string left = null, string center = null, string right = null)See [gtksource.print_compositor.PrintCompositor.setHeaderFormat] for more information about the parameters.void setHeaderFontName(string fontName = null)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.void setHeaderFormat(bool separator, string left = null, string center = null, string right = null)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. A sub...void setHighlightSyntax(bool highlight)Sets whether the printed text will be highlighted according to the buffer rules. Both color and font style are applied.void setLeftMargin(double margin, gtk.types.Unit unit)Sets the left margin used by compositor.void setLineNumbersFontName(string fontName = null)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.void setPrintFooter(bool print)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 [gtksource.print_compositor.PrintCompositor.setF...void setPrintHeader(bool print)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 [gtksource.print_compositor.PrintCompositor.setH...void setPrintLineNumbers(uint 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).void setRightMargin(double margin, gtk.types.Unit unit)Sets the right margin used by compositor.void setTabWidth(uint width)Sets the width of tabulation in characters for printed text.void setTopMargin(double margin, gtk.types.Unit unit)Sets the top margin used by compositor.void setWrapMode(gtk.types.WrapMode wrapMode)Sets the line wrapping mode for the printed text.Constructors
this(gtksource.buffer.Buffer buffer)Creates a new print compositor that can be used to print buffer.Methods
T bodyFontName(string propval)Set `bodyFontName` property. Params: propval = Name of the font used for the text body.T buffer(gtksource.buffer.Buffer propval)Set `buffer` property. Params: propval = The GtkSourceBuffer object to print. Returns: Builder instance for fluent chainingT footerFontName(string propval)Set `footerFontName` property. Params: propval = Name of the font used to print page footer. If this property is unspecified, the text body font is used.T headerFontName(string propval)Set `headerFontName` property. Params: propval = Name of the font used to print page header. If this property is unspecified, the text body font is used.T highlightSyntax(bool propval)Set `highlightSyntax` property. Params: propval = Whether to print the document with highlighted syntax.T lineNumbersFontName(string propval)Set `lineNumbersFontName` property. Params: propval = Name of the font used to print line numbers on the left margin. If this property is unspecified, the text body font is used.T printFooter(bool propval)Set `printFooter` property. Params: propval = Whether to print a footer in each page.T printHeader(bool propval)Set `printHeader` property. Params: propval = Whether to print a header in each page.T printLineNumbers(uint propval)Set `printLineNumbers` property. Params: propval = Interval of printed line numbers. If this property is set to 0 no numbers will be printed. If greater than 0, a number will be printed every "pri...T tabWidth(uint propval)Set `tabWidth` property. Params: propval = Width of a tab character expressed in spaces.T wrapMode(gtk.types.WrapMode propval)Set `wrapMode` property. Params: propval = Whether to wrap lines never, at word boundaries, or at character boundaries.Fluent builder for [gtksource.print_compositor.PrintCompositor]
Methods