File: class-gtktoggletoolbutton.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 (31 lines) | stat: -rw-r--r-- 11,145 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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.ToggleToolButton</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-gtktogglebutton.html" title="gtk.ToggleButton"><link rel="next" href="class-gtktoolbar.html" title="gtk.Toolbar"></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.ToggleToolButton</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktogglebutton.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtktoolbar.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtktoggletoolbutton"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.ToggleToolButton</h2><p>gtk.ToggleToolButton &#8212; A <a href="class-gtktoolitem.html" title="gtk.ToolItem"><tt class="classname">gtk.ToolItem</tt></a>
containing a toggle button (new in PyGTK 2.4)</p></div><div class="refsect1" lang="en"><a name="id3562531"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.ToggleToolButton</span></span>(<span class="ooclass"><span class="classname"><a href="class-gtktoolbutton.html" title="gtk.ToolButton">gtk.ToolButton</a></span></span>):
<code class="constructorsynopsis">    <span class="methodname"><a href="class-gtktoggletoolbutton.html#constructor-gtktoggletoolbutton" title="Constructor">gtk.ToggleToolButton</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>stock_id</tt></b></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoggletoolbutton.html#method-gtktoggletoolbutton--set-active" title="gtk.ToggleToolButton.set_active">set_active</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>is_active</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtktoggletoolbutton.html#method-gtktoggletoolbutton--get-active" title="gtk.ToggleToolButton.get_active">get_active</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3562618"></a><h2>Ancestry</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="synopsis">+-- <a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
  +-- <a href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
    +-- <a href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
      +-- <a href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
        +-- <a href="class-gtkbin.html" title="gtk.Bin">gtk.Bin</a>
          +-- <a href="class-gtktoolitem.html" title="gtk.ToolItem">gtk.ToolItem</a>
            +-- <a href="class-gtktoolbutton.html" title="gtk.ToolButton">gtk.ToolButton</a>
              +-- <a href="class-gtktoggletoolbutton.html" title="gtk.ToggleToolButton">gtk.ToggleToolButton</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3562680"></a><h2>Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term">"<a href="class-gtktoggletoolbutton.html#signal-gtktoggletoolbutton--toggled" title='The "toggled" gtk.ToggleToolButton Signal'>toggled</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>toggletoolbutton</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3562732"></a><h2>Description</h2><div class="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 href="class-gtktoggletoolbutton.html" title="gtk.ToggleToolButton"><tt class="classname">gtk.ToggleToolButton</tt></a>
is a <a href="class-gtktoolitem.html" title="gtk.ToolItem"><tt class="classname">gtk.ToolItem</tt></a> that
contains a toggle button. Use the <a href="class-gtktoggletoolbutton.html#constructor-gtktoggletoolbutton" title="Constructor">gtk.ToggleToolButton</a>()
constructor to create a new <a href="class-gtktoggletoolbutton.html" title="gtk.ToggleToolButton"><tt class="classname">gtk.ToggleToolButton</tt></a>.</p></div><div class="refsect1" lang="en"><a name="constructor-gtktoggletoolbutton"></a><h2>Constructor</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.ToggleToolButton</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>stock_id</tt></b></span><span class="initializer">=None</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>stock_id</tt></b>:</span></td><td>the name of a stock item</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a newly created <a href="class-gtktoggletoolbutton.html" title="gtk.ToggleToolButton"><tt class="classname">gtk.ToggleToolButton</tt></a></td></tr></tbody></table><div class="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 href="class-gtktoggletoolbutton.html" title="gtk.ToggleToolButton"><tt class="classname">gtk.ToggleToolButton</tt></a>. If
<i class="parameter"><tt>stock_id</tt></i> is not <tt class="literal">None</tt> the toggle
tool button contains the image and text from the specified stock
item.</p></div><div class="refsect1" lang="en"><a name="id3562886"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtktoggletoolbutton--set-active"></a><h3>gtk.ToggleToolButton.set_active</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_active</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>is_active</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>is_active</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> the toggle tool
	  button is active</td></tr></tbody></table><div class="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 <tt class="methodname">set_active</tt>() method sets the status
of the toggle tool button to the value specified by
<i class="parameter"><tt>is_active</tt></i>. If <i class="parameter"><tt>is_active</tt></i> is
<tt class="literal">TRUE</tt> the <a href="class-gtktogglebutton.html" title="gtk.ToggleButton"><tt class="classname">gtk.ToggleButton</tt></a>
is 'pressed in' (active). This method causes the toggled signal to be
emitted.</p></div><div class="refsect2" lang="en"><a name="method-gtktoggletoolbutton--get-active"></a><h3>gtk.ToggleToolButton.get_active</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_active</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 the toggle tool
	  button is pressed in (active)</td></tr></tbody></table><div class="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 <tt class="methodname">get_active</tt>() method returns
<tt class="literal">TRUE</tt> if the toggle tool button is pressed in (active) and
<tt class="literal">FALSE</tt> if it is raised.</p></div></div><div class="refsect1" lang="en"><a name="id3563058"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtktoggletoolbutton--toggled"></a><h3>The "toggled" gtk.ToggleToolButton Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>toggletoolbutton</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></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"><i class="parameter"><tt>toggletoolbutton</tt></i>:</span></td><td>the toggletoolbutton that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This signal is available in GTK+ 2.4 and above.</p></div><p>The "toggled" signal is emitted when the toggle tool button
changes state.</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-gtktogglebutton.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-gtktoolbar.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.ToggleButton</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.Toolbar</td></tr></table></div></body></html>