/usr/share/gtk-doc/html/pygtk/class-gtkcheckmenuitem.html is in python-gtk2-doc 2.24.0-4.
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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.CheckMenuItem</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-gtkcheckbutton.html" title="gtk.CheckButton"><link rel="next" href="class-gtkclipboard.html" title="gtk.Clipboard"></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.CheckMenuItem</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkcheckbutton.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkclipboard.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.CheckMenuItem"><a name="class-gtkcheckmenuitem"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.CheckMenuItem</h2><p>gtk.CheckMenuItem — a menu item with a check box.</p></div><div class="refsect1" title="Synopsis"><a name="id3640105"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.CheckMenuItem</span></span>(<span class="ooclass"><span class="classname"><a class="link" href="class-gtkmenuitem.html" title="gtk.MenuItem">gtk.MenuItem</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gtkcheckmenuitem.html#constructor-gtkcheckmenuitem" title="Constructor">gtk.CheckMenuItem</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-gtkcheckmenuitem.html#method-gtkcheckmenuitem--set-active" title="gtk.CheckMenuItem.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-gtkcheckmenuitem.html#method-gtkcheckmenuitem--get-active" title="gtk.CheckMenuItem.get_active">get_active</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcheckmenuitem.html#method-gtkcheckmenuitem--toggled" title="gtk.CheckMenuItem.toggled">toggled</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcheckmenuitem.html#method-gtkcheckmenuitem--set-inconsistent" title="gtk.CheckMenuItem.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-gtkcheckmenuitem.html#method-gtkcheckmenuitem--get-inconsistent" title="gtk.CheckMenuItem.get_inconsistent">get_inconsistent</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcheckmenuitem.html#method-gtkcheckmenuitem--set-draw-as-radio" title="gtk.CheckMenuItem.set_draw_as_radio">set_draw_as_radio</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>draw_as_radio</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkcheckmenuitem.html#method-gtkcheckmenuitem--get-draw-as-radio" title="gtk.CheckMenuItem.get_draw_as_radio">get_draw_as_radio</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3640315"></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-gtkitem.html" title="gtk.Item">gtk.Item</a>
+-- <a class="link" href="class-gtkmenuitem.html" title="gtk.MenuItem">gtk.MenuItem</a>
+-- <a class="link" href="class-gtkcheckmenuitem.html" title="gtk.CheckMenuItem">gtk.CheckMenuItem</a>
</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3640368"></a><h2>Implemented Interfaces</h2><p>
<a class="link" href="class-gtkcheckmenuitem.html" title="gtk.CheckMenuItem"><code class="classname">gtk.CheckMenuItem</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.CheckMenuItem Properties"><a name="properties-gtkcheckmenuitem"></a><h2>gtk.CheckMenuItem 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><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">"active"</td><td valign="top">Read/Write</td><td valign="top">If <code class="literal">True</code>, the menu item is checked.</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>, display an "inconsistent"
state.</td></tr><tr valign="top"><td valign="top">"draw-as-radio"</td><td valign="top">Read/Write</td><td valign="top">If <code class="literal">True</code>, display like a radio menu item.
GTK+ 2.4 and above.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.CheckMenuItem Style Properties"><a name="style-properties-gtkcheckmenuitem"></a><h2>gtk.CheckMenuItem 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-gtkmenuitem.html#style-properties-gtkmenuitem" title="gtk.MenuItem Style Properties">gtk.MenuItem 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="4in"></colgroup><tbody><tr valign="top"><td valign="top">"indicator-size"</td><td valign="top">Read</td><td valign="top">The size of the check or radio indicator.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Attributes"><a name="id3640592"></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 width="1in"><col width="1in"><col width="4in"></colgroup><tbody><tr valign="top"><td valign="top">"active"</td><td valign="top">Read</td><td valign="top">If <code class="literal">True</code>, the menu item is
checked.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.CheckMenuItem Signal Prototypes"><a name="signal-prototypes-gtkcheckmenuitem"></a><h2>gtk.CheckMenuItem 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-gtkitem.html#signal-prototypes-gtkitem" title="gtk.Item Signal Prototypes">gtk.Item Signal Prototypes</a></p><p><a class="link" href="class-gtkmenuitem.html#signal-prototypes-gtkmenuitem" title="gtk.MenuItem Signal Prototypes">gtk.MenuItem 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-gtkcheckmenuitem.html#signal-gtkcheckmenuitem--toggled" title='The "toggled" gtk.CheckMenuItem 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>checkmenuitem</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="id3640765"></a><h2>Description</h2><p>A <a class="link" href="class-gtkcheckmenuitem.html" title="gtk.CheckMenuItem"><code class="classname">gtk.CheckMenuItem</code></a>
is a menu item that maintains the state of a boolean value in addition to a
<a class="link" href="class-gtkmenuitem.html" title="gtk.MenuItem"><code class="classname">gtk.MenuItem</code></a>'s
usual role in activating application code. A check box indicating the state
of the boolean value is displayed at the left side of the <a class="link" href="class-gtkmenuitem.html" title="gtk.MenuItem"><code class="classname">gtk.MenuItem</code></a>.
Activating the <a class="link" href="class-gtkmenuitem.html" title="gtk.MenuItem"><code class="classname">gtk.MenuItem</code></a>
toggles the value.</p></div><div class="refsect1" title="Constructor"><a name="constructor-gtkcheckmenuitem"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.CheckMenuItem</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></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 to be used as the label text or
<code class="literal">None</code></td></tr><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 underscore in the
label text indicates the next character should be underlined and used for the
mnemonic accelerator key if it is the first character so
marked. Available in PyGTK 2.4 and above.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new checkmenuitem</td></tr></tbody></table><p>Creates a new checkmenuitem with a text label specified by
<em class="parameter"><code>label</code></em>. If <em class="parameter"><code>label</code></em> is
<code class="literal">None</code> or not specified then no label is created. If
<em class="parameter"><code>label</code></em> contains underscore characters then the
character following the underscore will be underlined and the character
following the first underscore will be used as the mnemonic keyboard
accelerator.</p><p>In PyGTK 2.4 and above the <em class="parameter"><code>use_underline</code></em>
parameter is available and defaults to <code class="literal">True</code>. If
<em class="parameter"><code>use_underline</code></em> is set to <code class="literal">False</code> the
label text will not be parsed for mnemonic characters.</p></div><div class="refsect1" title="Methods"><a name="id3640970"></a><h2>Methods</h2><div class="refsect2" title="gtk.CheckMenuItem.set_active"><a name="method-gtkcheckmenuitem--set-active"></a><h3>gtk.CheckMenuItem.set_active</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_active</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>is_active</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>is_active</code></strong> :</span></p></td><td>If True set the check box
active</td></tr></tbody></table><p>The <code class="methodname">set_active</code>() method sets the active
state of the menu item's check box according to the value of
<em class="parameter"><code>is_active</code></em>.</p></div><div class="refsect2" title="gtk.CheckMenuItem.get_active"><a name="method-gtkcheckmenuitem--get-active"></a><h3>gtk.CheckMenuItem.get_active</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_active</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 the menu item is
checked (check box is active).</td></tr></tbody></table><p>The <code class="methodname">get_active</code>() method returns whether
the check menu item is active. See <a class="link" href="class-gtkcheckmenuitem.html#method-gtkcheckmenuitem--set-active" title="gtk.CheckMenuItem.set_active"><code class="function">gtk.CheckMenuItem.set_active()</code></a>.</p></div><div class="refsect2" title="gtk.CheckMenuItem.toggled"><a name="method-gtkcheckmenuitem--toggled"></a><h3>gtk.CheckMenuItem.toggled</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">toggled</span>(<span class="methodparam"></span>)</code></pre><p>The toggle() method emits the "toggled" signal on the
checkmenuitem</p></div><div class="refsect2" title="gtk.CheckMenuItem.set_inconsistent"><a name="method-gtkcheckmenuitem--set-inconsistent"></a><h3>gtk.CheckMenuItem.set_inconsistent</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_inconsistent</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>setting</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>setting</code></strong> :</span></p></td><td>If <code class="literal">True</code> display an
"inconsistent" third state check</td></tr></tbody></table><p>The <code class="methodname">set_inconsistent</code>() method sets the
check box to display an "inconsistent" state if the value of
<em class="parameter"><code>setting</code></em> is <code class="literal">True</code>. The
"inconsistent" state display is removed if <em class="parameter"><code>setting</code></em> is
<code class="literal">False</code>.</p><p>An application may want to display an "inconsistent" state if
the user has selected a range of elements (such as some text or spreadsheet
cells) that are affected by a boolean setting, and the current values for
those elements cannot be represented by a single checkmenuitem state. The
<code class="methodname">set_inconsistent</code>() method only affects visual
appearance, it doesn't affect the semantics of the widget.</p></div><div class="refsect2" title="gtk.CheckMenuItem.get_inconsistent"><a name="method-gtkcheckmenuitem--get-inconsistent"></a><h3>gtk.CheckMenuItem.get_inconsistent</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_inconsistent</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 the checkmenuitem
displays the "inconsistent" state</td></tr></tbody></table><p>The <code class="methodname">get_inconsistent</code>() method retrieves
the value set by the <a class="link" href="class-gtkcheckmenuitem.html#method-gtkcheckmenuitem--set-inconsistent" title="gtk.CheckMenuItem.set_inconsistent"><code class="methodname">set_inconsistent()</code></a>
method.</p></div><div class="refsect2" title="gtk.CheckMenuItem.set_draw_as_radio"><a name="method-gtkcheckmenuitem--set-draw-as-radio"></a><h3>gtk.CheckMenuItem.set_draw_as_radio</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_draw_as_radio</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>draw_as_radio</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_as_radio</code></strong> :</span></p></td><td>If <code class="literal">True</code> display the check
menu item like a radio menu 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">set_draw_as_radio</code>() method displays
the check menu item like a radio menu item if the value of
<em class="parameter"><code>draw_as_radio</code></em> is <code class="literal">True</code>. If
<em class="parameter"><code>draw_as_radio</code></em> is <code class="literal">False</code> the check
menu item is displayed as normal.</p></div><div class="refsect2" title="gtk.CheckMenuItem.get_draw_as_radio"><a name="method-gtkcheckmenuitem--get-draw-as-radio"></a><h3>gtk.CheckMenuItem.get_draw_as_radio</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_draw_as_radio</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 the checkmenuitem
should be displayed like a radio menu 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_draw_as_radio</code>() method
retrieves the value set by the <a class="link" href="class-gtkcheckmenuitem.html#method-gtkcheckmenuitem--set-draw-as-radio" title="gtk.CheckMenuItem.set_draw_as_radio"><code class="methodname">set_draw_as_radio()</code></a>
method.</p></div></div><div class="refsect1" title="Signals"><a name="id3641459"></a><h2>Signals</h2><div class="refsect2" title='The "toggled" gtk.CheckMenuItem Signal'><a name="signal-gtkcheckmenuitem--toggled"></a><h3>The "toggled" gtk.CheckMenuItem Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>checkmenuitem</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>checkmenuitem</code></em> :</span></p></td><td>the checkmenuitem 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 "toggled" signal is emitted when the checkmenuitem 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-gtkcheckbutton.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-gtkclipboard.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.CheckButton </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.Clipboard</td></tr></table></div></body></html>
|