docs: Document shortcuts and actions

This commit is contained in:
g.willems 2024-06-24 15:26:35 +02:00
parent 0b57bd5a53
commit d58297fa15
33 changed files with 499 additions and 22 deletions

View File

@ -101,6 +101,12 @@
* NULL);
* ```
*
* ## Shortcuts and Gestures
*
* `GtkAboutDialog` supports the following keyboard shortcuts:
*
* - <kbd>Escape</kbd> closes the window.
*
* ## CSS nodes
*
* `GtkAboutDialog` has a single CSS node with the name `window` and style

View File

@ -34,6 +34,12 @@
* almost any other standard `GtkWidget`. The most commonly used child is the
* `GtkLabel`.
*
* # Shortcuts and Gestures
*
* The following signals have default keybindings:
*
* - [signal@Gtk.Button::activate]
*
* # CSS nodes
*
* `GtkButton` has a single CSS node with name button. The node will get the

View File

@ -51,6 +51,13 @@
* between 1582 and 1929. Display before these dates is likely to be
* historically incorrect.
*
* # Shortcuts and Gestures
*
* `GtkCalendar` supports the following gestures:
*
* - Scrolling up or down will switch to the previous or next month.
* - Date strings can be dropped for setting the current day.
*
* # CSS nodes
*
* ```

View File

@ -80,6 +80,12 @@
* `GAction` with a target for each button. Using the `toggled` signals to keep
* track of the group changes and state is discouraged.
*
* # Shortcuts and Gestures
*
* `GtkCheckButton` supports the following keyboard shortcuts:
*
* - <kbd></kbd> or <kbd>Enter</kbd> activates the button.
*
* # CSS nodes
*
* ```

View File

@ -61,6 +61,14 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
* The `GtkColorChooserWidget` is used in the [class@Gtk.ColorChooserDialog]
* to provide a dialog for selecting colors.
*
* # Actions
*
* `GtkColorChooserWidget` defines a set of built-in actions:
*
* - `color.customize` activates the color editor for the given color.
* - `color.select` emits the [signal@Gtk.ColorChooser::color-activated] signal
* for the given color.
*
* # CSS names
*
* `GtkColorChooserWidget` has a single CSS node with name colorchooser.

View File

@ -48,6 +48,20 @@
* for leaving the edit mode are the Enter key (to save
* the results) or the Escape key (to cancel the editing).
*
* # Shortcuts and Gestures
*
* `GtkEditableLabel` supports the following keyboard shortcuts:
*
* - <kbd>Enter</kbd> starts editing.
* - <kbd>Escape</kbd> stops editing.
*
* # Actions
*
* `GtkEditableLabel` defines a set of built-in actions:
*
* - `editing.starts` switches the widget into editing mode.
* - `editing.stop` switches the widget out of editing mode.
*
* # CSS nodes
*
* ```
@ -407,7 +421,7 @@ gtk_editable_label_class_init (GtkEditableLabelClass *class)
* user can make changes to the text.
*
* The default bindings for this action are clicking
* on the widget and the Enter key.
* on the widget and the <kbd>Enter</kbd> key.
*
* This action is disabled when `GtkEditableLabel:editing`
* is %FALSE.

View File

@ -48,6 +48,19 @@
* `GtkEmojiChooser` emits the [signal@Gtk.EmojiChooser::emoji-picked]
* signal when an Emoji is selected.
*
* # Shortcuts and Gestures
*
* `GtkEmojiChooser` supports the following keyboard shortcuts:
*
* - <kbd>Ctrl</kbd>+<kbd>N</kbd> scrolls th the next section.
* - <kbd>Ctrl</kbd>+<kbd>P</kbd> scrolls th the previous section.
*
* # Actions
*
* `GtkEmojiChooser` defines a set of built-in actions:
*
* - `scroll.section` scrolls to the next or previous section.
*
* # CSS nodes
*
* ```

View File

@ -118,6 +118,27 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
* use the methods of this interface to interact with the
* widget.
*
* # Shortcuts and Gestures
*
* `GtkFileChooserWidget` supports the following keyboard shortcuts:
*
* - <kbd>Shift</kbd>+<kbd>F10</kbd> or <kbd>Menu</kbd> opens the context menu.
*
* The following signals have default keybindings:
*
* - [signal@Gtk.FileChooserWidget::desktop-folder]
* - [signal@Gtk.FileChooserWidget::down-folder]
* - [signal@Gtk.FileChooserWidget::home-folder]
* - [signal@Gtk.FileChooserWidget::location-popup]
* - [signal@Gtk.FileChooserWidget::location-popup-on-paste]
* - [signal@Gtk.FileChooserWidget::location-toggle-popup]
* - [signal@Gtk.FileChooserWidget::places-shortcut]
* - [signal@Gtk.FileChooserWidget::quick-bookmark]
* - [signal@Gtk.FileChooserWidget::recent-shortcut]
* - [signal@Gtk.FileChooserWidget::search-shortcut]
* - [signal@Gtk.FileChooserWidget::show-hidden]
* - [signal@Gtk.FileChooserWidget::up-folder]
*
* # CSS nodes
*
* `GtkFileChooserWidget` has a single CSS node with name filechooser.

View File

@ -52,6 +52,15 @@
*
* Also see [class@Gtk.ListBox].
*
* # Shortcuts and Gestures
*
* The following signals have default keybindings:
*
* - [signal@Gtk.FlowBox::move-cursor]
* - [signal@Gtk.FlowBox::select-all]
* - [signal@Gtk.FlowBox::toggle-cursor-child]
* - [signal@Gtk.FlowBox::unselect-all]
*
* # CSS nodes
*
* ```

View File

@ -58,6 +58,13 @@
* To learn more about the list widget framework, see the
* [overview](section-list-widget.html).
*
* # Actions
*
* `GtkGridView` defines a set of built-in actions:
*
* - `list.activate-item` activates the item at given position by emitting the
* the [signal@Gtk.GridView::activate] signal.
*
* # CSS nodes
*
* ```

View File

@ -72,6 +72,40 @@
*
* ![An example GtkLabel](label.png)
*
* ## Shortcuts and Gestures
*
* `GtkLabel` supports the following keyboard shortcuts, when the cursor is
* visible:
*
* - <kbd>Shift</kbd>+<kbd>F10</kbd> or <kbd>Menu</kbd> opens the context menu.
* - <kbd>Ctrl</kbd>+<kbd>A</kbd> or <kbd>Ctrl</kbd>+<kbd>&sol;</kbd>
* selects all.
* - <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>A</kbd> or
* <kbd>Ctrl</kbd>+<kbd>&bsol;</kbd> unselects all.
*
* Additionally, the following signals have default keybindings:
*
* - [signal@Gtk.Label::activate-current-link]
* - [signal@Gtk.Label::copy-clipboard]
* - [signal@Gtk.Label::move-cursor]
*
* ## Actions
*
* `GtkLabel` defines a set of built-in actions:
*
* - `clipboard.copy` copies the text to the clipboard.
* - `clipboard.cut` doesn't do anything, since text in labels can't be deleted.
* - `clipboard.paste` doesn't do anything, since text in labels can't be
* edited.
* - `link.open` opens the link, when activated on a link inside the label.
* - `link.copy` copies the link to the clipboard, when activated on a link
* inside the label.
* - `menu.popup` opens the context menu.
* - `selection.delete` doesn't do anything, since text in labels can't be
* deleted.
* - `selection.select-all` selects all of the text, if the label allows
* selection.
*
* ## CSS nodes
*
* ```
@ -2283,8 +2317,8 @@ gtk_label_class_init (GtkLabelClass *class)
* programmatically.
*
* The default bindings for this signal come in two variants,
* the variant with the Shift modifier extends the selection,
* the variant without the Shift modifier does not.
* the variant with the <kbd>Shift</kbd> modifier extends the selection,
* the variant without the <kbd>Shift</kbd> modifier does not.
* There are too many key combinations to list them all here.
*
* - <kbd></kbd>, <kbd></kbd>, <kbd></kbd>, <kbd></kbd>

View File

@ -42,6 +42,19 @@
* [signal@Gtk.LinkButton::activate-link] signal and returning %TRUE from
* the signal handler.
*
* # Shortcuts and Gestures
*
* `GtkLinkButton` supports the following keyboard shortcuts:
*
* - <kbd>Shift</kbd>+<kbd>F10</kbd> or <kbd>Menu</kbd> opens the context menu.
*
* # Actions
*
* `GtkLinkButton` defines a set of built-in actions:
*
* - `clipboard.copy` copies the url to the clipboard.
* - `menu.popup` opens the context menu.
*
* # CSS nodes
*
* `GtkLinkButton` has a single CSS node with name button. To differentiate

View File

@ -39,6 +39,49 @@ G_BEGIN_DECLS
* GtkListBase:
*
* `GtkListBase` is the abstract base class for GTK's list widgets.
*
* # Shortcuts and Gestures
*
* `GtkListBase` supports the following keyboard shortcuts:
*
* - <kbd>Ctrl</kbd>+<kbd>A</kbd> or <kbd>Ctrl</kbd>+<kbd>&sol;</kbd>
* selects all items.
* - <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>A</kbd> or
* <kbd>Ctrl</kbd>+<kbd>&bsol;</kbd> unselects all items.
*
* The focused item is controlled by the navigation keys below, combined
* with the <kbd>Ctrl</kbd> modifier to prevent moving the selection,
* and the <kbd>Shift</kbd> modifier to extend the current selection.
*
* - <kbd></kbd>, <kbd></kbd>, <kbd></kbd>, <kbd></kbd> move the focus
* on the next item in the designed direction.
* - <kbd>Home</kbd> and <kbd>End</kbd> focus the first or last item.
* - <kbd>PgUp</kbd> and <kbd>PgDn</kbd> move the focus one page up or down.
*
* List item widgets support the following keyboard shortcuts:
*
* - <kbd>Enter</kbd> activates the item.
* - <kbd></kbd> selects the item, with the same <kbd>Ctrl</kbd> and
* <kbd>Shift</kbd> modifiers combinations as the navigation keys.
*
* # Actions
*
* `GtkListBase` defines a set of built-in actions:
*
* - `list.scroll-to-item` moves the visible area to the item at given position
* with the minimum amount of scrolling required. If the item is already
* visible, nothing happens.
* - `list.select-item` changes the selection.
* - `list.select-all` selects all items in the model, if the selection model
* supports it.
* - `list.unselect-all` unselects all items in the model, if the selection
* model supports it.
*
* List item widgets install the following actions:
*
* - `listitem.select` changes selection if the item is selectable.
* - `listitem.scroll-to` moves the visible area of the list to this item with
* the minimum amount of scrolling required.
*/
typedef struct _GtkListBase GtkListBase;
typedef struct _GtkListBaseClass GtkListBaseClass;

View File

@ -69,6 +69,15 @@
* attribute of a `<child>` element. See [method@Gtk.ListBox.set_placeholder]
* for info.
*
* # Shortcuts and Gestures
*
* The following signals have default keybindings:
*
* - [signal@Gtk.ListBox::move-cursor]
* - [signal@Gtk.ListBox::select-all]
* - [signal@Gtk.ListBox::toggle-cursor-row]
* - [signal@Gtk.ListBox::unselect-all]
*
* # CSS nodes
*
* |[<!-- language="plain" -->
@ -652,6 +661,8 @@ gtk_list_box_class_init (GtkListBoxClass *klass)
* @box: the list box
*
* Emitted when the cursor row is toggled.
*
* The default bindings for this signal is <kbd>Ctrl</kbd>+<kbd></kbd>.
*/
signals[TOGGLE_CURSOR_ROW] =
g_signal_new (I_("toggle-cursor-row"),

View File

@ -112,6 +112,13 @@
* gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), list);
* ```
*
* # Actions
*
* `GtkListView` defines a set of built-in actions:
*
* - `list.activate-item` activates the item at given position by emitting
* the [signal@Gtk.ListView::activate] signal.
*
* # CSS nodes
*
* ```

View File

@ -104,6 +104,31 @@
* </object>
* ```
*
* # Shortcuts and Gestures
*
* `GtkNotebook` supports the following keyboard shortcuts:
*
* - <kbd>Shift</kbd>+<kbd>F10</kbd> or <kbd>Menu</kbd> opens the context menu.
* - <kbd>Home</kbd> moves the focus to the first tab.
* - <kbd>End</kbd> moves the focus to the last tab.
*
* Additionally, the following signals have default keybindings:
*
* - [signal@Gtk.Notebook::change-current-page]
* - [signal@Gtk.Notebook::focus-tab]
* - [signal@Gtk.Notebook::move-focus-out]
* - [signal@Gtk.Notebook::reorder-tab]
* - [signal@Gtk.Notebook::select-page]
*
* Tabs support drag-and-drop between notebooks sharing the same `group-name`,
* or to new windows by handling the `::create-window` signal.
*
* # Actions
*
* `GtkNotebook` defines a set of built-in actions:
*
* - `menu.popup` opens the tabs context menu.
*
* # CSS nodes
*
* ```
@ -1231,6 +1256,8 @@ gtk_notebook_class_init (GtkNotebookClass *class)
*
* Emitted when a page should be selected.
*
* The default binding for this signal is <kbd></kbd>.
*
* Returns: whether the page was selected
*/
notebook_signals[SELECT_PAGE] =
@ -1253,6 +1280,11 @@ gtk_notebook_class_init (GtkNotebookClass *class)
*
* Emitted when the current page should be changed.
*
* The default bindings for this signal are
* <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>PgUp</kbd>,
* <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>PgDn</kbd>,
* <kbd>Ctrl</kbd>+<kbd>PgUp</kbd> and <kbd>Ctrl</kbd>+<kbd>PgDn</kbd>.
*
* Returns: whether the page was changed
*/
notebook_signals[CHANGE_CURRENT_PAGE] =
@ -1274,6 +1306,12 @@ gtk_notebook_class_init (GtkNotebookClass *class)
* @direction: the direction to move the focus
*
* Emitted when focus was moved out.
*
* The default bindings for this signal are
* <kbd>Ctrl</kbd>+<kbd>Tab</kbd>,
* <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Tab</kbd>,
* <kbd>Ctrl</kbd>+<kbd></kbd>, <kbd>Ctrl</kbd>+<kbd></kbd>,
* <kbd>Ctrl</kbd>+<kbd></kbd> and <kbd>Ctrl</kbd>+<kbd></kbd>.
*/
notebook_signals[MOVE_FOCUS_OUT] =
g_signal_new (I_("move-focus-out"),
@ -1293,6 +1331,12 @@ gtk_notebook_class_init (GtkNotebookClass *class)
*
* Emitted when the tab should be reordered.
*
* The default bindings for this signal are
* <kbd>Alt</kbd>+<kbd>Home</kbd>, <kbd>Alt</kbd>+<kbd>End</kbd>,
* <kbd>Alt</kbd>+<kbd>PgUp</kbd>, <kbd>Alt</kbd>+<kbd>PgDn</kbd>,
* <kbd>Alt</kbd>+<kbd></kbd>, <kbd>Alt</kbd>+<kbd></kbd>,
* <kbd>Alt</kbd>+<kbd></kbd> and <kbd>Alt</kbd>+<kbd></kbd>.
*
* Returns: whether the tab was moved.
*/
notebook_signals[REORDER_TAB] =

View File

@ -74,6 +74,17 @@
* The application can set the position of the slider as if it were set
* by the user, by calling [method@Gtk.Paned.set_position].
*
* # Shortcuts and Gestures
*
* The following signals have default keybindings:
*
* - [signal@Gtk.Paned::accept-position]
* - [signal@Gtk.Paned::cancel-position]
* - [signal@Gtk.Paned::cycle-child-focus]
* - [signal@Gtk.Paned::cycle-handle-focus]
* - [signal@Gtk.Paned::move-handle]
* - [signal@Gtk.Paned::toggle-handle-focus]
*
* # CSS nodes
*
* ```
@ -608,6 +619,13 @@ gtk_paned_class_init (GtkPanedClass *class)
*
* This is a [keybinding signal](class.SignalAction.html).
*
* The default bindings for this signal are
* <kbd>Ctrl</kbd>+<kbd></kbd>, <kbd></kbd>,
* <kbd>Ctrl</kbd>+<kbd></kbd>, <kbd></kbd>,
* <kbd>Ctrl</kbd>+<kbd></kbd>, <kbd></kbd>,
* <kbd>Ctrl</kbd>+<kbd></kbd>, <kbd></kbd>,
* <kbd>PgUp</kbd>, <kbd>PgDn</kbd>, <kbd>Home</kbd>, <kbd>End</kbd>.
*
* Returns: whether the handle was moved
*/
signals[MOVE_HANDLE] =

View File

@ -67,6 +67,17 @@
* </section>
* ```
*
* # Shortcuts and Gestures
*
* `GtkPopover` supports the following keyboard shortcuts:
*
* - <kbd>Escape</kbd> closes the popover.
* - <kbd>Alt</kbd> makes the mnemonics visible.
*
* The following signals have default keybindings:
*
* - [signal@Gtk.Popover::activate-default]
*
* # CSS nodes
*
* ```
@ -1960,6 +1971,8 @@ gtk_popover_class_init (GtkPopoverClass *klass)
* Emitted whend the user activates the default widget.
*
* This is a [keybinding signal](class.SignalAction.html).
*
* The default binding for this signal is <kbd>Enter</kbd>.
*/
signals[ACTIVATE_DEFAULT] =
g_signal_new (I_("activate-default"),

View File

@ -131,6 +131,12 @@
* [method@WidgetClass.add_binding_action] or
* [method@Gtk.ShortcutController.add_shortcut].
*
* # Shortcuts and Gestures
*
* `GtkPopoverMenu` supports the following keyboard shortcuts:
*
* - <kbd>Space</kbd> activates the default widget.
*
* # CSS Nodes
*
* `GtkPopoverMenu` is just a subclass of `GtkPopover` that adds custom content

View File

@ -62,6 +62,12 @@
* Apart from signals for monitoring the parameters of the adjustment,
* `GtkRange` provides properties and methods for setting a
* fill level on range widgets. See [method@Gtk.Range.set_fill_level].
*
* # Shortcuts and Gestures
*
* The `GtkRange` slider is draggable. Holding the <kbd>Shift</kbd> key while
* dragging, or initiating the drag with a long-press will enable the
* fine-tuning mode.
*/

View File

@ -70,6 +70,15 @@
* the mark. It can be translated with the usual translatable and
* context attributes.
*
* # Shortcuts and Gestures
*
* `GtkPopoverMenu` supports the following keyboard shortcuts:
*
* - Arrow keys, <kbd>+</kbd> and <kbd>-</kbd> will increment or decrement
* by step, or by page when combined with <kbd>Ctrl</kbd>.
* - <kbd>PgUp</kbd> and <kbd>PgDn</kbd> will increment or decrement by page.
* - <kbd>Home</kbd> and <kbd>End</kbd> will set the minimum or maximum value.
*
* # CSS nodes
*
* ```

View File

@ -69,6 +69,12 @@
* applications, and GTK provides a [class@Gtk.VolumeButton] subclass that
* is tailored for this use case.
*
* # Shortcuts and Gestures
*
* The following signals have default keybindings:
*
* - [signal@Gtk.ScaleButton::popup]
*
* # CSS nodes
*
* ```

View File

@ -105,6 +105,12 @@
* can be turned off with the [property@Gtk.ScrolledWindow:overlay-scrolling]
* property.
*
* # Shortcuts and Gestures
*
* The following signals have default keybindings:
*
* - [signal@Gtk.ScrolledWindow::scroll-child]
*
* # CSS nodes
*
* `GtkScrolledWindow` has a main CSS node with name scrolledwindow.
@ -805,8 +811,8 @@ gtk_scrolled_window_class_init (GtkScrolledWindowClass *class)
* This is a [keybinding signal](class.SignalAction.html).
*
* The default bindings for this signal are
* `Ctrl + Tab` to move forward and `Ctrl + Shift + Tab` to
* move backward.
* <kbd>Ctrl</kbd>+<kbd>Tab</kbd> to move forward and
* <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Tab</kbd>` to move backward.
*/
signals[MOVE_FOCUS_OUT] =
g_signal_new (I_("move-focus-out"),

View File

@ -70,6 +70,12 @@
*
* [A simple example](https://gitlab.gnome.org/GNOME/gtk/tree/main/examples/search-bar.c)
*
* # Shortcuts and Gestures
*
* `GtkSearchBar` supports the following keyboard shortcuts:
*
* - <kbd>Escape</kbd> hides the search bar.
*
* # CSS nodes
*
* ```

View File

@ -78,6 +78,15 @@
* `GtkSearchEntry` provides only minimal API and should be used with
* the [iface@Gtk.Editable] API.
*
* ## Shortcuts and Gestures
*
* The following signals have default keybindings:
*
* - [signal@Gtk.SearchEntry::activate]
* - [signal@Gtk.SearchEntry::next-match]
* - [signal@Gtk.SearchEntry::previous-match]
* - [signal@Gtk.SearchEntry::stop-search]
*
* ## CSS Nodes
*
* ```
@ -528,7 +537,7 @@ gtk_search_entry_class_init (GtkSearchEntryClass *klass)
*
* Emitted when the entry is activated.
*
* The keybindings for this signal are all forms of the Enter key.
* The keybindings for this signal are all forms of the <kbd>Enter</kbd> key.
*/
signals[ACTIVATE] =
g_signal_new (I_("activate"),
@ -568,7 +577,7 @@ gtk_search_entry_class_init (GtkSearchEntryClass *klass)
* Applications should connect to it, to implement moving
* between matches.
*
* The default bindings for this signal is Ctrl-g.
* The default bindings for this signal is <kbd>Ctrl</kbd>+<kbd>g</kbd>.
*/
signals[NEXT_MATCH] =
g_signal_new (I_("next-match"),
@ -591,7 +600,8 @@ gtk_search_entry_class_init (GtkSearchEntryClass *klass)
* Applications should connect to it, to implement moving
* between matches.
*
* The default bindings for this signal is Ctrl-Shift-g.
* The default bindings for this signal is
* <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>g</kbd>.
*/
signals[PREVIOUS_MATCH] =
g_signal_new (I_("previous-match"),
@ -613,7 +623,7 @@ gtk_search_entry_class_init (GtkSearchEntryClass *klass)
* Applications should connect to it, to implement hiding
* the search entry in this case.
*
* The default bindings for this signal is Escape.
* The default bindings for this signal is <kbd>Escape</kbd>.
*/
signals[STOP_SEARCH] =
g_signal_new (I_("stop-search"),

View File

@ -62,6 +62,14 @@
*
* 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]
*/
struct _GtkShortcutsSection
@ -357,6 +365,10 @@ gtk_shortcuts_section_class_init (GtkShortcutsSectionClass *klass)
*
* Emitted when we change the current page.
*
* The default bindings for this signal are
* <kbd>Ctrl</kbd>+<kbd>PgUp</kbd>, <kbd>PgUp</kbd>,
* <kbd>Ctrl</kbd>+<kbd>PgDn</kbd>, <kbd>PgDn</kbd>.
*
* Returns: whether the page was changed
*/
signals[CHANGE_CURRENT_PAGE] =

View File

@ -93,7 +93,14 @@
*
* The .ui file for this example can be found [here](https://gitlab.gnome.org/GNOME/gtk/tree/main/demos/gtk-demo/shortcuts-builder.ui).
*
* ## CSS nodes
* # Shortcuts and Gestures
*
* The following signals have default keybindings:
*
* - [signal@Gtk.ShortcutsWindow::close]
* - [signal@Gtk.ShortcutsWindow::search]
*
* # CSS nodes
*
* `GtkShortcutsWindow` has a single CSS node with the name `window` and style
* class `.shortcuts`.
@ -807,7 +814,7 @@ gtk_shortcuts_window_class_init (GtkShortcutsWindowClass *klass)
*
* This is a [keybinding signal](class.SignalAction.html).
*
* The default binding for this signal is the Escape key.
* The default binding for this signal is the <kbd>Escape</kbd> key.
*/
signals[CLOSE] = g_signal_new (I_("close"),
G_TYPE_FROM_CLASS (klass),
@ -824,7 +831,7 @@ gtk_shortcuts_window_class_init (GtkShortcutsWindowClass *klass)
*
* This is a [keybinding signal](class.SignalAction.html).
*
* The default binding for this signal is Control-F.
* The default binding for this signal is <kbd>Control</kbd>+<kbd>F</kbd>.
*/
signals[SEARCH] = g_signal_new (I_("search"),
G_TYPE_FROM_CLASS (klass),

View File

@ -152,6 +152,12 @@
* }
* ```
*
* # Shortcuts and Gestures
*
* The following signals have default keybindings:
*
* - [signal@Gtk.SpinButton::change-value]
*
* # CSS nodes
*
* ```

View File

@ -43,6 +43,10 @@
*
* See [signal@Gtk.Switch::state-set] for details.
*
* # Shortcuts and Gestures
*
* `GtkSwitch` supports pan and drag gestures to move the slider.
*
* # CSS nodes
*
* ```

View File

@ -102,6 +102,47 @@
*
* If you need multi-line editable text, look at [class@Gtk.TextView].
*
* # Shortcuts and Gestures
*
* `GtkText` supports the following keyboard shortcuts:
*
* - <kbd>Shift</kbd>+<kbd>F10</kbd> or <kbd>Menu</kbd> opens the context menu.
* - <kbd>Ctrl</kbd>+<kbd>A</kbd> or <kbd>Ctrl</kbd>+<kbd>&sol;</kbd>
* selects all the text.
* - <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>A</kbd> or
* <kbd>Ctrl</kbd>+<kbd>&bsol;</kbd> unselects all.
* - <kbd>Ctrl</kbd>+<kbd>Z</kbd> undoes the last modification.
* - <kbd>Ctrl</kbd>+<kbd>Y</kbd> or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Z</kbd>
* redoes the last undone modification.
*
* Additionally, the following signals have default keybindings:
*
* - [signal@Gtk.Text::activate]
* - [signal@Gtk.Text::backspace]
* - [signal@Gtk.Text::copy-clipboard]
* - [signal@Gtk.Text::cut-clipboard]
* - [signal@Gtk.Text::delete-from-cursor]
* - [signal@Gtk.Text::insert-emoji]
* - [signal@Gtk.Text::move-cursor]
* - [signal@Gtk.Text::paste-clipboard]
* - [signal@Gtk.Text::toggle-overwrite]
*
* # Actions
*
* `GtkText` defines a set of built-in actions:
*
* - `clipboard.copy` copies the contents to the clipboard.
* - `clipboard.cut` copies the contents to the clipboard and deletes it from
* the widget.
* - `clipboard.paste` inserts the contents of the clipboard into the widget.
* - `menu.popup` opens the context menu.
* - `misc.insert-emoji` opens the Emoji chooser.
* - `misc.toggle-visibility` toggles the `GtkText`:visibility property.
* - `selection.delete` deletes the current selection.
* - `selection.select-all` selects all of the widgets content.
* - `text.redo` redoes the last change to the contents.
* - `text.undo` undoes the last change to the contents.
*
* # CSS nodes
*
* ```

View File

@ -74,6 +74,43 @@
* which gives an overview of all the objects and data types related to the
* text widget and how they work together.
*
* ## Shortcuts and Gestures
*
* `GtkTextView` supports the following keyboard shortcuts:
*
* - <kbd>Shift</kbd>+<kbd>F10</kbd> or <kbd>Menu</kbd> opens the context menu.
* - <kbd>Ctrl</kbd>+<kbd>Z</kbd> undoes the last modification.
* - <kbd>Ctrl</kbd>+<kbd>Y</kbd> or <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Z</kbd>
* redoes the last undone modification.
*
* Additionally, the following signals have default keybindings:
*
* - [signal@Gtk.TextView::backspace]
* - [signal@Gtk.TextView::copy-clipboard]
* - [signal@Gtk.TextView::cut-clipboard]
* - [signal@Gtk.TextView::delete-from-cursor]
* - [signal@Gtk.TextView::insert-emoji]
* - [signal@Gtk.TextView::move-cursor]
* - [signal@Gtk.TextView::paste-clipboard]
* - [signal@Gtk.TextView::select-all]
* - [signal@Gtk.TextView::toggle-cursor-visible]
* - [signal@Gtk.TextView::toggle-overwrite]
*
* ## Actions
*
* `GtkTextView` defines a set of built-in actions:
*
* - `clipboard.copy` copies the contents to the clipboard.
* - `clipboard.cut` copies the contents to the clipboard and deletes it from
* the widget.
* - `clipboard.paste` inserts the contents of the clipboard into the widget.
* - `menu.popup` opens the context menu.
* - `misc.insert-emoji` opens the Emoji chooser.
* - `selection.delete` deletes the current selection.
* - `selection.select-all` selects all of the widgets content.
* - `text.redo` redoes the last change to the contents.
* - `text.undo` undoes the last change to the contents.
*
* ## CSS nodes
*
* ```

View File

@ -66,6 +66,28 @@
* the model of the treelistrow, to hide the expander for rows without children,
* even if the row is expandable.
*
* ## Shortcuts and Gestures
*
* `GtkTreeExpander` supports the following keyboard shortcuts:
*
* - <kbd>+</kbd> or <kbd>*</kbd> expands the expander.
* - <kbd>-</kbd> or <kbd>/</kbd> collapses the expander.
* - Left and right arrow keys, when combined with <kbd>Shift</kbd> or
* <kbd>Ctrl</kbd>+<kbd>Shift</kbd>, will expand or collapse, depending on
* the locale's text direction.
* - <kbd>Ctrl</kbd>+<kbd></kbd> toggles the expander state.
*
* The row can also expand on drag gestures.
*
* ## Actions
*
* `GtkTreeExpander` defines a set of built-in actions:
*
* - `listitem.expand` expands the expander if it can be expanded.
* - `listitem.collapse` collapses the expander.
* - `listitem.toggle-expand` tries to expand the expander if it was collapsed
* or collapses it if it was expanded.
*
* ## CSS nodes
*
* ```

View File

@ -123,6 +123,28 @@
* setting a child as the titlebar by specifying titlebar as the type
* attribute of a `<child>` element.
*
* # Shortcuts and Gestures
*
* `GtkWindow` supports the following keyboard shortcuts:
*
* - <kbd>F10</kbd> activates the menubar, if present.
* - <kbd>Alt</kbd> makes the mnemonics visible while pressed.
*
* The following signals have default keybindings:
*
* - [signal@Gtk.Window::activate-default]
* - [signal@Gtk.Window::activate-focus]
* - [signal@Gtk.Window::enable-debugging]
*
* # Actions
*
* `GtkWindow` defines a set of built-in actions:
*
* - `default.activate` activates the default widget.
* - `window.minimize` minimizes the window.
* - `window.toggle-maximized` maximizes or restores the window.
* - `window.close` closes the window.
*
* # CSS nodes
*
* ```
@ -158,14 +180,6 @@
* Until GTK 4.10, `GtkWindow` used the `GTK_ACCESSIBLE_ROLE_WINDOW` role.
*
* Since GTK 4.12, `GtkWindow` uses the `GTK_ACCESSIBLE_ROLE_APPLICATION` role.
*
* # Actions
*
* `GtkWindow` defines a set of built-in actions:
* - `default.activate`: Activate the default widget.
* - `window.minimize`: Minimize the window.
* - `window.toggle-maximized`: Maximize or restore the window.
* - `window.close`: Close the window.
*/
#define MENU_BAR_ACCEL GDK_KEY_F10
@ -1075,6 +1089,8 @@ gtk_window_class_init (GtkWindowClass *klass)
* widget of @window.
*
* This is a [keybinding signal](class.SignalAction.html).
*
* The default binding for this signal is <kbd></kbd>.
*/
window_signals[ACTIVATE_FOCUS] =
g_signal_new (I_("activate-focus"),
@ -1094,6 +1110,8 @@ gtk_window_class_init (GtkWindowClass *klass)
* of @window.
*
* This is a [keybinding signal](class.SignalAction.html).
*
* The keybindings for this signal are all forms of the <kbd>Enter</kbd> key.
*/
window_signals[ACTIVATE_DEFAULT] =
g_signal_new (I_("activate-default"),
@ -1138,8 +1156,9 @@ gtk_window_class_init (GtkWindowClass *klass)
*
* This is a [keybinding signal](class.SignalAction.html).
*
* The default bindings for this signal are Ctrl-Shift-I
* and Ctrl-Shift-D.
* The default bindings for this signal are
* <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>I</kbd> and
* <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd>.
*
* Return: %TRUE if the key binding was handled
*/