Gtk.ShortcutsWindow¶
| Subclasses: | None | 
|---|
Methods¶
| Inherited: | Gtk.Window (119), Gtk.Bin (1), Gtk.Container (35), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10) | 
|---|---|
| Structs: | Gtk.ContainerClass (5), Gtk.WidgetClass (12), GObject.ObjectClass (5) | 
Virtual Methods¶
| Inherited: | Gtk.Window (5), Gtk.Container (10), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10) | 
|---|
| do_close() | |
| do_search() | 
Properties¶
| Inherited: | Gtk.Window (33), Gtk.Container (3), Gtk.Widget (39) | 
|---|
| Name | Type | Flags | Short Description | 
|---|---|---|---|
| section-name | str | r/w | Section Name | 
| view-name | str | r/w | View Name | 
Style Properties¶
| Inherited: | Gtk.Window (2), Gtk.Widget (17) | 
|---|
Signals¶
| Inherited: | Gtk.Window (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) | 
|---|
| Name | Short Description | 
|---|---|
| close | The ::closesignal is akeybinding signalwhich gets emitted when the user uses a keybinding to close the window. | 
| search | The ::searchsignal is akeybinding signalwhich gets emitted when the user uses a keybinding to start a search. | 
Fields¶
| Inherited: | Gtk.Window (5), Gtk.Container (4), Gtk.Widget (69), GObject.Object (1) | 
|---|
| Name | Type | Access | Description | 
|---|---|---|---|
| window | Gtk.Window | r | 
Class Details¶
- 
class Gtk.ShortcutsWindow(*args, **kwargs)¶
- Bases: - Gtk.Window- Abstract: - No - Structure: - Gtk.ShortcutsWindowClass- 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 with- Gtk.Builder, by populating a- Gtk.ShortcutsWindowwith one or more- Gtk.ShortcutsSectionobjects, which contain- Gtk.ShortcutsGroupsthat in turn contain objects of class- Gtk.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: - RUN_LAST,- ACTION- Parameters: - shortcuts_window ( - Gtk.ShortcutsWindow) – The object which received the signal- The - ::closesignal is a- keybinding 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: - RUN_LAST,- ACTION- Parameters: - shortcuts_window ( - Gtk.ShortcutsWindow) – The object which received the signal- The - ::searchsignal is a- keybinding 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¶
- Name: - section-name- Type: - str- Default Value: - 'internal-search'- Flags: - READABLE,- WRITABLE- 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¶
- Name: - view-name- Type: - str- Default Value: - None- Flags: - READABLE,- WRITABLE- The view name by which to filter the contents. - This should correspond to the - Gtk.ShortcutsGroup- :viewproperty of some of the- Gtk.ShortcutsGroupobjects that are inside this shortcuts window.- Set this to - Noneto show all groups.