This file is indexed.

/usr/share/gtk-doc/html/pygtk/class-gtktoolbutton.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
 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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.ToolButton</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-gtktoolbar.html" title="gtk.Toolbar"><link rel="next" href="class-gtktoolitem.html" title="gtk.ToolItem"></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.ToolButton</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktoolbar.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtktoolitem.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.ToolButton"><a name="class-gtktoolbutton"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.ToolButton</h2><p>gtk.ToolButton — a <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>
    subclass that displays buttons (new in PyGTK 2.4)</p></div><div class="refsect1" title="Synopsis"><a name="id3999050"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.ToolButton</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem">gtk.ToolItem</a></span></span>):
<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gtktoolbutton.html#constructor-gtktoolbutton" title="gtk.ToolButton">gtk.ToolButton</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_widget</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gtktoolbutton.html#constructor-gtktoolbutton2" title="gtk.ToolButton">gtk.ToolButton</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stock_id</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktoolbutton.html#method-gtktoolbutton--set-label" title="gtk.ToolButton.set_label">set_label</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktoolbutton.html#method-gtktoolbutton--get-label" title="gtk.ToolButton.get_label">get_label</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktoolbutton.html#method-gtktoolbutton--set-use-underline" title="gtk.ToolButton.set_use_underline">set_use_underline</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_underline</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktoolbutton.html#method-gtktoolbutton--get-use-underline" title="gtk.ToolButton.get_use_underline">get_use_underline</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktoolbutton.html#method-gtktoolbutton--set-stock-id" title="gtk.ToolButton.set_stock_id">set_stock_id</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stock_id</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktoolbutton.html#method-gtktoolbutton--get-stock-id" title="gtk.ToolButton.get_stock_id">get_stock_id</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktoolbutton.html#method-gtktoolbutton--set-icon-name" title="gtk.ToolButton.set_icon_name">set_icon_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_name</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktoolbutton.html#method-gtktoolbutton--get-icon-name" title="gtk.ToolButton.get_icon_name">get_icon_name</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktoolbutton.html#method-gtktoolbutton--set-icon-widget" title="gtk.ToolButton.set_icon_widget">set_icon_widget</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_widget</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktoolbutton.html#method-gtktoolbutton--get-icon-widget" title="gtk.ToolButton.get_icon_widget">get_icon_widget</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktoolbutton.html#method-gtktoolbutton--set-label-widget" title="gtk.ToolButton.set_label_widget">set_label_widget</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label_widget</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktoolbutton.html#method-gtktoolbutton--get-label-widget" title="gtk.ToolButton.get_label_widget">get_label_widget</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3999441"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
  +-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
    +-- <a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
      +-- <a class="link" href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
        +-- <a class="link" href="class-gtkbin.html" title="gtk.Bin">gtk.Bin</a>
          +-- <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem">gtk.ToolItem</a>
            +-- <a class="link" href="class-gtktoolbutton.html" title="gtk.ToolButton">gtk.ToolButton</a>
</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3999498"></a><h2>Implemented Interfaces</h2><p>
			<a class="link" href="class-gtktoolbutton.html" title="gtk.ToolButton"><code class="classname">gtk.ToolButton</code></a>
			implements 
			<a class="link" href="class-gtkbuildable.html" title="gtk.Buildable"><code class="classname">gtk.Buildable</code></a>
		</p></div><div class="refsect1" title="gtk.ToolButton Properties"><a name="properties-gtktoolbutton"></a><h2>gtk.ToolButton Properties</h2><p><a class="link" href="class-gtkobject.html#properties-gtkobject" title="gtk.Object Properties">gtk.Object Properties</a></p><p><a class="link" href="class-gtkwidget.html#properties-gtkwidget" title="gtk.Widget Properties">gtk.Widget Properties</a></p><p><a class="link" href="class-gtkcontainer.html#properties-gtkcontainer" title="gtk.Container Properties">gtk.Container Properties</a></p><p><a class="link" href="class-gtktoolitem.html#properties-gtktoolitem" title="gtk.ToolItem Properties">gtk.ToolItem Properties</a></p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"icon-name"</td><td valign="top">Read-Write</td><td valign="top">The themed icon name to display in the item. This
property only has an effect if not overridden by "label", "icon-widget" or
"stock-id" properties. Default value: <code class="literal">None</code>.
Available in GTK+ 2.8 and above.</td></tr><tr valign="top"><td valign="top">"icon-widget"</td><td valign="top">Read-Write</td><td valign="top">The icon widget to display in the item.
Default value: <code class="literal">None</code>.</td></tr><tr valign="top"><td valign="top">"label"</td><td valign="top">Read-Write</td><td valign="top">The text to show in the item.
Default value: <code class="literal">None</code>.</td></tr><tr valign="top"><td valign="top">"label-widget"</td><td valign="top">Read-Write</td><td valign="top">The widget to use as the item label instead of
"label". Default value: <code class="literal">None</code>.</td></tr><tr valign="top"><td valign="top">"stock-id"</td><td valign="top">Read-Write</td><td valign="top">The stock icon displayed on the item if "label" and
"label-widget" are <code class="literal">None</code>.
Default value: <code class="literal">None</code>.</td></tr><tr valign="top"><td valign="top">"use-underline"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, an underline in the "label"
property indicates that the next character should be used for the mnemonic
accelerator key in the overflow menu.
Default value: <code class="literal">False</code>.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.ToolButton Style Properties"><a name="style-properties-gtktoolbutton"></a><h2>gtk.ToolButton Style Properties</h2><p><a class="link" href="class-gtkwidget.html#style-properties-gtkwidget" title="gtk.Widget Style Properties">gtk.Widget Style Properties</a></p><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col width="1in"><col width="1in"><col width="3.5in"></colgroup><tbody><tr valign="top"><td valign="top">"icon-spacing"</td><td valign="top">Read-Write</td><td valign="top">Spacing in pixels between the icon and label</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.ToolButton Signal Prototypes"><a name="signal-prototypes-gtktoolbutton"></a><h2>gtk.ToolButton Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a class="link" href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p><p><a class="link" href="class-gtkwidget.html#signal-prototypes-gtkwidget" title="gtk.Widget Signal Prototypes">gtk.Widget Signal Prototypes</a></p><p><a class="link" href="class-gtkcontainer.html#signal-prototypes-gtkcontainer" title="gtk.Container Signal Prototypes">gtk.Container Signal Prototypes</a></p><p><a class="link" href="class-gtktoolitem.html#signal-prototypes-gtktoolitem" title="gtk.ToolItem Signal Prototypes">gtk.ToolItem Signal Prototypes</a></p></div><div class="refsect1" title="Signal Prototypes"><a name="id3999907"></a><h2>Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtktoolbutton.html#signal-gtktoolbutton--clicked" title='The "clicked" gtk.ToolButton Signal'>clicked</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>toolbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" title="Description"><a name="id3999979"></a><h2>Description</h2><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This widget is available in PyGTK 2.4 and above.</p></div><p>A <a class="link" href="class-gtktoolbutton.html" title="gtk.ToolButton"><code class="classname">gtk.ToolButton</code></a>
is a sub class of <a class="link" href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a> that
contains a button. Use the <a class="link" href="class-gtktoolbutton.html#constructor-gtktoolbutton" title="gtk.ToolButton">gtk.ToolButton</a>() constructor to
create a new <a class="link" href="class-gtktoolbutton.html" title="gtk.ToolButton"><code class="classname">gtk.ToolButton</code></a>
specifying a widget to use as the icon and a label for the
text. Alternatively use the other <a class="link" href="class-gtktoolbutton.html#constructor-gtktoolbutton2" title="gtk.ToolButton">gtk.ToolButton</a>() constructor to
create a <a class="link" href="class-gtktoolbutton.html" title="gtk.ToolButton"><code class="classname">gtk.ToolButton</code></a>
from a stock item.</p><p>The label of a <a class="link" href="class-gtktoolbutton.html" title="gtk.ToolButton"><code class="classname">gtk.ToolButton</code></a>
is determined by the properties "label_widget", "label", and "stock_id". If
"label_widget" specifies a <a class="link" href="class-gtkwidget.html" title="gtk.Widget"><code class="classname">gtk.Widget</code></a>, that
widget is used as the label. If "label-widget" is <code class="literal">None</code>,
then the string in "label" is used as the label. If both "label-widget" and
"label" are <code class="literal">None</code>, the label is determined by the stock
item specified by "stock-id". Finally, if "label-widget", "label" and
"stock-id" are all <code class="literal">None</code>, the button does not have a
label.</p><p>The icon of a <a class="link" href="class-gtktoolbutton.html" title="gtk.ToolButton"><code class="classname">gtk.ToolButton</code></a>
is determined by the properties "icon-widget" and "stock-id". If
"icon-widget" specifies a <a class="link" href="class-gtkwidget.html" title="gtk.Widget"><code class="classname">gtk.Widget</code></a>, that
widget is used as the icon. If "icon-widget" is <code class="literal">None</code>, the
icon is determined by the stock item specified by "stock-id". If both
"icon-widget" and "stock-id" are <code class="literal">None</code>, the button does
not have an icon.</p></div><div class="refsect1" title="Constructor"><a name="id4000121"></a><h2>Constructor</h2><div class="refsect2" title="gtk.ToolButton"><a name="constructor-gtktoolbutton"></a><h3>gtk.ToolButton</h3><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.ToolButton</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_widget</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</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>icon_widget</code></strong> :</span></p></td><td>a <a class="link" href="class-gtkwidget.html" title="gtk.Widget"><code class="classname">gtk.Widget</code></a>
	  that will be used as the icon widget, or
	  <code class="literal">None</code></td></tr><tr><td><p><span class="term"><strong class="parameter"><code>label</code></strong> :</span></p></td><td>a string that will be used as the label, 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 new <a class="link" href="class-gtktoolbutton.html" title="gtk.ToolButton"><code class="classname">gtk.ToolButton</code></a></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This constructor is available in PyGTK 2.4 and above.</p></div><p>Creates a new <a class="link" href="class-gtktoolbutton.html" title="gtk.ToolButton"><code class="classname">gtk.ToolButton</code></a>
optionally using the icon specified by <em class="parameter"><code>icon_widget</code></em>
and the label text specified by <em class="parameter"><code>label</code></em>. If both
<em class="parameter"><code>icon_widget</code></em> and <em class="parameter"><code>label</code></em> are
<code class="literal">None</code>, the tool button will be empty.</p></div><div class="refsect2" title="gtk.ToolButton"><a name="constructor-gtktoolbutton2"></a><h3>gtk.ToolButton</h3><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.ToolButton</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stock_id</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>stock_id</code></strong> :</span></p></td><td>a string that specifies a stock
	  item</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-gtktoolbutton.html" title="gtk.ToolButton"><code class="classname">gtk.ToolButton</code></a></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This constructor is available in PyGTK 2.4 and above.</p></div><p>Creates a new <a class="link" href="class-gtktoolbutton.html" title="gtk.ToolButton"><code class="classname">gtk.ToolButton</code></a>
using the stock item specified by <em class="parameter"><code>stock_id</code></em> to
determine the icon and label text. It is an error if
<em class="parameter"><code>stock_id</code></em> is not a name of a stock item.</p></div></div><div class="refsect1" title="Methods"><a name="id4000434"></a><h2>Methods</h2><div class="refsect2" title="gtk.ToolButton.set_label"><a name="method-gtktoolbutton--set-label"></a><h3>gtk.ToolButton.set_label</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_label</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</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>label</code></strong> :</span></p></td><td>a string that will be used as label, or
      <code class="literal">None</code>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_label</code>() method sets the "label"
property to the value of <em class="parameter"><code>label</code></em>. If the "label_widget"
property is <code class="literal">None</code>, label will be used as the label of the
tool button.</p></div><div class="refsect2" title="gtk.ToolButton.get_label"><a name="method-gtktoolbutton--get-label"></a><h3>gtk.ToolButton.get_label</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_label</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>The label, or
	  <code class="literal">None</code></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_label</code>() method returns the
value of the "label" property that is used as the label of the tool button
if the "label-widget" property is <code class="literal">None</code>.</p></div><div class="refsect2" title="gtk.ToolButton.set_use_underline"><a name="method-gtktoolbutton--set-use-underline"></a><h3>gtk.ToolButton.set_use_underline</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_use_underline</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_underline</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>use_underline</code></strong> :</span></p></td><td>if <code class="literal">True</code>, an underline in the
	  label string specifies a mnemonic key for the overflow
	  menu</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_use_underline</code>() method sets the
"use-underline" property to the value of
<em class="parameter"><code>use_underline</code></em>. If
<em class="parameter"><code>use_underline</code></em> is <code class="literal">True</code>, an
underline in the "label" property indicates that the next character should
be used for the mnemonic accelerator key in the overflow menu. For example,
if the label property is "_Open" and <em class="parameter"><code>use_underline</code></em> is
<code class="literal">True</code>, the label on the tool button will be "Open" and the
item on the overflow menu will have an underlined 'O'. Labels shown on tool
buttons never have mnemonics on them; this property only affects the menu
item on the overflow menu.</p></div><div class="refsect2" title="gtk.ToolButton.get_use_underline"><a name="method-gtktoolbutton--get-use-underline"></a><h3>gtk.ToolButton.get_use_underline</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_use_underline</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><code class="literal">True</code> if underscores in the
	  "label" property are used as mnemonics on menu items on the
	  overflow menu.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_use_underline</code>() method returns
the value of the "use-underline" property. If "use-underline" is
<code class="literal">True</code>, underscores in the label property are used as
mnemonics on menu items on the overflow menu. See the <a class="link" href="class-gtktoolbutton.html#method-gtktoolbutton--set-use-underline" title="gtk.ToolButton.set_use_underline"><code class="methodname">set_use_underline()</code></a>
method for more information.</p></div><div class="refsect2" title="gtk.ToolButton.set_stock_id"><a name="method-gtktoolbutton--set-stock-id"></a><h3>gtk.ToolButton.set_stock_id</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_stock_id</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stock_id</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>stock_id</code></strong> :</span></p></td><td>a name of a stock item, or
	  <code class="literal">None</code></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_stock_id</code>() method sets the
"stock-id" property to the value of <em class="parameter"><code>stock_id</code></em>. The
stock item specified by <em class="parameter"><code>stock_id</code></em> is used to determine
the icon and label if not overridden by the "label" and "icon-widget"
properties. See the <a class="link" href="class-gtktoolbutton.html#constructor-gtktoolbutton2" title="gtk.ToolButton">gtk.ToolButton</a>() constructor for
more information.</p></div><div class="refsect2" title="gtk.ToolButton.get_stock_id"><a name="method-gtktoolbutton--get-stock-id"></a><h3>gtk.ToolButton.get_stock_id</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_stock_id</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>the name of the stock item.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_stock_id</code>() method returns the
value of the "stock-id" property that contains the name of a stock item or
<code class="literal">None</code>. See the <a class="link" href="class-gtktoolbutton.html#constructor-gtktoolbutton2" title="gtk.ToolButton">gtk.ToolButton</a>() constructor for
more information.</p></div><div class="refsect2" title="gtk.ToolButton.set_icon_name"><a name="method-gtktoolbutton--set-icon-name"></a><h3>gtk.ToolButton.set_icon_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_icon_name</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_name</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>icon_name</code></strong> :</span></p></td><td>a name of a themed icon, or
<code class="literal">None</code></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.8 and above.</p></div><p>The <code class="methodname">set_icon_name</code>() method sets the
"icon-name" property to the value of <em class="parameter"><code>icon_name</code></em>. The
themed icon name specified by <em class="parameter"><code>icon_name</code></em> is used to
determine the icon for the toolbutton if not overridden by the "label",
"stock-id" and "icon-widget" properties. See the <a class="link" href="class-gtktoolbutton.html#constructor-gtktoolbutton2" title="gtk.ToolButton">gtk.ToolButton</a>() constructor for
more information.</p><p>In PyGTK 2.10 and above, <em class="parameter"><code>icon_name</code></em> may be
<code class="literal">None</code> to unset the icon name.</p></div><div class="refsect2" title="gtk.ToolButton.get_icon_name"><a name="method-gtktoolbutton--get-icon-name"></a><h3>gtk.ToolButton.get_icon_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_icon_name</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>the name of the stock item.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.8 and above.</p></div><p>The <code class="methodname">get_icon_name</code>() method returns the
value of the "icon_name" property that contains the name of a themed icon or
<code class="literal">None</code>. See the <a class="link" href="class-gtktoolbutton.html#constructor-gtktoolbutton2" title="gtk.ToolButton">gtk.ToolButton</a>() constructor for
more information.</p></div><div class="refsect2" title="gtk.ToolButton.set_icon_widget"><a name="method-gtktoolbutton--set-icon-widget"></a><h3>gtk.ToolButton.set_icon_widget</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_icon_widget</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_widget</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>icon_widget</code></strong> :</span></p></td><td>the widget used as icon, or
	  <code class="literal">None</code></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_icon_widget</code>() method sets the
"icon-widget" property to the value of
<em class="parameter"><code>icon_widget</code></em>. If <em class="parameter"><code>icon_widget</code></em>
specifies a <a class="link" href="class-gtkwidget.html" title="gtk.Widget"><code class="classname">gtk.Widget</code></a>, it is
used as the icon of the tool button. If <em class="parameter"><code>icon_widget</code></em>
is <code class="literal">None</code> the icon is determined by the "stock_id"
property. If the "stock_id" property is also <code class="literal">None</code>, the
tool button will not have an icon.</p></div><div class="refsect2" title="gtk.ToolButton.get_icon_widget"><a name="method-gtktoolbutton--get-icon-widget"></a><h3>gtk.ToolButton.get_icon_widget</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_icon_widget</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>The widget used as icon on
	  <em class="parameter"><code>button</code></em>, or
	  <code class="literal">None</code>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_icon_widget</code>() method returns
the value of the "icon-widget" property that contains the <a class="link" href="class-gtkwidget.html" title="gtk.Widget"><code class="classname">gtk.Widget</code></a> used as
the icon on the tool button. See the <a class="link" href="class-gtktoolbutton.html#method-gtktoolbutton--set-icon-widget" title="gtk.ToolButton.set_icon_widget"><code class="methodname">set_icon_widget()</code></a>
method for more information.</p></div><div class="refsect2" title="gtk.ToolButton.set_label_widget"><a name="method-gtktoolbutton--set-label-widget"></a><h3>gtk.ToolButton.set_label_widget</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_label_widget</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label_widget</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>label_widget</code></strong> :</span></p></td><td>the widget used as the label, or
	  <code class="literal">None</code></td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">set_label_widget</code>() method sets the
"label-widget" property to the <a class="link" href="class-gtkwidget.html" title="gtk.Widget"><code class="classname">gtk.Widget</code></a> specified
by <em class="parameter"><code>label_widget</code></em> that will be used as the label for
the tool button. If <em class="parameter"><code>label_widget</code></em> is
<code class="literal">None</code> the "label" property is used as label. If
"label-widget" and "label" are both <code class="literal">None</code>, the label in
the stock item determined by the "stock_id" property is used as the
label. If "label-widget", "label" and "stock_id" are all
<code class="literal">None</code>, the tool button will not have a label.</p></div><div class="refsect2" title="gtk.ToolButton.get_label_widget"><a name="method-gtktoolbutton--get-label-widget"></a><h3>gtk.ToolButton.get_label_widget</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_label_widget</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>The widget used as label on
	  <em class="parameter"><code>button</code></em>, or
	  <code class="literal">None</code>.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.4 and above.</p></div><p>The <code class="methodname">get_label_widget</code>() method returns
the value of the "label-widget" property that is used as the label on the
tool button. See the <a class="link" href="class-gtktoolbutton.html#method-gtktoolbutton--set-label-widget" title="gtk.ToolButton.set_label_widget"><code class="methodname">gtk.ToolButton.set_label_widget()</code></a>
method for more information.</p></div></div><div class="refsect1" title="Signals"><a name="id4001657"></a><h2>Signals</h2><div class="refsect2" title='The "clicked" gtk.ToolButton Signal'><a name="signal-gtktoolbutton--clicked"></a><h3>The "clicked" gtk.ToolButton Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>toolbutton</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></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"><em class="parameter"><code>toolbutton</code></em> :</span></p></td><td>the toolbutton that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "clicked" signal is emitted when the tool button is clicked
with the mouse or activated with the keyboard.</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-gtktoolbar.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-gtktoolitem.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.Toolbar </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.ToolItem</td></tr></table></div></body></html>