This file is indexed.

/usr/share/gtk-doc/html/pygtk/class-gtkiconset.html is in python-gtk2-doc 2.24.0-5.1ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.IconSet</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtkiconinfo.html" title="gtk.IconInfo"><link rel="next" href="class-gtkiconsource.html" title="gtk.IconSource"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.IconSet</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkiconinfo.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkiconsource.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.IconSet"><a name="class-gtkiconset"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.IconSet</h2><p>gtk.IconSet — contains a set of variants for an icon</p></div><div class="refsect1" title="Synopsis"><a name="id3732973"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.IconSet</span></span>(<span class="ooclass"><span class="classname">gobject.GBoxed</span></span>):
<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gtkiconset.html#constructor-gtkiconset" title="Constructor">gtk.IconSet</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkiconset.html#method-gtkiconset--copy" title="gtk.IconSet.copy">copy</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkiconset.html#method-gtkiconset--render-icon" title="gtk.IconSet.render_icon">render_icon</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>style</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>direction</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>state</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>detail</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkiconset.html#method-gtkiconset--add-source" title="gtk.IconSet.add_source">add_source</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>source</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkiconset.html#method-gtkiconset--get-sizes" title="gtk.IconSet.get_sizes">get_sizes</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Description"><a name="id3733192"></a><h2>Description</h2><p>A <a class="link" href="class-gtkiconset.html" title="gtk.IconSet"><code class="classname">gtk.IconSet</code></a>
contains a set of variants for a single icon. The variants provide icons of
different sizes and for different widget states. The variants can be added
with the <a class="link" href="class-gtkiconset.html#method-gtkiconset--add-source" title="gtk.IconSet.add_source"><code class="methodname">add_source</code>()</a> 
method.</p></div><div class="refsect1" title="Constructor"><a name="constructor-gtkiconset"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.IconSet</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>pixbuf</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>pixbuf</code></strong> :</span></p></td><td>a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gtkiconset.html" title="gtk.IconSet"><code class="classname">gtk.IconSet</code></a></td></tr></tbody></table><p>Creates a new <a class="link" href="class-gtkiconset.html" title="gtk.IconSet"><code class="classname">gtk.IconSet</code></a> with
<em class="parameter"><code>pixbuf</code></em> as the default fallback source image. If
<em class="parameter"><code>pixbuf</code></em> is <code class="literal">None</code> there is no default
fallback source image. If you don't add any additional <a class="link" href="class-gtkiconsource.html" title="gtk.IconSource"><code class="classname">gtk.IconSource</code></a>s
to the icon set, all variants of the icon will be created from
<em class="parameter"><code>pixbuf</code></em>, using scaling, pixelation, etc. as required
to adjust the icon size or make the icon look insensitive/prelighted.</p></div><div class="refsect1" title="Methods"><a name="id3733360"></a><h2>Methods</h2><div class="refsect2" title="gtk.IconSet.copy"><a name="method-gtkiconset--copy"></a><h3>gtk.IconSet.copy</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">copy</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gtkiconset.html" title="gtk.IconSet"><code class="classname">gtk.IconSet</code></a>
identical to the first.</td></tr></tbody></table><p>The <code class="methodname">copy</code>() method returns a copy of the
icon set.</p></div><div class="refsect2" title="gtk.IconSet.render_icon"><a name="method-gtkiconset--render-icon"></a><h3>gtk.IconSet.render_icon</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">render_icon</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>style</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>direction</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>state</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>size</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>detail</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>style</code></strong> :</span></p></td><td>a <a class="link" href="class-gtkstyle.html" title="gtk.Style"><code class="classname">gtk.Style</code></a> associated
with <em class="parameter"><code>widget</code></em>, or
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>direction</code></strong> :</span></p></td><td>the text direction; one of:
<code class="literal">gtk.TEXT_DIR_NONE</code>, <code class="literal">gtk.TEXT_DIR_LTR</code>,
<code class="literal">gtk.TEXT_DIR_RTL</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>state</code></strong> :</span></p></td><td>the widget state; one of:
<code class="literal">gtk.STATE_NORMAL</code>, <code class="literal">gtk.STATE_ACTIVE</code>,
<code class="literal">gtk.STATE_PRELIGHT</code>,
<code class="literal">gtk.STATE_SELECTED</code>,
<code class="literal">gtk.STATE_INSENSITIVE</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>size</code></strong> :</span></p></td><td>the icon size; one of:
<code class="literal">gtk.ICON_SIZE_INVALID</code>,
<code class="literal">gtk.ICON_SIZE_MENU</code>,
<code class="literal">gtk.ICON_SIZE_SMALL_TOOLBAR</code>,
<code class="literal">gtk.ICON_SIZE_LARGE_TOOLBAR</code>,
<code class="literal">gtk.ICON_SIZE_BUTTON</code>,
<code class="literal">gtk.ICON_SIZE_DND</code>,
<code class="literal">gtk.ICON_SIZE_DIALOG</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>widget</code></strong> :</span></p></td><td>the widget that will display the icon, or
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>detail</code></strong> :</span></p></td><td>the detail to pass to the theme engine, or
<code class="literal">None</code></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a <a class="link" href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><code class="classname">gtk.gdk.Pixbuf</code></a> to be
displayed</td></tr></tbody></table><p>The <code class="methodname">render_icon</code>() method renders an
icon using <a class="link" href="class-gtkstyle.html#method-gtkstyle--render-icon" title="gtk.Style.render_icon"><code class="function">gtk.Style.render_icon()</code></a>. 
In most cases, <a class="link" href="class-gtkwidget.html#method-gtkwidget--render-icon" title="gtk.Widget.render_icon"><code class="function">gtk.Widget.render_icon()</code></a> 
is better, since it automatically provides most of the arguments from the
current widget settings.  This method never returns <code class="literal">None</code>;
if the icon can't be rendered (perhaps because an image file fails to load),
a default "missing image" icon will be returned instead.</p></div><div class="refsect2" title="gtk.IconSet.add_source"><a name="method-gtkiconset--add-source"></a><h3>gtk.IconSet.add_source</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">add_source</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>source</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>source</code></strong> :</span></p></td><td>a <a class="link" href="class-gtkiconsource.html" title="gtk.IconSource"><code class="classname">gtk.IconSource</code></a></td></tr></tbody></table><p>The <code class="methodname">add_source</code>() method adds the <a class="link" href="class-gtkiconsource.html" title="gtk.IconSource"><code class="classname">gtk.IconSource</code></a>
specified by <em class="parameter"><code>source</code></em> to the icon set.  Icon sets have
a list of <a class="link" href="class-gtkiconsource.html" title="gtk.IconSource"><code class="classname">gtk.IconSource</code></a>,
which they use as base icons for rendering icons in different states and
sizes. Icons are scaled, made to look insensitive, etc. in the <a class="link" href="class-gtkiconset.html#method-gtkiconset--render-icon" title="gtk.IconSet.render_icon"><code class="methodname">render_icon</code>()</a>
method, but <a class="link" href="class-gtkiconset.html" title="gtk.IconSet"><code class="classname">gtk.IconSet</code></a> needs
base images to work with. The base images and when to use them are described
by a <a class="link" href="class-gtkiconsource.html" title="gtk.IconSource"><code class="classname">gtk.IconSource</code></a>.</p><p>An example of when you'd use this method: a web browser's
"<span class="guibutton">Back to Previous Page</span>" icon might point in a
different direction in Hebrew and in English; it might look different when
insensitive; and it might change size depending on toolbar mode (small
or large icons). So a single icon set would contain all those variants of the
icon, and you might add a separate source for each one.</p><p>You should nearly always add a "default" icon source with all
fields wildcarded, which will be used as a fallback if no more specific
source matches. <a class="link" href="class-gtkiconset.html" title="gtk.IconSet"><code class="classname">gtk.IconSet</code></a> always
prefers more specific icon sources to more generic icon sources. The order
in which you add the sources to the icon set does not matter.</p><p>The <a class="link" href="class-gtkiconset.html#constructor-gtkiconset" title="Constructor"><code class="methodname">gtk.IconSet</code>()</a> 
constructor creates a new icon set with a default icon source based on the
given pixbuf.</p></div><div class="refsect2" title="gtk.IconSet.get_sizes"><a name="method-gtkiconset--get-sizes"></a><h3>gtk.IconSet.get_sizes</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_sizes</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a tuple containing all the icon sizes supported
by the icon set</td></tr></tbody></table><p>The <code class="methodname">get_sizes</code>() method returns a tuple
containing all the icon sizes this icon set can render.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtkiconinfo.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gtkiconsource.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.IconInfo </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.IconSource</td></tr></table></div></body></html>