~ubuntu-branches/ubuntu/natty/pygtk/natty-proposed

« back to all changes in this revision

Viewing changes to docs/html/class-gtktogglebutton.html

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-06-22 16:49:42 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090622164942-19zeltp4z0u5iw72
Tags: 2.15.2-0ubuntu1
* New upstream version:
  - Rename gtk.Statusbar.remove() to gtk.Statusbar.remove_message
  - Allow pango.Context creation 
  - Make gtk.gdk.Pixbuf.add_alpha accept integers, retaining backward
    compatibility accepting also chars 
  - Protect window obj from GC in gtk.window_get_toplevels 
  - Plug huge number of memory leaks in Pango wrappers 
  - Add gtk.gdk.WINDOWING constant 
  - Wrap gdk_pixbuf_apply_embedded_orientation 
  - Modernize constructors of seven more types 
  - Don't free a string we don't own 
  - Some docs tweaking 
* debian/control.in:
  - set vcs location
* debian/patches/02_fix_get_application_info_crash.patch:
  - the change is in the new version

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.ToggleButton</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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-gtktoggleaction.html" title="gtk.ToggleAction"><link rel="next" href="class-gtktoggletoolbutton.html" title="gtk.ToggleToolButton"></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.ToggleButton</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktoggleaction.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtktoggletoolbutton.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtktogglebutton"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.ToggleButton</h2><p>gtk.ToggleButton — a button that retains its state</p></div><div class="refsect1" lang="en"><a name="id3740439"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.ToggleButton</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkbutton.html" title="gtk.Button">gtk.Button</a></span></span>):
2
 
<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gtktogglebutton.html#constructor-gtktogglebutton" title="Constructor">gtk.ToggleButton</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_underline</code></strong></span><span class="initializer">=True</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktogglebutton.html#method-gtktogglebutton--set-mode" title="gtk.ToggleButton.set_mode">set_mode</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>draw_indicator</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktogglebutton.html#method-gtktogglebutton--get-mode" title="gtk.ToggleButton.get_mode">get_mode</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktogglebutton.html#method-gtktogglebutton--set-active" title="gtk.ToggleButton.set_active">set_active</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_active</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktogglebutton.html#method-gtktogglebutton--get-active" title="gtk.ToggleButton.get_active">get_active</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktogglebutton.html#method-gtktogglebutton--toggled" title="gtk.ToggleButton.toggled">toggled</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktogglebutton.html#method-gtktogglebutton--set-inconsistent" title="gtk.ToggleButton.set_inconsistent">set_inconsistent</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktogglebutton.html#method-gtktogglebutton--get-inconsistent" title="gtk.ToggleButton.get_inconsistent">get_inconsistent</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3740681"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
 
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.ToggleButton</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" 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-gtktoggleaction.html" title="gtk.ToggleAction"><link rel="next" href="class-gtktoggletoolbutton.html" title="gtk.ToggleToolButton"></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.ToggleButton</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktoggleaction.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtktoggletoolbutton.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtktogglebutton"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.ToggleButton</h2><p>gtk.ToggleButton — a button that retains its state</p></div><div class="refsect1" lang="en"><a name="id3941346"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.ToggleButton</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkbutton.html" title="gtk.Button">gtk.Button</a></span></span>):
 
2
<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gtktogglebutton.html#constructor-gtktogglebutton" title="Constructor">gtk.ToggleButton</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_underline</code></strong></span><span class="initializer">=True</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktogglebutton.html#method-gtktogglebutton--set-mode" title="gtk.ToggleButton.set_mode">set_mode</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>draw_indicator</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktogglebutton.html#method-gtktogglebutton--get-mode" title="gtk.ToggleButton.get_mode">get_mode</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktogglebutton.html#method-gtktogglebutton--set-active" title="gtk.ToggleButton.set_active">set_active</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_active</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktogglebutton.html#method-gtktogglebutton--get-active" title="gtk.ToggleButton.get_active">get_active</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktogglebutton.html#method-gtktogglebutton--toggled" title="gtk.ToggleButton.toggled">toggled</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktogglebutton.html#method-gtktogglebutton--set-inconsistent" title="gtk.ToggleButton.set_inconsistent">set_inconsistent</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtktogglebutton.html#method-gtktogglebutton--get-inconsistent" title="gtk.ToggleButton.get_inconsistent">get_inconsistent</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3941588"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
3
3
  +-- <a class="link" href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
4
4
    +-- <a class="link" href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
5
5
      +-- <a class="link" href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
6
6
        +-- <a class="link" href="class-gtkbin.html" title="gtk.Bin">gtk.Bin</a>
7
7
          +-- <a class="link" href="class-gtkbutton.html" title="gtk.Button">gtk.Button</a>
8
8
            +-- <a class="link" href="class-gtktogglebutton.html" title="gtk.ToggleButton">gtk.ToggleButton</a>
9
 
</pre></div><div class="refsect1" lang="en"><a name="id3740738"></a><h2>Implemented Interfaces</h2><p>
 
9
</pre></div><div class="refsect1" lang="en"><a name="id3941645"></a><h2>Implemented Interfaces</h2><p>
10
10
                        <a class="link" href="class-gtktogglebutton.html" title="gtk.ToggleButton"><code class="classname">gtk.ToggleButton</code></a>
11
11
                        implements 
12
12
                        <a class="link" href="class-gtkbuildable.html" title="gtk.Buildable"><code class="classname">gtk.Buildable</code></a>
13
13
                </p></div><div class="refsect1" lang="en"><a name="properties-gtktogglebutton"></a><h2>gtk.ToggleButton 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-gtkbutton.html#properties-gtkbutton" title="gtk.Button Properties">gtk.Button 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><col><col></colgroup><tbody><tr valign="top"><td valign="top">"active"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, the toggle button should be
14
14
pressed in.</td></tr><tr valign="top"><td valign="top">"draw-indicator"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, the toggle part of the
15
15
button is displayed.</td></tr><tr valign="top"><td valign="top">"inconsistent"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, the toggle button is in an
16
 
"in between" state.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="style-properties-gtktogglebutton"></a><h2>gtk.ToggleButton 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><p><a class="link" href="class-gtkbutton.html#style-properties-gtkbutton" title="gtk.Button Style Properties">gtk.Button Style Properties</a></p></div><div class="refsect1" lang="en"><a name="id3740951"></a><h2>Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"draw_indicator"</td><td valign="top">Read</td><td valign="top">If <code class="literal">True</code>, the toggle part of the
17
 
button is displayed.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtktogglebutton"></a><h2>gtk.ToggleButton 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-gtkbutton.html#signal-prototypes-gtkbutton" title="gtk.Button Signal Prototypes">gtk.Button Signal Prototypes</a></p><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-gtktogglebutton.html#signal-gtktogglebutton--toggled" title='The "toggled" gtk.ToggleButton Signal'>toggled</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>togglebutton</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" lang="en"><a name="id3741146"></a><h2>Description</h2><p>A <a class="link" href="class-gtktogglebutton.html" title="gtk.ToggleButton"><code class="classname">gtk.ToggleButton</code></a> 
 
16
"in between" state.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="style-properties-gtktogglebutton"></a><h2>gtk.ToggleButton 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><p><a class="link" href="class-gtkbutton.html#style-properties-gtkbutton" title="gtk.Button Style Properties">gtk.Button Style Properties</a></p></div><div class="refsect1" lang="en"><a name="id3941858"></a><h2>Attributes</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table cellpadding="5" width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"draw_indicator"</td><td valign="top">Read</td><td valign="top">If <code class="literal">True</code>, the toggle part of the
 
17
button is displayed.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtktogglebutton"></a><h2>gtk.ToggleButton 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-gtkbutton.html#signal-prototypes-gtkbutton" title="gtk.Button Signal Prototypes">gtk.Button Signal Prototypes</a></p><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-gtktogglebutton.html#signal-gtktogglebutton--toggled" title='The "toggled" gtk.ToggleButton Signal'>toggled</a>"</span></p></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>togglebutton</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" lang="en"><a name="id3942053"></a><h2>Description</h2><p>A <a class="link" href="class-gtktogglebutton.html" title="gtk.ToggleButton"><code class="classname">gtk.ToggleButton</code></a> 
18
18
is a <a class="link" href="class-gtkbutton.html" title="gtk.Button"><code class="classname">gtk.Button</code></a> that has
19
19
two stable states: 'pressed-in' ("on" or "active") and "normal" ("off" or
20
20
"inactive"). The state changes to the alternate state each time the
35
35
<code class="literal">None</code> or not specified, no label will be created.</p><p>In PyGTK 2.4 and above the <em class="parameter"><code>use_underline</code></em>
36
36
parameter is available and defaults to <code class="literal">True</code>. If
37
37
<em class="parameter"><code>use_underline</code></em> is set to <code class="literal">False</code> the
38
 
label text will not be parsed for mnemonic characters.</p></div><div class="refsect1" lang="en"><a name="id3741420"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtktogglebutton--set-mode"></a><h3>gtk.ToggleButton.set_mode</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_mode</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>draw_indicator</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>draw_indicator</code></strong> :</span></p></td><td>if <code class="literal">True</code> display the button
 
38
label text will not be parsed for mnemonic characters.</p></div><div class="refsect1" lang="en"><a name="id3942327"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtktogglebutton--set-mode"></a><h3>gtk.ToggleButton.set_mode</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_mode</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>draw_indicator</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>draw_indicator</code></strong> :</span></p></td><td>if <code class="literal">True</code> display the button
39
39
as an indicator with a label; if <code class="literal">False</code> just display as a
40
40
normal button</td></tr></tbody></table><p>The <code class="methodname">set_mode</code>() method sets the
41
41
"draw-indicator" property to the value of<em class="parameter"><code>
75
75
the value of the "inconsistent" property. If "inconsistent" is
76
76
<code class="literal">True</code> the togglebutton is displayed in an 'in between'
77
77
state. See the <a class="link" href="class-gtktogglebutton.html#method-gtktogglebutton--set-inconsistent" title="gtk.ToggleButton.set_inconsistent"><code class="methodname">set_inconsistent</code>()</a> 
78
 
method for more details.</p></div></div><div class="refsect1" lang="en"><a name="id3742058"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtktogglebutton--toggled"></a><h3>The "toggled" gtk.ToggleButton Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>togglebutton</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>togglebutton</code></em> :</span></p></td><td>the togglebutton that received the
 
78
method for more details.</p></div></div><div class="refsect1" lang="en"><a name="id3942965"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtktogglebutton--toggled"></a><h3>The "toggled" gtk.ToggleButton Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>togglebutton</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>togglebutton</code></em> :</span></p></td><td>the togglebutton that received the
79
79
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
80
80
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
81
81
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if