Commit e848df06 authored by Matthias Clasen's avatar Matthias Clasen

Small additions and corrections

svn path=/trunk/; revision=18449
parent 981127c7
2007-07-11 Matthias Clasen <mclasen@redhat.com>
* gtk/tmpl/gtkbox.sgml:
* gtk/tmpl/gtksignal.sgml:
* gtk/tmpl/gtkaboutdialog.sgml:
* gtk/tmpl/gtkbindings.sgml:
* gtk/tmpl/gtklabel.sgml:
* gtk/tmpl/gtkstatusbar.sgml: Small additions and corrections.
2007-07-11 Matthias Clasen <mclasen@redhat.com> 2007-07-11 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Additions * gtk/gtk-sections.txt: Additions
......
...@@ -413,12 +413,10 @@ link is activated. ...@@ -413,12 +413,10 @@ link is activated.
</para> </para>
@about: the #GtkAboutDialog in which the link was activated @about: the #GtkAboutDialog in which the link was activated
@link_: @link_: the URL or email address to which the activated link points
@data: user data that was passed when the function was registered @data: user data that was passed when the function was registered
with gtk_about_dialog_set_email_hook() or with gtk_about_dialog_set_email_hook() or
gtk_about_dialog_set_url_hook() gtk_about_dialog_set_url_hook()
<!-- # Unused Parameters # -->
@link: the URL or email address to whiche the activated link points
<!-- ##### FUNCTION gtk_about_dialog_set_email_hook ##### --> <!-- ##### FUNCTION gtk_about_dialog_set_email_hook ##### -->
......
...@@ -6,10 +6,10 @@ Key bindings for individual widgets ...@@ -6,10 +6,10 @@ Key bindings for individual widgets
<!-- ##### SECTION Long_Description ##### --> <!-- ##### SECTION Long_Description ##### -->
<para> <para>
GtkBinding provides a mechanism for configuring Gtk+ key bindings through RC files. GtkBinding provides a mechanism for configuring GTK+ key bindings through
This eases key binding adjustments for application developers as well as users and RC files. This eases key binding adjustments for application developers as
provides Gtk+ users or administrators with high key binding configurability which well as users and provides GTK+ users or administrators with high key
requires no application or toolkit side changes. binding configurability which requires no application or toolkit side changes.
</para> </para>
<refsect2> <refsect2>
...@@ -17,20 +17,23 @@ requires no application or toolkit side changes. ...@@ -17,20 +17,23 @@ requires no application or toolkit side changes.
<title>Installing a key binding</title> <title>Installing a key binding</title>
<para> <para>
A resource file binding consists of a 'binding' definition and a match statement to A resource file binding consists of a 'binding' definition and a match
apply the binding to specific widget types. Details on the matching mechanism are statement to apply the binding to specific widget types. Details on the
described under <link linkend="gtkrc-pathnames-and-patterns">Pathnames and patterns</link>. matching mechanism are described under
Inside the binding definition, key combinations are bound to specific signal emissions <link linkend="gtkrc-pathnames-and-patterns">Pathnames and patterns</link>.
on the target widget. Key combinations are strings consisting of an optional #GdkModifierType Inside the binding definition, key combinations are bound to specific signal
name and <link linkend="gdk-Keyboard-Handling">key names</link> such as those defined in emissions on the target widget. Key combinations are strings consisting of
<filename>&lt;gdk/gdkkeysyms.h&gt;</filename> or returned from gdk_keyval_name(), they have an optional #GdkModifierType name and
to be parsable by gtk_accelerator_parse(). <link linkend="gdk-Keyboard-Handling">key names</link> such as those defined
Specifications of signal emissions consist of a string identifying the signal name, and in <filename>&lt;gdk/gdkkeysyms.h&gt;</filename> or returned from
a list of signal specific arguments in parenthesis. gdk_keyval_name(), they have to be parsable by gtk_accelerator_parse().
Specifications of signal emissions consist of a string identifying the signal
For example for binding Control and the left or right cursor keys of a #GtkEntry widget to the name, and a list of signal specific arguments in parenthesis.
#GtkEntry::move-cursor signal, so movement occurs in 3 letter steps, </para>
the following binding can be used: <para>
For example for binding Control and the left or right cursor keys of a
#GtkEntry widget to the #GtkEntry::move-cursor signal, so movement occurs
in 3 letter steps, the following binding can be used:
<informalexample><programlisting> <informalexample><programlisting>
binding "MoveCursor3" { binding "MoveCursor3" {
...@@ -49,12 +52,12 @@ class "GtkEntry" binding "MoveCursor3" ...@@ -49,12 +52,12 @@ class "GtkEntry" binding "MoveCursor3"
<anchor id="gtk-bindings-unbind"/> <anchor id="gtk-bindings-unbind"/>
<title>Unbinding existing key bindings</title> <title>Unbinding existing key bindings</title>
<para> <para>
Gtk+ already defines a number of useful bindings for the widgets it provides. GTK+ already defines a number of useful bindings for the widgets it provides.
Because custom bindings set up in RC files take precedence over the default bindings Because custom bindings set up in RC files take precedence over the default
shipped with Gtk+, overriding existing bindings as demonstrated in bindings shipped with GTK+, overriding existing bindings as demonstrated in
<link linkend="gtk-bindings-install">Installing a key binding</link> <link linkend="gtk-bindings-install">Installing a key binding</link>
works as expected. The same mechanism can not be used to "unbind" existing bindings, works as expected. The same mechanism can not be used to "unbind" existing
however. bindings, however.
<informalexample><programlisting> <informalexample><programlisting>
binding "MoveCursor3" { binding "MoveCursor3" {
...@@ -64,14 +67,15 @@ binding "MoveCursor3" { ...@@ -64,14 +67,15 @@ binding "MoveCursor3" {
class "GtkEntry" binding "MoveCursor3" class "GtkEntry" binding "MoveCursor3"
</programlisting></informalexample> </programlisting></informalexample>
The above example will not have the desired effect of causing "&lt;Control&gt;Right" The above example will not have the desired effect of causing
and "&lt;Control&gt;Left" key presses to be ignored by Gtk+. Instead, it just causes "&lt;Control&gt;Right" and "&lt;Control&gt;Left" key presses to be ignored
any existing bindings from the bindings set "MoveCursor3" to be deleted, so when by GTK+. Instead, it just causes any existing bindings from the bindings
"&lt;Control&gt;Right" or "&lt;Control&gt;Left" are pressed, no binding for these keys set "MoveCursor3" to be deleted, so when "&lt;Control&gt;Right" or
is found in binding set "MoveCursor3". Gtk+ will thus continue to search for matching "&lt;Control&gt;Left" are pressed, no binding for these keys is found in
key bindings, and will eventually lookup and find the default Gtk+ bindings for entries binding set "MoveCursor3". GTK+ will thus continue to search for matching
which implement word movement. To keep Gtk+ from activating its default bindings, the key bindings, and will eventually lookup and find the default GTK+ bindings
"unbind" keyword can be used like this: for entries which implement word movement. To keep GTK+ from activating its
default bindings, the "unbind" keyword can be used like this:
<informalexample><programlisting> <informalexample><programlisting>
binding "MoveCursor3" { binding "MoveCursor3" {
...@@ -81,12 +85,15 @@ binding "MoveCursor3" { ...@@ -81,12 +85,15 @@ binding "MoveCursor3" {
class "GtkEntry" binding "MoveCursor3" class "GtkEntry" binding "MoveCursor3"
</programlisting></informalexample> </programlisting></informalexample>
Now, Gtk+ will find a match when looking up "&lt;Control&gt;Right" and "&lt;Control&gt;Left" Now, GTK+ will find a match when looking up "&lt;Control&gt;Right" and
key presses before it resorts to its default bindings, and the match instructs it to abort "&lt;Control&gt;Left" key presses before it resorts to its default
("unbind") the search, so the key presses are not consumed by this widget. bindings, and the match instructs it to abort ("unbind") the search, so
As usual, further processing of the key presses, e.g. by an entries parent widget, the key presses are not consumed by this widget. As usual, further processing
is now possible. of the key presses, e.g. by an entry's parent widget, is now possible.
</para>
<para>
The "unbind" functionality has been introduced in GTK+ 2.12.
</para> </para>
</refsect2> </refsect2>
...@@ -104,7 +111,7 @@ is now possible. ...@@ -104,7 +111,7 @@ is now possible.
<varlistentry> <varlistentry>
<term><link linkend="Resource-Files">Resource Files</link> <term><link linkend="Resource-Files">Resource Files</link>
</term> </term>
<listitem><para>Gtk+ Resource Files - behavior and style definitions.</para></listitem> <listitem><para>GTK+ Resource Files - behavior and style definitions.</para></listitem>
</varlistentry> </varlistentry>
</variablelist> </variablelist>
...@@ -117,9 +124,10 @@ is now possible. ...@@ -117,9 +124,10 @@ is now possible.
<para> <para>
A binding set maintains a list of activatable key bindings. A binding set maintains a list of activatable key bindings.
A single binding set can match multiple types of widgets. A single binding set can match multiple types of widgets.
Similar to styles, widgets can be mapped by widget name paths, widget class paths or widget class types. Similar to styles, widgets can be mapped by widget name paths, widget
When a binding within a set is matched upon activation, an action signal is emitted on class paths or widget class types. When a binding within a set is
the target widget to carry out the actual activation. matched upon activation, an action signal is emitted on the target
widget to carry out the actual activation.
</para> </para>
@set_name: unique binding set name @set_name: unique binding set name
...@@ -133,7 +141,8 @@ the target widget to carry out the actual activation. ...@@ -133,7 +141,8 @@ the target widget to carry out the actual activation.
<!-- ##### STRUCT GtkBindingEntry ##### --> <!-- ##### STRUCT GtkBindingEntry ##### -->
<para> <para>
Each key binding element of a binding sets binding list is represented by a #GtkBindingEntry. Each key binding element of a binding sets binding list is represented by
a #GtkBindingEntry.
</para> </para>
@keyval: key value to match @keyval: key value to match
...@@ -141,7 +150,7 @@ Each key binding element of a binding sets binding list is represented by a #Gtk ...@@ -141,7 +150,7 @@ Each key binding element of a binding sets binding list is represented by a #Gtk
@binding_set: binding set this entry belongs to @binding_set: binding set this entry belongs to
@destroyed: implementation detail @destroyed: implementation detail
@in_emission: implementation detail @in_emission: implementation detail
@marks_unbound: @marks_unbound: implementation detail
@set_next: linked list of entries maintained by binding set @set_next: linked list of entries maintained by binding set
@hash_next: implementation detail @hash_next: implementation detail
@signals: action signals of this entry @signals: action signals of this entry
......
...@@ -179,7 +179,7 @@ application.) ...@@ -179,7 +179,7 @@ application.)
%TRUE by default. %TRUE by default.
@pack: one of #GtkPackType indicating whether the child is packed with @pack: one of #GtkPackType indicating whether the child is packed with
reference to the start (top/left) or end (bottom/right) of the GtkBox. reference to the start (top/left) or end (bottom/right) of the GtkBox.
@is_secondary: @is_secondary: %TRUE if the child is secondary
<!-- ##### FUNCTION gtk_box_pack_start ##### --> <!-- ##### FUNCTION gtk_box_pack_start ##### -->
<para> <para>
......
...@@ -373,7 +373,7 @@ Parses the given string for underscores and converts the next ...@@ -373,7 +373,7 @@ Parses the given string for underscores and converts the next
character to an underlined character. The last character that character to an underlined character. The last character that
was underlined will have its lower-cased accelerator keyval returned (i.e. was underlined will have its lower-cased accelerator keyval returned (i.e.
&quot;_File&quot; would return the keyval for &quot;f&quot;. This is &quot;_File&quot; would return the keyval for &quot;f&quot;. This is
probably only used within the Gtk+ library itself for menu items and such. probably only used within the GTK+ library itself for menu items and such.
</para> </para>
@label: The #GtkLabel you want to affect. @label: The #GtkLabel you want to affect.
...@@ -402,7 +402,7 @@ probably only used within the Gtk+ library itself for menu items and such. ...@@ -402,7 +402,7 @@ probably only used within the Gtk+ library itself for menu items and such.
<!-- ##### MACRO gtk_label_set ##### --> <!-- ##### MACRO gtk_label_set ##### -->
<para> <para>
Aliases gtk_label_set_text(). Probably used for backward compatibility with Aliases gtk_label_set_text(). Probably used for backward compatibility with
Gtk+ 1.0.x. GTK+ 1.0.x.
</para> </para>
......
...@@ -15,7 +15,7 @@ It may also have a resize grip (a triangular area in the lower right corner) ...@@ -15,7 +15,7 @@ It may also have a resize grip (a triangular area in the lower right corner)
which can be clicked on to resize the window containing the statusbar. which can be clicked on to resize the window containing the statusbar.
</para> </para>
<para> <para>
Status bars in Gtk+ maintain a stack of messages. The message at Status bars in GTK+ maintain a stack of messages. The message at
the top of the each bar's stack is the one that will currently be displayed. the top of the each bar's stack is the one that will currently be displayed.
</para> </para>
<para> <para>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment