File: class-gtkbuttonbox.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 (69 lines) | stat: -rw-r--r-- 14,021 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
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
69
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.ButtonBox</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-gtkbutton.html" title="gtk.Button"><link rel="next" href="class-gtkcalendar.html" title="gtk.Calendar"></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.ButtonBox</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkbutton.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtkcalendar.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkbuttonbox"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.ButtonBox</h2><p>gtk.ButtonBox &#8212; the base class for widgets that contain multiple
buttons</p></div><div class="refsect1" lang="en"><a name="id3327250"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.ButtonBox</span></span>(<span class="ooclass"><span class="classname"><a href="class-gtkbox.html" title="gtk.Box">gtk.Box</a></span></span>):
<code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkbuttonbox.html#method-gtkbuttonbox--get-layout" title="gtk.ButtonBox.get_layout">get_layout</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkbuttonbox.html#method-gtkbuttonbox--set-layout" title="gtk.ButtonBox.set_layout">set_layout</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>layout_style</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkbuttonbox.html#method-gtkbuttonbox--get-child-secondary" title="gtk.ButtonBox.get_child_secondary">get_child_secondary</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a href="class-gtkbuttonbox.html#method-gtkbuttonbox--set-child-secondary" title="gtk.ButtonBox.set_child_secondary">set_child_secondary</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>is_secondary</tt></b></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3383450"></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-gtkbuttonbox.html" title="gtk.ButtonBox">gtk.ButtonBox</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3205392"></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">"layout-style"</td><td valign="top">Read/Write</td><td valign="top">the style used to layout the buttons in the box. The layout
styles are: <tt class="literal">gtk.BUTTONBOX_SPREAD</tt>,
<tt class="literal">gtk.BUTTONBOX_EDGE</tt>,
<tt class="literal">gtk.BUTTONBOX_START</tt> and
<tt class="literal">gtk.BUTTONBOX_END</tt>.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3204734"></a><h2>Child 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">"secondary"</td><td valign="top">Read/Write</td><td valign="top">If <tt class="literal">TRUE</tt>, the child appears in a secondary
group of children, suitable for, e.g., help buttons.</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3198857"></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">"child-min-width"</td><td valign="top">Read</td><td valign="top">The minimum width of buttons inside the box.</td></tr><tr valign="top"><td valign="top">"child-min-height"</td><td valign="top">Read</td><td valign="top">The minimum height of buttons inside the box.</td></tr><tr valign="top"><td valign="top">"child-internal-pad-y"</td><td valign="top">Read</td><td valign="top">The amount of padding that increases a child's size on
the top and bottom</td></tr><tr valign="top"><td valign="top">"child-internal-pad-x"</td><td valign="top">Read</td><td valign="top">The amount of padding that increases a child's size on
the top and bottom</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3288015"></a><h2>Description</h2><p>A button box is used to provide a consistent layout of buttons
throughout an application. The <a href="class-gtkbuttonbox.html" title="gtk.ButtonBox"><tt class="classname">gtk.ButtonBox</tt></a> is
subclassed by the <a href="class-gtkhbuttonbox.html" title="gtk.HButtonBox"><tt class="classname">gtk.HButtonBox</tt></a>
and <a href="class-gtkvbuttonbox.html" title="gtk.VButtonBox"><tt class="classname">gtk.VButtonBox</tt></a>
classes to provide horizontal and vertical button layouts respectively. The
same effect could be achieved by using a <a href="class-gtkvbuttonbox.html" title="gtk.VButtonBox"><tt class="classname">gtk.Box</tt></a> but less
conveniently.</p><p>A buttonbox provides one default layout and a default spacing
value that are persistent across all widgets. The layout/spacing can then be
altered by the programmer, or if desired, by the user to alter the 'feel' of
a program to a small degree.</p><p>The <a href="class-gtkbox.html#method-gtkbox--get-spacing" title="gtk.Box.get_spacing"><tt class="methodname">gtk.Box.get_spacing</tt>()</a> 
method and the <a href="class-gtkbox.html#method-gtkbox--set-spacing" title="gtk.Box.set_spacing"><tt class="methodname">gtk.Box.set_spacing</tt>()</a> 
methods retrieve and change the default number of pixels between buttons.
The <a href="class-gtkbuttonbox.html#method-gtkbuttonbox--get-layout" title="gtk.ButtonBox.get_layout"><tt class="methodname">get_layout</tt>()</a> 
and <a href="class-gtkbuttonbox.html#method-gtkbuttonbox--set-layout" title="gtk.ButtonBox.set_layout"><tt class="methodname">set_layout</tt>()</a> 
methods retrieve and alter the style used to spread the buttons in a button
box across the container. The layout styles are:
<tt class="literal">gtk.BUTTONBOX_SPREAD</tt>,
<tt class="literal">gtk.BUTTONBOX_EDGE</tt>,
<tt class="literal">gtk.BUTTONBOX_START</tt> and
<tt class="literal">gtk.BUTTONBOX_END</tt>.</p></div><div class="refsect1" lang="en"><a name="id3145586"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkbuttonbox--get-layout"></a><h3>gtk.ButtonBox.get_layout</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_layout</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 layout style used by the
buttonbox</td></tr></tbody></table><p>The <tt class="methodname">get_layout</tt>() method returns the
current value of the "layout-style" property. The possible values are:
<tt class="literal">gtk.BUTTONBOX_SPREAD</tt>,
<tt class="literal">gtk.BUTTONBOX_EDGE</tt>,
<tt class="literal">gtk.BUTTONBOX_START</tt> and
<tt class="literal">gtk.BUTTONBOX_END</tt>.</p></div><div class="refsect2" lang="en"><a name="method-gtkbuttonbox--set-layout"></a><h3>gtk.ButtonBox.set_layout</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_layout</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>layout_style</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>layout_style</tt></b>:</span></td><td>the new layout style</td></tr></tbody></table><p>The <tt class="methodname">set_layout</tt>() method sets the
"layout-style" property to the value in <i class="parameter"><tt>layout_style</tt></i>.
The possible values are: <tt class="literal">gtk.BUTTONBOX_SPREAD</tt>,
<tt class="literal">gtk.BUTTONBOX_EDGE</tt>,
<tt class="literal">gtk.BUTTONBOX_START</tt> and
<tt class="literal">gtk.BUTTONBOX_END</tt>.</p></div><div class="refsect2" lang="en"><a name="method-gtkbuttonbox--get-child-secondary"></a><h3>gtk.ButtonBox.get_child_secondary</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_child_secondary</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</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>child</tt></b>:</span></td><td>a child button of the
buttonbox</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>if <tt class="literal">TRUE</tt>, the
<i class="parameter"><tt>child</tt></i> appears in a secondary group of the button
box.</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.4 and above.</p></div><p>The <tt class="methodname">get_child_secondary</tt>() method
returns <tt class="literal">TRUE</tt> if <i class="parameter"><tt>child</tt></i> should
appear in a secondary group of children. See the <a href="class-gtkbuttonbox.html#method-gtkbuttonbox--set-child-secondary" title="gtk.ButtonBox.set_child_secondary"><tt class="methodname">set_child_secondary</tt>()</a>
method for more information.</p></div><div class="refsect2" lang="en"><a name="method-gtkbuttonbox--set-child-secondary"></a><h3>gtk.ButtonBox.set_child_secondary</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_child_secondary</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>child</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>is_secondary</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>child</tt></b>:</span></td><td>a child button of the
buttonbox</td></tr><tr><td><span class="term"><b class="parameter"><tt>is_secondary</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt>, the
<i class="parameter"><tt>child</tt></i> appears in a secondary group of the button
box.</td></tr></tbody></table><p>The <tt class="methodname">set_child_secondary</tt>() method sets
whether <i class="parameter"><tt>child</tt></i> should appear in a secondary group of
children. The typical use of a secondary child is the help button in a
dialog that is displayed away from the main group of buttons e.g. right
aligned.</p><p>The secondary group appears after the other children if the
style is <tt class="literal">gtk.BUTTONBOX_START</tt>,
<tt class="literal">gtk.BUTTONBOX_SPREAD</tt> or
<tt class="literal">gtk.BUTTONBOX_EDGE</tt>, and before the the other children if
the style is <tt class="literal">gtk.BUTTONBOX_END</tt>. For horizontal button
boxes, the definition of before/after depends on direction of the widget
(see <a href="class-gtkwidget.html#method-gtkwidget--set-direction" title="gtk.Widget.set_direction"><tt class="function">gtk.Widget.set_direction()</tt></a>). 
If the style is <tt class="literal">gtk.BUTTONBOX_START</tt> or
<tt class="literal">gtk.BUTTONBOX_END</tt>, then the secondary children are
aligned at the other end of the button box from the main children. For the
other styles, they appear immediately next to the main children.</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-gtkbutton.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-gtkcalendar.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.Button</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.Calendar</td></tr></table></div></body></html>