File: class-gtkiconsource.html

package info (click to toggle)
python-gtk2-doc 2.5.2-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 8,304 kB
  • ctags: 3,741
  • sloc: makefile: 38
file content (152 lines) | stat: -rw-r--r-- 41,222 bytes parent folder | download
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.IconSource</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><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="previous" href="class-gtkiconset.html" title="gtk.IconSet"><link rel="next" href="class-gtkicontheme.html" title="gtk.IconTheme"></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.IconSource</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkiconset.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtkicontheme.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkiconsource"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.IconSource</h2><p>gtk.IconSource &#8212; a source for icon variants</p></div><div class="refsect1" lang="en"><a name="id3434422"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.IconSource</span></span>(<span class="ooclass"><span class="classname">gobject.GBoxed</span></span>):
<code class="constructorsynopsis">    <span class="methodname"><a href="class-gtkiconsource.html#constructor-gtkiconsource" title="Constructor">gtk.IconSource</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--copy" title="gtk.IconSource.copy">copy</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--free" title="gtk.IconSource.free">free</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--set-filename" title="gtk.IconSource.set_filename">set_filename</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>filename</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--set-pixbuf" title="gtk.IconSource.set_pixbuf">set_pixbuf</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>pixbuf</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--get-filename" title="gtk.IconSource.get_filename">get_filename</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--get-pixbuf" title="gtk.IconSource.get_pixbuf">get_pixbuf</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--set-direction-wildcarded" title="gtk.IconSource.set_direction_wildcarded">set_direction_wildcarded</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>setting</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--set-state-wildcarded" title="gtk.IconSource.set_state_wildcarded">set_state_wildcarded</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>setting</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--set-size-wildcarded" title="gtk.IconSource.set_size_wildcarded">set_size_wildcarded</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>setting</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--get-size-wildcarded" title="gtk.IconSource.get_size_wildcarded">get_size_wildcarded</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--get-state-wildcarded" title="gtk.IconSource.get_state_wildcarded">get_state_wildcarded</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--get-direction-wildcarded" title="gtk.IconSource.get_direction_wildcarded">get_direction_wildcarded</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--set-direction" title="gtk.IconSource.set_direction">set_direction</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>direction</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--set-state" title="gtk.IconSource.set_state">set_state</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>state</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--set-size" title="gtk.IconSource.set_size">set_size</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>size</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--get-direction" title="gtk.IconSource.get_direction">get_direction</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--get-state" title="gtk.IconSource.get_state">get_state</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#method-gtkiconsource--get-size" title="gtk.IconSource.get_size">get_size</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
<span class="bold"><b>Functions</b></span>

<code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#function-gtk--icon-size-lookup" title="gtk.icon_size_lookup">gtk.icon_size_lookup</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon_size</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#function-gtk--icon-size-lookup-for-settings" title="gtk.icon_size_lookup_for_settings">gtk.icon_size_lookup_for_settings</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>settings</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon_size</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#function-gtk--icon-size-register" title="gtk.icon_size_register">gtk.icon_size_register</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>width</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>height</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#function-gtk--icon-size-register-alias" title="gtk.icon_size_register_alias">gtk.icon_size_register_alias</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>alias</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>target</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#function-gtk--icon-size-from-name" title="gtk.icon_size_from_name">gtk.icon_size_from_name</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkiconsource.html#function-gtk--icon-size-get-name" title="gtk.icon_size_get_name">gtk.icon_size_get_name</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>size</tt></b></span></span>)</code></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3434869"></a><h2>Description</h2><p>A <a href="class-gtkiconsource.html" title="gtk.IconSource"><tt class="classname">gtk.IconSource</tt></a>
contains a <a href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><tt class="classname">gtk.gdk.Pixbuf</tt></a> (or
an image filename) that serves as the base image for one or more of the
icons in a <a href="class-gtkiconset.html" title="gtk.IconSet"><tt class="classname">gtk.IconSet</tt></a>, along
with a specification for which icons in the icon set will be based on that
pixbuf or image file. By default, the icon source has all parameters
wildcarded. That is, the icon source can be used as the base icon for any
desired text direction, widget state, or icon size.</p></div><div class="refsect1" lang="en"><a name="constructor-gtkiconsource"></a><h2>Constructor</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.IconSource</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gtkiconsource.html" title="gtk.IconSource"><tt class="classname">gtk.IconSource</tt></a></td></tr></tbody></table><p>Creates a new <a href="class-gtkiconsource.html" title="gtk.IconSource"><tt class="classname">gtk.IconSource</tt></a>.
A <a href="class-gtkiconsource.html" title="gtk.IconSource"><tt class="classname">gtk.IconSource</tt></a>
contains a <a href="class-gdkpixbuf.html" title="gtk.gdk.Pixbuf"><tt class="classname">gtk.gdk.Pixbuf</tt></a> (or
image filename) that serves as the base image for one or more of the icons
in a <a href="class-gtkiconset.html" title="gtk.IconSet"><tt class="classname">gtk.IconSet</tt></a>, along
with a specification for which icons in the icon set will be based on that
pixbuf or image file. By default, the icon source has all parameters
wildcarded. That is, the icon source will be used as the base icon for any
desired text direction, widget state, or icon size.</p></div><div class="refsect1" lang="en"><a name="id3434979"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkiconsource--copy"></a><h3>gtk.IconSource.copy</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">copy</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gtkiconsource.html" title="gtk.IconSource"><tt class="classname">gtk.IconSource</tt></a></td></tr></tbody></table><p>The <tt class="methodname">copy</tt>() method creates a copy of the
icon source.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--free"></a><h3>gtk.IconSource.free</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">free</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><p>The <tt class="methodname">free</tt>() method frees a
dynamically-allocated icon source, along with its filename, size, and pixbuf
fields if those are not <tt class="literal">None</tt>.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--set-filename"></a><h3>gtk.IconSource.set_filename</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_filename</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>filename</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>filename</tt></b>:</span></td><td>the image file to use</td></tr></tbody></table><p>The <tt class="methodname">set_filename</tt>() method sets the name
of the image file (specified by <i class="parameter"><tt>filename</tt></i>) to use as
the base image when creating icon variants for a <a href="class-gtkiconset.html" title="gtk.IconSet"><tt class="classname">gtk.IconSet</tt></a>. The
filename must be absolute.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--set-pixbuf"></a><h3>gtk.IconSource.set_pixbuf</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_pixbuf</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>pixbuf</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>pixbuf</tt></b>:</span></td><td>the pixbuf to use as a
source</td></tr></tbody></table><p>The <tt class="methodname">set_pixbuf</tt>() method sets a pixbuf
(specified by <i class="parameter"><tt>pixbuf</tt></i>) to use as a base image when
creating icon variants for a <a href="class-gtkiconset.html" title="gtk.IconSet"><tt class="classname">gtk.IconSet</tt></a>. If an
icon source has both a filename and a pixbuf set, the pixbuf will take
priority.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--get-filename"></a><h3>gtk.IconSource.get_filename</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_filename</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the image filename</td></tr></tbody></table><p>The <tt class="methodname">get_filename</tt>() method retrieves the
source filename, or <tt class="literal">None</tt> if none is set.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--get-pixbuf"></a><h3>gtk.IconSource.get_pixbuf</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_pixbuf</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the source pixbuf</td></tr></tbody></table><p>The <tt class="methodname">get_pixbuf</tt>() method retrieves the
source pixbuf, or <tt class="literal">None</tt> if none is set.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--set-direction-wildcarded"></a><h3>gtk.IconSource.set_direction_wildcarded</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_direction_wildcarded</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>setting</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>setting</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> wildcard the text
direction</td></tr></tbody></table><p>The <tt class="methodname">set_direction_wildcarded</tt>() method
determines whether the icon source direction is wildcarded according to the
value specified by <i class="parameter"><tt>setting</tt></i>. If
<i class="parameter"><tt>setting</tt></i> is <tt class="literal">TRUE</tt> the text direction
is wildcarded and the icon source can be used as the base image for an icon
in any text direction (<tt class="literal">gtk.TEXT_DIR_NONE</tt>,
<tt class="literal">gtk.TEXT_DIR_LTR</tt> or <tt class="literal">gtk.TEXT_DIR_RTL</tt>).
If the text direction is not wildcarded, then the text direction the icon
source applies to should be set with the <a href="class-gtkiconsource.html#method-gtkiconsource--set-direction" title="gtk.IconSource.set_direction"><tt class="methodname">set_direction</tt>()</a> 
method and the icon source will only be used with that text direction.
Non-wildcarded icon sources (exact matches) are preferred over wildcarded
icon sources. An exact match will be used when possible.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--set-state-wildcarded"></a><h3>gtk.IconSource.set_state_wildcarded</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_state_wildcarded</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>setting</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>setting</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> wildcard the widget
state</td></tr></tbody></table><p>The <tt class="methodname">set_state_wildcarded</tt>() method
determines whether the icon source state is wildcarded according to the
value of <i class="parameter"><tt>setting</tt></i>. If <i class="parameter"><tt>setting</tt></i>
is <tt class="literal">TRUE</tt> the widget state is wildcarded and the icon
source can be used as the base image for an icon in any widget state
(<tt class="literal">gtk.STATE_NORMAL</tt>, <tt class="literal">gtk.STATE_ACTIVE</tt>,
<tt class="literal">gtk.STATE_PRELIGHT</tt>, <tt class="literal">gtk.STATE_SELECTED</tt>
or <tt class="literal">gtk.STATE_INSENSITIVE</tt>). If the widget state is not
wildcarded, then the widget state the icon source applies to should be set
with the <a href="class-gtkiconsource.html#method-gtkiconsource--set-state" title="gtk.IconSource.set_state"><tt class="methodname">set_state</tt>()</a> 
method and the icon source will only be used with that specific state.
Non-wildcarded icon sources (exact matches) are preferred over wildcarded
icon sources. An exact match will be used when possible.</p><p>A <a href="class-gtkiconset.html" title="gtk.IconSet"><tt class="classname">gtk.IconSet</tt></a> will
normally transform wildcarded icon source images to produce an appropriate
icon for a given state, for example lightening an image on prelight, but
will not modify source images that match exactly.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--set-size-wildcarded"></a><h3>gtk.IconSource.set_size_wildcarded</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_size_wildcarded</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>setting</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>setting</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> wildcard the widget
state</td></tr></tbody></table><p>The <tt class="methodname">set_size_wildcarded</tt>() determines
whether the icon source can be used as the basis for an icon of any size
according to the value of <i class="parameter"><tt>setting</tt></i>. If
<i class="parameter"><tt>setting</tt></i> is <tt class="literal">TRUE</tt> the icon size is
wildcarded and the icon source can be used as the base image for an icon of
any size.  If the size is not wildcarded, then the size the icon source
applies to should be set with <a href="class-gtkiconsource.html#method-gtkiconsource--set-size" title="gtk.IconSource.set_size"><tt class="function">gtk.IconSource.set_size()</tt></a> 
and the icon source will only be used with that specific size.
Non-wildcarded icon sources (exact matches) are preferred over wildcarded
icon sources. An exact match will be used when possible.</p><p><a href="class-gtkiconset.html" title="gtk.IconSet"><tt class="classname">gtk.IconSet</tt></a> will
normally scale wildcarded source images to produce an appropriate icon at a
given size, but will not change the size of source images that match
exactly.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--get-size-wildcarded"></a><h3>gtk.IconSource.get_size_wildcarded</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_size_wildcarded</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if this icon source is
a base for any icon size variant</td></tr></tbody></table><p>The <tt class="methodname">get_size_wildcarded</tt>() method gets
the value set by the <a href="class-gtkiconsource.html#method-gtkiconsource--set-size-wildcarded" title="gtk.IconSource.set_size_wildcarded"><tt class="methodname">set_size_wildcarded</tt>()</a> 
method.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--get-state-wildcarded"></a><h3>gtk.IconSource.get_state_wildcarded</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_state_wildcarded</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if this icon source is
a base for any widget state variant</td></tr></tbody></table><p>The <tt class="methodname">get_state_wildcarded</tt>() method gets
the value set by the <a href="class-gtkiconsource.html#method-gtkiconsource--set-state-wildcarded" title="gtk.IconSource.set_state_wildcarded"><tt class="methodname">set_state_wildcarded</tt>()</a> 
method.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--get-direction-wildcarded"></a><h3>gtk.IconSource.get_direction_wildcarded</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_direction_wildcarded</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if this icon source is
a base for any text direction variant</td></tr></tbody></table><p>The <tt class="methodname">get_direction_wildcarded</tt>() method
gets the value set by the <a href="class-gtkiconsource.html#method-gtkiconsource--set-direction-wildcarded" title="gtk.IconSource.set_direction_wildcarded"><tt class="methodname">set_direction_wildcarded</tt>()</a> 
method.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--set-direction"></a><h3>gtk.IconSource.set_direction</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_direction</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>direction</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>direction</tt></b>:</span></td><td>the text direction this icon source applies
to</td></tr></tbody></table><p>The <tt class="methodname">set_direction</tt>() method sets the
text direction according to the value of <i class="parameter"><tt>direction</tt></i>
that the icon source is intended to be used with. The value of direction
must be one of: <tt class="literal">gtk.TEXT_DIR_NONE</tt>,
<tt class="literal">gtk.TEXT_DIR_LTR</tt> or
<tt class="literal">gtk.TEXT_DIR_RTL</tt>.</p><p>Setting the text direction on an icon source makes no difference
if the text direction is wildcarded. Therefore, you should usually call the
<a href="class-gtkiconsource.html#method-gtkiconsource--set-direction-wildcarded" title="gtk.IconSource.set_direction_wildcarded"><tt class="methodname">set_direction_wildcarded</tt>()</a> 
method with a setting of <tt class="literal">FALSE</tt> to un-wildcard it in
addition to calling this function.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--set-state"></a><h3>gtk.IconSource.set_state</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_state</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>state</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>state</tt></b>:</span></td><td>the widget state this source applies
to</td></tr></tbody></table><p>The <tt class="methodname">set_state</tt>() method sets the widget
state specified by <i class="parameter"><tt>state</tt></i> that the icon source is
intended to be used with. The value of <i class="parameter"><tt>state</tt></i> must be
one of: <tt class="literal">gtk.STATE_NORMAL</tt>,
<tt class="literal">gtk.STATE_ACTIVE</tt>, <tt class="literal">gtk.STATE_PRELIGHT</tt>,
<tt class="literal">gtk.STATE_SELECTED</tt> or
<tt class="literal">gtk.STATE_INSENSITIVE</tt>. Setting the widget state on an
icon source makes no difference if the state is wildcarded. Therefore, you
should usually call the <a href="class-gtkiconsource.html#method-gtkiconsource--set-state-wildcarded" title="gtk.IconSource.set_state_wildcarded"><tt class="methodname">set_state_wildcarded</tt>()</a> 
method with a setting of <tt class="literal">FALSE</tt> to un-wildcard it in
addition to calling this function.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--set-size"></a><h3>gtk.IconSource.set_size</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_size</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>size</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>size</tt></b>:</span></td><td>the icon size this source applies
to</td></tr></tbody></table><p>The <tt class="methodname">set_size</tt>() method sets the icon
size specified by <i class="parameter"><tt>size</tt></i> that the icon source is
intended to be used with. Setting the icon size for an icon source makes no
difference if the size is wildcarded. Therefore, you should usually call the
<a href="class-gtkiconsource.html#method-gtkiconsource--set-size-wildcarded" title="gtk.IconSource.set_size_wildcarded"><tt class="function">gtk.IconSource.set_size_wildcarded()</tt></a> 
method with a setting of <tt class="literal">FALSE</tt> to un-wildcard it in
addition to calling this function.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--get-direction"></a><h3>gtk.IconSource.get_direction</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_direction</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the text direction the icon source
matches</td></tr></tbody></table><p>The <tt class="methodname">get_direction</tt>() method obtains the
text direction this icon source applies to. The return value is only useful
and meaningful if the text direction is <span class="emphasis"><em>not</em></span>
wildcarded.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--get-state"></a><h3>gtk.IconSource.get_state</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_state</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the widget state the icon source
matches</td></tr></tbody></table><p>The <tt class="methodname">get_state</tt>() method obtains the
widget state this icon source applies to. The return value is only useful
and meaningful if the widget state is <span class="emphasis"><em>not</em></span>
wildcarded.</p></div><div class="refsect2" lang="en"><a name="method-gtkiconsource--get-size"></a><h3>gtk.IconSource.get_size</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_size</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the icon size this source
matches.</td></tr></tbody></table><p>The <tt class="methodname">get_size</tt>() method obtains the icon
size this source applies to. The return value is only useful and meaningful
if the icon size is <span class="emphasis"><em>not</em></span> wildcarded.</p></div></div><div class="refsect1" lang="en"><a name="id3436106"></a><h2>Functions</h2><div class="refsect2" lang="en"><a name="function-gtk--icon-size-lookup"></a><h3>gtk.icon_size_lookup</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.icon_size_lookup</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon_size</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>icon_size</tt></b>:</span></td><td> an icon size</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a 2-tuple containing the width and height of
the specified <i class="parameter"><tt>icon_size</tt></i></td></tr></tbody></table><p>The <tt class="function">gtk.icon_size_lookup</tt>() function returns
a 2-tuple containing the width and height of the icon size specified by
<i class="parameter"><tt>icon_size</tt></i>. The value of
<i class="parameter"><tt>icon_size</tt></i> must be one of:</p><div class="itemizedlist"><ul type="disc"><li><tt class="literal">gtk.ICON_SIZE_MENU</tt></li><li><tt class="literal">gtk.ICON_SIZE_SMALL_TOOLBAR</tt></li><li><tt class="literal">gtk.ICON_SIZE_LARGE_TOOLBAR</tt></li><li><tt class="literal">gtk.ICON_SIZE_BUTTON</tt></li><li><tt class="literal">gtk.ICON_SIZE_DND</tt></li><li><tt class="literal">gtk.ICON_SIZE_DIALOG</tt></li></ul></div><p>or an integer value returned from the <a href="class-gtkiconsource.html#function-gtk--icon-size-register" title="gtk.icon_size_register"><tt class="function">gtk.icon_size_register</tt>()</a> 
function.</p></div><div class="refsect2" lang="en"><a name="function-gtk--icon-size-lookup-for-settings"></a><h3>gtk.icon_size_lookup_for_settings</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.icon_size_lookup_for_settings</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>settings</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>icon_size</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>settings</tt></b>:</span></td><td>a <a href="class-gtksettings.html" title="gtk.Settings"><tt class="classname">gtk.Settings</tt></a>
object used to determine which user preferences to use.</td></tr><tr><td><span class="term"><b class="parameter"><tt>icon_size</tt></b>:</span></td><td> an icon size</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a 2-tuple containing the width and height of
the specified <i class="parameter"><tt>icon_size</tt></i> or <tt class="literal">None</tt>
if <i class="parameter"><tt>icon_size</tt></i> was invalid.</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This function is available in PyGTK 2.4 and above.</p></div><p>The <tt class="function">gtk.icon_size_lookup_for_settings</tt>()
function returns a 2-tuple containing the width and height of the icon size
specified by <i class="parameter"><tt>icon_size</tt></i> of <tt class="literal">None</tt> if
<i class="parameter"><tt>icon_size</tt></i> was not valid. The value of
<i class="parameter"><tt>icon_size</tt></i> must be one of:</p><div class="itemizedlist"><ul type="disc"><li><tt class="literal">gtk.ICON_SIZE_MENU</tt></li><li><tt class="literal">gtk.ICON_SIZE_SMALL_TOOLBAR</tt></li><li><tt class="literal">gtk.ICON_SIZE_LARGE_TOOLBAR</tt></li><li><tt class="literal">gtk.ICON_SIZE_BUTTON</tt></li><li><tt class="literal">gtk.ICON_SIZE_DND</tt></li><li><tt class="literal">gtk.ICON_SIZE_DIALOG</tt></li></ul></div><p>or an integer value returned from the <a href="class-gtkiconsource.html#function-gtk--icon-size-register" title="gtk.icon_size_register"><tt class="function">gtk.icon_size_register</tt>()</a> 
function.</p></div><div class="refsect2" lang="en"><a name="function-gtk--icon-size-register"></a><h3>gtk.icon_size_register</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.icon_size_register</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>width</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>height</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>name</tt></b>:</span></td><td>the name of the icon size</td></tr><tr><td><span class="term"><b class="parameter"><tt>width</tt></b>:</span></td><td>the width of the icon size</td></tr><tr><td><span class="term"><b class="parameter"><tt>height</tt></b>:</span></td><td>the height of the icon
size</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>an integer representing the icon
size</td></tr></tbody></table><p>The <tt class="function">gtk.icon_size_register</tt>() function
registers a new icon size for the specified <i class="parameter"><tt>width</tt></i> and
<i class="parameter"><tt>height</tt></i> with the specified <i class="parameter"><tt>name</tt></i>
and returns the integer used to represent the icon size.</p></div><div class="refsect2" lang="en"><a name="function-gtk--icon-size-register-alias"></a><h3>gtk.icon_size_register_alias</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.icon_size_register_alias</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>alias</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>target</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>alias</tt></b>:</span></td><td>an alias for
<i class="parameter"><tt>target</tt></i></td></tr><tr><td><span class="term"><b class="parameter"><tt>target</tt></b>:</span></td><td>an integer representing an existing icon
size</td></tr></tbody></table><p>The <tt class="function">gtk.icon_size_register_alias</tt>() function
registers the specified <i class="parameter"><tt>alias</tt></i> as another name for the
icon size specified by <i class="parameter"><tt>target</tt></i>.</p></div><div class="refsect2" lang="en"><a name="function-gtk--icon-size-from-name"></a><h3>gtk.icon_size_from_name</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.icon_size_from_name</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>name</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>name</tt></b>:</span></td><td>a name of an existing icon
size</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the icon size associated with
<i class="parameter"><tt>name</tt></i></td></tr></tbody></table><p>The <tt class="function">gtk.icon_size_from_name</tt>() function
returns the integer representing the icon size associated with the specified
<i class="parameter"><tt>name</tt></i>.</p></div><div class="refsect2" lang="en"><a name="function-gtk--icon-size-get-name"></a><h3>gtk.icon_size_get_name</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">gtk.icon_size_get_name</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>size</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>size</tt></b>:</span></td><td>an integer representing an existing icon
size</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the name associated with the icon size
represented by <i class="parameter"><tt>size</tt></i></td></tr></tbody></table><p>The <tt class="function">gtk.icon_size_get_name</tt>() function
returns the name of the icon size represented by
<i class="parameter"><tt>size</tt></i>.</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-gtkiconset.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-gtkicontheme.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.IconSet</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.IconTheme</td></tr></table></div></body></html>