Hoogle Search
Within LTS Haskell 24.37 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
printCompositorNew :: (HasCallStack, MonadIO m, IsBuffer a) => a -> m PrintCompositorgi-gtksource5 GI.GtkSource.Objects.PrintCompositor Creates a new print compositor that can be used to print buffer.
printCompositorNewFromView :: (HasCallStack, MonadIO m, IsView a) => a -> m PrintCompositorgi-gtksource5 GI.GtkSource.Objects.PrintCompositor 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 possible. The properties set are [propertyprintCompositor:tab-width], [propertyprintCompositor:highlight-syntax], [propertyprintCompositor:wrap-mode], [propertyprintCompositor:body-font-name] and [propertyprintCompositor:print-line-numbers].
-
gi-gtksource5 GI.GtkSource.Objects.PrintCompositor Paginate the document associated with the compositor. In order to support non-blocking pagination, document is paginated in small chunks. Each time [methodprintCompositor.paginate] is invoked, a chunk of the document is paginated. To paginate the entire document, [methodprintCompositor.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 PrintOperation::paginate signal, as shown in the following example:
c code
// Signal handler for the GtkPrintOperation::paginate signal static gboolean 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)) { gint 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; }If you don't need to do pagination in chunks, you can simply do it all in the PrintOperation::beginPrint handler, and set the number of pages from there, like in the following example:c code
// Signal handler for the GtkPrintOperation::begin-print signal static void begin_print (GtkPrintOperation *operation, GtkPrintContext *context, gpointer user_data) { GtkSourcePrintCompositor *compositor; gint 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); } -
gi-gtksource5 GI.GtkSource.Objects.PrintCompositor Sets the default font for the printed text. fontName should be a string representation of a font description Pango can understand. (e.g. "Monospace 10"). See fontDescriptionFromString for a description of the format of the string representation. This function cannot be called anymore after the first call to the [methodprintCompositor.paginate] function.
-
gi-gtksource5 GI.GtkSource.Objects.PrintCompositor Sets the bottom margin used by compositor.
-
gi-gtksource5 GI.GtkSource.Objects.PrintCompositor Sets the font for printing the page footer. If Nothing is supplied, the default font (i.e. the one being used for the text) will be used instead. fontName should be a string representation of a font description Pango can understand. (e.g. "Monospace 10"). See fontDescriptionFromString for a description of the format of the string representation. This function cannot be called anymore after the first call to the [methodprintCompositor.paginate] function.
-
gi-gtksource5 GI.GtkSource.Objects.PrintCompositor See [methodprintCompositor.set_header_format] for more information about the parameters.
-
gi-gtksource5 GI.GtkSource.Objects.PrintCompositor Sets the font for printing the page header. If Nothing is supplied, the default font (i.e. the one being used for the text) will be used instead. fontName should be a string representation of a font description Pango can understand. (e.g. "Monospace 10"). See fontDescriptionFromString for a description of the format of the string representation. This function cannot be called anymore after the first call to the [methodprintCompositor.paginate] function.
-
gi-gtksource5 GI.GtkSource.Objects.PrintCompositor 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 subset of strftime() codes are accepted, see dateTimeFormat for more details on the accepted format specifiers. Additionally the following format specifiers are accepted:
- N: the page number
- Q: the page count.
-
gi-gtksource5 GI.GtkSource.Objects.PrintCompositor 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 [methodprintCompositor.paginate] function.