diff options
author | John Finlay <finlay@src.gnome.org> | 2004-01-29 03:21:57 +0000 |
---|---|---|
committer | John Finlay <finlay@src.gnome.org> | 2004-01-29 03:21:57 +0000 |
commit | f01847be431d053083e90aded7e8e84e0e7057be (patch) | |
tree | 2df3b778d539b295b85e8b3ca53ac47e00ee8c38 /docs/reference/pygtk-gtkimage.xml | |
parent | a058e5a9a2f79e6a8ae67fa374ac09a46e7ea157 (diff) | |
download | pygtk-f01847be431d053083e90aded7e8e84e0e7057be.tar.gz |
Initial revision
Diffstat (limited to 'docs/reference/pygtk-gtkimage.xml')
-rw-r--r-- | docs/reference/pygtk-gtkimage.xml | 1310 |
1 files changed, 1310 insertions, 0 deletions
diff --git a/docs/reference/pygtk-gtkimage.xml b/docs/reference/pygtk-gtkimage.xml new file mode 100644 index 00000000..227d3b38 --- /dev/null +++ b/docs/reference/pygtk-gtkimage.xml @@ -0,0 +1,1310 @@ +<?xml version="1.0" standalone="no"?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"> + +<refentry id="class-gtkimage"> + <refnamediv> + <refname>gtk.Image</refname> + <refpurpose>A widget displaying an image +</refpurpose> + </refnamediv> + + <refsect1> + <title>Synopsis</title> + + <classsynopsis language="python"> + <ooclass><classname>gtk.Image</classname></ooclass> + <ooclass><classname><link +linkend="class-gtkmisc">gtk.Misc</link></classname></ooclass> + <constructorsynopsis language="python"> + <methodname><link +linkend="constructor-gtkimage">gtk.Image</link></methodname> + <methodparam></methodparam> </constructorsynopsis> + <methodsynopsis language="python"> + <methodname><link +linkend="method-gtkimage--set-from-pixmap">set_from_pixmap</link></methodname> + <methodparam><parameter + role="keyword">pixmap</parameter></methodparam> + <methodparam><parameter + role="keyword">mask</parameter></methodparam> + </methodsynopsis> + <methodsynopsis language="python"> + <methodname><link +linkend="method-gtkimage--set-from-image">set_from_image</link></methodname> + <methodparam><parameter + role="keyword">gdk_image</parameter></methodparam> + <methodparam><parameter + role="keyword">mask</parameter></methodparam> + </methodsynopsis> + <methodsynopsis language="python"> + <methodname><link +linkend="method-gtkimage--set-from-file">set_from_file</link></methodname> + <methodparam><parameter + role="keyword">filename</parameter></methodparam> + </methodsynopsis> + <methodsynopsis language="python"> + <methodname><link +linkend="method-gtkimage--set-from-pixbuf">set_from_pixbuf</link></methodname> + <methodparam><parameter + role="keyword">pixbuf</parameter></methodparam> + </methodsynopsis> + <methodsynopsis language="python"> + <methodname><link +linkend="method-gtkimage--set-from-stock">set_from_stock</link></methodname> + <methodparam><parameter + role="keyword">stock_id</parameter></methodparam> + <methodparam><parameter + role="keyword">size</parameter></methodparam> + </methodsynopsis> + <methodsynopsis language="python"> + <methodname><link +linkend="method-gtkimage--set-from-icon-set">set_from_icon_set</link></methodname> + <methodparam><parameter + role="keyword">icon_set</parameter></methodparam> + <methodparam><parameter + role="keyword">size</parameter></methodparam> + </methodsynopsis> + <methodsynopsis language="python"> + <methodname><link +linkend="method-gtkimage--set-from-animation">set_from_animation</link></methodname> + <methodparam><parameter + role="keyword">animation</parameter></methodparam> + </methodsynopsis> + <methodsynopsis language="python"> + <methodname><link +linkend="method-gtkimage--get-storage-type">get_storage_type</link></methodname> + <methodparam></methodparam> </methodsynopsis> + <methodsynopsis language="python"> + <methodname><link +linkend="method-gtkimage--get-pixmap">get_pixmap</link></methodname> + <methodparam><parameter + role="keyword">pixmap</parameter></methodparam> + <methodparam><parameter + role="keyword">mask</parameter></methodparam> + </methodsynopsis> + <methodsynopsis language="python"> + <methodname><link +linkend="method-gtkimage--get-image">get_image</link></methodname> + <methodparam><parameter + role="keyword">gdk_image</parameter></methodparam> + <methodparam><parameter + role="keyword">mask</parameter></methodparam> + </methodsynopsis> + <methodsynopsis language="python"> + <methodname><link +linkend="method-gtkimage--get-pixbuf">get_pixbuf</link></methodname> + <methodparam></methodparam> </methodsynopsis> + <methodsynopsis language="python"> + <methodname><link +linkend="method-gtkimage--get-stock">get_stock</link></methodname> + <methodparam><parameter + role="keyword">stock_id</parameter></methodparam> + <methodparam><parameter + role="keyword">size</parameter></methodparam> + </methodsynopsis> + <methodsynopsis language="python"> + <methodname><link +linkend="method-gtkimage--get-icon-set">get_icon_set</link></methodname> + <methodparam><parameter + role="keyword">icon_set</parameter></methodparam> + <methodparam><parameter + role="keyword">size</parameter></methodparam> + </methodsynopsis> + <methodsynopsis language="python"> + <methodname><link +linkend="method-gtkimage--get-animation">get_animation</link></methodname> + <methodparam></methodparam> </methodsynopsis> + </classsynopsis> + +<programlisting> +<emphasis role="bold">Functions</emphasis> + +<methodsynopsis language="python"> + <methodname><link linkend="function-gtk--image-new-from-stock">gtk.image_new_from_stock</link></methodname> + <methodparam><parameter role="keyword">stock_id</parameter></methodparam> + <methodparam><parameter role="keyword">size</parameter></methodparam> + </methodsynopsis><methodsynopsis language="python"> + <methodname><link linkend="function-gtk--image-new-from-icon-set">gtk.image_new_from_icon_set</link></methodname> + <methodparam><parameter role="keyword">icon_set</parameter></methodparam> + <methodparam><parameter role="keyword">size</parameter></methodparam> + </methodsynopsis><methodsynopsis language="python"> + <methodname><link linkend="function-gtk--image-new-from-animation">gtk.image_new_from_animation</link></methodname> + <methodparam><parameter role="keyword">animation</parameter></methodparam> + </methodsynopsis></programlisting> + + </refsect1> + + <refsect1> + <title>Ancestry</title> + +<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link> + +-- <link linkend="class-gtkobject">gtk.Object</link> + +-- <link linkend="class-gtkwidget">gtk.Widget</link> + +-- <link linkend="class-gtkmisc">gtk.Misc</link> + +-- <link linkend="class-gtkimage">gtk.Image</link> +</synopsis> + + </refsect1> + + <refsect1> + <title>Properties</title> + + <blockquote role="properties"> + <informaltable pgwide="1" frame="none"> + <tgroup cols="3"> + <colspec column="1" colwidth="1in"/> + <colspec column="2" colwidth="1in"/> + <colspec column="3" colwidth="4in"/> + <tbody> + + <row valign="top"> + <entry>"pixbuf"</entry> + <entry>Read-Write</entry> + <entry>a <link +linkend="class-gdkpixmap"><classname>gtk.gdk.Pixmap</classname></link> to +display</entry> + </row> + + <row valign="top"> + <entry>"pixmap"</entry> + <entry>Read-Write</entry> + <entry>a <link +linkend="class-gdkpixmap"><classname>gtk.gdk.Pixmap</classname></link> to +display</entry> + </row> + + <row valign="top"> + <entry>"image"</entry> + <entry>Read-Write</entry> + <entry>a <link +linkend="class-gdkimage"><classname>gtk.gdk.Image</classname></link> to +display</entry> + </row> + + <row valign="top"> + <entry>"mask"</entry> + <entry>Read-Write</entry> + <entry>a bitmap <link +linkend="class-gdkpixmap"><classname>gtk.gdk.Pixmap</classname></link> to +use with a <link +linkend="class-gdkimage"><classname>gtk.gdk.Image</classname></link> or a +<link +linkend="class-gdkpixmap"><classname>gtk.gdk.Pixmap</classname></link></entry> + </row> + + <row valign="top"> + <entry>"file"</entry> + <entry>Write</entry> + <entry>a filename containing the image data</entry> + </row> + + <row valign="top"> + <entry>"stock"</entry> + <entry>Read-Write</entry> + <entry>the stock ID for a stock image to display.</entry> + </row> + + <row valign="top"> + <entry>"icon-set"</entry> + <entry>Read-Write</entry> + <entry>the <link +linkend="class-gtkiconset"><classname>gtk.IconSet</classname></link> to +display</entry> + </row> + + <row valign="top"> + <entry>"icon-size"</entry> + <entry>Read-Write</entry> + <entry>the size to use for a stock icon or icon set.</entry> + </row> + + <row valign="top"> + <entry>"pixbuf-animation"</entry> + <entry>Read-Write</entry> + <entry>the <link +linkend="class-gdkpixbufanimation"><classname>gtk.gdk.PixbufAnimation</classname></link> +to display</entry> + </row> + + <row valign="top"> + <entry>"storage-type"</entry> + <entry>Read</entry> + <entry>the type of the image data; one of +<literal>gtk.IMAGE_EMPTY</literal>, <literal>gtk.IMAGE_PIXMAP</literal>, +<literal>gtk.IMAGE_IMAGE</literal>, <literal>gtk.IMAGE_PIXBUF</literal>, +<literal>gtk.IMAGE_STOCK</literal>, <literal>gtk.IMAGE_ICON_SET</literal> or +<literal>gtk.IMAGE_ANIMATION</literal></entry> + </row> + + </tbody> + </tgroup> + </informaltable> + </blockquote> + + </refsect1> + + <refsect1> + <title>Description</title> + + <para>The <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> widget +displays an image. Various kinds of objects can be displayed as an image; +usually, you would load a <link +linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link> +("pixel buffer") from a file, and then display it. The convenience method +<link +linkend="method-gtkimage--set-from-file"><methodname>set_from_file</methodname>()</link> +will read the file and automatically create a pixbuf that is added to the +<link linkend="class-gtkimage"><classname>gtk.Image</classname></link> +widget. If the file isn't loaded successfully, the image will contain a +"broken image" icon similar to that used in many web browsers. If you want +to handle errors in loading the file yourself, for example by displaying an +error message, then load the image with <link +linkend="function-gdk--pixbuf-new-from-file"><methodname>gtk.gdk.pixbuf_new_from_file</methodname>()</link>, +then add it to the <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> with the +<link +linkend="method-gtkimage--set-from-pixbuf"><methodname>set_from_pixbuf</methodname>()</link> +method. The image file may contain an animation; if so, the <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> will +display an animation (<link +linkend="class-gdkpixbufanimation"><classname>gtk.gdk.PixbufAnimation</classname></link>) +instead of a static image.</para> + + <para><link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> is a +subclass of <link +linkend="class-gtkmisc"><classname>gtk.Misc</classname></link>, which +implies that you can align it (center, left, right) and add padding to it, +using the <link +linkend="class-gtkmisc"><classname>gtk.Misc</classname></link> methods. +<link linkend="class-gtkimage"><classname>gtk.Image</classname></link> is a +"no window" widget (has no <link +linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> of +its own), so by default does not receive events. If you want to receive +events on the image, such as button clicks, place the image inside a <link +linkend="class-gtkeventbox"><classname>gtk.EventBox</classname></link>, then +connect to the event signals on the event box.</para> + + </refsect1> + + <refsect1 id="constructor-gtkimage"> + <title>Constructor</title> + + <programlisting><constructorsynopsis language="python"> + <methodname>gtk.Image</methodname> + <methodparam></methodparam> </constructorsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><emphasis>Returns</emphasis> :</term> + <listitem><simpara>a newly created <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> +widget.</simpara></listitem> + </varlistentry> + </variablelist> + + <para>Creates a new empty <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> +widget.</para> + + </refsect1> + + <refsect1> + <title>Methods</title> + + <refsect2 id="method-gtkimage--set-from-pixmap"> + <title>gtk.Image.set_from_pixmap</title> + + <programlisting><methodsynopsis language="python"> + <methodname>set_from_pixmap</methodname> + <methodparam><parameter + role="keyword">pixmap</parameter></methodparam> + <methodparam><parameter + role="keyword">mask</parameter></methodparam> + </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><parameter role="keyword">pixmap</parameter> :</term> + <listitem><simpara>a <link +linkend="class-gdkpixmap"><classname>gtk.gdk.Pixmap</classname></link></simpara></listitem> + </varlistentry> + <varlistentry> + <term><parameter role="keyword">mask</parameter> :</term> + <listitem><simpara>a bitmap <link +linkend="class-gdkpixmap"><classname>gtk.gdk.Pixmap</classname></link> or +<literal>None</literal></simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <methodname>set_from_pixmap</methodname>() method sets the +image data from <parameter>pixmap</parameter> using +<parameter>mask</parameter>.</para> + + </refsect2> + + <refsect2 id="method-gtkimage--set-from-image"> + <title>gtk.Image.set_from_image</title> + + <programlisting><methodsynopsis language="python"> + <methodname>set_from_image</methodname> + <methodparam><parameter + role="keyword">gdk_image</parameter></methodparam> + <methodparam><parameter + role="keyword">mask</parameter></methodparam> + </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><parameter +role="keyword">gdk_image</parameter> :</term> + <listitem><simpara>a <link +linkend="class-gdkimage"><classname>gtk.gdk.Image</classname></link> or +<literal>None</literal></simpara></listitem> + </varlistentry> + <varlistentry> + <term><parameter role="keyword">mask</parameter> :</term> + <listitem><simpara>a bitmap <link +linkend="class-gdkpixmap"><classname>gtk.gdk.Pixmap</classname></link> or +<literal>None</literal></simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <methodname>set_from_image</methodname>() method sets the +image data from <parameter>image</parameter> using +<parameter>mask</parameter>. A <link +linkend="class-gdkimage"><classname>gtk.gdk.Image</classname></link> is a +client-side image buffer in the pixel format of the current display. If +<parameter>image</parameter> is <literal>None</literal> the current image +data will be removed.</para> + + </refsect2> + + <refsect2 id="method-gtkimage--set-from-file"> + <title>gtk.Image.set_from_file</title> + + <programlisting><methodsynopsis language="python"> + <methodname>set_from_file</methodname> + <methodparam><parameter + role="keyword">filename</parameter></methodparam> + </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><parameter role="keyword">filename</parameter> :</term> + <listitem><simpara>a filename or +<literal>None</literal></simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <methodname>set_fron_file</methodname>() method sets the +image data from the contents of the file named +<parameter>filename</parameter>. If the file isn't found or can't be loaded, +the resulting <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> will +display a "broken image" icon. This function never returns None, it always +returns a valid <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> widget. If +the file contains an animation, the image will contain an animation. If +<parameter>filename</parameter> is <literal>None</literal> the current image +data will be removed.</para> + + <para>If you need to detect failures to load the file, use <link +linkend="function-gdk--pixbuf-new-from-file"><methodname>gtk.gdk.pixbuf_new_from_file</methodname>()</link> +to load the file yourself, then create the <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> from the +pixbuf. (Or for animations, use the <link +linkend="constructor-gdkpixbufanimation">gtk.gdk.PixbufAnimation</link>() +constructor.</para> + + </refsect2> + + <refsect2 id="method-gtkimage--set-from-pixbuf"> + <title>gtk.Image.set_from_pixbuf</title> + + <programlisting><methodsynopsis language="python"> + <methodname>set_from_pixbuf</methodname> + <methodparam><parameter + role="keyword">pixbuf</parameter></methodparam> + </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><parameter role="keyword">pixbuf</parameter> :</term> + <listitem><simpara>a <link +linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link> or +<literal>None</literal></simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <methodname>set_from_pixbuf</methodname>() method sets the +image data using <parameter>pixbuf</parameter>. Note that this function just +creates an <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> from +<parameter>pixbuf</parameter>. The <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> created +will not react to state changes. Should you want that, you should use the +<link +linkend="method-gtkimage--set-from-icon-set"><methodname>set_from_icon_set</methodname>()</link> +method If <parameter>pixbuf</parameter> is <literal>None</literal> the +current image data will be removed.</para> + + </refsect2> + + <refsect2 id="method-gtkimage--set-from-stock"> + <title>gtk.Image.set_from_stock</title> + + <programlisting><methodsynopsis language="python"> + <methodname>set_from_stock</methodname> + <methodparam><parameter + role="keyword">stock_id</parameter></methodparam> + <methodparam><parameter + role="keyword">size</parameter></methodparam> + </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><parameter role="keyword">stock_id</parameter> :</term> + <listitem><simpara>a stock icon name</simpara></listitem> + </varlistentry> + <varlistentry> + <term><parameter role="keyword">size</parameter> :</term> + <listitem><simpara>a stock icon size</simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <methodname>set_from_stock</methodname>() method sets the +image data from the stock item identified by +<parameter>stock_id</parameter>. Sample stock icon names are +<literal>gtk.STOCK_OPEN</literal> and <literal>gtk.STOCK_OK</literal>. +Stock icon sizes are <literal>gtk.ICON_SIZE_MENU</literal>, +<literal>gtk.ICON_SIZE_SMALL_TOOLBAR</literal>, +<literal>gtk.ICON_SIZE_LARGE_TOOLBAR</literal>, +<literal>gtk.ICON_SIZE_BUTTON</literal>, +<literal>gtk.ICON_SIZE_DND</literal> and +<literal>gtk.ICON_SIZE_DIALOG</literal>. If the stock icon name isn't known, +a "broken image" icon will be displayed instead. You can register your own +stock icon names, see the <link +linkend="method-gtkiconfactory--add-default"><methodname>gtk.IconFactory.add_default</methodname>()</link> +and <link +linkend="method-gtkiconfactory--add"><methodname>gtk.IconFactory.add</methodname>()</link> +methods.</para> + + <para>The stock icons are:</para> + + <variablelist> + <varlistentry> + <term><literal>gtk.STOCK_DIALOG_INFO</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_dialog_info_48.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_DIALOG_WARNING</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_dialog_warning_48.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_DIALOG_ERROR</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_dialog_error_48.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_DIALOG_QUESTION</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_dialog_question_48.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_DND</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_dnd_32.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_DND_MULTIPLE</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_dnd_multiple_32.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_ADD</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_add_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_APPLY</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_apply_20.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_BOLD</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_text_bold_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_CANCEL</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_cancel_20.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_CDROM</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_cdrom_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_CLEAR</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_clear_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_CLOSE</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_close_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_CONVERT</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_convert_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_COPY</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_copy_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_CUT</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_cut_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_DELETE</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_trash_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_EXECUTE</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_exec_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_FIND</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_search_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_FIND_AND_REPLACE</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_search_replace_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_FLOPPY</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_save_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_GOTO_BOTTOM</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_bottom_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_GOTO_FIRST</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_first_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_GOTO_LAST</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_last_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_GOTO_TOP</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_top_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_GO_BACK</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_left_arrow_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_GO_DOWN</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_down_arrow_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_GO_FORWARD</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_right_arrow_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_GO_UP</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_up_arrow_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_HELP</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_help_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_HOME</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_home_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_INDEX</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_index_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_ITALIC</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_text_italic_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_JUMP_TO</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_jump_to_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_JUSTIFY_CENTER</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_align_center_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_JUSTIFY_FILL</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_align_justify_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_JUSTIFY_LEFT</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_align_left_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_JUSTIFY_RIGHT</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_align_right_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_MISSING_IMAGE</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_broken_image_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_NEW</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_new_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_NO</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_no_20.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_OK</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_ok_20.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_OPEN</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_open_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_PASTE</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_paste_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_PREFERENCES</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_preferences_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_PRINT</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_print_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_PRINT_PREVIEW</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_print_preview_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_PROPERTIES</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_properties_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_QUIT</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_exit_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_REDO</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_redo_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_REFRESH</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_refresh_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_REMOVE</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_remove_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_REVERT_TO_SAVED</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_revert_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_SAVE</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_save_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_SAVE_AS</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_save_as_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_SELECT_COLOR</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_colorselector_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_SELECT_FONT</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_font_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_SORT_ASCENDING</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_sort_ascending_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_SORT_DESCENDING</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_sort_descending_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_SPELL_CHECK</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_spellcheck_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_STOP</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_stop_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_STRIKETHROUGH</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_text_strikethrough_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_UNDELETE</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_undelete_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_UNDERLINE</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_text_underline_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_UNDO</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_undo_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_YES</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_yes_20.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_ZOOM_100</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_zoom_1_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_ZOOM_FIT</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_zoom_fit_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_ZOOM_IN</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_zoom_in_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + <varlistentry> + <term><literal>gtk.STOCK_ZOOM_OUT</literal></term> + <listitem> + <simpara><imagedata fileref="icons/stock_zoom_out_24.png" format="png"/></simpara> + </listitem> + </varlistentry> + </variablelist> + + <para></para> + + </refsect2> + + <refsect2 id="method-gtkimage--set-from-icon-set"> + <title>gtk.Image.set_from_icon_set</title> + + <programlisting><methodsynopsis language="python"> + <methodname>set_from_icon_set</methodname> + <methodparam><parameter + role="keyword">icon_set</parameter></methodparam> + <methodparam><parameter + role="keyword">size</parameter></methodparam> + </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><parameter role="keyword">icon_set</parameter> :</term> + <listitem><simpara>a <link +linkend="class-gtkiconset"><classname>gtk.IconSet</classname></link></simpara></listitem> + </varlistentry> + <varlistentry> + <term><parameter role="keyword">size</parameter> :</term> + <listitem><simpara>a stock icon size</simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <methodname>set_from_icon_set</methodname>() method sets the +image data from icon_set with the size specified by +<parameter>size</parameter>. Stock icon sizes are +<literal>gtk.ICON_SIZE_MENU</literal>, +<literal>gtk.ICON_SIZE_SMALL_TOOLBAR</literal>, +<literal>gtk.ICON_SIZE_LARGE_TOOLBAR</literal>, +<literal>gtk.ICON_SIZE_BUTTON</literal>, +<literal>gtk.ICON_SIZE_DND</literal> and +<literal>gtk.ICON_SIZE_DIALOG</literal>.</para> + + </refsect2> + + <refsect2 id="method-gtkimage--set-from-animation"> + <title>gtk.Image.set_from_animation</title> + + <programlisting><methodsynopsis language="python"> + <methodname>set_from_animation</methodname> + <methodparam><parameter + role="keyword">animation</parameter></methodparam> + </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><parameter +role="keyword">animation</parameter> :</term> + <listitem><simpara>the <link +linkend="class-gdkpixbufanimation"><classname>gtk.gdk.PixbufAnimation</classname></link></simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <methodname>set_from_animation</methodname>() method sets +the image data from <parameter>animation</parameter>.</para> + + </refsect2> + + <refsect2 id="method-gtkimage--get-storage-type"> + <title>gtk.Image.get_storage_type</title> + + <programlisting><methodsynopsis language="python"> + <methodname>get_storage_type</methodname> + <methodparam></methodparam> </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><emphasis>Returns</emphasis> :</term> + <listitem><simpara>the type of the image representation being +used</simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <methodname>get_storage_type</methodname>() method gets the +type of representation being used by the <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> to store +image data. If the <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> has no +image data, the return value will be <literal>gtk.IMAGE_EMPTY</literal>. The +image type is one of: <literal>gtk.IMAGE_EMPTY</literal>, +<literal>gtk.IMAGE_PIXMAP</literal>, <literal>gtk.IMAGE_IMAGE</literal>, +<literal>gtk.IMAGE_PIXBUF</literal>, <literal>gtk.IMAGE_STOCK</literal>, +<literal>gtk.IMAGE_ICON_SET</literal> or +<literal>gtk.IMAGE_ANIMATION</literal>.</para> + + </refsect2> + + <refsect2 id="method-gtkimage--get-pixmap"> + <title>gtk.Image.get_pixmap</title> + + <programlisting><methodsynopsis language="python"> + <methodname>get_pixmap</methodname> + <methodparam></methodparam> + </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><emphasis>Returns</emphasis> :</term> + <listitem><simpara>a tuple containing the pixmap (or +<literal>None</literal>) and the mask (or +<literal>None</literal>)</simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <methodname>get_pixmap</methodname>() method returns a tuple +containing the pixmap and mask being displayed by the <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link>. Either or +both the pixmap and mask may be <literal>None</literal>. If the storage type +of the image is not either <literal>gtk.IMAGE_EMPTY</literal> or +<literal>gtk.IMAGE_PIXMAP</literal> the ValueError exception will be +raised.</para> + + </refsect2> + + <refsect2 id="method-gtkimage--get-image"> + <title>gtk.Image.get_image</title> + + <programlisting><methodsynopsis language="python"> + <methodname>get_image</methodname> + <methodparam></methodparam> + </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><emphasis>Returns</emphasis> :</term> + <listitem><simpara>a tuple containing a <link +linkend="class-gdkimage"><classname>gtk.gdk.Image</classname></link> and a +mask bitmap</simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <methodname>get_image</methodname>() method returns a tuple +containing the <link +linkend="class-gdkimage"><classname>gtk.gdk.Image</classname></link> and +mask being displayed by the <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link>. One or +both of the <link +linkend="class-gdkimage"><classname>gtk.gdk.Image</classname></link> and +mask may be <literal>None</literal>. If the storage type of the image is not +either of <literal>gtk.IMAGE_EMPTY</literal> or +<literal>gtk.IMAGE_IMAGE</literal> the ValueError exception will be +raised.</para> + + </refsect2> + + <refsect2 id="method-gtkimage--get-pixbuf"> + <title>gtk.Image.get_pixbuf</title> + + <programlisting><methodsynopsis language="python"> + <methodname>get_pixbuf</methodname> + <methodparam></methodparam> </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><emphasis>Returns</emphasis> :</term> + <listitem><simpara>the displayed pixbuf, or +<literal>None</literal> if the image is empty</simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <methodname>get_pixbuf</methodname>() method gets the <link +linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link> being +displayed by the <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link>. The return +value may be None if no image data is set. If the storage type of the image +is not either <literal>gtk.IMAGE_EMPTY</literal> or +<literal>gtk.IMAGE_PIXBUF</literal> the VlaueError exception will be +raised.</para> + + </refsect2> + + <refsect2 id="method-gtkimage--get-stock"> + <title>gtk.Image.get_stock</title> + + <programlisting><methodsynopsis language="python"> + <methodname>get_stock</methodname> + <methodparam></methodparam> + </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><emphasis>Returns</emphasis> :</term> + <listitem><simpara>a tuple containing the stock icon name and the +stock icon size of the image data</simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <methodname>get_stock</methodname>() method returns a tuple +containing the stock icon identifier (may be <literal>None</literal>) and +size being displayed by the <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link>. The size +will be one of: <literal>gtk.ICON_SIZE_MENU</literal>, +<literal>gtk.ICON_SIZE_SMALL_TOOLBAR</literal>, +<literal>gtk.ICON_SIZE_LARGE_TOOLBAR</literal>, +<literal>gtk.ICON_SIZE_BUTTON</literal>, +<literal>gtk.ICON_SIZE_DND</literal> or +<literal>gtk.ICON_SIZE_DIALOG</literal>. If the storage type of the image is +not either <literal>gtk.IMAGE_EMPTY</literal> or +<literal>gtk.IMAGE_STOCK</literal> the ValueError exception will be +raised.</para> + + </refsect2> + + <refsect2 id="method-gtkimage--get-icon-set"> + <title>gtk.Image.get_icon_set</title> + + <programlisting><methodsynopsis language="python"> + <methodname>get_icon_set</methodname> + <methodparam></methodparam> + </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><emphasis>Returns</emphasis> :</term> + <listitem><simpara>a tuple containing a <link +linkend="class-gtkiconset"><classname>gtk.IconSet</classname></link> and a +stock icon size</simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <methodname>get_icon_set</methodname>() method returns a +tuple containing the icon set (may be <literal>None</literal>) and size +being displayed by the <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link>. The size +will be one of: <literal>gtk.ICON_SIZE_MENU</literal>, +<literal>gtk.ICON_SIZE_SMALL_TOOLBAR</literal>, +<literal>gtk.ICON_SIZE_LARGE_TOOLBAR</literal>, +<literal>gtk.ICON_SIZE_BUTTON</literal>, +<literal>gtk.ICON_SIZE_DND</literal> or +<literal>gtk.ICON_SIZE_DIALOG</literal>. If the storage type of the image is +not either <literal>gtk.IMAGE_EMPTY</literal> or +<literal>gtk.IMAGE_ICON_SET</literal> the ValueError exception will be +raised.</para> + + </refsect2> + + <refsect2 id="method-gtkimage--get-animation"> + <title>gtk.Image.get_animation</title> + + <programlisting><methodsynopsis language="python"> + <methodname>get_animation</methodname> + <methodparam></methodparam> </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><emphasis>Returns</emphasis> :</term> + <listitem><simpara>the displayed animation, or +<literal>None</literal> if the image is empty</simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <methodname>get_animation</methodname>() method gets the +<link +linkend="class-gdkpixbufanimation"><classname>gtk.gdk.PixbufAnimation</classname></link> +(may be None if there is no image data) being displayed by the <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link>. If the +storage type of the image is not either <literal>gtk.IMAGE_EMPTY</literal> +or <literal>gtk.IMAGE_ANIMATION</literal> the ValueError exception will be +raised.</para> + + </refsect2> + + </refsect1> + + <refsect1> + <title>Functions</title> + + <refsect2 id="function-gtk--image-new-from-stock"> + <title>gtk.image_new_from_stock</title> + + <programlisting><methodsynopsis language="python"> + <methodname>gtk.image_new_from_stock</methodname> + <methodparam><parameter + role="keyword">stock_id</parameter></methodparam> + <methodparam><parameter + role="keyword">size</parameter></methodparam> + </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><parameter role="keyword">stock_id</parameter> :</term> + <listitem><simpara>a stock icon name</simpara></listitem> + </varlistentry> + <varlistentry> + <term><parameter role="keyword">size</parameter> :</term> + <listitem><simpara>an integer representing an icon +size</simpara></listitem> + </varlistentry> + <varlistentry> + <term><emphasis>Returns</emphasis> :</term> + <listitem><simpara>a new gtkImage displaying the stock +icon</simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <function>gtk.image_new_from_stock</function>() function +returns a new <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> displaying +the stock icon specified by <parameter>stock_id</parameter> with the +specified <parameter>size</parameter>. Sample stock icon names are +<literal>gtk.STOCK_OPEN</literal>, <literal>gtk.STOCK_OK</literal> - see the +<link +linkend="method-gtkimage--set-from-stock"><methodname>set_from_stock</methodname>()</link> +method for detailed information on the <literal>PyGTK</literal> stock icons. +. Sample stock sizes are <literal>gtk.ICON_SIZE_MENU</literal>, +<literal>gtk.ICON_SIZE_SMALL_TOOLBAR</literal> - see the <link linkend="function-gtk--icon-size-lookup"><function>gtk.icon_size_lookup</function>()</link> function for more detail. If the stock icon name isn't +known, a "broken image" icon will be displayed instead. You can register +your own stock icon names, see the <link +linkend="method-gtkiconfactory--add-default"><methodname>gtk.IconFactory.add_default</methodname>()</link> +and <link +linkend="method-gtkiconfactory--add"><methodname>gtk.IconFactory.add</methodname>()</link> +methods.</para> + + </refsect2> + + <refsect2 id="function-gtk--image-new-from-icon-set"> + <title>gtk.image_new_from_icon_set</title> + + <programlisting><methodsynopsis language="python"> + <methodname>gtk.image_new_from_icon_set</methodname> + <methodparam><parameter + role="keyword">icon_set</parameter></methodparam> + <methodparam><parameter + role="keyword">size</parameter></methodparam> + </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><parameter role="keyword">icon_set</parameter> :</term> + <listitem><simpara>a <link +linkend="class-gtkiconset"><classname>gtk.IconSet</classname></link> +object</simpara></listitem> + </varlistentry> + <varlistentry> + <term><parameter role="keyword">size</parameter> :</term> + <listitem><simpara>an integer representing an icon +size</simpara></listitem> + </varlistentry> + <varlistentry> + <term><emphasis>Returns</emphasis> :</term> + <listitem><simpara>a new <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> +object</simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <function>gtk.image_new_from_icon_set</function>() function +returns a new <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> created +from the <link +linkend="class-gtkiconset"><classname>gtk.IconSet</classname></link> +specified by <parameter>icon_set</parameter> with the specified +<parameter>size</parameter>. Sample stock sizes are +<literal>gtk.ICON_SIZE_MENU</literal>, +<literal>gtk.ICON_SIZE_SMALL_TOOLBAR</literal> - see the <link +linkend="function-gtk--icon-size-lookup"><function>gtk.icon_size_lookup</function>()</link> +function for more detail. Instead of using this function, usually it's +better to create a <link +linkend="class-gtkiconfactory"><classname>gtk.IconFactory</classname></link>, +put your icon sets in the icon factory, add the icon factory to the list of +default factories with the <link +linkend="method-gtkiconfactory--add-default"><methodname>add_default</methodname>()</link> +method, and then use the <link +linkend="function-gtk--image-new-from-stock"><function>gtk.image_new_from_stock</function>()</link> +function. This will allow themes to override the icon you ship with your +application.</para> + + </refsect2> + + <refsect2 id="function-gtk--image-new-from-animation"> + <title>gtk.image_new_from_animation</title> + + <programlisting><methodsynopsis language="python"> + <methodname>gtk.image_new_from_animation</methodname> + <methodparam><parameter + role="keyword">animation</parameter></methodparam> + </methodsynopsis></programlisting> + <variablelist> + <varlistentry> + <term><parameter +role="keyword">animation</parameter> :</term> + <listitem><simpara>a <link +linkend="class-gdkpixbufanimation"><classname>gtk.gdk.PixbufAnimation</classname></link> +object</simpara></listitem> + </varlistentry> + <varlistentry> + <term><emphasis>Returns</emphasis> :</term> + <listitem><simpara>a new <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> +object</simpara></listitem> + </varlistentry> + </variablelist> + + <para>The <function>gtk.image_new_from_animation</function>() function +returns a new <link +linkend="class-gtkimage"><classname>gtk.Image</classname></link> object +containing the <link +linkend="class-gdkpixbufanimation"><classname>gtk.gdk.PixbufAnimation</classname></link> +specified by <parameter>animation</parameter>.</para> + + </refsect2> + + </refsect1> + +</refentry> |