File: pygtk-reference-format.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 (61 lines) | stat: -rw-r--r-- 7,933 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
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Reference Page Format</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="pygtk-introduction.html" title="Introduction"><link rel="previous" href="pygtk-introduction.html" title="Introduction"><link rel="next" href="pygtk-reference-copyright.html" title="Copyright and License Notice"></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">Reference Page Format</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="pygtk-introduction.html">Prev</a></td><th width="60%" align="center">Introduction</th><td width="20%" align="right"><a accesskey="n" href="pygtk-reference-copyright.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="pygtk-reference-format"></a>Reference Page Format</h2></div></div><div></div></div><p>Each <tt class="literal">PyGTK</tt> class is described in a reference
page that has a number of sections in a fixed format. Each reference page
will have a subset of the following sections:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term">Name</span></td><td>The name and a one-line description of the
class.</td></tr><tr><td><span class="term">Synopsis</span></td><td>A synopsis of the class and its methods and
optionally a list of associated functions.</td></tr><tr><td><span class="term">Ancestry</span></td><td>The list of the parent classes of the class. This
section may not be present in all class descriptions.</td></tr><tr><td><span class="term">Properties</span></td><td>A list of the properties (internal state)
supported by the class. This section may not be present in all classes. The
property descriptions include the name, the access operations (e.g. Read,
Write), and a brief description. Properties are accessed using the <a href="class-gobject.html#method-gobject--set-property" title="gobject.GObject.set_property"><tt class="methodname">gobject.set_property</tt>()</a> 
and <a href="class-gobject.html#method-gobject--get-property" title="gobject.GObject.get_property"><tt class="methodname">gobject.get_property</tt>()</a> 
methods that are available to every <tt class="literal">PyGTK</tt> object. This
section may not be present in all class descriptions.</td></tr><tr><td><span class="term">StyleProperties</span></td><td>A list of style properties supported by the
class. Similar to the properties (described above) the style properties hold
information about the style of a widgets e.g. border style, shadow type,
etc. Most widgets do not support style properties so this section is not
present in most class descriptions. Only PyGTK 2.4 has the ability to access
style properties.</td></tr><tr><td><span class="term">ChildProperties</span></td><td>A list of child properties supported by the
class. Similar to the properties (described above) the child properties hold
information about the properties of a widget's child widget. Only container
widgets support child properties so this section is not present in most
class descriptions.</td></tr><tr><td><span class="term">Attributes</span></td><td>A set of internal object state data accessible as
Python attributes (e.g. object.attr). The attribute descriptions include a
name by which the attribute data is accessed, the access mode (e.g. Read,
Write), and a brief description of the attribute. Most
<tt class="literal">PyGTK</tt> classes do not support attributes so this section
is not present in most class descriptions.</td></tr><tr><td><span class="term">SignalPrototypes</span></td><td>A list of the signals supported by the class
including the signal name and a synopsis of the signal handler function
prototype. This section may not be present in all class descriptions; most
<tt class="literal">gtk.gdk</tt> classes do not support signals.</td></tr><tr><td><span class="term">Description</span></td><td>A description of the class and possibly some of
the methods supported by the class.</td></tr><tr><td><span class="term">Constructor</span></td><td>The description of the class object constructor
including the synopsis with brief parameter descriptions and a description
of th use of the constructor. There may be more than one constructor
description if the constructor supports different parameter lists. This
section may not be present in all class descriptions.</td></tr><tr><td><span class="term">Methods</span></td><td>A list of methods supported by the class. Each
method description includes: a synopsis of the method and its parameters as
well as a brief description of each parameter and return value (if any);
and, a description of the use of the method.</td></tr><tr><td><span class="term">Functions</span></td><td>A list of related functions. Each function
description includes a synopsis of the function and its parameters and
return value (if any), and a description of the use of the
function.</td></tr><tr><td><span class="term">Signals</span></td><td>A list of signals including a synopsis of the
signal handler prototype function with its parameters and return value (if
any). The signal emission conditions are briefly described. This section is
not present in all class descriptions; specifically, the
<tt class="literal">gtk.gdk</tt> classes do not usually support signals.</td></tr></tbody></table><p>The function and method synopsis parameters are displayed in
<span class="bold"><b>bold</b></span> to denote Python keyword parameters.
Also if the parameter is optional its default value will be displayed. For
example the <a href="class-gtkbutton.html#constructor-gtkbutton" title="Constructor">gtk.Button</a>()
constructor synopsis is:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
<code class="constructorsynopsis">    <span class="methodname"><a href="class-gtkbutton.html#constructor-gtkbutton" title="Constructor">gtk.Button</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>label</tt></b></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>stock</tt></b></span><span class="initializer">=None</span></span>)</code>
</pre></td></tr></table><p>The parameters <i class="parameter"><tt>label</tt></i> and
<i class="parameter"><tt>stock</tt></i> are keyword parameters that can be specified in
a call either by position or keyword (in which case position is not
important). The following calls have the same result:</p><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting">
  b = gtk.Button("Cancel")
  b = gtk.Button(label="Cancel")
  b = gtk.Button("Cancel", None)
  b = gtk.Button("Cancel", stock=None)
  b = gtk.Button(stock=None, label="Cancel")
</pre></td></tr></table><p>Parameters that are not keyword parameters are displayed in
<span class="emphasis"><em>italic</em></span> and must be specified positionally but may also
be optional.</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="pygtk-introduction.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="pygtk-introduction.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="pygtk-reference-copyright.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Introduction</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">Copyright and License Notice</td></tr></table></div></body></html>