<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-gtkbuilder">
    <refnamediv>
        <refname>gtk.Builder</refname>
        <refpurpose>Build an interface from an XML UI definition.</refpurpose>
    </refnamediv>

    <refsect1>
        <title>Synopsis</title>

    <classsynopsis language="python">
        <ooclass><classname>gtk.Builder</classname></ooclass>
        <ooclass><classname><link linkend="class-gobject">gobject.GObject</link></classname></ooclass>
    <constructorsynopsis language="python">
        <methodname><link linkend="constructor-gtkbuilder">gtk.Builder</link></methodname>
        <methodparam></methodparam>
    </constructorsynopsis>
    
    <methodsynopsis language="python">
        <methodname><link linkend="method-gtkbuilder--add-from-file">add_from_file</link></methodname>
        <methodparam><parameter role="keyword">filename</parameter></methodparam>
    </methodsynopsis>
    <methodsynopsis language="python">
        <methodname><link linkend="method-gtkbuilder--add-from-string">add_from_string</link></methodname>
        <methodparam><parameter role="keyword">buffer</parameter></methodparam>
    </methodsynopsis>
    <methodsynopsis language="python">
        <methodname><link linkend="method-gtkbuilder--add-objects-from-file">add_objects_from_file</link></methodname>
        <methodparam><parameter role="keyword">filename</parameter></methodparam>
        <methodparam><parameter role="keyword">object_ids</parameter></methodparam>
    </methodsynopsis>
    <methodsynopsis language="python">
        <methodname><link linkend="method-gtkbuilder--add-objects-from-string">add_objects_from_string</link></methodname>
        <methodparam><parameter role="keyword">buffer</parameter></methodparam>
        <methodparam><parameter role="keyword">object_ids</parameter></methodparam>
    </methodsynopsis>
    <methodsynopsis language="python">
        <methodname><link linkend="method-gtkbuilder--connect-signals">connect_signals</link></methodname>
        <methodparam><parameter role="keyword">object</parameter></methodparam>
        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
    </methodsynopsis>
    <!-- NOT YET IMPLEMENTED <methodsynopsis language="python">
        <methodname><link linkend="method-gtkbuilder-connect-signals-full">connect_signals_full</link></methodname>
        <methodparam><parameter role="keyword">func</parameter></methodparam>
        <methodparam><parameter role="keyword">user_data</parameter><initializer>None</initializer></methodparam>
    </methodsynopsis> FINISH NON YET IMPLEMENTED -->
    <methodsynopsis language="python">
        <methodname><link linkend="method-gtkbuilder--get-object">get_object</link></methodname>
        <methodparam><parameter role="keyword">name</parameter></methodparam>
    </methodsynopsis>
    <methodsynopsis language="python">
        <methodname><link linkend="method-gtkbuilder--get-objects">get_objects</link></methodname>
        <methodparam></methodparam>
    </methodsynopsis>
    <methodsynopsis language="python">
        <methodname><link linkend="method-gtkbuilder--get-translation-domain">get_translation_domain</link></methodname>
        <methodparam></methodparam>
    </methodsynopsis>
    <methodsynopsis language="python">
        <methodname><link linkend="method-gtkbuilder--get-type-from-name">get_type_from_name</link></methodname>
        <methodparam><parameter role="keyword">type_name</parameter></methodparam>
    </methodsynopsis>
    <methodsynopsis language="python">
        <methodname><link linkend="method-gtkbuilder--set-translation-domain">set_translation_domain</link></methodname>
        <methodparam><parameter role="keyword">domain</parameter></methodparam>
    </methodsynopsis>
    <!-- NOT YET IMPLEMENTED <methodsynopsis language="python">
        <methodname><link linkend="method-gtkbuilder-value-from-string">value_from_string</link></methodname>
        <methodparam><parameter role="keyword">pspec</parameter></methodparam>
        <methodparam><parameter role="keyword">string</methodparam>
        <methodparam><parameter role="keyword">value</methodparam>
    </methodsynopsis>
    <methodsynopsis language="python">
        <methodname><link linkend="method-gtkbuilder-value-from-string-type">value_from_string_type</link></methodname>
        <methodparam><parameter role="keyword">type</parameter></methodparam>
        <methodparam><parameter role="keyword">string</methodparam>
        <methodparam><parameter role="keyword">value</methodparam>
    </methodsynopsis> FINISH NON YET IMPLEMENTED -->
    
    </classsynopsis>
    </refsect1>

    <refsect1>
        <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-gtkbuilder">gtk.Builder</link>
</synopsis>

    </refsect1>

    <refsect1 id="properties-gtkbuilder">
        <title>gtk.Builder Properties</title>

        <blockquote role="properties">
            <informaltable pgwide="1" frame="none">
                <tgroup cols="3">
                    <colspec column="1" colwidth="1in"/>
                    <colspec column="2" colwidth="1in"/>
                    <colspec column="3" colwidth="3.5in"/>
                    <tbody>
                        <row valign="top">
                            <entry>"translation-domain"</entry>
                            <entry>Read/Write</entry>
                            <entry>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
                            </entry>
                        </row>
                    </tbody>
                </tgroup>
            </informaltable>
        </blockquote>
    </refsect1>

    <refsect1>
        <title>Description</title>

        <para>
            A <link linkend="class-gtkbuilder"><classname>gtk.Builder</classname></link>
            is an auxiliary object that reads textual descriptions of a user interface and
            instantiates the described objects. To pass a description to a
            <link linkend="class-gtkbuilder"><classname>gtk.Builder</classname></link>, call
            <methodname><link linkend="method-gtkbuilder--add-from-file">add_from_file</link></methodname>() or
            <methodname><link linkend="method-gtkbuilder--add-from-string">add_from_string</link></methodname>().
            These methods can be called multiple times; the builder merges the content of all descriptions.
        </para>
        <para>
            A <link linkend="class-gtkbuilder"><classname>gtk.Builder</classname></link>
            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
            <methodname><link linkend="method-gtkwidget--destroy">gtk.Widget.destroy</link></methodname>()
            to get rid of them and all the widgets they contain.
        </para>
        <para>
            The methods <methodname><link linkend="method-gtkbuilder--get-object">get_object</link></methodname>()
            and <methodname><link linkend="method-gtkbuilder--get-objects">get_objects</link></methodname>()
            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 <methodname><link linkend="method-gtkwidget--destroy">gtk.Widget.destroy</link></methodname>().
            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.
        </para>
        <para>
            The methods <methodname><link linkend="method-gtkbuilder--connect-signals">connect_signals</link></methodname>()
            and variants thereof can be used to connect handlers to the named signals in the description.
        </para>
        <refsect2 id="gtkbuilder-ui-definition">
            <title>gtk.Builder UI definition</title>
            <para>
                <link linkend="class-gtkbuilder"><classname>gtk.Builder</classname></link> 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.
            </para>
<programlisting>
<![CDATA[
<!ELEMENT interface (requires|object)* >
<!ELEMENT object    (property|signal|child|ANY)* >
<!ELEMENT property  PCDATA >
<!ELEMENT signal    EMPTY >
<!ELEMENT requires  EMPTY >
<!ELEMENT child     (object|ANY*) >
<!ATTLIST interface domain                 #IMPLIED >
<!ATTLIST object    id                     #REQUIRED
                    class                  #REQUIRED
                    type-func              #IMPLIED
                    constructor            #IMPLIED >
<!ATTLIST requires  lib                    #REQUIRED
                    version                #REQUIRED >
<!ATTLIST property  name                   #REQUIRED
                    translatable           #IMPLIED 
                    comments               #IMPLIED
                    context                #IMPLIED >
<!ATTLIST signal    name                   #REQUIRED
                    handler                #REQUIRED
                    after                  #IMPLIED
                    swapped                #IMPLIED
                    object                 #IMPLIED
                    last_modification_time #IMPLIED >
<!ATTLIST child     type                   #IMPLIED
                    internal-child         #IMPLIED >
]]>
</programlisting>
            <para>
                The toplevel element is &#60;interface&#62;. 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
                <methodname><link linkend="method-gtkbuilder--set-translation-domain">set_translation_domain</link></methodname>()
                on the builder. Objects are described by &#60;object&#62; elements, which can contain &#60;property&#62;
                elements to set properties, &#60;signal&#62; elements which connect signals to handlers, and &#60;child&#62;
                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 &#60;child&#62; element contains an &#60;object&#62;
                element which describes the child object. The target toolkit version(s) are described by &#60;requires&#62;
                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 "&#60;major&#62;.&#60;minor&#62;".
                The builder will error out if the version requirements are not met.
            </para>
            <para>
                Typically, the specific kind of object represented by an &#60;object&#62; 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,
                <link linkend="class-gtkbuilder"><classname>gtk.Builder</classname></link> allows to use an object that
                has been constructed by a <link linkend="class-gtkuimanager"><classname>gtk.UIManager</classname></link>
                in another part of the UI definition by specifying the id of the
                <link linkend="class-gtkuimanager"><classname>gtk.UIManager</classname></link> in the "constructor" attribute
                and the name of the object in the "id" attribute.
            </para>
            <para>
                Objects must be given a name with the "id" attribute, which allows the application to retrieve them from
                the builder with <methodname><link linkend="method-gtkbuilder--get-object">get_object</link></methodname>().
                An id is also necessary to use the object as property value in other parts of the UI definition.
            </para>
            <note>
                Prior to GTK+ 2.20, <link linkend="class-gtkbuilder"><classname>gtk.Builder</classname></link>
                was setting the "name" property of constructed widgets to the "id" attribute. In GTK+ 2.20 or newer, you
                have to use <link linkend="method-gtkbuildable--set-name"><methodname>gtk.Buildable.get_name</methodname></link>()
                instead of <link linkend="method-gtkwidget--get-name"><methodname>gtk.Widget.get_name</methodname></link>()
                to obtain the "id", or set the "name" property in your UI definition.
            </note>
            <para>
                Setting properties of objects is pretty straightforward with the &#60;property&#62;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.
            </para>
            <para>
                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
                <literal>True</literal>, strings like "FALSE, "f", "no", "n", "0" are interpreted as <literal>False</literal>),
                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 <link linkend="function-gdk--color-parse"><methodname>gtk.gdk.color_parse</methodname></link>()).
                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.
            </para>
            <para>
                Signal handlers are set up with the &#60;signal&#62; 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()<!--NOT IMPLEMENTED IN PYGTK:, but this can be changed by passing a custom
                GtkBuilderConnectFunc to gtk_builder_connect_signals_full()-->. 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.
            </para>
            <para>
                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
                <link linkend="class-gtkdialog"><classname>gtk.Dialog</classname></link>).
                This can be achieved by setting the "internal-child" propery of the &#60;child&#62; element to a true value.
                Note that <link linkend="class-gtkbuilder"><classname>gtk.Builder</classname></link>
                still requires an &#60;object&#62; element for the internal child, even if it has already been constructed.
            </para>
            <para>
                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
                &#60;child&#62; The possible values for the "type" attribute are described in the sections describing
                the widget-specific portions of UI definitions.
            </para>
        </refsect2>
        
        <refsect2 id="gtkbuilder-ui-definition-example">
            <title>A gtk.Builder UI definition example</title>
<programlisting>
<![CDATA[
<interface>
  <object class="GtkDialog" id="dialog1">
    <child internal-child="vbox">
      <object class="GtkVBox" id="vbox1">
        <property name="border-width">10</property>
        <child internal-child="action_area">
          <object class="GtkHButtonBox" id="hbuttonbox1">
            <property name="border-width">20</property>
            <child>
              <object class="GtkButton" id="ok_button">
                <property name="label">gtk-ok</property>
                <property name="use-stock">TRUE</property>
                <signal name="clicked" handler="ok_button_clicked"/>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </object>
</interface>
]]>
</programlisting>
            <para>
                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 &#60;child&#62; element gets parsed by the custom tag handler of
                the parent object, while a custom element in an &#60;object&#62; element gets parsed
                by the custom tag handler of the object.
            </para>

            <para>
              These XML fragments are explained in the documentation of their respective objects in the
              GTK+ Reference Manual.
            </para>
        </refsect2>
    </refsect1>

    <refsect1 id="constructor-gtkbuilder">
        <title>Constructor</title>

        <programlisting><constructorsynopsis language="python">
            <methodname>gtk.Builder</methodname>
            <methodparam></methodparam>
        </constructorsynopsis></programlisting>

        <variablelist>
            <varlistentry>
                <term><emphasis>Returns</emphasis>&nbsp;:</term>
                <listitem><simpara>a new builder object.</simpara></listitem>
            </varlistentry>
        </variablelist>

        <para>
            Creates a new builder object.
        </para>
    </refsect1>

    <refsect1>
        <title>Methods</title>

        <refsect2 id="method-gtkbuilder--add-from-file">
            <title>gtk.Builder.add_from_file</title>

            <programlisting><methodsynopsis language="python">
                <methodname>add_from_file</methodname>
                <methodparam><parameter>filename</parameter></methodparam>
            </methodsynopsis></programlisting>
            
            <variablelist>
                <varlistentry>
                    <term><parameter role="keyword">filename</parameter>&nbsp;:</term>
                        <listitem><simpara>The name of the file to parse.</simpara></listitem>
                </varlistentry>
                <varlistentry>
                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
                        <listitem><simpara>A positive value on success, 0 if an error occurred.</simpara></listitem>
                </varlistentry>
            </variablelist>

            <note>
                <para>This method is available in PyGTK 2.12 and above.</para>
            </note>

            <para>
                The <methodname>add_from_file</methodname>() method parses a file containing a GtkBuilder UI
                definition and merges it with the current contents of builder.
            </para>
        </refsect2>

        <refsect2 id="method-gtkbuilder--add-from-string">
            <title>gtk.Builder.add_from_string</title>

            <programlisting><methodsynopsis language="python">
                <methodname>add_from_string</methodname>
                <methodparam><parameter>buffer</parameter></methodparam>
            </methodsynopsis></programlisting>
            
            <variablelist>
                <varlistentry>
                    <term><parameter role="keyword">buffer</parameter>&nbsp;:</term>
                        <listitem><simpara>The string to parse.</simpara></listitem>
                </varlistentry>
                <varlistentry>
                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
                        <listitem><simpara>A positive value on success, 0 if an error occurred.</simpara></listitem>
                </varlistentry>
            </variablelist>

            <note>
                <para>This method is available in PyGTK 2.12 and above.</para>
            </note>

            <para>
                The <methodname>add_from_string</methodname>() method parses a string containing a GtkBuilder UI
                definition and merges it with the current contents of builder.
            </para>
        </refsect2>

        <refsect2 id="method-gtkbuilder--add-objects-from-file">
            <title>gtk.Builder.add_objects_from_file</title>

            <programlisting><methodsynopsis language="python">
                <methodname>add_objects_from_file</methodname>
                <methodparam><parameter>filename</parameter></methodparam>
                <methodparam><parameter>object_ids</parameter></methodparam>
            </methodsynopsis></programlisting>

            <variablelist>
                <varlistentry>
                    <term><parameter role="keyword">filename</parameter>&nbsp;:</term>
                        <listitem><simpara>The name of the file to parse.</simpara></listitem>
                </varlistentry>
                <varlistentry>
                    <term><parameter role="keyword">object_ids</parameter>&nbsp;:</term>
                        <listitem><simpara>A list of objects to build.</simpara></listitem>
                </varlistentry>
                <varlistentry>
                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
                        <listitem><simpara>A positive value on success, 0 if an error occurred.</simpara></listitem>
                </varlistentry>
            </variablelist>

            <note>
                <para>This method is available in PyGTK 2.14 and above.</para>
            </note>

            <para>
                The <methodname>add_objects_from_file</methodname>() method parses a file containing a GtkBuilder UI
                definition building only the requested objects and merges it with the current contents of builder.
            </para>
            <para>
                Note that if you are adding an object that depends on an object that is not its child (for instance
                a <link linkend="class-gtktreeview"><classname>gtk.TreeView</classname></link> that depends on its
                <link linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link>), you have to
                explicitely list all of them in <parameter>object_ids</parameter>.
            </para>
        </refsect2>

        <refsect2 id="method-gtkbuilder--add-objects-from-string">
            <title>gtk.Builder.add_objects_from_string</title>

            <programlisting><methodsynopsis language="python">
                <methodname>add_objects_from_string</methodname>
                <methodparam><parameter>buffer</parameter></methodparam>
                <methodparam><parameter>object_ids</parameter></methodparam>
            </methodsynopsis></programlisting>

            <variablelist>
                <varlistentry>
                    <term><parameter role="keyword">buffer</parameter>&nbsp;:</term>
                        <listitem><simpara>The string to parse.</simpara></listitem>
                </varlistentry>
                <varlistentry>
                    <term><parameter role="keyword">object_ids</parameter>&nbsp;:</term>
                        <listitem><simpara>A list of objects to build.</simpara></listitem>
                </varlistentry>
                <varlistentry>
                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
                        <listitem><simpara>A positive value on success, 0 if an error occurred.</simpara></listitem>
                </varlistentry>
            </variablelist>

            <note>
                <para>This method is available in PyGTK 2.14 and above.</para>
            </note>

            <para>
                The <methodname>add_objects_from_string</methodname>() method parses a string containing a GtkBuilder UI
                definition building only the requested objects and merges it with the current contents of builder.
            </para>
            <para>
                Note that if you are adding an object that depends on an object that is not its child (for instance
                a <link linkend="class-gtktreeview"><classname>gtk.TreeView</classname></link> that depends on its
                <link linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link>), you have to
                explicitely list all of them in <parameter>object_ids</parameter>.
            </para>

        </refsect2>

        <refsect2 id="method-gtkbuilder--connect-signals">
            <title>gtk.Builder.connect_signals</title>

            <programlisting><methodsynopsis language="python">
                <methodname>connect_signals</methodname>
                <methodparam><parameter>object</parameter></methodparam>
                <methodparam><parameter>user_data</parameter></methodparam>
            </methodsynopsis></programlisting>
            
            <variablelist>
                <varlistentry>
                    <term><parameter role="keyword">object</parameter>&nbsp;:</term>
                        <listitem><simpara>A mapping or an instance.</simpara></listitem>
                </varlistentry>
                <varlistentry>
                    <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
                        <listitem><simpara>User data for every signal handler.</simpara></listitem>
                </varlistentry>
            </variablelist>

            <note>
                <para>This method is available in PyGTK 2.12 and above.</para>
            </note>

            <para>
                The <methodname>connect_signals</methodname>() 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.
            </para>

	    <para>
	        For each of handlers that cannot be found, a <classname>RuntimeWarning</classname>
	        is issued.  Also, if there is at least one such missing handler,
		<methodname>connect_signals</methodname> will return a list of their names,
		else return value is None.
	    </para>

	    <note>
	        <para><classname>RuntimeWarning</classname> and return value for missing
		  handlers was added in PyGTK 2.14.</para>
	    </note>
	</refsect2>

        <refsect2 id="method-gtkbuilder--get-object">
            <title>gtk.Builder.get_object</title>

            <programlisting><methodsynopsis language="python">
                <methodname>get_object</methodname>
                <methodparam><parameter>name</parameter></methodparam>
            </methodsynopsis></programlisting>
            
            <variablelist>
                <varlistentry>
                    <term><parameter role="keyword">name</parameter>&nbsp;:</term>
                        <listitem><simpara>Name of object to get.</simpara></listitem>
                </varlistentry>
                <varlistentry>
                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
                        <listitem><simpara>The object named name or None if it could
                        not be found in the object tree.</simpara></listitem>
                </varlistentry>
            </variablelist>

            <note>
                <para>This method is available in PyGTK 2.12 and above.</para>
            </note>

            <para>
                The <methodname>get_object</methodname>() method gets the object named name.
            </para>
        </refsect2>

        <refsect2 id="method-gtkbuilder--get-objects">
            <title>gtk.Builder.get_objects</title>

            <programlisting><methodsynopsis language="python">
                <methodname>get_objects</methodname>
                <methodparam></methodparam>
            </methodsynopsis></programlisting>
            
            <variablelist>
                <varlistentry>
                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
                        <listitem><simpara>A list containing all the objects constructed
                        by the GtkBuilder instance</simpara></listitem>
                </varlistentry>
            </variablelist>

            <note>
                <para>This method is available in PyGTK 2.12 and above.</para>
            </note>

            <para>
                The <methodname>get_objects</methodname>() method gets all objects that have
                been constructed by builder.
            </para>
        </refsect2>

        <refsect2 id="method-gtkbuilder--get-translation-domain">
            <title>gtk.Builder.get_translation_domain</title>

            <programlisting><methodsynopsis language="python">
                <methodname>get_translation_domain</methodname>
                <methodparam></methodparam>
            </methodsynopsis></programlisting>
            
            <variablelist>
                <varlistentry>
                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
                        <listitem><simpara>The translation domain.</simpara></listitem>
                </varlistentry>
            </variablelist>

            <note>
                <para>This method is available in PyGTK 2.12 and above.</para>
            </note>

            <para>
                The <methodname>get_translation_domain</methodname>() gets the translation domain of builder.
            </para>
        </refsect2>

        <refsect2 id="method-gtkbuilder--get-type-from-name">
            <title>gtk.Builder.get_type_from_name</title>

            <programlisting><methodsynopsis language="python">
                <methodname>get_type_from_name</methodname>
                <methodparam><parameter>type_name</parameter></methodparam>
            </methodsynopsis></programlisting>
            
            <variablelist>
                <varlistentry>
                    <term><parameter role="keyword">type_name</parameter>&nbsp;:</term>
                        <listitem><simpara>The name to lookup.</simpara></listitem>
                </varlistentry>
                <varlistentry>
                    <term><emphasis>Returns</emphasis>&nbsp;:</term>
                        <listitem><simpara>The GType found for type_name or G_TYPE_INVALID if no type was found</simpara></listitem>
                </varlistentry>
            </variablelist>

            <note>
                <para>This method is available in PyGTK 2.12 and above.</para>
            </note>

            <para>
                The <methodname>get_type_from_name</methodname>() method looks up a type by name,
                using the virtual function that GtkBuilder has for that purpose.
            </para>
        </refsect2>

        <refsect2 id="method-gtkbuilder--set-translation-domain">
            <title>gtk.Builder.set_translation_domain</title>

            <programlisting><methodsynopsis language="python">
                <methodname>set_translation_domain</methodname>
                <methodparam><parameter>domain</parameter></methodparam>
            </methodsynopsis></programlisting>
            
            <variablelist>
                <varlistentry>
                    <term><parameter role="keyword">domain</parameter>&nbsp;:</term>
                        <listitem><simpara>The translation domain or None.</simpara></listitem>
                </varlistentry>
            </variablelist>

            <note>
                <para>This method is available in PyGTK 2.12 and above.</para>
            </note>

            <para>
                The <methodname>set_translation_domain</methodname>() method sets the translation
                domain of builder. See GtkBuilder:translation-domain property.
            </para>
        </refsect2>
    </refsect1>
</refentry>
