gtksource.print_compositor
Module for [PrintCompositor] class
Types 3
Methods
PrintCompositorGidBuilder builder() static nothrowGet builder for [gtksource.print_compositor.PrintCompositor] Returns: New builder objectstring bodyFontName() @property nothrowGet `bodyFontName` property. Returns: Name of the font used for the text body.void bodyFontName(string propval) @property nothrowSet `bodyFontName` property. Params: propval = Name of the font used for the text body.gtksource.buffer.Buffer buffer() @property nothrowGet `buffer` property. Returns: The GtkSourceBuffer object to print.string footerFontName() @property nothrowGet `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) @property nothrowSet `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() @property nothrowGet `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) @property nothrowSet `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() @property nothrowGet `highlightSyntax` property. Returns: Whether to print the document with highlighted syntax.void highlightSyntax(bool propval) @property nothrowSet `highlightSyntax` property. Params: propval = Whether to print the document with highlighted syntax.string lineNumbersFontName() @property nothrowGet `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) @property nothrowSet `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() @property nothrowGet `nPages` property. Returns: The number of pages in the document or <code>-1</code> if the document has not been completely paginated.bool printFooter() @property nothrowGet `printFooter` property. Returns: Whether to print a footer in each page.void printFooter(bool propval) @property nothrowSet `printFooter` property. Params: propval = Whether to print a footer in each page.bool printHeader() @property nothrowGet `printHeader` property. Returns: Whether to print a header in each page.void printHeader(bool propval) @property nothrowSet `printHeader` property. Params: propval = Whether to print a header in each page.uint printLineNumbers() @property nothrowGet `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) @property nothrowSet `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() @property nothrowGet `tabWidth` property. Returns: Width of a tab character expressed in spaces.void tabWidth(uint propval) @property nothrowSet `tabWidth` property. Params: propval = Width of a tab character expressed in spaces.gtk.types.WrapMode wrapMode() @property nothrowGet `wrapMode` property. Returns: Whether to wrap lines never, at word boundaries, or at character boundaries.void wrapMode(gtk.types.WrapMode propval) @property nothrowSet `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) static nothrowCreates 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) nothrowDraw page page_nr for printing on the the Cairo context encapsuled in context.string getBodyFontName() nothrowReturns 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.gtksource.buffer.Buffer getBuffer() nothrowGets 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() nothrowReturns 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() nothrowReturns 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() nothrowDetermines 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...string getLineNumbersFontName() nothrowReturns 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() nothrowReturns 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() nothrowReturns the current fraction of the document pagination that has been completed. Returns: a fraction from 0.0 to 1.0 inclusive.bool getPrintFooter() nothrowDetermines 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() nothrowDetermines 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() nothrowReturns 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...uint getTabWidth() nothrowReturns the width of tabulation in characters for printed text. Returns: width of tab.gtk.types.WrapMode getWrapMode() nothrowGets the line wrapping mode for the printed text. Returns: the line wrap mode.bool paginate(gtk.print_context.PrintContext context) nothrowPaginate the document associated with the compositor.void setBottomMargin(double margin, gtk.types.Unit unit) nothrowSets the bottom margin used by compositor.void setFooterFontName(string fontName = null) nothrowSets 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) nothrowSee [gtksource.print_compositor.PrintCompositor.setHeaderFormat] for more information about the parameters.void setHeaderFontName(string fontName = null) nothrowSets 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) nothrowSets 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) nothrowSets 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) nothrowSets the left margin used by compositor.void setLineNumbersFontName(string fontName = null) nothrowSets 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) nothrowSets 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) nothrowSets 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) nothrowSets 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) nothrowSets the right margin used by compositor.void setTopMargin(double margin, gtk.types.Unit unit) nothrowSets the top margin used by compositor.void setWrapMode(gtk.types.WrapMode wrapMode) nothrowSets 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.Fluent builder implementation template for gtksource.print_compositor.PrintCompositor
Methods
T bodyFontName(string propval) nothrowSet `bodyFontName` property. Params: propval = Name of the font used for the text body.T buffer(gtksource.buffer.Buffer propval) nothrowSet `buffer` property. Params: propval = The GtkSourceBuffer object to print. Returns: Builder instance for fluent chainingT footerFontName(string propval) nothrowSet `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) nothrowSet `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) nothrowSet `highlightSyntax` property. Params: propval = Whether to print the document with highlighted syntax.T lineNumbersFontName(string propval) nothrowSet `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) nothrowSet `printFooter` property. Params: propval = Whether to print a footer in each page.T printHeader(bool propval) nothrowSet `printHeader` property. Params: propval = Whether to print a header in each page.T printLineNumbers(uint propval) nothrowSet `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) nothrowSet `tabWidth` property. Params: propval = Width of a tab character expressed in spaces.T wrapMode(gtk.types.WrapMode propval) nothrowSet `wrapMode` property. Params: propval = Whether to wrap lines never, at word boundaries, or at character boundaries.Fluent builder for gtksource.print_compositor.PrintCompositor
Methods