Hoogle Search

Within LTS Haskell 24.42 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. module GI.Gtk.Objects.PadController

    PadController is an event controller for the pads found in drawing tablets (The collection of buttons and tactile sensors often found around the stylus-sensitive area). These buttons and sensors have no implicit meaning, and by default they perform no action, this event controller is provided to map those to Action objects, thus letting the application give those a more semantic meaning. Buttons and sensors are not constrained to triggering a single action, some InputSourceTabletPad devices feature multiple "modes", all these input elements have one current mode, which may determine the final action being triggered. Pad devices often divide buttons and sensors into groups, all elements in a group share the same current mode, but different groups may have different modes. See devicePadGetNGroups and devicePadGetGroupNModes. Each of the actions that a given button/strip/ring performs for a given mode is defined by PadActionEntry, it contains an action name that will be looked up in the given ActionGroup and activated whenever the specified input element and mode are triggered. A simple example of PadController usage, assigning button 1 in all modes and pad devices to an "invert-selection" action:

    GtkPadActionEntry *pad_actions[] = {
    { GTK_PAD_ACTION_BUTTON, 1, -1, "Invert selection", "pad-actions.invert-selection" },
    …
    };
    
    …
    action_group = g_simple_action_group_new ();
    action = g_simple_action_new ("pad-actions.invert-selection", NULL);
    g_signal_connect (action, "activate", on_invert_selection_activated, NULL);
    g_action_map_add_action (G_ACTION_MAP (action_group), action);
    …
    pad_controller = gtk_pad_controller_new (window, action_group, NULL);
    
    The actions belonging to rings/strips will be activated with a parameter of type G_VARIANT_TYPE_DOUBLE bearing the value of the given axis, it is required that those are made stateful and accepting this VariantType.

  2. newtype PadController

    gi-gtk3 GI.Gtk.Objects.PadController

    Memory-managed wrapper type.

  3. PadController :: ManagedPtr PadController -> PadController

    gi-gtk3 GI.Gtk.Objects.PadController

    No documentation available.

  4. module GI.Gtk.Objects.PageSetup

    A GtkPageSetup object stores the page size, orientation and margins. The idea is that you can get one of these from the page setup dialog and then pass it to the PrintOperation when printing. The benefit of splitting this out of the PrintSettings is that these affect the actual layout of the page, and thus need to be set long before user prints. ## Margins ## {print-margins} The margins specified in this object are the “print margins”, i.e. the parts of the page that the printer cannot print on. These are different from the layout margins that a word processor uses; they are typically used to determine the minimal size for the layout margins. To obtain a PageSetup use pageSetupNew to get the defaults, or use printRunPageSetupDialog to show the page setup dialog and receive the resulting page setup.

    A page setup dialog

    C code

    static GtkPrintSettings *settings = NULL;
    static GtkPageSetup *page_setup = NULL;
    
    static void
    do_page_setup (void)
    {
    GtkPageSetup *new_page_setup;
    
    if (settings == NULL)
    settings = gtk_print_settings_new ();
    
    new_page_setup = gtk_print_run_page_setup_dialog (GTK_WINDOW (main_window),
    page_setup, settings);
    
    if (page_setup)
    g_object_unref (page_setup);
    
    page_setup = new_page_setup;
    }
    
    Printing support was added in GTK+ 2.10.

  5. newtype PageSetup

    gi-gtk3 GI.Gtk.Objects.PageSetup

    Memory-managed wrapper type.

  6. PageSetup :: ManagedPtr PageSetup -> PageSetup

    gi-gtk3 GI.Gtk.Objects.PageSetup

    No documentation available.

  7. module GI.Gtk.Objects.Paned

    Paned has two panes, arranged either horizontally or vertically. The division between the two panes is adjustable by the user by dragging a handle. Child widgets are added to the panes of the widget with panedPack1 and panedPack2. The division between the two children is set by default from the size requests of the children, but it can be adjusted by the user. A paned widget draws a separator between the two child widgets and a small handle that the user can drag to adjust the division. It does not draw any relief around the children or around the separator. (The space in which the separator is called the gutter.) Often, it is useful to put each child inside a Frame with the shadow type set to ShadowTypeIn so that the gutter appears as a ridge. No separator is drawn if one of the children is missing. Each child has two options that can be set, resize and shrink. If resize is true, then when the Paned is resized, that child will expand or shrink along with the paned widget. If shrink is true, then that child can be made smaller than its requisition by the user. Setting shrink to False allows the application to set a minimum size. If resize is false for both children, then this is treated as if resize is true for both children. The application can set the position of the slider as if it were set by the user, by calling panedSetPosition.

    CSS nodes

    plain code

    paned
    ├── <child>
    ├── separator[.wide]
    ╰── <child>
    
    GtkPaned has a main CSS node with name paned, and a subnode for the separator with name separator. The subnode gets a .wide style class when the paned is supposed to be wide. In horizontal orientation, the nodes of the children are always arranged from left to right. So :first-child will always select the leftmost child, regardless of text direction.

    Creating a paned widget with minimum sizes.

    C code

    GtkWidget *hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
    GtkWidget *frame1 = gtk_frame_new (NULL);
    GtkWidget *frame2 = gtk_frame_new (NULL);
    gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);
    gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_IN);
    
    gtk_widget_set_size_request (hpaned, 200, -1);
    
    gtk_paned_pack1 (GTK_PANED (hpaned), frame1, TRUE, FALSE);
    gtk_widget_set_size_request (frame1, 50, -1);
    
    gtk_paned_pack2 (GTK_PANED (hpaned), frame2, FALSE, FALSE);
    gtk_widget_set_size_request (frame2, 50, -1);
    

  8. newtype Paned

    gi-gtk3 GI.Gtk.Objects.Paned

    Memory-managed wrapper type.

  9. Paned :: ManagedPtr Paned -> Paned

    gi-gtk3 GI.Gtk.Objects.Paned

    No documentation available.

  10. type PanedAcceptPositionCallback = IO Bool

    gi-gtk3 GI.Gtk.Objects.Paned

    The acceptPosition signal is a [keybinding signal][GtkBindingSignal] which gets emitted to accept the current position of the handle when moving it using key bindings. The default binding for this signal is Return or Space. Since: 2.0

Page 860 of many | Previous | Next