Hoogle Search
Within LTS Haskell 24.20 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
gi-gtksource5 GI.GtkSource.Objects.PrintCompositor 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).
-
gi-gtksource5 GI.GtkSource.Objects.PrintCompositor Gets the right margin in units of unit.
printCompositorGetTabWidth :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> m Word32gi-gtksource5 GI.GtkSource.Objects.PrintCompositor Returns the width of tabulation in characters for printed text.
-
gi-gtksource5 GI.GtkSource.Objects.PrintCompositor Gets the top margin in units of unit.
printCompositorGetWrapMode :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> m WrapModegi-gtksource5 GI.GtkSource.Objects.PrintCompositor Gets the line wrapping mode for the printed text.
-
gi-gtksource5 GI.GtkSource.Objects.PrintCompositor Specifies a tag whose style should be ignored when compositing the document to the printable page. Since: 5.2
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.