Gtk.ShortcutsWindow¶
- Subclasses:
None
Methods¶
Virtual Methods¶
- Inherited:
Gtk.Window (5), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)
|
|
|
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Section Name |
||
r/w |
View Name |
Style Properties¶
- Inherited:
Signals¶
- Inherited:
Gtk.Window (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name |
Short Description |
---|---|
The |
|
The |
Fields¶
- Inherited:
Gtk.Window (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name |
Type |
Access |
Description |
---|---|---|---|
window |
r |
Class Details¶
- class Gtk.ShortcutsWindow(*args, **kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A
Gtk.ShortcutsWindow
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
Gtk.ShortcutsWindow
is withGtk.Builder
, by populating aGtk.ShortcutsWindow
with one or moreGtk.ShortcutsSection
objects, which containGtk.ShortcutsGroups
that in turn contain objects of classGtk.ShortcutsShortcut
.- 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.ShortcutsWindow
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.ShortcutsWindow
with two sections, “Editor Shortcuts” and “Terminal Shortcuts”.The .ui file for this example can be found here.
- do_close() virtual¶
- do_search() virtual¶
Signal Details¶
- Gtk.ShortcutsWindow.signals.close(shortcuts_window)¶
- Signal Name:
close
- Flags:
- Parameters:
shortcuts_window (
Gtk.ShortcutsWindow
) – The object which received the signal
The
::close
signal is akeybinding signal
which gets emitted when the user uses a keybinding to close the window.The default binding for this signal is the Escape key.
- Gtk.ShortcutsWindow.signals.search(shortcuts_window)¶
- Signal Name:
search
- Flags:
- Parameters:
shortcuts_window (
Gtk.ShortcutsWindow
) – The object which received the signal
The
::search
signal is akeybinding signal
which gets emitted when the user uses a keybinding to start a search.The default binding for this signal is Control-F.
Property Details¶
- Gtk.ShortcutsWindow.props.section_name¶
-
The name of the section to show.
This should be the section-name of one of the
Gtk.ShortcutsSection
objects that are in this shortcuts window.
- Gtk.ShortcutsWindow.props.view_name¶
-
The view name by which to filter the contents.
This should correspond to the
Gtk.ShortcutsGroup
:view
property of some of theGtk.ShortcutsGroup
objects that are inside this shortcuts window.Set this to
None
to show all groups.