gtk3/docs/reference/gtk/html/GtkShortcutsWindow.html
2020-12-11 10:15:31 +00:00

253 lines
14 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GtkShortcutsWindow: GTK+ 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GTK+ 3 Reference Manual">
<link rel="up" href="ShortcutsOverview.html" title="Shortcuts Overview">
<link rel="prev" href="ShortcutsOverview.html" title="Shortcuts Overview">
<link rel="next" href="GtkShortcutsSection.html" title="GtkShortcutsSection">
<meta name="generator" content="GTK-Doc V1.33.0 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#GtkShortcutsWindow.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
<a href="#GtkShortcutsWindow.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_interfaces">  <span class="dim">|</span> 
<a href="#GtkShortcutsWindow.implemented-interfaces" class="shortcut">Implemented Interfaces</a></span><span id="nav_properties">  <span class="dim">|</span> 
<a href="#GtkShortcutsWindow.properties" class="shortcut">Properties</a></span><span id="nav_signals">  <span class="dim">|</span> 
<a href="#GtkShortcutsWindow.signals" class="shortcut">Signals</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ShortcutsOverview.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ShortcutsOverview.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GtkShortcutsSection.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="GtkShortcutsWindow"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="GtkShortcutsWindow.top_of_page"></a>GtkShortcutsWindow</span></h2>
<p>GtkShortcutsWindow — Toplevel which shows help for shortcuts</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="GtkShortcutsWindow.properties"></a><h2>Properties</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="properties_type">
<col width="300px" class="properties_name">
<col width="200px" class="properties_flags">
</colgroup>
<tbody>
<tr>
<td class="property_type">
<span class="type">char</span> *</td>
<td class="property_name"><a class="link" href="GtkShortcutsWindow.html#GtkShortcutsWindow--section-name" title="The “section-name” property">section-name</a></td>
<td class="property_flags">Read / Write</td>
</tr>
<tr>
<td class="property_type">
<span class="type">char</span> *</td>
<td class="property_name"><a class="link" href="GtkShortcutsWindow.html#GtkShortcutsWindow--view-name" title="The “view-name” property">view-name</a></td>
<td class="property_flags">Read / Write</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkShortcutsWindow.signals"></a><h2>Signals</h2>
<div class="informaltable"><table class="informaltable" border="0">
<colgroup>
<col width="150px" class="signal_proto_type">
<col width="300px" class="signal_proto_name">
<col width="200px" class="signal_proto_flags">
</colgroup>
<tbody>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkShortcutsWindow.html#GtkShortcutsWindow-close" title="The “close” signal">close</a></td>
<td class="signal_flags">Action</td>
</tr>
<tr>
<td class="signal_type"><span class="returnvalue">void</span></td>
<td class="signal_name"><a class="link" href="GtkShortcutsWindow.html#GtkShortcutsWindow-search" title="The “search” signal">search</a></td>
<td class="signal_flags">Action</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkShortcutsWindow.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody><tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="GtkShortcutsWindow.html#GtkShortcutsWindow-struct" title="struct GtkShortcutsWindow">GtkShortcutsWindow</a></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect1">
<a name="GtkShortcutsWindow.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen"> GObject
<span class="lineart">╰──</span> GInitiallyUnowned
<span class="lineart">╰──</span> <a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>
<span class="lineart">╰──</span> <a class="link" href="GtkContainer.html" title="GtkContainer">GtkContainer</a>
<span class="lineart">╰──</span> <a class="link" href="GtkBin.html" title="GtkBin">GtkBin</a>
<span class="lineart">╰──</span> <a class="link" href="GtkWindow.html" title="GtkWindow">GtkWindow</a>
<span class="lineart">╰──</span> GtkShortcutsWindow
</pre>
</div>
<div class="refsect1">
<a name="GtkShortcutsWindow.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
GtkShortcutsWindow implements
AtkImplementorIface and <a class="link" href="GtkBuildable.html" title="GtkBuildable">GtkBuildable</a>.</p>
</div>
<div class="refsect1">
<a name="GtkShortcutsWindow.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gtk/gtk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="GtkShortcutsWindow.description"></a><h2>Description</h2>
<p>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.</p>
<p>Additionally, the shortcuts can be filtered by the current view, to avoid
showing information that is not relevant in the current application context.</p>
<p>The recommended way to construct a GtkShortcutsWindow is with GtkBuilder,
by populating a <a class="link" href="GtkShortcutsWindow.html" title="GtkShortcutsWindow"><span class="type">GtkShortcutsWindow</span></a> with one or more <a class="link" href="GtkShortcutsSection.html" title="GtkShortcutsSection"><span class="type">GtkShortcutsSection</span></a>
objects, which contain <a href="GtkShortcutsGroup.html#GtkShortcutsGroup-struct"><span class="type">GtkShortcutsGroups</span></a> that in turn contain objects of
class <a class="link" href="GtkShortcutsShortcut.html" title="GtkShortcutsShortcut"><span class="type">GtkShortcutsShortcut</span></a>.</p>
<div class="refsect2">
<a name="id-1.3.18.2.9.5"></a><h3>A simple example:</h3>
<p><span class="inlinemediaobject"><img src="gedit-shortcuts.png"></span></p>
<p>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.</p>
<p>The .ui file for this example can be found <a class="ulink" href="https://git.gnome.org/browse/gtk+/tree/demos/gtk-demo/shortcuts-gedit.ui" target="_top">here</a>.</p>
</div>
<hr>
<div class="refsect2">
<a name="id-1.3.18.2.9.6"></a><h3>An example with multiple views:</h3>
<p><span class="inlinemediaobject"><img src="clocks-shortcuts.png"></span></p>
<p>This example shows a <a class="link" href="GtkShortcutsWindow.html" title="GtkShortcutsWindow"><span class="type">GtkShortcutsWindow</span></a> that has been configured to show only
the shortcuts relevant to the "stopwatch" view.</p>
<p>The .ui file for this example can be found <a class="ulink" href="https://git.gnome.org/browse/gtk+/tree/demos/gtk-demo/shortcuts-clocks.ui" target="_top">here</a>.</p>
</div>
<hr>
<div class="refsect2">
<a name="id-1.3.18.2.9.7"></a><h3>An example with multiple sections:</h3>
<p><span class="inlinemediaobject"><img src="builder-shortcuts.png"></span></p>
<p>This example shows a <a class="link" href="GtkShortcutsWindow.html" title="GtkShortcutsWindow"><span class="type">GtkShortcutsWindow</span></a> with two sections, "Editor Shortcuts"
and "Terminal Shortcuts".</p>
<p>The .ui file for this example can be found <a class="ulink" href="https://git.gnome.org/browse/gtk+/tree/demos/gtk-demo/shortcuts-builder.ui" target="_top">here</a>.</p>
</div>
</div>
<div class="refsect1">
<a name="GtkShortcutsWindow.functions_details"></a><h2>Functions</h2>
<p></p>
</div>
<div class="refsect1">
<a name="GtkShortcutsWindow.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GtkShortcutsWindow-struct"></a><h3>struct GtkShortcutsWindow</h3>
<pre class="programlisting">struct GtkShortcutsWindow;</pre>
</div>
</div>
<div class="refsect1">
<a name="GtkShortcutsWindow.property-details"></a><h2>Property Details</h2>
<div class="refsect2">
<a name="GtkShortcutsWindow--section-name"></a><h3>The <code class="literal">“section-name”</code> property</h3>
<pre class="programlisting"> “section-name” <span class="type">char</span> *</pre>
<p>The name of the section to show.</p>
<p>This should be the section-name of one of the <a class="link" href="GtkShortcutsSection.html" title="GtkShortcutsSection"><span class="type">GtkShortcutsSection</span></a>
objects that are in this shortcuts window.</p>
<p>Owner: GtkShortcutsWindow</p>
<p>Flags: Read / Write</p>
<p>Default value: "internal-search"</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkShortcutsWindow--view-name"></a><h3>The <code class="literal">“view-name”</code> property</h3>
<pre class="programlisting"> “view-name” <span class="type">char</span> *</pre>
<p>The view name by which to filter the contents.</p>
<p>This should correspond to the <a class="link" href="GtkShortcutsGroup.html#GtkShortcutsGroup--view" title="The “view” property"><span class="type">“view”</span></a> property of some of
the <a class="link" href="GtkShortcutsGroup.html" title="GtkShortcutsGroup"><span class="type">GtkShortcutsGroup</span></a> objects that are inside this shortcuts window.</p>
<p>Set this to <code class="literal">NULL</code> to show all groups.</p>
<p>Owner: GtkShortcutsWindow</p>
<p>Flags: Read / Write</p>
<p>Default value: NULL</p>
</div>
</div>
<div class="refsect1">
<a name="GtkShortcutsWindow.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2">
<a name="GtkShortcutsWindow-close"></a><h3>The <code class="literal">“close”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkShortcutsWindow.html" title="GtkShortcutsWindow"><span class="type">GtkShortcutsWindow</span></a> *shortcutswindow,
<span class="type">gpointer</span> user_data)</pre>
<p>The ::close signal is a
<a class="link" href="gtk3-Bindings.html#GtkBindingSignal" title="struct GtkBindingSignal">keybinding signal</a>
which gets emitted when the user uses a keybinding to close
the window.</p>
<p>The default binding for this signal is the Escape key.</p>
<div class="refsect3">
<a name="GtkShortcutsWindow-close.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p>Flags: Action</p>
</div>
<hr>
<div class="refsect2">
<a name="GtkShortcutsWindow-search"></a><h3>The <code class="literal">“search”</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
user_function (<a class="link" href="GtkShortcutsWindow.html" title="GtkShortcutsWindow"><span class="type">GtkShortcutsWindow</span></a> *shortcutswindow,
<span class="type">gpointer</span> user_data)</pre>
<p>The ::search signal is a
<a class="link" href="gtk3-Bindings.html#GtkBindingSignal" title="struct GtkBindingSignal">keybinding signal</a>
which gets emitted when the user uses a keybinding to start a search.</p>
<p>The default binding for this signal is Control-F.</p>
<div class="refsect3">
<a name="GtkShortcutsWindow-search.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>user_data</p></td>
<td class="parameter_description"><p>user data set when the signal handler was connected.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p>Flags: Action</p>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.0</div>
</body>
</html>