Hoogle Search
Within LTS Haskell 24.41 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
gi-gtk3 GI.Gtk.Objects.NotebookPageAccessible No description available in the introspection data.
-
gi-gtk3 GI.Gtk.Objects.NotebookPageAccessible No description available in the introspection data.
toNotebookPageAccessible :: (MonadIO m, IsNotebookPageAccessible o) => o -> m NotebookPageAccessiblegi-gtk3 GI.Gtk.Objects.NotebookPageAccessible Cast to NotebookPageAccessible, for types for which this is known to be safe. For general casts, use castTo.
class (GObject o, IsDescendantOf PageSetup o) =>
IsPageSetup ogi-gtk3 GI.Gtk.Objects.PageSetup Type class for types which can be safely cast to PageSetup, for instance with toPageSetup.
toPageSetup :: (MonadIO m, IsPageSetup o) => o -> m PageSetupgi-gtk3 GI.Gtk.Objects.PageSetup Cast to PageSetup, for types for which this is known to be safe. For general casts, use castTo.
printContextGetPageSetup :: (HasCallStack, MonadIO m, IsPrintContext a) => a -> m PageSetupgi-gtk3 GI.Gtk.Objects.PrintContext Obtains the PageSetup that determines the page dimensions of the PrintContext. Since: 2.10
type
PrintOperationDrawPageCallback = PrintContext -> Int32 -> IO ()gi-gtk3 GI.Gtk.Objects.PrintOperation Emitted for every page that is printed. The signal handler must render the pageNr's page onto the cairo context obtained from context using printContextGetCairoContext.
C code
static void draw_page (GtkPrintOperation *operation, GtkPrintContext *context, gint page_nr, gpointer user_data) { cairo_t *cr; PangoLayout *layout; gdouble width, text_height; gint layout_height; PangoFontDescription *desc; cr = gtk_print_context_get_cairo_context (context); width = gtk_print_context_get_width (context); cairo_rectangle (cr, 0, 0, width, HEADER_HEIGHT); cairo_set_source_rgb (cr, 0.8, 0.8, 0.8); cairo_fill (cr); layout = gtk_print_context_create_pango_layout (context); desc = pango_font_description_from_string ("sans 14"); pango_layout_set_font_description (layout, desc); pango_font_description_free (desc); pango_layout_set_text (layout, "some text", -1); pango_layout_set_width (layout, width * PANGO_SCALE); pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER); pango_layout_get_size (layout, NULL, &layout_height); text_height = (gdouble)layout_height / PANGO_SCALE; cairo_move_to (cr, width / 2, (HEADER_HEIGHT - text_height) / 2); pango_cairo_show_layout (cr, layout); g_object_unref (layout); }Use printOperationSetUseFullPage and printOperationSetUnit before starting the print operation to set up the transformation of the cairo context according to your needs. Since: 2.10type
PrintOperationRequestPageSetupCallback = PrintContext -> Int32 -> PageSetup -> IO ()gi-gtk3 GI.Gtk.Objects.PrintOperation Emitted once for every page that is printed, to give the application a chance to modify the page setup. Any changes done to setup will be in force only for printing this page. Since: 2.10
-
gi-gtk3 GI.Gtk.Objects.PrintOperation Connect a signal handler for the drawPage signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after printOperation #drawPage callback
By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension. -
gi-gtk3 GI.Gtk.Objects.PrintOperation Connect a signal handler for the requestPageSetup signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after printOperation #requestPageSetup callback
By default the object invoking the signal is not passed to the callback. If you need to access it, you can use the implit ?self parameter. Note that this requires activating the ImplicitParams GHC extension.