Gtk.Shortcuts_Window

Entities

Tagged Types

Access Types

Constants

Subprograms

Generic Instantiations

Description

A GtkShortcutsWindow shows brief information about the keyboard shortcuts and gestures of an application. The shortcuts can be grouped, and you can have multiple sections in this window, corresponding to the major modes of your application.

Additionally, the shortcuts can be filtered by the current view, to avoid showing information that is not relevant in the current application context.

The recommended way to construct a GtkShortcutsWindow is with GtkBuilder, by populating a Gtk.Shortcuts_Window.Gtk_Shortcuts_Window with one or more Gtk.Shortcuts_Section.Gtk_Shortcuts_Section objects, which contain Gtk_Shortcuts_Groups that in turn contain objects of class Gtk.Shortcuts_Shortcut.Gtk_Shortcuts_Shortcut.

# A simple example:

This example has as single section. As you can see, the shortcut groups are arranged in columns, and spread across several pages if there are too many to find on a single page.

The .ui file for this example can be found here.

# An example with multiple views:

This example shows a Gtk.Shortcuts_Window.Gtk_Shortcuts_Window that has been configured to show only the shortcuts relevant to the "stopwatch" view.

The .ui file for this example can be found here.

# An example with multiple sections:

This example shows a Gtk.Shortcuts_Window.Gtk_Shortcuts_Window with two sections, "Editor Shortcuts" and "Terminal Shortcuts".

The .ui file for this example can be found here.

"+"

function "+"
  (Widget : access Gtk_Shortcuts_Window_Record'Class)
return Gtk.Buildable.Gtk_Buildable
Parameters
Widget
Return Value

"-"

function "-"
  (Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Shortcuts_Window
Parameters
Interf
Return Value

Cb_GObject_Void

type Cb_GObject_Void is not null access procedure
  (Self : access Glib.Object.GObject_Record'Class);
Parameters
Self

Cb_Gtk_Shortcuts_Window_Void

type Cb_Gtk_Shortcuts_Window_Void is not null access procedure
  (Self : access Gtk_Shortcuts_Window_Record'Class);
Parameters
Self

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_Shortcuts_Window

type Gtk_Shortcuts_Window is access all Gtk_Shortcuts_Window_Record'Class;

Gtk_Shortcuts_Window_Record

type Gtk_Shortcuts_Window_Record is new Gtk_Window_Record with null record;

Implements_Gtk_Buildable

package Implements_Gtk_Buildable is new Glib.Types.Implements
  (Gtk.Buildable.Gtk_Buildable, Gtk_Shortcuts_Window_Record, Gtk_Shortcuts_Window);

On_Close

procedure On_Close
   (Self  : not null access Gtk_Shortcuts_Window_Record;
    Call  : Cb_GObject_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

The ::close signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user uses a keybinding to close the window.

The default binding for this signal is the Escape key.

Parameters
Self
Call
Slot
After

On_Close

procedure On_Close
   (Self  : not null access Gtk_Shortcuts_Window_Record;
    Call  : Cb_Gtk_Shortcuts_Window_Void;
    After : Boolean := False)

The ::close signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user uses a keybinding to close the window.

The default binding for this signal is the Escape key.

Parameters
Self
Call
After

On_Search

procedure On_Search
   (Self  : not null access Gtk_Shortcuts_Window_Record;
    Call  : Cb_GObject_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

The ::search signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user uses a keybinding to start a search.

The default binding for this signal is Control-F.

Parameters
Self
Call
Slot
After

On_Search

procedure On_Search
   (Self  : not null access Gtk_Shortcuts_Window_Record;
    Call  : Cb_Gtk_Shortcuts_Window_Void;
    After : Boolean := False)

The ::search signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user uses a keybinding to start a search.

The default binding for this signal is Control-F.

Parameters
Self
Call
After

Section_Name_Property

Section_Name_Property : constant Glib.Properties.Property_String;

The name of the section to show.

This should be the section-name of one of the Gtk.Shortcuts_Section.Gtk_Shortcuts_Section objects that are in this shortcuts window.

Signal_Close

Signal_Close : constant Glib.Signal_Name := "close";

The ::close signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user uses a keybinding to close the window.

The default binding for this signal is the Escape key.

Signal_Search

Signal_Search : constant Glib.Signal_Name := "search";

The ::search signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user uses a keybinding to start a search.

The default binding for this signal is Control-F.

View_Name_Property

View_Name_Property : constant Glib.Properties.Property_String;

The view name by which to filter the contents.

This should correspond to the Gtk.Shortcuts_Group.Gtk_Shortcuts_Group:view property of some of the Gtk.Shortcuts_Group.Gtk_Shortcuts_Group objects that are inside this shortcuts window.

Set this to null to show all groups.