diff options
author | Johan Dahlin <jdahlin@async.com.br> | 2008-03-07 00:08:16 +0000 |
---|---|---|
committer | Johan Dahlin <johan@src.gnome.org> | 2008-03-07 00:08:16 +0000 |
commit | 61be2a71275fadd9e241202875de2dfe45c63032 (patch) | |
tree | 8575d5ea7286e3ea0c7f675f9ddc3d2ca44fdae7 /docs | |
parent | 6f9bcaa8b7e92ee63cdeb7011741baa0847e2a41 (diff) | |
download | gdk-pixbuf-61be2a71275fadd9e241202875de2dfe45c63032.tar.gz |
Implement GtkBuildable on GtkIconFactory, to make it possible to register
2008-03-06 Johan Dahlin <jdahlin@async.com.br>
* docs/reference/gtk/tmpl/gtkiconfactory.sgml:
* gtk/gtkbuilder.c:
* gtk/gtkbuilderprivate.h:
* gtk/gtkiconfactory.c:
* tests/buildertest.c:
Implement GtkBuildable on GtkIconFactory, to make
it possible to register custom stock icons.
Fixes #517066
svn path=/trunk/; revision=19726
Diffstat (limited to 'docs')
-rw-r--r-- | docs/reference/gtk/tmpl/gtkiconfactory.sgml | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/docs/reference/gtk/tmpl/gtkiconfactory.sgml b/docs/reference/gtk/tmpl/gtkiconfactory.sgml index 88a7229a3..db160c208 100644 --- a/docs/reference/gtk/tmpl/gtkiconfactory.sgml +++ b/docs/reference/gtk/tmpl/gtkiconfactory.sgml @@ -35,6 +35,77 @@ gtk_widget_render_icon(). These functions take the theme into account when looking up the icon to use for a given stock ID. </para> +<refsect2 id="GtkIconFactory-BUILDER-UI"><title>GtkIconFactory as GtkBuildable</title> +<para> +GtkIconFactory supports a custom <sources> element, which +can contain multiple <source> elements. +The following attributes are allowed: +<variablelist> + +<varlistentry> +<term>stock-id</term> +<listitem><para>The stock id of the source, a string. +This attribute is mandatory</para></listitem> +</varlistentry> + +<varlistentry> +<term>filename</term> +<listitem><para>The filename of the source, a string. +This attribute is mandatory</para> +</listitem> +</varlistentry> + +<varlistentry> +<term>icon-name</term> +<listitem><para>The icon name for the source, a string. +This attribute is optional.</para> +</listitem> +</varlistentry> + +<varlistentry> +<term>size</term> +<listitem><para>Size of the icon, a #GtkIconSize enum value. +This attribute is optional.</para> +</listitem> +</varlistentry> + +<varlistentry> +<term>direction</term> +<listitem><para>Direction of the source, a #GtkTextDirection enum value. +This attribute is optional.</para> +</listitem> +</varlistentry> + +<varlistentry> +<term>state</term> +<listitem><para>State of the source, a #GtkStateType enum value. +This attribute is optional.</para> +</listitem> +</varlistentry> + +</variablelist> + +</para> +<example> +<title>A <structname>GtkIconFactory</structname> UI definition fragment.</title> +<programlisting><![CDATA[ +<object class="GtkIconFactory" id="iconfactory1"> + <sources> + <source stock-id="apple-red" filename="apple-red.png"/> + </sources> +</object> +<object class="GtkWindow" id="window1"> + <child> + <object class="GtkButton" id="apple_button"> + <property name="label">apple-red</property> + <property name="use-stock">True</property> + </object> + </child> +</object> +]]></programlisting> +</example> +</refsect2> + <!-- ##### SECTION See_Also ##### --> <para> |