File: class-gtkimagemenuitem.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 (32 lines) | stat: -rw-r--r-- 9,083 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
32
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.ImageMenuItem</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-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" lang="en"><a name="class-gtkimagemenuitem"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.ImageMenuItem</h2><p>gtk.ImageMenuItem &#8212; a menuitem that displays an image with an accel
label</p></div><div class="refsect1" lang="en"><a name="id3446562"></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 href="class-gtkmenuitem.html" title="gtk.MenuItem">gtk.MenuItem</a></span></span>):
<code class="constructorsynopsis">    <span class="methodname"><a href="class-gtkimagemenuitem.html#constructor-gtkimagemenuitem" title="Constructor">gtk.ImageMenuItem</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>stock_id</tt></b></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>accel_group</tt></b></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkimagemenuitem.html#method-gtkimagemenuitem--set-image" title="gtk.ImageMenuItem.set_image">set_image</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>image</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkimagemenuitem.html#method-gtkimagemenuitem--get-image" title="gtk.ImageMenuItem.get_image">get_image</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3446645"></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-gtkitem.html" title="gtk.Item">gtk.Item</a>
            +-- <a href="class-gtkmenuitem.html" title="gtk.MenuItem">gtk.MenuItem</a>
              +-- <a href="class-gtkimagemenuitem.html" title="gtk.ImageMenuItem">gtk.ImageMenuItem</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3446696"></a><h2>Properties</h2><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">"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></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3446758"></a><h2>Description</h2><p>The <a href="class-gtkimagemenuitem.html" title="gtk.ImageMenuItem"><tt class="classname">gtk.ImageMenuItem</tt></a> 
widget is a subclass of <a href="class-gtkmenuitem.html" title="gtk.MenuItem"><tt class="classname">gtk.MenuItem</tt></a> that
contains an image widget and a <a href="class-gtkaccellabel.html" title="gtk.AccelLabel"><tt class="classname">gtk.AccelLabel</tt></a>
though a <a href="class-gtkimagemenuitem.html" title="gtk.ImageMenuItem"><tt class="classname">gtk.ImageMenuItem</tt></a> 
can be created that has no image and an empty label.</p></div><div class="refsect1" lang="en"><a name="constructor-gtkimagemenuitem"></a><h2>Constructor</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.ImageMenuItem</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>stock_id</tt></b></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>accel_group</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 stock icon ID or <tt class="literal">None</tt> if
no image is needed</td></tr><tr><td><span class="term"><b class="parameter"><tt>accel_group</tt></b>:</span></td><td>the accel group to add the accel label mnemonic
to</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gtkimagemenuitem.html" title="gtk.ImageMenuItem"><tt class="classname">gtk.ImageMenuItem</tt></a> 
widget</td></tr></tbody></table><p>Creates a new <a href="class-gtkimagemenuitem.html" title="gtk.ImageMenuItem"><tt class="classname">gtk.ImageMenuItem</tt></a> 
with a stock label and image specified by <i class="parameter"><tt>stock_id</tt></i>.
If <i class="parameter"><tt>stock_id</tt></i> is not a stock item then the image will
be the "broken image" and the label text will be the string in
<i class="parameter"><tt>stock_id</tt></i>. The label text will be parsed for
underscore characters to indicate the mnemonic character for the
accelerator.</p><p>If <i class="parameter"><tt>stock_id</tt></i> specifies a stock item and
<i class="parameter"><tt>accel_group</tt></i> specifies a <a href="class-gtkaccelgroup.html" title="gtk.AccelGroup"><tt class="classname">gtk.AccelGroup</tt></a>
the accelerator is added to <i class="parameter"><tt>accel_group</tt></i>.</p></div><div class="refsect1" lang="en"><a name="id3446927"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkimagemenuitem--set-image"></a><h3>gtk.ImageMenuItem.set_image</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_image</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>image</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>image</tt></b>:</span></td><td>a widget to set as the image for the menu
item.</td></tr></tbody></table><p>The <tt class="methodname">set_image</tt>() method sets the image
of the image menu item to the widget specified in
<i class="parameter"><tt>image</tt></i>.</p></div><div class="refsect2" lang="en"><a name="method-gtkimagemenuitem--get-image"></a><h3>gtk.ImageMenuItem.get_image</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_image</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>the image in the image menu
item</td></tr></tbody></table><p>The <tt class="methodname">get_image</tt>() method gets the widget
that is currently set as the image of image menu item. See <a href="class-gtkimagemenuitem.html#method-gtkimagemenuitem--set-image" title="gtk.ImageMenuItem.set_image"><tt class="methodname">set_image</tt>()</a>.</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>