Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: ShortcutsSection

[28:7] extends: object

A GtkShortcutsSection collects all the keyboard shortcuts and gestures for a major application mode. If your application needs multiple sections, you should give each section a unique [property@Gtk.ShortcutsSection:section-name] and a [property@Gtk.ShortcutsSection:title] that can be shown in the section selector of the [class@Gtk.ShortcutsWindow]. The [property@Gtk.ShortcutsSection:max-height] property can be used to influence how the groups in the section are distributed over pages and columns. This widget is only meant to be used with [class@Gtk.ShortcutsWindow]. The recommended way to construct a GtkShortcutsSection is with [class@Gtk.Builder], by using the <child> tag to populate a GtkShortcutsSection with one or more [class@Gtk.ShortcutsGroup] instances, which in turn contain one or more [class@Gtk.ShortcutsShortcut] objects. If you need to add a group programmatically, use [method@Gtk.ShortcutsSection.add_group]. # Shortcuts and Gestures Pan gestures allow to navigate between sections. The following signals have default keybindings: - [signal@Gtk.ShortcutsSection::change-current-page]

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • ShortcutsSection (Handle = null)

    Creates a new ShortcutsSection by wrapping a native handle or another wrapper.

    • @p Handle is the native handle or another wrapper whose handle to adopt.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asBox ()

    Wraps this handle as Box.

    • @r A Box object.
  • asAccessible ()

    Wraps this handle as Accessible.

    • @r A Accessible object.
  • asBuildable ()

    Wraps this handle as Buildable.

    • @r A Buildable object.
  • asConstraintTarget ()

    Wraps this handle as ConstraintTarget.

    • @r A ConstraintTarget object.
  • asOrientable ()

    Wraps this handle as Orientable.

    • @r A Orientable object.
  • connectSignal (string Name, CallbackObj)

    Connects one generated callback wrapper to a named signal.

    • @p Name is the signal name.
    • @p CallbackObj is the generated callback wrapper to connect.
    • @r The connected handler id.
  • disconnectSignalHandler (int HandlerId)

    Disconnects one retained signal handler id.

    • @p HandlerId is the signal handler id to disconnect.
    • @r None.
  • setOnChangecurrentpage (callback Fn, UserData = null)

    Emitted when we change the current page. The default bindings for this signal are Ctrl+PgUp, PgUp, Ctrl+PgDn, PgDn.

    • @p Fn is the Aussom callback.
    • @p Fn is called with (ShortcutsSection Self, int Offset).
    • @p UserData is retained and passed through to the generated callback wrapper when provided.
    • @r The connected handler id.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setMaxheight (int Value)

    The maximum number of lines to allow per column. This property can be used to influence how the groups in this section are distributed across pages and columns. The default value of 15 should work in most cases.

    • @p Value is the new property value.
    • @r None.
  • setSectionname (string Value)

    A unique name to identify this section among the sections added to the GtkShortcutsWindow. Setting the [property@Gtk.ShortcutsWindow:section-name] property to this string will make this section shown in the GtkShortcutsWindow.

    • @p Value is the new property value.
    • @r None.
  • setTitle (string Value)

    The string to show in the section selector of the GtkShortcutsWindow for this section. If there is only one section, you don't need to set a title, since the section selector will not be shown in this case.

    • @p Value is the new property value.
    • @r None.
  • setViewname (string Value)

    A view name to filter the groups in this section by. See [property@Gtk.ShortcutsGroup:view]. Applications are expected to use the [property@Gtk.ShortcutsWindow:view-name] property for this purpose.

    • @p Value is the new property value.
    • @r None.
  • add_group (object group)

    Adds a group to the shortcuts section. This is the programmatic equivalent to using [class@Gtk.Builder] and a <child> tag to add the child. Adding children with the GtkBox API is not appropriate, as GtkShortcutsSection manages its children internally.

    • @p group is the GtkShortcutsGroup to add.
    • @r None.

class: ShortcutsSectionMeta

[359:14] static extends: object

Generated metadata helpers for ShortcutsSection class surfaces.

Methods

  • properties ()

    Returns property metadata for ShortcutsSection.

    • @r A list.
  • signals ()

    Returns signal metadata for ShortcutsSection.

    • @r A list.

class: ShortcutsSectionChangecurrentpageCallback

[289:7] extends: object

Generated low-level callback wrapper for GIR callback change-current-page.

Members

  • callbackObj
  • userFn
  • userData
  • hasUserData

Methods

  • ShortcutsSectionChangecurrentpageCallback (callback Fn, UserData = null)

    Creates one native callback wrapper. The wrapper owns a trampoline that converts native pointers into generated wrapper objects before invoking Fn.

    • @p Fn is the Aussom callback implementation.
    • @p UserData is retained and passed through to Fn on each invocation when provided.
  • trampoline (nativeSelf, offset, nativeUserData)

    Internal trampoline. Converts native pointer arguments into generated wrapper instances, then invokes the user's callback.

  • callback ()

    Returns the wrapped NativeCallback.

  • handle ()

    Returns the callback as a NativeHandle.

  • close ()

    Closes the underlying NativeCallback.

  • isClosed ()

    Returns true when the callback has been closed.