/usr/share/gtk-doc/html/pygtk/class-gtkimagemenuitem.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 | <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.ImageMenuItem</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-gtkimage.html" title="gtk.Image"><link rel="next" href="class-gtkimcontext.html" title="gtk.IMContext"></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.ImageMenuItem</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkimage.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkimcontext.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.ImageMenuItem"><a name="class-gtkimagemenuitem"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.ImageMenuItem</h2><p>gtk.ImageMenuItem — a menuitem that displays an image with an accel
label</p></div><div class="refsect1" title="Synopsis"><a name="id3758140"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.ImageMenuItem</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-gtkimagemenuitem.html#constructor-gtkimagemenuitem" title="Constructor">gtk.ImageMenuItem</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stock_id</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_group</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkimagemenuitem.html#method-gtkimagemenuitem--set-image" title="gtk.ImageMenuItem.set_image">set_image</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>image</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkimagemenuitem.html#method-gtkimagemenuitem--get-image" title="gtk.ImageMenuItem.get_image">get_image</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkimagemenuitem.html#method-gtkimagemenuitem--set-always-show-image" title="gtk.ImageMenuItem.set_always_show_image">set_always_show_image</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>always_show</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkimagemenuitem.html#method-gtkimagemenuitem--get-always-show-image" title="gtk.ImageMenuItem.get_always_show_image">get_always_show_image</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkimagemenuitem.html#method-gtkimagemenuitem--set-use-stock" title="gtk.ImageMenuItem.set_use_stock">set_use_stock</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_stock</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkimagemenuitem.html#method-gtkimagemenuitem--get-use-stock" title="gtk.ImageMenuItem.get_use_stock">get_use_stock</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtkimagemenuitem.html#method-gtkimagemenuitem--set-accel-group" title="gtk.ImageMenuItem.set_accel_group">set_accel_group</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_group</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3758388"></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-gtkimagemenuitem.html" title="gtk.ImageMenuItem">gtk.ImageMenuItem</a>
</pre></div><div class="refsect1" title="Implemented Interfaces"><a name="id3758451"></a><h2>Implemented Interfaces</h2><p>
<a class="link" href="class-gtkimagemenuitem.html" title="gtk.ImageMenuItem"><code class="classname">gtk.ImageMenuItem</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.ImageMenuItem Properties"><a name="properties-gtkimagemenuitem"></a><h2>gtk.ImageMenuItem 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="4in"></colgroup><tbody><tr valign="top"><td valign="top">"accel-group"</td><td valign="top">Write</td><td valign="top">The Accel Group to use for stock accelerator keys.
Available in GTK+ 2.16 and above.</td></tr><tr valign="top"><td valign="top">"always-show-image"</td><td valign="top">Read-Write-Construct</td><td valign="top">If <code class="literal">True</code>, the menu item will ignore the "gtk-menu-images" setting
and always show the image, if available. Use this property if the menuitem would be useless
or hard to use without the image.
Default value: <code class="literal">False</code>.
Available in GTK+ 2.16 and above.</td></tr><tr valign="top"><td valign="top">"image"</td><td valign="top">Read-Write</td><td valign="top">the child widget that is next to the text in the menu item</td></tr><tr valign="top"><td valign="top">"use-stock"</td><td valign="top">Read-Write-Construct</td><td valign="top">If <code class="literal">True</code>, the label set in the menuitem is used as a stock id
to select the stock item for the item.
Default value: <code class="literal">False</code>.
Available in GTK+ 2.16 and above.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="gtk.ImageMenuItem Style Properties"><a name="style-properties-gtkimagemenuitem"></a><h2>gtk.ImageMenuItem 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><div class="refsect1" title="gtk.ImageMenuItem Signal Prototypes"><a name="signal-prototypes-gtkimagemenuitem"></a><h2>gtk.ImageMenuItem 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></div><div class="refsect1" title="Description"><a name="id3758745"></a><h2>Description</h2><p>The <a class="link" href="class-gtkimagemenuitem.html" title="gtk.ImageMenuItem"><code class="classname">gtk.ImageMenuItem</code></a>
widget is a subclass of <a class="link" href="class-gtkmenuitem.html" title="gtk.MenuItem"><code class="classname">gtk.MenuItem</code></a> that
contains an image widget and a <a class="link" href="class-gtkaccellabel.html" title="gtk.AccelLabel"><code class="classname">gtk.AccelLabel</code></a>
though a <a class="link" href="class-gtkimagemenuitem.html" title="gtk.ImageMenuItem"><code class="classname">gtk.ImageMenuItem</code></a>
can be created that has no image and an empty label.</p></div><div class="refsect1" title="Constructor"><a name="constructor-gtkimagemenuitem"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.ImageMenuItem</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stock_id</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_group</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>stock_id</code></strong> :</span></p></td><td>the stock icon ID or <code class="literal">None</code> if
no image is needed</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>accel_group</code></strong> :</span></p></td><td>the accel group to add the accel label mnemonic
to</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-gtkimagemenuitem.html" title="gtk.ImageMenuItem"><code class="classname">gtk.ImageMenuItem</code></a>
widget</td></tr></tbody></table><p>Creates a new <a class="link" href="class-gtkimagemenuitem.html" title="gtk.ImageMenuItem"><code class="classname">gtk.ImageMenuItem</code></a>
with a stock label and image specified by <em class="parameter"><code>stock_id</code></em>.
If <em class="parameter"><code>stock_id</code></em> is not a stock item then the image will
be the "broken image" and the label text will be the string in
<em class="parameter"><code>stock_id</code></em>. The label text will be parsed for
underscore characters to indicate the mnemonic character for the
accelerator.</p><p>If <em class="parameter"><code>stock_id</code></em> specifies a stock item and
<em class="parameter"><code>accel_group</code></em> specifies a <a class="link" href="class-gtkaccelgroup.html" title="gtk.AccelGroup"><code class="classname">gtk.AccelGroup</code></a>
the accelerator is added to <em class="parameter"><code>accel_group</code></em>.</p></div><div class="refsect1" title="Methods"><a name="id3758979"></a><h2>Methods</h2><div class="refsect2" title="gtk.ImageMenuItem.set_image"><a name="method-gtkimagemenuitem--set-image"></a><h3>gtk.ImageMenuItem.set_image</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_image</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>image</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>image</code></strong> :</span></p></td><td>a widget to set as the image for the menu
item.</td></tr></tbody></table><p>The <code class="methodname">set_image</code>() method sets the image
of the image menu item to the widget specified in
<em class="parameter"><code>image</code></em>.</p></div><div class="refsect2" title="gtk.ImageMenuItem.get_image"><a name="method-gtkimagemenuitem--get-image"></a><h3>gtk.ImageMenuItem.get_image</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_image</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 image in the image menu
item</td></tr></tbody></table><p>The <code class="methodname">get_image</code>() method gets the widget
that is currently set as the image of image menu item. See <a class="link" href="class-gtkimagemenuitem.html#method-gtkimagemenuitem--set-image" title="gtk.ImageMenuItem.set_image"><code class="methodname">set_image</code>()</a>.</p></div><div class="refsect2" title="gtk.ImageMenuItem.set_always_show_image"><a name="method-gtkimagemenuitem--set-always-show-image"></a><h3>gtk.ImageMenuItem.set_always_show_image</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_always_show_image</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>always_show</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>always_show</code></strong> :</span></p></td><td><code class="literal">True</code> if the menuitem should always show the image, <code class="literal">False</code> otherwise.</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.16 and above.</p></div><p>The <code class="methodname">set_always_show_image</code>() method sets whether
the menu item will ignore the "gtk-menu-images" setting and always show the image,
if available.</p></div><div class="refsect2" title="gtk.ImageMenuItem.get_always_show_image"><a name="method-gtkimagemenuitem--get-always-show-image"></a><h3>gtk.ImageMenuItem.get_always_show_image</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_always_show_image</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 menuitem will always show the image, <code class="literal">False</code> otherwise..</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.16 and above.</p></div><p>The <code class="methodname">get_always_show_image</code>() method returns whether
the menu item will ignore the "gtk-menu-images" setting and always show the image,
if available.</p></div><div class="refsect2" title="gtk.ImageMenuItem.set_use_stock"><a name="method-gtkimagemenuitem--set-use-stock"></a><h3>gtk.ImageMenuItem.set_use_stock</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_use_stock</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>use_stock</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_stock</code></strong> :</span></p></td><td><code class="literal">True</code> if the menuitem should use a stock item, <code class="literal">False</code> otherwise.</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.16 and above.</p></div><p>The <code class="methodname">set_use_stock</code>() method sets whether
the label set in the menuitem is used as a stock id to select the stock
item for the item.</p></div><div class="refsect2" title="gtk.ImageMenuItem.get_use_stock"><a name="method-gtkimagemenuitem--get-use-stock"></a><h3>gtk.ImageMenuItem.get_use_stock</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_use_stock</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 menuitem will use a stock item, <code class="literal">False</code> otherwise.</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.16 and above.</p></div><p>The <code class="methodname">get_use_stock</code>() method gets whether
the label set in the menuitem is used as a stock id to select the stock item for the item.</p></div><div class="refsect2" title="gtk.ImageMenuItem.set_accel_group"><a name="method-gtkimagemenuitem--set-accel-group"></a><h3>gtk.ImageMenuItem.set_accel_group</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_accel_group</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>accel_group</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>accel_group</code></strong> :</span></p></td><td>The <a class="link" href="class-gtkaccelgroup.html" title="gtk.AccelGroup"><code class="classname">gtk.AccelGroup</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 method is available in PyGTK 2.16 and above.</p></div><p>The <code class="methodname">set_accel_group</code>() method specifies an accel_group to add the menu items accelerator to (this only
applies to stock items so a stock item must already be set, make sure to call
<PYGTKDOCLINK HREF="method-gtkimage-menu-item--set-use-stock"><code class="methodname">get_accel_width</code></PYGTKDOCLINK>
gtk_image_menu_item_set_use_stock()
and gtk_menu_item_set_label()
with a valid stock item first).</p><p>If you want this menu item to have changeable accelerators then you shouldnt need this (see
gtk_image_menu_item_new_from_stock()).</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-gtkimage.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-gtkimcontext.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.Image </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.IMContext</td></tr></table></div></body></html>
|