<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkShortcutsWindow">
<refmeta>
<refentrytitle role="top_of_page" id="GtkShortcutsWindow.top_of_page">GtkShortcutsWindow</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkShortcutsWindow</refname>
<refpurpose>Toplevel which shows help for shortcuts</refpurpose>
</refnamediv>

<refsect1 id="GtkShortcutsWindow.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkShortcutsWindow--section-name">section-name</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkShortcutsWindow--view-name">view-name</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkShortcutsWindow.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkShortcutsWindow-close">close</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkShortcutsWindow-search">search</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkShortcutsWindow.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword">struct</entry><entry role="function_name"><link linkend="GtkShortcutsWindow-struct">GtkShortcutsWindow</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkShortcutsWindow.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWidget">GtkWidget</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkWindow">GtkWindow</link>
                <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkShortcutsWindow
</screen>
</refsect1>
<refsect1 id="GtkShortcutsWindow.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkShortcutsWindow implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>,  <link linkend="GtkBuildable">GtkBuildable</link>,  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link>,  <link linkend="GtkNative">GtkNative</link>,  <link linkend="GtkShortcutManager">GtkShortcutManager</link> and  <link linkend="GtkRoot">GtkRoot</link>.</para>

</refsect1>

<refsect1 id="GtkShortcutsWindow.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkShortcutsWindow.description" role="desc">
<title role="desc.title">Description</title>
<para>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.</para>
<para>Additionally, the shortcuts can be filtered by the current view, to avoid
showing information that is not relevant in the current application context.</para>
<para>The recommended way to construct a GtkShortcutsWindow is with GtkBuilder,
by populating a <link linkend="GtkShortcutsWindow"><type>GtkShortcutsWindow</type></link> with one or more <link linkend="GtkShortcutsSection"><type>GtkShortcutsSection</type></link>
objects, which contain <link linkend="GtkShortcutsGroups"><type>GtkShortcutsGroups</type></link> that in turn contain objects of
class <link linkend="GtkShortcutsShortcut"><type>GtkShortcutsShortcut</type></link>.</para>
<refsect2><title>A simple example:</title><para><inlinemediaobject><imageobject><imagedata fileref="gedit-shortcuts.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject></para>
<para>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.</para>
<para>The .ui file for this example can be found <ulink url="https://gitlab.gnome.org/GNOME/gtk/tree/master/demos/gtk-demo/shortcuts-gedit.ui">here</ulink>.</para>
</refsect2>
<refsect2><title>An example with multiple views:</title><para><inlinemediaobject><imageobject><imagedata fileref="clocks-shortcuts.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject></para>
<para>This example shows a <link linkend="GtkShortcutsWindow"><type>GtkShortcutsWindow</type></link> that has been configured to show only
the shortcuts relevant to the "stopwatch" view.</para>
<para>The .ui file for this example can be found <ulink url="https://gitlab.gnome.org/GNOME/gtk/tree/master/demos/gtk-demo/shortcuts-clocks.ui">here</ulink>.</para>
</refsect2>
<refsect2><title>An example with multiple sections:</title><para><inlinemediaobject><imageobject><imagedata fileref="builder-shortcuts.png"></imagedata></imageobject><textobject><phrase></phrase></textobject></inlinemediaobject></para>
<para>This example shows a <link linkend="GtkShortcutsWindow"><type>GtkShortcutsWindow</type></link> with two sections, "Editor Shortcuts"
and "Terminal Shortcuts".</para>
<para>The .ui file for this example can be found <ulink url="https://gitlab.gnome.org/GNOME/gtk/tree/master/demos/gtk-demo/shortcuts-builder.ui">here</ulink>.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkShortcutsWindow.functions_details" role="details">
<title role="details.title">Functions</title>
<para />
</refsect1>
<refsect1 id="GtkShortcutsWindow.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkShortcutsWindow-struct" role="struct">
<title>struct GtkShortcutsWindow</title>
<indexterm zone="GtkShortcutsWindow-struct"><primary>GtkShortcutsWindow</primary></indexterm>
<programlisting language="C">struct GtkShortcutsWindow;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkShortcutsWindow.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkShortcutsWindow--section-name" role="property"><title>The <literal>“section-name”</literal> property</title>
<indexterm zone="GtkShortcutsWindow--section-name"><primary>GtkShortcutsWindow:section-name</primary></indexterm>
<programlisting>  “section-name”             <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>The name of the section to show.</para>
<para>This should be the section-name of one of the <link linkend="GtkShortcutsSection"><type>GtkShortcutsSection</type></link>
objects that are in this shortcuts window.</para>
<para>Owner: GtkShortcutsWindow</para>
<para>Flags: Read / Write</para>
<para>Default value: "internal-search"</para>
</refsect2>
<refsect2 id="GtkShortcutsWindow--view-name" role="property"><title>The <literal>“view-name”</literal> property</title>
<indexterm zone="GtkShortcutsWindow--view-name"><primary>GtkShortcutsWindow:view-name</primary></indexterm>
<programlisting>  “view-name”                <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>The view name by which to filter the contents.</para>
<para>This should correspond to the <link linkend="GtkShortcutsGroup--view"><type>“view”</type></link> property of some of
the <link linkend="GtkShortcutsGroup"><type>GtkShortcutsGroup</type></link> objects that are inside this shortcuts window.</para>
<para>Set this to <link linkend="NULL:CAPS"><literal>NULL</literal></link> to show all groups.</para>
<para>Owner: GtkShortcutsWindow</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>

</refsect1>
<refsect1 id="GtkShortcutsWindow.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkShortcutsWindow-close" role="signal"><title>The <literal>“close”</literal> signal</title>
<indexterm zone="GtkShortcutsWindow-close"><primary>GtkShortcutsWindow::close</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkShortcutsWindow"><type>GtkShortcutsWindow</type></link> *shortcutswindow,
               <link linkend="gpointer"><type>gpointer</type></link>            user_data)</programlisting>
<para>The ::close signal is a
<link linkend="GtkBindingSignal">keybinding signal</link>
which gets emitted when the user uses a keybinding to close
the window.</para>
<para>The default binding for this signal is the Escape key.</para>
<refsect3 id="GtkShortcutsWindow-close.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkShortcutsWindow-search" role="signal"><title>The <literal>“search”</literal> signal</title>
<indexterm zone="GtkShortcutsWindow-search"><primary>GtkShortcutsWindow::search</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkShortcutsWindow"><type>GtkShortcutsWindow</type></link> *shortcutswindow,
               <link linkend="gpointer"><type>gpointer</type></link>            user_data)</programlisting>
<para>The ::search signal is a
<link linkend="GtkBindingSignal">keybinding signal</link>
which gets emitted when the user uses a keybinding to start a search.</para>
<para>The default binding for this signal is Control-F.</para>
<refsect3 id="GtkShortcutsWindow-search.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2>
</refsect1>

</refentry>
