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=ISO-8859-1"><title>gtk.Statusbar</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-gtkspinbutton.html" title="gtk.SpinButton"><link rel="next" href="class-gtkstyle.html" title="gtk.Style"></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.Statusbar</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkspinbutton.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtkstyle.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkstatusbar"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2><span class="refentrytitle">gtk.Statusbar</span></h2><p>gtk.Statusbar — report messages of minor importance to the user.</p></div><div class="refsect1" lang="en"><a name="id3509766"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Statusbar</span></span>(<span class="ooclass"><span class="classname"><a href="class-gtkhbox.html" title="gtk.HBox">gtk.HBox</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a href="class-gtkstatusbar.html#constructor-gtkstatusbar" title="Constructor">gtk.Statusbar</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkstatusbar.html#method-gtkstatusbar--get-context-id" title="gtk.Statusbar.get_context_id">get_context_id</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>context_description</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkstatusbar.html#method-gtkstatusbar--push" title="gtk.Statusbar.push">push</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>context_id</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkstatusbar.html#method-gtkstatusbar--pop" title="gtk.Statusbar.pop">pop</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>context_id</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkstatusbar.html#method-gtkstatusbar--remove" title="gtk.Statusbar.remove">remove</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>context_id</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>message_id</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkstatusbar.html#method-gtkstatusbar--set-has-resize-grip" title="gtk.Statusbar.set_has_resize_grip">set_has_resize_grip</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>setting</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkstatusbar.html#method-gtkstatusbar--get-has-resize-grip" title="gtk.Statusbar.get_has_resize_grip">get_has_resize_grip</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3509942"></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-gtkbox.html" title="gtk.Box">gtk.Box</a>
+-- <a href="class-gtkhbox.html" title="gtk.HBox">gtk.HBox</a>
+-- <a href="class-gtkstatusbar.html" title="gtk.Statusbar">gtk.Statusbar</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3509996"></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">"has-resize-grip"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt>, the statusbar has a grip
for resizing the toplevel window. Available in GTK+ 2.4 and
above.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3510071"></a><h2>Style 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">"shadow-type"</td><td valign="top">Read</td><td valign="top">The style of bevel around the statusbar text</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3510142"></a><h2>Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term">"<a href="class-gtkstatusbar.html#signal-gtkstatusbar--text-popped" title='The "text-popped" gtk.Statusbar Signal'>text-popped</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>statusbar</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>context_id</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>text</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtkstatusbar.html#signal-gtkstatusbar--text-pushed" title='The "text-pushed" gtk.Statusbar Signal'>text-pushed</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>statusbar</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>context_id</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>text</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3510254"></a><h2>Description</h2><p>A <a href="class-gtkstatusbar.html" title="gtk.Statusbar"><tt class="classname">gtk.Statusbar</tt></a> is
usually placed along the bottom of an application's main <a href="class-gtkwindow.html" title="gtk.Window"><tt class="classname">gtk.Window</tt></a>. It may
provide a regular commentary of the application's status (as is usually the
case in a web browser, for example), or may be used to simply output a
message when the status changes, (when an upload is complete in an
<tt class="literal">FTP</tt> client, for example). It may also have a resize grip
(a triangular area in the lower right corner) which can be clicked on to
resize the window containing the statusbar. Status bars in PyGTK maintain a
stack of messages. The message at the top of the each bar's stack is the one
that will currently be displayed.</p><p>Any messages added to a statusbar's stack must specify a
<tt class="literal">context_id</tt> that is used to uniquely identify the source
of a message. The <tt class="literal">context_id</tt> can be generated by the
<a href="class-gtkstatusbar.html#method-gtkstatusbar--get-context-id" title="gtk.Statusbar.get_context_id"><tt class="methodname">get_context_id</tt>()</a>
method, and associated with a context message. An existing context_id can be
retrieved using the context message using the <a href="class-gtkstatusbar.html#method-gtkstatusbar--get-context-id" title="gtk.Statusbar.get_context_id"><tt class="methodname">get_context_id</tt>()</a>
method. Note that messages are stored in a stack, and when choosing which
message to display, the stack structure is adhered to, regardless of the
context identifier of a message.</p></div><div class="refsect1" lang="en"><a name="constructor-gtkstatusbar"></a><h2>Constructor</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.Statusbar</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>a new <a href="class-gtkstatusbar.html" title="gtk.Statusbar"><tt class="classname">gtk.Statusbar</tt></a>
widget</td></tr></tbody></table><p>Creates a new <a href="class-gtkstatusbar.html" title="gtk.Statusbar"><tt class="classname">gtk.Statusbar</tt></a>
widget.</p></div><div class="refsect1" lang="en"><a name="id3510392"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkstatusbar--get-context-id"></a><h3>gtk.Statusbar.get_context_id</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_context_id</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>context_description</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>context_description</tt></b>:</span></td><td>a string identifying the context for the
message</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>an integer context
identifier</td></tr></tbody></table><p>The <tt class="methodname">get_context_id</tt>() method returns a
new or existing context identifier, given a description of the actual
context specified by <i class="parameter"><tt>context_description</tt></i>. In effect,
<tt class="methodname">get_context_id</tt>() both registers and retrieves a
context identifier.</p></div><div class="refsect2" lang="en"><a name="method-gtkstatusbar--push"></a><h3>gtk.Statusbar.push</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">push</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>context_id</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>text</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>context_id</tt></b>:</span></td><td>a context identifier</td></tr><tr><td><span class="term"><b class="parameter"><tt>text</tt></b>:</span></td><td>the message text</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>an integer message
identifier</td></tr></tbody></table><p>The <tt class="methodname">push</tt>() method pushes a new message
specified by <i class="parameter"><tt>text</tt></i> with the specified
<i class="parameter"><tt>context_id</tt></i> onto a statusbar's stack and returns a
message id that that can be used with the <a href="class-gtkstatusbar.html#method-gtkstatusbar--remove" title="gtk.Statusbar.remove"><tt class="methodname">remove</tt>()</a>
method.</p></div><div class="refsect2" lang="en"><a name="method-gtkstatusbar--pop"></a><h3>gtk.Statusbar.pop</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">pop</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>context_id</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>context_id</tt></b>:</span></td><td>a context identifier</td></tr></tbody></table><p>The <tt class="methodname">pop</tt>() method removes the top
message with the specified <i class="parameter"><tt>context_id</tt></i> from the
statusbar's stack.</p></div><div class="refsect2" lang="en"><a name="method-gtkstatusbar--remove"></a><h3>gtk.Statusbar.remove</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">remove</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>context_id</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>message_id</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>context_id</tt></b>:</span></td><td>the context identifier</td></tr><tr><td><span class="term"><b class="parameter"><tt>message_id</tt></b>:</span></td><td>the message identifier</td></tr></tbody></table><p>The <tt class="methodname">remove</tt>() method removes the message
with the specified <i class="parameter"><tt>message_id</tt></i> and
<i class="parameter"><tt>context_id</tt></i> from the statusbar's message stack.</p></div><div class="refsect2" lang="en"><a name="method-gtkstatusbar--set-has-resize-grip"></a><h3>gtk.Statusbar.set_has_resize_grip</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_has_resize_grip</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>setting</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>setting</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> a resize grip is
displayed</td></tr></tbody></table><p>The <tt class="methodname">set_has_resize_grip</tt>() method sets
the internal "has_resize_grip" property to the value specified by
<i class="parameter"><tt>setting</tt></i>. If <i class="parameter"><tt>setting</tt></i> is
<tt class="literal">TRUE</tt> a resize grip is displayed on the statusbar</p></div><div class="refsect2" lang="en"><a name="method-gtkstatusbar--get-has-resize-grip"></a><h3>gtk.Statusbar.get_has_resize_grip</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_has_resize_grip</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><tt class="literal">TRUE</tt> if a resize grip is
displayed</td></tr></tbody></table><p>The <tt class="methodname">get_has_resize_grip</tt>() method
returns the value of the internal "has_resize_grip" property that determines
if a resize grip is displayed on the statusbar.</p></div></div><div class="refsect1" lang="en"><a name="id3510889"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtkstatusbar--text-popped"></a><h3>The "text-popped" gtk.Statusbar Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>statusbar</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>context_id</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>text</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></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"><i class="parameter"><tt>statusbar</tt></i>:</span></td><td>the statusbar that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>context_id</tt></i>:</span></td><td>the context identifier of the top
message</td></tr><tr><td><span class="term"><i class="parameter"><tt>text</tt></i>:</span></td><td>the string containing the top message
text</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "text-popped" signal is emitted when a message is removed
from the statusbar message stack. Note the text and context_id are for the
top message on the statusbar stack not the message that was actually
removed.</p></div><div class="refsect2" lang="en"><a name="signal-gtkstatusbar--text-pushed"></a><h3>The "text-pushed" gtk.Statusbar Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>statusbar</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>context_id</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>text</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></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"><i class="parameter"><tt>statusbar</tt></i>:</span></td><td>the statusbar that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>context_id</tt></i>:</span></td><td>the context identifier of the message
added</td></tr><tr><td><span class="term"><i class="parameter"><tt>text</tt></i>:</span></td><td>the string containing the message
text</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "text-pushed" signal is emitted when a message is added to
the statusbar message stack.</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-gtkspinbutton.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-gtkstyle.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.SpinButton</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.Style</td></tr></table></div></body></html>
|