source: pkg/pygtk/branches/upstream/current/docs/html/class-gtkmenutoolbutton.html @ 4

Revision 4, 17.3 KB checked in by alanbach-guest, 7 years ago (diff)

[svn-inject] Installing original source of pygtk

Line 
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.MenuToolButton</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.68.1"><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-gtkmenushell.html" title="gtk.MenuShell"><link rel="next" href="class-gtkmessagedialog.html" title="gtk.MessageDialog"></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.MenuToolButton</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkmenushell.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkmessagedialog.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkmenutoolbutton"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.MenuToolButton</h2><p>gtk.MenuToolButton — A <a href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a>
2containing a button with an additional dropdown menu (new in PyGTK
32.6)</p></div><div class="refsect1" lang="en"><a name="id3304486"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.MenuToolButton</span></span>(<span class="ooclass"><span class="classname"><a href="class-gtktoolbutton.html" title="gtk.ToolButton">gtk.ToolButton</a></span></span>):
4<code class="constructorsynopsis">    <span class="methodname"><a href="class-gtkmenutoolbutton.html#constructor-gtkmenutoolbutton1" title="gtk.MenuToolButton">gtk.MenuToolButton</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stock_id</code></strong></span></span>)</code><br><code class="constructorsynopsis">    <span class="methodname"><a href="class-gtkmenutoolbutton.html#constructor-gtkmenutoolbutton2" title="gtk.MenuToolButton">gtk.MenuToolButton</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkmenutoolbutton.html#method-gtkmenutoolbutton--set-menu" title="gtk.MenuToolButton.set_menu">set_menu</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>menu</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkmenutoolbutton.html#method-gtkmenutoolbutton--get-menu" title="gtk.MenuToolButton.get_menu">get_menu</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkmenutoolbutton.html#method-gtkmenutoolbutton--set-arrow-tooltip" title="gtk.MenuToolButton.set_arrow_tooltip">set_arrow_tooltip</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tooltips</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>tip_text</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>tip_private</code></strong></span><span class="initializer">=None</span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3304690"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
5  +-- <a href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
6    +-- <a href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
7      +-- <a href="class-gtkcontainer.html" title="gtk.Container">gtk.Container</a>
8        +-- <a href="class-gtkbin.html" title="gtk.Bin">gtk.Bin</a>
9          +-- <a href="class-gtktoolitem.html" title="gtk.ToolItem">gtk.ToolItem</a>
10            +-- <a href="class-gtktoolbutton.html" title="gtk.ToolButton">gtk.ToolButton</a>
11              +-- <a href="class-gtkmenutoolbutton.html" title="gtk.MenuToolButton">gtk.MenuToolButton</a>
12</pre></div><div class="refsect1" lang="en"><a name="properties-gtkmenutoolbutton"></a><h2>gtk.MenuToolButton Properties</h2><p><a href="class-gtkobject.html#properties-gtkobject" title="gtk.Object Properties">gtk.Object Properties</a></p><p><a href="class-gtkwidget.html#properties-gtkwidget" title="gtk.Widget Properties">gtk.Widget Properties</a></p><p><a href="class-gtkcontainer.html#properties-gtkcontainer" title="gtk.Container Properties">gtk.Container Properties</a></p><p><a href="class-gtktoolitem.html#properties-gtktoolitem" title="gtk.ToolItem Properties">gtk.ToolItem Properties</a></p><p><a href="class-gtktoolbutton.html#properties-gtktoolbutton" title="gtk.ToolButton Properties">gtk.ToolButton 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">"menu"</td><td valign="top">Read-Write</td><td valign="top">The dropdown <a href="class-gtkmenu.html" title="gtk.Menu"><code class="classname">gtk.Menu</code></a>.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="style-properties-gtkmenutoolbutton"></a><h2>gtk.MenuToolButton Style Properties</h2><p><a href="class-gtkwidget.html#style-properties-gtkwidget" title="gtk.Widget Style Properties">gtk.Widget Style Properties</a></p><p><a href="class-gtktoolbutton.html#style-properties-gtktoolbutton" title="gtk.ToolButton Style Properties">gtk.ToolButton Style Properties</a></p></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtkmenutoolbutton"></a><h2>gtk.MenuToolButton Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><p><a href="class-gtkobject.html#signal-prototypes-gtkobject" title="gtk.Object Signal Prototypes">gtk.Object Signal Prototypes</a></p><p><a href="class-gtkwidget.html#signal-prototypes-gtkwidget" title="gtk.Widget Signal Prototypes">gtk.Widget Signal Prototypes</a></p><p><a href="class-gtkcontainer.html#signal-prototypes-gtkcontainer" title="gtk.Container Signal Prototypes">gtk.Container Signal Prototypes</a></p><p><a href="class-gtktoolitem.html#signal-prototypes-gtktoolitem" title="gtk.ToolItem Signal Prototypes">gtk.ToolItem Signal Prototypes</a></p><p><a href="class-gtktoolbutton.html#signal-prototypes-gtktoolbutton" title="gtk.ToolButton Signal Prototypes">gtk.ToolButton Signal Prototypes</a></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term">"<a href="class-gtkmenutoolbutton.html#signal-gtkmenutoolbutton--show-menu" title='The "show-menu" gtk.MenuToolButton Signal'>show-menu</a>"</span></td><td><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>menutoolbutton</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="id3305024"></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.6 and above.</p></div><p>A <a href="class-gtkmenutoolbutton.html" title="gtk.MenuToolButton"><code class="classname">gtk.MenuToolButton</code></a>
13is a <a href="class-gtktoolitem.html" title="gtk.ToolItem"><code class="classname">gtk.ToolItem</code></a> that
14contains a button and a small additional button with an arrow. When clicked,
15the arrow button pops up a dropdown menu.</p></div><div class="refsect1" lang="en"><a name="id3305060"></a><h2>Constructor</h2><div class="refsect2" lang="en"><a name="constructor-gtkmenutoolbutton1"></a><h3>gtk.MenuToolButton</h3><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.MenuToolButton</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>stock_id</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>stock_id</code></strong> :</span></td><td></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a new <a href="class-gtkmenutoolbutton.html" title="gtk.MenuToolButton"><code class="classname">gtk.MenuToolButton</code></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.6 and above.</p></div><p>Creates a new <a href="class-gtkmenutoolbutton.html" title="gtk.MenuToolButton"><code class="classname">gtk.MenuToolButton</code></a>
16using from the stock item specified by <em class="parameter"><code>stock_id</code></em>. The
17new <a href="class-gtkmenutoolbutton.html" title="gtk.MenuToolButton"><code class="classname">gtk.MenuToolButton</code></a>
18will contain the icon and label associated with
19<em class="parameter"><code>stock_id</code></em>.</p></div><div class="refsect2" lang="en"><a name="constructor-gtkmenutoolbutton2"></a><h3>gtk.MenuToolButton</h3><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.MenuToolButton</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>icon_widget</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>label</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>icon_widget</code></strong> :</span></td><td>a widget that will be used as icon widget,
20or <code class="literal">None</code></td></tr><tr><td><span class="term"><strong class="parameter"><code>label</code></strong> :</span></td><td>a string that will be used as label, or
21<code class="literal">None</code></td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td>a new <a href="class-gtkmenutoolbutton.html" title="gtk.MenuToolButton"><code class="classname">gtk.MenuToolButton</code></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.6 and above.</p></div><p>Creates a new <a href="class-gtkmenutoolbutton.html" title="gtk.MenuToolButton"><code class="classname">gtk.MenuToolButton</code></a>
22using the icon specified by <em class="parameter"><code>icon_widget</code></em> and the label
23specified by <em class="parameter"><code>label</code></em>.</p></div></div><div class="refsect1" lang="en"><a name="id3305348"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkmenutoolbutton--set-menu"></a><h3>gtk.MenuToolButton.set_menu</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_menu</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>menu</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><strong class="parameter"><code>menu</code></strong> :</span></td><td>a <a href="class-gtkmenu.html" title="gtk.Menu"><code class="classname">gtk.Menu</code></a></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.6 and above.</p></div><p>The <code class="methodname">set_menu</code>() method sets the "menu"
24property to the <a href="class-gtkmenu.html" title="gtk.Menu"><code class="classname">gtk.Menu</code></a> specified by
25<em class="parameter"><code>menu</code></em>.</p></div><div class="refsect2" lang="en"><a name="method-gtkmenutoolbutton--get-menu"></a><h3>gtk.MenuToolButton.get_menu</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_menu</span>()</code></pre><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 associated <a href="class-gtkmenu.html" title="gtk.Menu"><code class="classname">gtk.Menu</code></a></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.6 and above.</p></div><p>The <code class="methodname">get_menu</code>() method returns the value
26of the "menu" property that contains the associated <a href="class-gtkmenu.html" title="gtk.Menu"><code class="classname">gtk.Menu</code></a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkmenutoolbutton--set-arrow-tooltip"></a><h3>gtk.MenuToolButton.set_arrow_tooltip</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_arrow_tooltip</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>tooltips</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>tip_text</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>tip_private</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><span class="term"><strong class="parameter"><code>tooltips</code></strong> :</span></td><td>A <a href="class-gtktooltips.html" title="gtk.Tooltips"><code class="classname">gtk.Tooltips</code></a>
27object.</td></tr><tr><td><span class="term"><strong class="parameter"><code>tip_text</code></strong> :</span></td><td>The text to use as the tooltip or
28<code class="literal">None</code></td></tr><tr><td><span class="term"><strong class="parameter"><code>tip_private</code></strong> :</span></td><td>Opitonal private tooltip text or
29<code class="literal">None</code>. Defaults to
30<code class="literal">None</code>.</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.6 and above.</p></div><p>The <code class="methodname">set_arrow_tooltip</code>() method sets the
31tooltip data specified by <em class="parameter"><code>tip_text</code></em> for the arrow
32button using the <a href="class-gtktooltips.html" title="gtk.Tooltips"><code class="classname">gtk.Tooltips</code></a>
33object specified by <em class="parameter"><code>tooltips</code></em>.</p></div></div><div class="refsect1" lang="en"><a name="id3305718"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtkmenutoolbutton--show-menu"></a><h3>The "show-menu" gtk.MenuToolButton Signal</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>menutoolbutton</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><span class="term"><em class="parameter"><code>menutoolbutton</code></em> :</span></td><td>the menutoolbutton that received the
34signal</td></tr><tr><td><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></td><td>the first user parameter (if any) specified
35with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
36method</td></tr><tr><td><span class="term"><em class="parameter"><code>...</code></em> :</span></td><td>additional user parameters (if
37any)</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.6 and above.</p></div><p>The "show-menu" signal is emitted before the dropdown menu is
38displayed.</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-gtkmenushell.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-gtkmessagedialog.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.MenuShell </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.MessageDialog</td></tr></table></div></body></html>
Note: See TracBrowser for help on using the repository browser.