source: pkg/pygtk/branches/upstream/current/docs/html/pygtk-reference-format.html @ 4

Revision 4, 7.6 KB checked in by alanbach-guest, 6 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>Reference Page Format</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="pygtk-introduction.html" title="Introduction"><link rel="prev" href="pygtk-introduction.html" title="Introduction"><link rel="next" href="class-hierarchy.html" title="PyGTK Class Hierarchy"></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="class-hierarchy.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><p>Each <code class="literal">PyGTK</code> class is described in a reference
2page that has a number of sections in a fixed format. Each reference page
3will 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
4class.</td></tr><tr><td><span class="term">Synopsis</span></td><td>A synopsis of the class and its methods and
5optionally 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
6section 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)
7supported by the class. This section may not be present in all classes. The
8property descriptions include the name, the access operations (e.g. Read,
9Write), and a brief description. Properties are accessed using the <PYGTKDOCLINK HREF="method-gobject--set-property"><code class="methodname">gobject.set_property</code>()</PYGTKDOCLINK> 
10and <PYGTKDOCLINK HREF="method-gobject--get-property"><code class="methodname">gobject.get_property</code>()</PYGTKDOCLINK> 
11methods that are available to every <code class="literal">PyGTK</code> object. This
12section may not be present in all class descriptions.</td></tr><tr><td><span class="term">Style Properties</span></td><td>A list of style properties supported by the
13class. Similar to the properties (described above) the style properties hold
14information about the style of a widgets e.g. border style, shadow type,
15etc. Most widgets do not support style properties so this section is not
16present in most class descriptions. Only PyGTK 2.4 has the ability to access
17style properties.</td></tr><tr><td><span class="term">Child Properties</span></td><td>A list of child properties supported by the
18class. Similar to the properties (described above) the child properties hold
19information about the properties of a widget's child widget. Only container
20widgets support child properties so this section is not present in most
21class descriptions.</td></tr><tr><td><span class="term">Attributes</span></td><td>A set of internal object state data accessible as
22Python attributes (e.g. object.attr). The attribute descriptions include a
23name by which the attribute data is accessed, the access mode (e.g. Read,
24Write), and a brief description of the attribute. Most
25<code class="literal">PyGTK</code> classes do not support attributes so this section
26is not present in most class descriptions.</td></tr><tr><td><span class="term">Signal Prototypes</span></td><td>A list of the signals supported by the class
27including the signal name and a synopsis of the signal handler function
28prototype. This section may not be present in all class descriptions; most
29<code class="literal">gtk.gdk</code> 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
30the methods supported by the class.</td></tr><tr><td><span class="term">Constructor</span></td><td>The description of the class object constructor
31including the synopsis with brief parameter descriptions and a description
32of th use of the constructor. There may be more than one constructor
33description if the constructor supports different parameter lists. This
34section 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
35method description includes: a synopsis of the method and its parameters as
36well as a brief description of each parameter and return value (if any);
37and, 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
38description includes a synopsis of the function and its parameters and
39return value (if any), and a description of the use of the
40function.</td></tr><tr><td><span class="term">Signals</span></td><td>A list of signals including a synopsis of the
41signal handler prototype function with its parameters and return value (if
42any). The signal emission conditions are briefly described. This section is
43not present in all class descriptions; specifically, the
44<code class="literal">gtk.gdk</code> classes do not usually support signals.</td></tr></tbody></table><p>The function and method synopsis parameters are displayed in
45<span class="bold"><strong>bold</strong></span> to denote Python keyword parameters.
46Also if the parameter is optional its default value will be displayed. For
47example the <a href="class-gtkbutton.html#constructor-gtkbutton" title="Constructor">gtk.Button</a>()
48constructor synopsis is:</p><pre class="programlisting">
49<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"><strong class="parameter"><code>label</code></strong></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>stock</code></strong></span><span class="initializer">=None</span></span>)</code>
50</pre><p>The parameters <em class="parameter"><code>label</code></em> and
51<em class="parameter"><code>stock</code></em> are keyword parameters that can be specified in
52a call either by position or keyword (in which case position is not
53important). The following calls have the same result:</p><pre class="programlisting">
54  b = gtk.Button("Cancel")
55  b = gtk.Button(label="Cancel")
56  b = gtk.Button("Cancel", None)
57  b = gtk.Button("Cancel", stock=None)
58  b = gtk.Button(stock=None, label="Cancel")
59</pre><p>Parameters that are not keyword parameters are displayed in
60    <span class="emphasis"><em>italic</em></span> and must be specified positionally but may
61    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="class-hierarchy.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"> PyGTK Class Hierarchy</td></tr></table></div></body></html>
Note: See TracBrowser for help on using the repository browser.