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.

  1. printCompositorNew :: (HasCallStack, MonadIO m, IsBuffer a) => a -> m PrintCompositor

    gi-gtksource5 GI.GtkSource.Objects.PrintCompositor

    Creates a new print compositor that can be used to print buffer.

  2. printCompositorNewFromView :: (HasCallStack, MonadIO m, IsView a) => a -> m PrintCompositor

    gi-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].

  3. printCompositorPaginate :: (HasCallStack, MonadIO m, IsPrintCompositor a, IsPrintContext b) => a -> b -> m Bool

    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);
    }
    

  4. printCompositorSetBodyFontName :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Text -> m ()

    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.

  5. printCompositorSetBottomMargin :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Double -> Unit -> m ()

    gi-gtksource5 GI.GtkSource.Objects.PrintCompositor

    Sets the bottom margin used by compositor.

  6. printCompositorSetFooterFontName :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Maybe Text -> m ()

    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.

  7. printCompositorSetFooterFormat :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Bool -> Maybe Text -> Maybe Text -> Maybe Text -> m ()

    gi-gtksource5 GI.GtkSource.Objects.PrintCompositor

    See [methodprintCompositor.set_header_format] for more information about the parameters.

  8. printCompositorSetHeaderFontName :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Maybe Text -> m ()

    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.

  9. printCompositorSetHeaderFormat :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Bool -> Maybe Text -> Maybe Text -> Maybe Text -> m ()

    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.
    separator specifies if a solid line should be drawn to separate the header from the document text. If Nothing 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 [methodprintCompositor.set_print_header]. This function cannot be called anymore after the first call to the [methodprintCompositor.paginate] function.

  10. printCompositorSetHighlightSyntax :: (HasCallStack, MonadIO m, IsPrintCompositor a) => a -> Bool -> m ()

    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.

Page 83 of many | Previous | Next