This file is indexed.

/usr/share/doc/python-gtk2-tutorial/html/sec-Frames.html is in python-gtk2-tutorial 2.4-1.

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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>10.5. Frames</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Tutorial"><link rel="up" href="ch-ContainerWidgets.html" title="Chapter 10. Container Widgets"><link rel="previous" href="sec-Layout.html" title="10.4. Layout Container"><link rel="next" href="sec-AspectFrames.html" title="10.6. Aspect Frames"></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">10.5. Frames</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="sec-Layout.html">Prev</a> </td><th width="60%" align="center">Chapter 10. Container Widgets</th><td width="20%" align="right"> <a accesskey="n" href="sec-AspectFrames.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sec-Frames"></a>10.5. Frames</h2></div></div><div></div></div><p>Frames can be used to enclose one or a group of widgets with a
box which can optionally be labeled. The position of the label and the
style of the box can be altered to suit.</p><p>A <tt class="classname">Frame</tt> can be created with the following
function:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  frame = gtk.Frame(<b class="parameter"><tt>label</tt></b>=None)
</pre></td></tr></table><p>The <i class="parameter"><tt>label</tt></i> is by default placed in the
upper left hand corner of the frame. Specifying a value of None for the
<i class="parameter"><tt>label</tt></i> argument or specifying no
<i class="parameter"><tt>label</tt></i> argument will result in no label being
displayed. The text of the label can be changed using the method.</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  frame.set_label(<b class="parameter"><tt>label</tt></b>)
</pre></td></tr></table><p>The position of the label can be changed using this
method:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  frame.set_label_align(<b class="parameter"><tt>xalign</tt></b>, <b class="parameter"><tt>yalign</tt></b>)
</pre></td></tr></table><p><i class="parameter"><tt>xalign</tt></i> and <i class="parameter"><tt>yalign</tt></i>
take values between 0.0 and 1.0. <i class="parameter"><tt>xalign</tt></i> indicates the
position of the label along the top horizontal of the frame.
<i class="parameter"><tt>yalign</tt></i> is not currently used. The default value of
<i class="parameter"><tt>xalign</tt></i> is 0.0 which places the label at the left hand
end of the frame.</p><p>The next method alters the style of the box that is used to
outline the frame.</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  frame.set_shadow_type(<b class="parameter"><tt>type</tt></b>)
</pre></td></tr></table><p>The <i class="parameter"><tt>type</tt></i> argument can take one of the
following values:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  SHADOW_NONE
  SHADOW_IN
  SHADOW_OUT
  SHADOW_ETCHED_IN      # the default
  SHADOW_ETCHED_OUT
</pre></td></tr></table><p>The <a href="examples/frame.py" target="_top"><span><b class="command">frame.py</b></span></a> example
illustrates the use of the Frame widget.
<a href="sec-Frames.html#framefig" title="Figure 10.4. Frame Example">Figure 10.4, &#8220;Frame Example&#8221;</a> shows the resulting display:</p><div class="figure"><a name="framefig"></a><p class="title"><b>Figure 10.4. Frame Example</b></p><div class="mediaobject" align="center"><img src="figures/frame.png" align="middle" alt="Frame Example"></div></div><p>The source code of <a href="examples/frame.py" target="_top"><span><b class="command">frame.py</b></span></a> is:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
    1	#!/usr/bin/env python
    2	
    3	# example frame.py
    4	
    5	import pygtk
    6	pygtk.require('2.0')
    7	import gtk
    8	
    9	class FrameExample:
   10	    def __init__(self):
   11	        # Create a new window
   12	        window = gtk.Window(gtk.WINDOW_TOPLEVEL)
   13	        window.set_title("Frame Example")
   14	
   15	        # Here we connect the "destroy" event to a signal handler 
   16	        window.connect("destroy", lambda w: gtk.main_quit())
   17	        window.set_size_request(300, 300)
   18	
   19	        # Sets the border width of the window.
   20	        window.set_border_width(10)
   21	
   22	        # Create a Frame
   23	        frame = gtk.Frame()
   24	        window.add(frame)
   25	
   26	        # Set the frame's label
   27	        frame.set_label("GTK Frame Widget")
   28	
   29	        # Align the label at the right of the frame
   30	        frame.set_label_align(1.0, 0.0)
   31	
   32	        # Set the style of the frame
   33	        frame.set_shadow_type(gtk.SHADOW_ETCHED_OUT)
   34	        frame.show()
   35	  
   36	        # Display the window
   37	        window.show()
   38	
   39	def main():
   40	    # Enter the event loop
   41	    gtk.main()
   42	    return 0
   43	
   44	if __name__ == "__main__":
   45	    FrameExample()
   46	    main()
</pre></td></tr></table><p>The <a href="examples/calendar.py" target="_top"><span><b class="command">calendar.py</b></span></a>, <a href="examples/label.py" target="_top"><span><b class="command">label.py</b></span></a> and <a href="examples/spinbutton.py" target="_top"><span><b class="command">spinbutton.py</b></span></a>
examples also use Frames.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="sec-Layout.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch-ContainerWidgets.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="sec-AspectFrames.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">10.4. Layout Container </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 10.6. Aspect Frames</td></tr></table></div></body></html>