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.ShortcutsWindowshows 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.ShortcutsWindowis withGtk.Builder, by populating aGtk.ShortcutsWindowwith one or moreGtk.ShortcutsSectionobjects, which containGtk.ShortcutsGroupsthat 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.ShortcutsWindowthat 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.ShortcutsWindowwith 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
::closesignal is akeybinding signalwhich 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
::searchsignal is akeybinding signalwhich 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.ShortcutsSectionobjects 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:viewproperty of some of theGtk.ShortcutsGroupobjects that are inside this shortcuts window.Set this to
Noneto show all groups.