This file is indexed.

/usr/share/gtk-doc/html/pygtk/class-gtkbuilder.html is in python-gtk2-doc 2.24.0-4ubuntu1.

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
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.Builder</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><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="prev" href="class-gtkbuildable.html" title="gtk.Buildable"><link rel="next" href="class-gtkbutton.html" title="gtk.Button"></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.Builder</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtkbuildable.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtkbutton.html">Next</a></td></tr></table><hr></div><div class="refentry" title="gtk.Builder"><a name="class-gtkbuilder"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.Builder</h2><p>gtk.Builder — Build an interface from an XML UI definition.</p></div><div class="refsect1" title="Synopsis"><a name="id3423696"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.Builder</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK></span></span>):
<code class="constructorsynopsis">    <span class="methodname"><a class="link" href="class-gtkbuilder.html#constructor-gtkbuilder" title="Constructor">gtk.Builder</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--add-from-file" title="gtk.Builder.add_from_file">add_from_file</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--add-from-string" title="gtk.Builder.add_from_string">add_from_string</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--add-objects-from-file" title="gtk.Builder.add_objects_from_file">add_objects_from_file</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>filename</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>object_ids</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--add-objects-from-string" title="gtk.Builder.add_objects_from_string">add_objects_from_string</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>buffer</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>object_ids</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--connect-signals" title="gtk.Builder.connect_signals">connect_signals</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>object</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>user_data</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--get-object" title="gtk.Builder.get_object">get_object</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--get-objects" title="gtk.Builder.get_objects">get_objects</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--get-translation-domain" title="gtk.Builder.get_translation_domain">get_translation_domain</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--get-type-from-name" title="gtk.Builder.get_type_from_name">get_type_from_name</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>type_name</code></strong></span></span>)</code><br><code class="methodsynopsis">    def <span class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--set-translation-domain" title="gtk.Builder.set_translation_domain">set_translation_domain</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>domain</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" title="Ancestry"><a name="id3441584"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
  +-- <a class="link" href="class-gtkbuilder.html" title="gtk.Builder">gtk.Builder</a>
</pre></div><div class="refsect1" title="gtk.Builder Properties"><a name="properties-gtkbuilder"></a><h2>gtk.Builder 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 width="1in"><col width="1in"><col width="3.5in"></colgroup><tbody><tr valign="top"><td valign="top">"translation-domain"</td><td valign="top">Read/Write</td><td valign="top">The translation domain used when translating property
                            values that have been marked as translatable in interface descriptions.
                            If the translation domain is None, GtkBuilder uses gettext(),
                            otherwise dgettext(). Default value: None
                            </td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" title="Description"><a name="id3498310"></a><h2>Description</h2><p>
            A <a class="link" href="class-gtkbuilder.html" title="gtk.Builder"><code class="classname">gtk.Builder</code></a>
            is an auxiliary object that reads textual descriptions of a user interface and
            instantiates the described objects. To pass a description to a
            <a class="link" href="class-gtkbuilder.html" title="gtk.Builder"><code class="classname">gtk.Builder</code></a>, call
            <code class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--add-from-file" title="gtk.Builder.add_from_file">add_from_file</a></code>() or
            <code class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--add-from-string" title="gtk.Builder.add_from_string">add_from_string</a></code>().
            These methods can be called multiple times; the builder merges the content of all descriptions.
        </p><p>
            A <a class="link" href="class-gtkbuilder.html" title="gtk.Builder"><code class="classname">gtk.Builder</code></a>
            holds a reference to all objects that it has constructed and drops these references
            when it is finalized. This finalization can cause the destruction of non-widget objects
            or widgets which are not contained in a toplevel window. For toplevel windows constructed
            by a builder, it is the responsibility of the user to call
            <code class="methodname"><a class="link" href="class-gtkwidget.html#method-gtkwidget--destroy" title="gtk.Widget.destroy">gtk.Widget.destroy</a></code>()
            to get rid of them and all the widgets they contain.
        </p><p>
            The methods <code class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--get-object" title="gtk.Builder.get_object">get_object</a></code>()
            and <code class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--get-objects" title="gtk.Builder.get_objects">get_objects</a></code>()
            can be used to access the widgets in the interface by the names assigned to them inside the UI description.
            Toplevel windows returned by these methods will stay around until the user explicitly
            destroys them with <code class="methodname"><a class="link" href="class-gtkwidget.html#method-gtkwidget--destroy" title="gtk.Widget.destroy">gtk.Widget.destroy</a></code>().
            Other widgets will either be part of a larger hierarchy constructed by the builder (in which case you
            should not have to worry about their lifecycle), or without a parent, in which case they have to be added
            to some container to make use of them.
        </p><p>
            The methods <code class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--connect-signals" title="gtk.Builder.connect_signals">connect_signals</a></code>()
            and variants thereof can be used to connect handlers to the named signals in the description.
        </p><div class="refsect2" title="gtk.Builder UI definition"><a name="gtkbuilder-ui-definition"></a><h3>gtk.Builder UI definition</h3><p>
                <a class="link" href="class-gtkbuilder.html" title="gtk.Builder"><code class="classname">gtk.Builder</code></a> parses textual
                descriptions of user interfaces which are specified in an XML format which
                can be roughly described by the DTD below. We refer to these descriptions as GtkBuilder UI definitions
                or just UI definitions if the context is clear. Do not confuse GtkBuilder UI Definitions with
                GtkUIManager UI Definitions, which are more limited in scope.
            </p><pre class="programlisting">

&lt;!ELEMENT interface (requires|object)* &gt;
&lt;!ELEMENT object    (property|signal|child|ANY)* &gt;
&lt;!ELEMENT property  PCDATA &gt;
&lt;!ELEMENT signal    EMPTY &gt;
&lt;!ELEMENT requires  EMPTY &gt;
&lt;!ELEMENT child     (object|ANY*) &gt;
&lt;!ATTLIST interface domain                 #IMPLIED &gt;
&lt;!ATTLIST object    id                     #REQUIRED
                    class                  #REQUIRED
                    type-func              #IMPLIED
                    constructor            #IMPLIED &gt;
&lt;!ATTLIST requires  lib                    #REQUIRED
                    version                #REQUIRED &gt;
&lt;!ATTLIST property  name                   #REQUIRED
                    translatable           #IMPLIED 
                    comments               #IMPLIED
                    context                #IMPLIED &gt;
&lt;!ATTLIST signal    name                   #REQUIRED
                    handler                #REQUIRED
                    after                  #IMPLIED
                    swapped                #IMPLIED
                    object                 #IMPLIED
                    last_modification_time #IMPLIED &gt;
&lt;!ATTLIST child     type                   #IMPLIED
                    internal-child         #IMPLIED &gt;

</pre><p>
                The toplevel element is &lt;interface&gt;. It optionally takes a "domain" attribute,
                which will make the builder look for translated strings using dgettext() in the domain
                specified. This can also be done by calling
                <code class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--set-translation-domain" title="gtk.Builder.set_translation_domain">set_translation_domain</a></code>()
                on the builder. Objects are described by &lt;object&gt; elements, which can contain &lt;property&gt;
                elements to set properties, &lt;signal&gt; elements which connect signals to handlers, and &lt;child&gt;
                elements, which describe child objects (most often widgets inside a container, but also e.g. actions
                in an action group, or columns in a tree model). A &lt;child&gt; element contains an &lt;object&gt;
                element which describes the child object. The target toolkit version(s) are described by &lt;requires&gt;
                elements, the "lib" attribute specifies the widget library in question (currently the only supported value
                is "gtk+") and the "version" attribute specifies the target version in the form "&lt;major&gt;.&lt;minor&gt;".
                The builder will error out if the version requirements are not met.
            </p><p>
                Typically, the specific kind of object represented by an &lt;object&gt; element is specified by the
                "class" attribute. If the type has not been loaded yet, GTK+ tries to find the _get_type() from the
                class name by applying heuristics. This works in most cases, but if necessary, it is possible to specify
                the name of the _get_type() explictly with the "type-func" attribute. As a special case,
                <a class="link" href="class-gtkbuilder.html" title="gtk.Builder"><code class="classname">gtk.Builder</code></a> allows to use an object that
                has been constructed by a <a class="link" href="class-gtkuimanager.html" title="gtk.UIManager"><code class="classname">gtk.UIManager</code></a>
                in another part of the UI definition by specifying the id of the
                <a class="link" href="class-gtkuimanager.html" title="gtk.UIManager"><code class="classname">gtk.UIManager</code></a> in the "constructor" attribute
                and the name of the object in the "id" attribute.
            </p><p>
                Objects must be given a name with the "id" attribute, which allows the application to retrieve them from
                the builder with <code class="methodname"><a class="link" href="class-gtkbuilder.html#method-gtkbuilder--get-object" title="gtk.Builder.get_object">get_object</a></code>().
                An id is also necessary to use the object as property value in other parts of the UI definition.
            </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
                Prior to GTK+ 2.20, <a class="link" href="class-gtkbuilder.html" title="gtk.Builder"><code class="classname">gtk.Builder</code></a>
                was setting the "name" property of constructed widgets to the "id" attribute. In GTK+ 2.20 or newer, you
                have to use <a class="link" href="class-gtkbuildable.html#method-gtkbuildable--set-name" title="gtk.Buildable.set_name"><code class="methodname">gtk.Buildable.get_name</code></a>()
                instead of <a class="link" href="class-gtkwidget.html#method-gtkwidget--get-name" title="gtk.Widget.get_name"><code class="methodname">gtk.Widget.get_name</code></a>()
                to obtain the "id", or set the "name" property in your UI definition.
            </div><p>
                Setting properties of objects is pretty straightforward with the &lt;property&gt;element: the "name"
                attribute specifies the name of the property, and the content of the element specifies the value. If the
                "translatable" attribute is set to a true value, GTK+ uses gettext() (or dgettext() if the builder has
                a translation domain set) to find a translation for the value. This happens before the value is parsed,
                so it can be used for properties of any type, but it is probably most useful for string properties.
                It is also possible to specify a context to disambiguate short strings, and comments which may
                help the translators.
            </p><p>
                GtkBuilder can parse textual representations for the most common property types: characters, strings,
                integers, floating-point numbers, booleans (strings like "TRUE", "t", "yes", "y", "1" are interpreted as
                <code class="literal">True</code>, strings like "FALSE, "f", "no", "n", "0" are interpreted as <code class="literal">False</code>),
                enumerations (can be specified by their name, nick or integer value), flags (can be specified by their
                name, nick, integer value, optionally combined with "|", e.g. "gtk.VISIBLE|gtk.REALIZED")
                and colors (in a format understood by <a class="link" href="class-gdkcolor.html#function-gdk--color-parse" title="gtk.gdk.color_parse"><code class="methodname">gtk.gdk.color_parse</code></a>()).
                Objects can be referred to by their name.
                Pixbufs can be specified as a filename of an image file to load. In general, GtkBuilder allows
                forward references to objects — an object doesn't have to be constructed before it can be referred to.
                The exception to this rule is that an object has to be constructed before it can be used as the value
                of a construct-only property.
            </p><p>
                Signal handlers are set up with the &lt;signal&gt; element. The "name" attribute specifies the name
                of the signal, and the "handler" attribute specifies the function to connect to the signal. By default,
                GTK+ tries to find the handler using g_module_symbol(). The remaining attributes, "after", "swapped"
                and "object", have the same meaning as the corresponding parameters of the g_signal_connect_object() or
                g_signal_connect_data() functions. A "last_modification_time" attribute is also allowed, but it does not
                have a meaning to the builder.
            </p><p>
                Sometimes it is necessary to refer to widgets which have implicitly been constructed by GTK+ as part of
                a composite widget, to set properties on them or to add further children (e.g. the vbox of a
                <a class="link" href="class-gtkdialog.html" title="gtk.Dialog"><code class="classname">gtk.Dialog</code></a>).
                This can be achieved by setting the "internal-child" propery of the &lt;child&gt; element to a true value.
                Note that <a class="link" href="class-gtkbuilder.html" title="gtk.Builder"><code class="classname">gtk.Builder</code></a>
                still requires an &lt;object&gt; element for the internal child, even if it has already been constructed.
            </p><p>
                A number of widgets have different places where a child can be added (e.g. tabs vs. page content in
                notebooks). This can be reflected in a UI definition by specifying the "type" attribute on a
                &lt;child&gt; The possible values for the "type" attribute are described in the sections describing
                the widget-specific portions of UI definitions.
            </p></div><div class="refsect2" title="A gtk.Builder UI definition example"><a name="gtkbuilder-ui-definition-example"></a><h3>A gtk.Builder UI definition example</h3><pre class="programlisting">

&lt;interface&gt;
  &lt;object class="GtkDialog" id="dialog1"&gt;
    &lt;child internal-child="vbox"&gt;
      &lt;object class="GtkVBox" id="vbox1"&gt;
        &lt;property name="border-width"&gt;10&lt;/property&gt;
        &lt;child internal-child="action_area"&gt;
          &lt;object class="GtkHButtonBox" id="hbuttonbox1"&gt;
            &lt;property name="border-width"&gt;20&lt;/property&gt;
            &lt;child&gt;
              &lt;object class="GtkButton" id="ok_button"&gt;
                &lt;property name="label"&gt;gtk-ok&lt;/property&gt;
                &lt;property name="use-stock"&gt;TRUE&lt;/property&gt;
                &lt;signal name="clicked" handler="ok_button_clicked"/&gt;
              &lt;/object&gt;
            &lt;/child&gt;
          &lt;/object&gt;
        &lt;/child&gt;
      &lt;/object&gt;
    &lt;/child&gt;
  &lt;/object&gt;
&lt;/interface&gt;

</pre><p>
                Beyond this general structure, several object classes define their own XML DTD
                fragments for filling in the ANY placeholders in the DTD above. Note that a
                custom element in a &lt;child&gt; element gets parsed by the custom tag handler of
                the parent object, while a custom element in an &lt;object&gt; element gets parsed
                by the custom tag handler of the object.
            </p><p>
              These XML fragments are explained in the documentation of their respective objects in the
              GTK+ Reference Manual.
            </p></div></div><div class="refsect1" title="Constructor"><a name="constructor-gtkbuilder"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis">    <span class="methodname">gtk.Builder</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new builder object.</td></tr></tbody></table><p>
            Creates a new builder object.
        </p></div><div class="refsect1" title="Methods"><a name="id3531272"></a><h2>Methods</h2><div class="refsect2" title="gtk.Builder.add_from_file"><a name="method-gtkbuilder--add-from-file"></a><h3>gtk.Builder.add_from_file</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">add_from_file</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filename</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>filename</code></strong> :</span></p></td><td>The name of the file to parse.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A positive value on success, 0 if an error occurred.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>
                The <code class="methodname">add_from_file</code>() method parses a file containing a GtkBuilder UI
                definition and merges it with the current contents of builder.
            </p></div><div class="refsect2" title="gtk.Builder.add_from_string"><a name="method-gtkbuilder--add-from-string"></a><h3>gtk.Builder.add_from_string</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">add_from_string</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>buffer</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>buffer</code></strong> :</span></p></td><td>The string to parse.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A positive value on success, 0 if an error occurred.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>
                The <code class="methodname">add_from_string</code>() method parses a string containing a GtkBuilder UI
                definition and merges it with the current contents of builder.
            </p></div><div class="refsect2" title="gtk.Builder.add_objects_from_file"><a name="method-gtkbuilder--add-objects-from-file"></a><h3>gtk.Builder.add_objects_from_file</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">add_objects_from_file</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>filename</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>object_ids</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>filename</code></strong> :</span></p></td><td>The name of the file to parse.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>object_ids</code></strong> :</span></p></td><td>A list of objects to build.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A positive value on success, 0 if an error occurred.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.14 and above.</p></div><p>
                The <code class="methodname">add_objects_from_file</code>() method parses a file containing a GtkBuilder UI
                definition building only the requested objects and merges it with the current contents of builder.
            </p><p>
                Note that if you are adding an object that depends on an object that is not its child (for instance
                a <a class="link" href="class-gtktreeview.html" title="gtk.TreeView"><code class="classname">gtk.TreeView</code></a> that depends on its
                <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a>), you have to
                explicitely list all of them in <em class="parameter"><code>object_ids</code></em>.
            </p></div><div class="refsect2" title="gtk.Builder.add_objects_from_string"><a name="method-gtkbuilder--add-objects-from-string"></a><h3>gtk.Builder.add_objects_from_string</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">add_objects_from_string</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>buffer</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>object_ids</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>buffer</code></strong> :</span></p></td><td>The string to parse.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>object_ids</code></strong> :</span></p></td><td>A list of objects to build.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A positive value on success, 0 if an error occurred.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.14 and above.</p></div><p>
                The <code class="methodname">add_objects_from_string</code>() method parses a string containing a GtkBuilder UI
                definition building only the requested objects and merges it with the current contents of builder.
            </p><p>
                Note that if you are adding an object that depends on an object that is not its child (for instance
                a <a class="link" href="class-gtktreeview.html" title="gtk.TreeView"><code class="classname">gtk.TreeView</code></a> that depends on its
                <a class="link" href="class-gtktreemodel.html" title="gtk.TreeModel"><code class="classname">gtk.TreeModel</code></a>), you have to
                explicitely list all of them in <em class="parameter"><code>object_ids</code></em>.
            </p></div><div class="refsect2" title="gtk.Builder.connect_signals"><a name="method-gtkbuilder--connect-signals"></a><h3>gtk.Builder.connect_signals</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">connect_signals</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>object</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_data</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>object</code></strong> :</span></p></td><td>A mapping or an instance.</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>user_data</code></strong> :</span></p></td><td>User data for every signal handler.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>
                The <code class="methodname">connect_signals</code>() method uses Python's introspective
                features to look at the keys (if object is a mapping) or attributes (if object is an instance)
                and tries to match them with the signal handler names given in the interface description.
                The callbacks referenced by each matched key or attribute are connected to their matching signals.
            </p><p>
	        For each of handlers that cannot be found, a <code class="classname">RuntimeWarning</code>
	        is issued.  Also, if there is at least one such missing handler,
		<code class="methodname">connect_signals</code> will return a list of their names,
		else return value is None.
	    </p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p><code class="classname">RuntimeWarning</code> and return value for missing
		  handlers was added in PyGTK 2.14.</p></div></div><div class="refsect2" title="gtk.Builder.get_object"><a name="method-gtkbuilder--get-object"></a><h3>gtk.Builder.get_object</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_object</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>name</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>Name of object to get.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The object named name or None if it could
                        not be found in the object tree.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>
                The <code class="methodname">get_object</code>() method gets the object named name.
            </p></div><div class="refsect2" title="gtk.Builder.get_objects"><a name="method-gtkbuilder--get-objects"></a><h3>gtk.Builder.get_objects</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_objects</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>A list containing all the objects constructed
                        by the GtkBuilder instance</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>
                The <code class="methodname">get_objects</code>() method gets all objects that have
                been constructed by builder.
            </p></div><div class="refsect2" title="gtk.Builder.get_translation_domain"><a name="method-gtkbuilder--get-translation-domain"></a><h3>gtk.Builder.get_translation_domain</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_translation_domain</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The translation domain.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>
                The <code class="methodname">get_translation_domain</code>() gets the translation domain of builder.
            </p></div><div class="refsect2" title="gtk.Builder.get_type_from_name"><a name="method-gtkbuilder--get-type-from-name"></a><h3>gtk.Builder.get_type_from_name</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">get_type_from_name</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>type_name</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>type_name</code></strong> :</span></p></td><td>The name to lookup.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>The GType found for type_name or G_TYPE_INVALID if no type was found</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>
                The <code class="methodname">get_type_from_name</code>() method looks up a type by name,
                using the virtual function that GtkBuilder has for that purpose.
            </p></div><div class="refsect2" title="gtk.Builder.set_translation_domain"><a name="method-gtkbuilder--set-translation-domain"></a><h3>gtk.Builder.set_translation_domain</h3><pre class="programlisting"><code class="methodsynopsis">    def <span class="methodname">set_translation_domain</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>domain</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>domain</code></strong> :</span></p></td><td>The translation domain or None.</td></tr></tbody></table><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>This method is available in PyGTK 2.12 and above.</p></div><p>
                The <code class="methodname">set_translation_domain</code>() method sets the translation
                domain of builder. See GtkBuilder:translation-domain property.
            </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-gtkbuildable.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-gtkbutton.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.Buildable </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.Button</td></tr></table></div></body></html>