<?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-gtktextbuffer">
  <refnamediv>
    <refname>gtk.TextBuffer</refname>
    <refpurpose>stores attributed text for display in a <link
linkend="class-gtktextview"><classname>gtk.TextView</classname></link></refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.TextBuffer</classname></ooclass>
      <ooclass><classname><link
linkend="class-gobject">gobject.GObject</link></classname></ooclass>
      <constructorsynopsis language="python">
	<methodname><link
linkend="constructor-gtktextbuffer">gtk.TextBuffer</link></methodname>
	<methodparam><parameter role="keyword">table</parameter>
	  <initializer>None</initializer></methodparam>
      </constructorsynopsis>

      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-line-count">get_line_count</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-char-count">get_char_count</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-tag-table">get_tag_table</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--set-text">set_text</link></methodname>
	<methodparam><parameter
		       role="keyword">text</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--insert">insert</link></methodname>
	<methodparam><parameter
		       role="keyword">iter</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">text</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--insert-at-cursor">insert_at_cursor</link></methodname>
	<methodparam><parameter
		       role="keyword">text</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--insert-interactive">insert_interactive</link></methodname>
	<methodparam><parameter
		       role="keyword">iter</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">text</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">default_editable</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--insert-interactive-at-cursor">insert_interactive_at_cursor</link></methodname>
	<methodparam><parameter
		       role="keyword">text</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">default_editable</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--insert-range">insert_range</link></methodname>
	<methodparam><parameter
	       role="keyword">iter</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">start</parameter></methodparam>
	<methodparam><parameter role="keyword">end</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--insert-range-interactive">insert_range_interactive</link></methodname>
	<methodparam><parameter
		       role="keyword">iter</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">start</parameter></methodparam>
	<methodparam><parameter role="keyword">end</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">default_editable</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--insert-with-tags">insert_with_tags</link></methodname>
	<methodparam><parameter>iter</parameter></methodparam>
	<methodparam><parameter>text</parameter></methodparam>
	<methodparam><parameter role="keyword">...</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--insert-with-tags-by-name">insert_with_tags_by_name</link></methodname>
	<methodparam><parameter>iter</parameter></methodparam>
	<methodparam><parameter>text</parameter></methodparam>
	<methodparam><parameter>...</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--delete">delete</link></methodname>
	<methodparam><parameter
		       role="keyword">start</parameter></methodparam>
	<methodparam><parameter role="keyword">end</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--delete-interactive">delete_interactive</link></methodname>
	<methodparam><parameter
		       role="keyword">start_iter</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">end_iter</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">default_editable</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-text">get_text</link></methodname>
	<methodparam><parameter
		       role="keyword">start</parameter></methodparam>
	<methodparam><parameter role="keyword">end</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">include_hidden_chars</parameter>
	  <initializer><literal>True</literal></initializer></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-slice">get_slice</link></methodname>
	<methodparam><parameter
		       role="keyword">start</parameter></methodparam>
	<methodparam><parameter role="keyword">end</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">include_hidden_chars</parameter>
	  <initializer><literal>True</literal></initializer></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--insert-pixbuf">insert_pixbuf</link></methodname>
	<methodparam><parameter
		       role="keyword">iter</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">pixbuf</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--insert-child-anchor">insert_child_anchor</link></methodname>
	<methodparam><parameter
		       role="keyword">iter</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">anchor</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--create-child-anchor">create_child_anchor</link></methodname>
	<methodparam><parameter
		       role="keyword">iter</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--create-mark">create_mark</link></methodname>
	<methodparam><parameter
		       role="keyword">mark_name</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">where</parameter></methodparam>
	<methodparam><parameter role="keyword">left_gravity</parameter>
	  <initializer><literal>False</literal></initializer></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--move-mark">move_mark</link></methodname>
	<methodparam><parameter
		       role="keyword">mark</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">where</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--delete-mark">delete_mark</link></methodname>
	<methodparam><parameter
		       role="keyword">mark</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-mark">get_mark</link></methodname>
	<methodparam><parameter
		       role="keyword">name</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--move-mark-by-name">move_mark_by_name</link></methodname>
	<methodparam><parameter
		       role="keyword">name</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">where</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--delete-mark-by-name">delete_mark_by_name</link></methodname>
	<methodparam><parameter
		       role="keyword">name</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-insert">get_insert</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-selection-bound">get_selection_bound</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--place-cursor">place_cursor</link></methodname>
	<methodparam><parameter
		       role="keyword">where</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--place-cursor">select_range</link></methodname>
	<methodparam><parameter
		       role="keyword">ins</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">bound</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--apply-tag">apply_tag</link></methodname>
	<methodparam><parameter role="keyword">tag</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">start</parameter></methodparam>
	<methodparam><parameter role="keyword">end</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--remove-tag">remove_tag</link></methodname>
	<methodparam><parameter role="keyword">tag</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">start</parameter></methodparam>
	<methodparam><parameter role="keyword">end</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--apply-tag-by-name">apply_tag_by_name</link></methodname>
	<methodparam><parameter
		       role="keyword">name</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">start</parameter></methodparam>
	<methodparam><parameter role="keyword">end</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--remove-tag-by-name">remove_tag_by_name</link></methodname>
	<methodparam><parameter
		       role="keyword">name</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">start</parameter></methodparam>
	<methodparam><parameter role="keyword">end</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--remove-all-tags">remove_all_tags</link></methodname>
	<methodparam><parameter
		       role="keyword">start</parameter></methodparam>
	<methodparam><parameter role="keyword">end</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--create-tag">create_tag</link></methodname>
	<methodparam><parameter>tag_name</parameter>
	  <initializer>None</initializer></methodparam>
	<methodparam><parameter>...</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-iter-at-line-offset">get_iter_at_line_offset</link></methodname>
	<methodparam><parameter
		       role="keyword">line_number</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">char_offset</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-iter-at-line-index">get_iter_at_line_index</link></methodname>
	<methodparam><parameter
		       role="keyword">line_number</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">byte_index</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-iter-at-offset">get_iter_at_offset</link></methodname>
	<methodparam><parameter
		       role="keyword">char_offset</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-iter-at-line">get_iter_at_line</link></methodname>
	<methodparam><parameter
		       role="keyword">line_number</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-start-iter">get_start_iter</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-end-iter">get_end_iter</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-bounds">get_bounds</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-iter-at-mark">get_iter_at_mark</link></methodname>
	<methodparam><parameter
		       role="keyword">mark</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-iter-at-child-anchor">get_iter_at_child_anchor</link></methodname>
	<methodparam><parameter
		       role="keyword">anchor</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-modified">get_modified</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--set-modified">set_modified</link></methodname>
	<methodparam><parameter
		       role="keyword">setting</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtktextbuffer--add-selection-clipboard">add_selection_clipboard</link></methodname>
	<methodparam><parameter role="keyword">clipboard</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtktextbuffer--remove-selection-clipboard">remove_selection_clipboard</link></methodname>
	<methodparam><parameter role="keyword">clipboard</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtktextbuffer--cut-clipboard">cut_clipboard</link></methodname>
	<methodparam><parameter role="keyword">clipboard</parameter></methodparam>
	<methodparam><parameter role="keyword">default_editable</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtktextbuffer--copy-clipboard">copy_clipboard</link></methodname>
	<methodparam><parameter role="keyword">clipboard</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link linkend="method-gtktextbuffer--paste-clipboard">paste_clipboard</link></methodname>
	<methodparam><parameter role="keyword">clipboard</parameter></methodparam>
	<methodparam><parameter role="keyword">override_location</parameter></methodparam>
	<methodparam><parameter role="keyword">default_editable</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--get-selection-bounds">get_selection_bounds</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--delete-selection">delete_selection</link></methodname>
	<methodparam><parameter
		       role="keyword">interactive</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">default_editable</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--begin-user-action">begin_user_action</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--end-user-action">end_user_action</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktextbuffer--end-user-action">backspace</link></methodname>
	<methodparam><parameter
		       role="keyword">iter</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">interactive</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">default_editable</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktextbuffer--get-has-selection">get_has_selection</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktextbuffer--get-copy-target-list">get_copy_target_list</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktextbuffer--get-paste-target-list">get_paste_target_list</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktextbuffer--register-serialize-format">register_serialize_format</link></methodname>
        <methodparam><parameter role="keyword">mime_type</parameter></methodparam>
        <methodparam><parameter role="keyword">function</parameter></methodparam>
        <methodparam><parameter role="keyword">user_data</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktextbuffer--register-serialize-tagset">register_serialize_tagset</link></methodname>
        <methodparam><parameter role="keyword">tagset_name</parameter><initializer>NULL</initializer></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktextbuffer--register-deserialize-format">register_deserialize_format</link></methodname>
        <methodparam><parameter role="keyword">mime_type</parameter></methodparam>
        <methodparam><parameter role="keyword">function</parameter></methodparam>
        <methodparam><parameter role="keyword">user_data</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktextbuffer--register-deserialize-tagset">register_deserialize_tagset</link></methodname>
        <methodparam><parameter role="keyword">tagset_name</parameter><initializer>NULL</initializer></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktextbuffer--unregister-serialize-format">unregister_serialize_format</link></methodname>
        <methodparam><parameter role="keyword">format</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktextbuffer--unregister-deserialize-format">unregister_deserialize_format</link></methodname>
        <methodparam><parameter role="keyword">format</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktextbuffer--deserialize-set-can-create-tags">deserialize_set_can_create_tags</link></methodname>
        <methodparam><parameter role="keyword">format</parameter></methodparam>
        <methodparam><parameter role="keyword">can_create_tags</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktextbuffer--deserialize-get-can-create-tags">deserialize_get_can_create_tags</link></methodname>
        <methodparam><parameter role="keyword">format</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktextbuffer--get-serialize-formats">get_serialize_formats</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktextbuffer--get-deserialize-formats">get_deserialize_formats</link></methodname>
        <methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktextbuffer--serialize">serialize</link></methodname>
        <methodparam><parameter role="keyword">content_buffer</parameter></methodparam>
        <methodparam><parameter role="keyword">format</parameter></methodparam>
        <methodparam><parameter role="keyword">start</parameter></methodparam>
        <methodparam><parameter role="keyword">end</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktextbuffer--deserialize">deserialize</link></methodname>
        <methodparam><parameter role="keyword">content_buffer</parameter></methodparam>
        <methodparam><parameter role="keyword">format</parameter></methodparam>
        <methodparam><parameter role="keyword">iter</parameter></methodparam>
        <methodparam><parameter role="keyword">data</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
        <methodname><link linkend="method-gtktextbuffer--add-mark">add_mark</link></methodname>
        <methodparam><parameter role="keyword">mark</parameter></methodparam>
        <methodparam><parameter role="keyword">where</parameter></methodparam>
      </methodsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-gtktextbuffer">gtk.TextBuffer</link>
</synopsis>

  </refsect1>

  <refsect1 id="properties-gtktextbuffer">
    <title>gtk.TextBuffer 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="4in"/>
          <tbody>
 
            <row valign="top">
              <entry>"copy-target-list"</entry>
              <entry>Read</entry>
              <entry>The list of targets this buffer supports for clipboard
              copying and as DND source.  This property is available in GTK+
              2.10 and above.</entry>
            </row>

            <row valign="top">
              <entry>"cursor-position"</entry>
              <entry>Read</entry>
              <entry>The position of the insert mark (as offset from the
              beginning of the buffer).  It is useful for getting notified
              when the cursor moves. Allowed values: >= 0.  Default value:
              0.  This property is available in GTK+ 2.10 and above.</entry>
            </row>

            <row valign="top">
              <entry>"has-selection"</entry>
              <entry>Read</entry>
              <entry>If <literal>True</literal> the buffer has some text
              currently selected. Default value:
              <literal>False</literal>. This property is available in GTK+
              2.10 and above.</entry>
            </row>

            <row valign="top">
              <entry>"paste-target-list"</entry>
              <entry>Read</entry>
              <entry>The list of targets this buffer supports for clipboard
              pasting and as DND destination.  This property is available in
              GTK+ 2.10 and above.</entry>
            </row>

            <row valign="top">
              <entry>"tag-table"</entry>
              <entry>Read-Write-Construct Only</entry>
              <entry>The <link
              linkend="class-gtktexttagtable"><classname>gtk.TextTagTable</classname></link>
              associated with the textbuffer. Available in GTK+ 2.2 and
              above.</entry>
            </row>
 
            <row valign="top">
              <entry>"text"</entry>
              <entry>Read-Write</entry>
              <entry>The text content of the buffer. Without child widgets
              and images, see the <link
              linkend="method-gtktextbuffer--get-text"><methodname>gtk.TextBuffer.get_text()</methodname></link>
              method for more information. Default value: "". This property
              is available in GTK+ 2.8 and above.</entry>
            </row>

          </tbody>
        </tgroup>
      </informaltable>
    </blockquote>
 
  </refsect1>
 
   <refsect1>
    <title>Attributes</title>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">
	<?dbhtml cellpadding="5"?>
	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="4in"/>
	  <tbody>

	    <row valign="top">
	      <entry>"tag_table"</entry>
	      <entry>Read</entry>
	      <entry>The <link
linkend="class-gtktexttagtable"><classname>gtk.TextTagTable</classname></link> 
associated with the textbuffer.</entry>
	    </row>

	</tbody>
      </tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1 id="signal-prototypes-gtktextbuffer">
    <title>gtk.TextBuffer Signal Prototypes</title>

    <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>

    <variablelist>
      <varlistentry>
        <term>"<link linkend="signal-gtktextbuffer--apply-tag">apply-tag</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>textbuffer</parameter></methodparam>
            <methodparam><parameter>texttag</parameter></methodparam>
            <methodparam><parameter>start</parameter></methodparam>
            <methodparam><parameter>end</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link linkend="signal-gtktextbuffer--begin-user-action">begin-user-action</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>textbuffer</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link linkend="signal-gtktextbuffer--changed">changed</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>textbuffer</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link linkend="signal-gtktextbuffer--delete-range">delete-range</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>textbuffer</parameter></methodparam>
            <methodparam><parameter>start</parameter></methodparam>
            <methodparam><parameter>end</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link linkend="signal-gtktextbuffer--end-user-action">end-user-action</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>textbuffer</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link linkend="signal-gtktextbuffer--insert-child-anchor">insert-child-anchor</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>textbuffer</parameter></methodparam>
            <methodparam><parameter>iter</parameter></methodparam>
            <methodparam><parameter>anchor</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link linkend="signal-gtktextbuffer--insert-pixbuf">insert-pixbuf</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>textbuffer</parameter></methodparam>
            <methodparam><parameter>iter</parameter></methodparam>
            <methodparam><parameter>pixbuf</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link linkend="signal-gtktextbuffer--insert-text">insert-text</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>textbuffer</parameter></methodparam>
            <methodparam><parameter>iter</parameter></methodparam>
            <methodparam><parameter>text</parameter></methodparam>
            <methodparam><parameter>length</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link linkend="signal-gtktextbuffer--mark-deleted">mark-deleted</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>textbuffer</parameter></methodparam>
            <methodparam><parameter>textmark</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link linkend="signal-gtktextbuffer--mark-set">mark-set</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>textbuffer</parameter></methodparam>
            <methodparam><parameter>iter</parameter></methodparam>
            <methodparam><parameter>textmark</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link linkend="signal-gtktextbuffer--modified-changed">modified-changed</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>textbuffer</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link linkend="signal-gtktextbuffer--paste-done">paste-done</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>textbuffer</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>"<link linkend="signal-gtktextbuffer--remove-tag">remove-tag</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>textbuffer</parameter></methodparam>
            <methodparam><parameter>texttag</parameter></methodparam>
            <methodparam><parameter>start</parameter></methodparam>
            <methodparam><parameter>end</parameter></methodparam>
            <methodparam><parameter>user_param1</parameter></methodparam>
            <methodparam><parameter>...</parameter></methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
    </variablelist>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>A <link
linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link>
is the core component of the PyGTK text editing system. A <link
linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link>
contains the text, pixbufs and child widget anchors that are displayed in
one or more <link
linkend="class-gtktextview"><classname>gtk.TextView</classname></link>
widgets. A <link
linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link>
has an associated <link
linkend="class-gtktexttagtable"><classname>gtk.TextTagTable</classname></link> 
that contains the <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link> objects
that can be used to set attributes on the text in the textbuffer.</para>

    <para>A <link
linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link>
can be automatically created when creating a <link
linkend="class-gtktextview"><classname>gtk.TextView</classname></link> or it
can be created with the <link
linkend="constructor-gtktextbuffer">gtk.TextBuffer</link>() constructor and
associated with a <link
linkend="class-gtktextview"><classname>gtk.TextView</classname></link> using
the <link
linkend="method-gtktextview--set-buffer"><methodname>set_buffer</methodname>()</link> 
method or the <link linkend="constructor-gtktextview">gtk.TextView</link>()
constructor.</para>

  </refsect1>

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

    <programlisting><constructorsynopsis language="python">
	<methodname>gtk.TextBuffer</methodname>
	<methodparam><parameter role="keyword">table</parameter>
	  <initializer>None</initializer></methodparam>
      </constructorsynopsis></programlisting>
    <variablelist>
      <varlistentry>
	<term><parameter role="keyword">table</parameter>&nbsp;:</term>
	<listitem><simpara>a tag table, or None to create a new
one</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	<listitem><simpara>a new text buffer object</simpara></listitem>
      </varlistentry>
    </variablelist>

    <para>Creates a new <link
linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link>
object.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gtktextbuffer--get-line-count">
      <title>gtk.TextBuffer.get_line_count</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_line_count</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the number of lines in the
buffer</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_line_count</methodname>() method returns the
number of lines in the buffer. This value is cached, so the function is very
fast.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-char-count">
      <title>gtk.TextBuffer.get_char_count</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_char_count</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the number of characters in the
buffer</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_char_count</methodname>() method returns the
number of characters in the buffer; note that characters and bytes are not
the same, you can't e.g. expect the contents of the buffer in string form to
be this many bytes long. The character count is cached, so this function is
very fast.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-tag-table">
      <title>gtk.TextBuffer.get_tag_table</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_tag_table</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the buffer's tag table</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_tag_table</methodname>() method returns the
<link
linkend="class-gtktexttagtable"><classname>gtk.TextTagTable</classname></link> 
object associated with the textbuffer.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--set-text">
      <title>gtk.TextBuffer.set_text</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_text</methodname>
	  <methodparam><parameter
			 role="keyword">text</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">text</parameter>&nbsp;:</term>
	  <listitem><simpara>UTF-8 text to insert</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_text</methodname>() method replaces the
current contents of the textbuffer with the contents of
<parameter>text</parameter>. <parameter>text</parameter> must be valid
UTF-8.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--insert">
      <title>gtk.TextBuffer.insert</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>insert</methodname>
	  <methodparam><parameter
			 role="keyword">iter</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">text</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying a position in the buffer</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">text</parameter>&nbsp;:</term>
	  <listitem><simpara>UTF-8 format text to
insert</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>insert</methodname>() method inserts the
contents of <parameter>text</parameter> into the textbuffer at the position
specified by <parameter>iter</parameter>. The "insert_text" signal is
emitted and the text insertion actually occurs in the default handler for
the signal. <parameter>iter</parameter> is invalidated when insertion occurs
(because the buffer contents change), but the default signal handler
revalidates it to point to the end of the inserted text.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--insert-at-cursor">
      <title>gtk.TextBuffer.insert_at_cursor</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>insert_at_cursor</methodname>
	  <methodparam><parameter
			 role="keyword">text</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">text</parameter>&nbsp;:</term>
	  <listitem><simpara>some text in UTF-8 format</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>insert_at_cursor</methodname>() method is a
convenience method that calls the <link
linkend="method-gtktextbuffer--insert"><methodname>insert</methodname>()</link> 
method, using the current cursor position as the insertion point.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--insert-interactive">
      <title>gtk.TextBuffer.insert_interactive</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>insert_interactive</methodname>
	  <methodparam><parameter
			 role="keyword">iter</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">text</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">default_editable</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying a position in
<parameter>buffer</parameter></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">text</parameter>&nbsp;:</term>
	  <listitem><simpara>some UTF-8 text</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">default_editable</parameter>&nbsp;:</term>
	  <listitem><simpara>default editability of
buffer</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the text was
actually inserted</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>insert_interactive</methodname>() method is
similar to the <link
linkend="method-gtktextbuffer--insert"><methodname>insert</methodname>()</link> 
method, except the insertion of <parameter>text</parameter> at
<parameter>iter</parameter> will not occur if <parameter>iter</parameter> is
at a non-editable location in the buffer. A location is non-editable if a
<link linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link>
applied at that location has its "editable" attribute set to
<literal>False</literal> or the <link
linkend="class-gtktextview"><classname>gtk.TextView</classname></link> used
by the user is set non-editable. Usually you want to prevent insertions at
locations if the insertion results from a user action (is
interactive).</para>

      <para><parameter>default_editable</parameter> indicates the
editability of text that doesn't have a tag affecting editability applied to
it. Typically the result of the <link
linkend="method-gtktextview--get-editable"><methodname>gtk.TextView.get_editable</methodname>()</link> 
method is appropriate here.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--insert-interactive-at-cursor">
      <title>gtk.TextBuffer.insert_interactive_at_cursor</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>insert_interactive_at_cursor</methodname>
	  <methodparam><parameter
			 role="keyword">text</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">default_editable</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">text</parameter>&nbsp;:</term>
	  <listitem><simpara>text in UTF-8 format</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">default_editable</parameter>&nbsp;:</term>
	  <listitem><simpara>default editability of
buffer</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the text was
actually inserted</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>insert_interactive_at_cursor</methodname>()
method calls the <link
linkend="method-gtktextbuffer--insert-interactive"><methodname>insert_interactive</methodname>()</link> 
method to insert <parameter>text</parameter> at the cursor (insert)
position. <parameter>default_editable</parameter> indicates the editability
of text that doesn't have a tag affecting editability applied to it.
Typically the result of the <link
linkend="method-gtktextview--get-editable"><methodname>gtk.TextView.get_editable</methodname>()</link> 
method is appropriate here.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--insert-range">
      <title>gtk.TextBuffer.insert_range</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>insert_range</methodname>
	  <methodparam><parameter
			 role="keyword">iter</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">start</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">end</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying a position in the
textbuffer</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">start</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying a position in a (possibly different) <link
linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">end</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying another position in the same buffer as
<parameter>start</parameter></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>insert_range</methodname>() method copies text,
tags, and pixbufs (but not child anchors) between
<parameter>start</parameter> and <parameter>end</parameter> (the order of
<parameter>start</parameter> and <parameter>end</parameter> doesn't matter)
form a <link
linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link>
and inserts the copy at <parameter>iter</parameter>. Used instead of simply
getting/inserting text because it preserves images and tags. If
<parameter>start</parameter> and <parameter>end</parameter> are in a
different buffer from <parameter>buffer</parameter>, the two buffers must
share the same tag table. This method is implemented via emissions of the
"insert_text" and "apply_tag" signals.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--insert-range-interactive">
      <title>gtk.TextBuffer.insert_range_interactive</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>insert_range_interactive</methodname>
	  <methodparam><parameter
			 role="keyword">iter</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">start</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">end</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">default_editable</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying a position in the
textbuffer</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">start</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying a position in a (possibly different) <link
linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">end</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying another position in the same buffer as
<parameter>start</parameter></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">default_editable</parameter>&nbsp;:</term>
	  <listitem><simpara>default editability of the
buffer</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if an insertion was
possible at <parameter>iter</parameter></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>insert_range_interactive</methodname>() method
is similar to the <link
linkend="method-gtktextbuffer--insert-range"><methodname>insert_range</methodname>()</link> 
method, except the insertion of <parameter>text</parameter> at
<parameter>iter</parameter> will not occur if the insertion position is
non-editable. A location is non-editable if a <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link> applied
at that location has its "editable" attribute set to
<literal>False</literal> or the <link
linkend="class-gtktextview"><classname>gtk.TextView</classname></link> used
by the user is set non-editable. The <parameter>default_editable</parameter>
parameter indicates whether the text is editable at
<parameter>iter</parameter> if no tags enclosing <parameter>iter</parameter>
affect editability. Typically the result of the <link
linkend="method-gtktextview--get-editable"><methodname>gtk.TextView.get_editable</methodname>()</link> 
method is appropriate here.</para>

    </refsect2>


    <refsect2 id="method-gtktextbuffer--insert-with-tags">
      <title>gtk.TextBuffer.insert_with_tags</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>insert_with_tags</methodname>
	  <methodparam><parameter>iter</parameter></methodparam>
	  <methodparam><parameter>text</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter>iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying a position in <parameter>buffer</parameter></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>text</parameter>&nbsp;:</term>
	  <listitem><simpara>UTF-8 text</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>one or more optional <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link> objects
to apply to <parameter>text</parameter></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>insert_with_tags</methodname>() method inserts
the specified <parameter>text</parameter> into the textbuffer at the
location specified by <parameter>iter</parameter>, applying any optional
tags following the first two parameters to the newly-inserted text. This
method is a convenience method that is equivalent to calling the <link
linkend="method-gtktextbuffer--insert"><methodname>insert</methodname>()</link> 
method, then the <link
linkend="method-gtktextbuffer--apply-tag"><methodname>apply_tag</methodname>()</link> 
method on the inserted text.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--insert-with-tags-by-name">
      <title>gtk.TextBuffer.insert_with_tags_by_name</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>insert_with_tags_by_name</methodname>
	  <methodparam><parameter>iter</parameter></methodparam>
	  <methodparam><parameter>text</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter>iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying a position in <parameter>buffer</parameter></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>text</parameter>&nbsp;:</term>
	  <listitem><simpara>UTF-8 text</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>one or more optional <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link> names
to apply to <parameter>text</parameter></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>insert_with_tags_by_name</methodname>() method
is similar to the <link
linkend="method-gtktextbuffer--insert-with-tags"><methodname>insert_with_tags</methodname>()</link> 
method, but uses tag names instead of tag objects.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--delete">
      <title>gtk.TextBuffer.delete</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>delete</methodname>
	  <methodparam><parameter
			 role="keyword">start</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">end</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">start</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying a position in the textbuffer</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">end</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying another position in the textbuffer</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>delete</methodname>() method deletes the text
between <parameter>start</parameter> and <parameter>end</parameter>. The
order of <parameter>start</parameter> and <parameter>end</parameter> is not
actually relevant as the <methodname>delete</methodname>() method will
reorder them. This method emits the "delete_range" signal, and the default
handler of that signal deletes the text. Because the textbuffer is modified,
all outstanding iterators become invalid after calling this function;
however, <parameter>start</parameter> and <parameter>end</parameter> will be
re-initialized to point to the location where text was deleted.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--delete-interactive">
      <title>gtk.TextBuffer.delete_interactive</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>delete_interactive</methodname>
	  <methodparam><parameter
			 role="keyword">start_iter</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">end_iter</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">default_editable</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">start_iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the start of the text to delete</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">end_iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the end of the text to delete</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">default_editable</parameter>&nbsp;:</term>
	  <listitem><simpara>whether the buffer is editable by
default</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if some text was
actually deleted</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>delete_interactive</methodname>() method deletes
all <emphasis>editable</emphasis> text in the given range. This method calls
the <link
linkend="method-gtktextbuffer--delete"><methodname>delete</methodname>()</link> 
method for each editable sub-range of
[<parameter>start</parameter>,<parameter>end</parameter>).
<parameter>start</parameter> and <parameter>end</parameter> are revalidated
to point to the location of the last deleted range, or left untouched if no
text was deleted. A range of <parameter>text</parameter> is non-editable if
a <link linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link>
applied to that range has its "editable" attribute set to
<literal>False</literal> or the <link
linkend="class-gtktextview"><classname>gtk.TextView</classname></link> used
by the user is set non-editable. The <parameter>default_editable</parameter>
parameter indicates whether <parameter>text</parameter> is editable if no
tags enclosing any part of <parameter>text</parameter> affect editability.
Typically the result of the <link
linkend="method-gtktextview--get-editable"><methodname>gtk.TextView.get_editable</methodname>()</link> 
method is appropriate here.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-text">
      <title>gtk.TextBuffer.get_text</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_text</methodname>
	  <methodparam><parameter
			 role="keyword">start</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">end</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">include_hidden_chars</parameter>
	    <initializer>True</initializer></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">start</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the start of a range</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">end</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the end of a range</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">include_hidden_chars</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal> include invisible
text</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the text in the range</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_text</methodname>() method returns the text
in the specified range
[<parameter>start</parameter>,<parameter>end</parameter>). Undisplayed text
(text marked with tags that set the invisibility attribute) are excluded if
<parameter>include_hidden_chars</parameter> is <literal>False</literal>.
<methodname>get_text</methodname>() does not return characters representing
embedded images, so byte and character indexes into the returned string do
<emphasis>not</emphasis> correspond to byte and character indexes into the
buffer. Contrast this behavior with the <link
linkend="method-gtktextbuffer--get-slice"><methodname>get_slice</methodname>()</link> 
method.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-slice">
      <title>gtk.TextBuffer.get_slice</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_slice</methodname>
	  <methodparam><parameter
			 role="keyword">start</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">end</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">include_hidden_chars</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">start</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the start of a range</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">end</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the end of a range</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">include_hidden_chars</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal> include invisible
text</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the contents of the range including text and
indicators for pixbufs and child anchors</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_slice</methodname>() method returns the text
in the range [<parameter>start</parameter>,<parameter>end</parameter>).
Undisplayed text (text marked with tags that set the invisibility attribute)
is excluded if <parameter>include_hidden_chars</parameter> is
<literal>False</literal>. The returned string includes a 0xFFFC character
whenever the textbuffer contains embedded images or child anchors, so byte
and character indexes into the returned string <emphasis>do</emphasis>
correspond to byte and character indexes into the buffer. Contrast this
behavior with the <link
linkend="method-gtktextbuffer--get-text"><methodname>get_text</methodname>()</link> 
method. Note that 0xFFFC can occur in normal text as well, so it is not a
reliable indicator that a pixbuf or widget is in the buffer.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--insert-pixbuf">
      <title>gtk.TextBuffer.insert_pixbuf</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>insert_pixbuf</methodname>
	  <methodparam><parameter
			 role="keyword">iter</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">pixbuf</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the location to insert the pixbuf</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">pixbuf</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>insert_pixbuf</methodname>() method inserts an
image specified by <parameter>pixbuf</parameter> into the text buffer at the
location specified by <parameter>iter</parameter>. The image will be counted
as one character in character counts, and when obtaining the buffer contents
as a string, will be represented by the Unicode "object replacement
character" 0xFFFC. Note that the "slice" variants for obtaining portions of
the buffer as a string include this character for pixbufs, but the "text"
variants do not. e.g. see the <link
linkend="method-gtktextbuffer--get-slice"><methodname>get_slice</methodname>()</link> 
and <link
linkend="method-gtktextbuffer--get-text"><methodname>get_text</methodname>()</link> 
methods.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--insert-child-anchor">
      <title>gtk.TextBuffer.insert_child_anchor</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>insert_child_anchor</methodname>
	  <methodparam><parameter
			 role="keyword">iter</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">anchor</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the location to insert the anchor</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">anchor</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextchildanchor"><classname>gtk.TextChildAnchor</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>insert_child_anchor</methodname>() method
inserts a child widget anchor specified by <parameter>anchor</parameter>
into the textbuffer at the location specified by
<parameter>iter</parameter>. The anchor will be counted as one character in
character counts, and when obtaining the buffer contents as a string, will
be represented by the Unicode "object replacement character" 0xFFFC. Note
that the "slice" variants for obtaining portions of the buffer as a string
include this character for child anchors, but the "text" variants do not.
e.g. see the <link
linkend="method-gtktextbuffer--get-slice"><methodname>get_slice</methodname>()</link> 
and <link
linkend="method-gtktextbuffer--get-text"><methodname>get_text</methodname>()</link> 
methods. The <link
linkend="method-gtktextbuffer--create-child-anchor"><methodname>create_child_anchor</methodname>()</link> 
is a more convenient alternative to this function.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--create-child-anchor">
      <title>gtk.TextBuffer.create_child_anchor</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>create_child_anchor</methodname>
	  <methodparam><parameter
			 role="keyword">iter</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying a location in the buffer</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the new child anchor</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>create_child_anchor</methodname>() method is a
convenience function that creates a child anchor with the <link
linkend="constructor-gtktextchildanchor">gtk.TextChildAnchor</link>()
constructor and inserts it into the textbuffer at the location specified by
<parameter>iter</parameter> with the <link
linkend="method-gtktextbuffer--insert-child-anchor"><methodname>insert_child_anchor</methodname>()</link> 
method.</para> 

    </refsect2>

    <refsect2 id="method-gtktextbuffer--create-mark">
      <title>gtk.TextBuffer.create_mark</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>create_mark</methodname>
	  <methodparam><parameter
			 role="keyword">mark_name</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">where</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">left_gravity</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">mark_name</parameter>&nbsp;:</term>
	  <listitem><simpara>the name for the new mark, or
<literal>None</literal></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">where</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the location to place the mark</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">left_gravity</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal> the mark has left
gravity</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the new <link
linkend="class-gtktextmark"><classname>gtk.TextMark</classname></link>
object</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>create_mark</methodname>() method creates a mark
with the name specified by <parameter>mark_name</parameter> at the position
specified by <parameter>where</parameter> and left gravity specified by
<parameter>left_gravity</parameter>. If <parameter>mark_name</parameter> is
<literal>None</literal>, the mark is anonymous; otherwise, the mark can be
retrieved by name using the <link
linkend="method-gtktextbuffer--get-mark"><methodname>get_mark</methodname>()</link> 
method. If a mark has left gravity, and text is inserted at the mark's
current location, the mark will be moved to the left of the newly-inserted
text. If the mark has right gravity (<parameter>left_gravity</parameter> =
<literal>False</literal>), the mark will end up on the right of
newly-inserted text. The standard left-to-right cursor is a mark with right
gravity (when you type, the cursor stays on the right side of the text
you're typing). Marks are owned by the buffer and go away when the buffer
does. This method emits the "mark_set" signal as notification of the mark's
initial placement.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--move-mark">
      <title>gtk.TextBuffer.move_mark</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>move_mark</methodname>
	  <methodparam><parameter
			 role="keyword">mark</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">where</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">mark</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextmark"><classname>gtk.TextMark</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">where</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying a new location for <parameter>mark</parameter></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>move_mark</methodname>() method moves the <link
linkend="class-gtktextmark"><classname>gtk.TextMark</classname></link>
specified by <parameter>mark</parameter> to the new location specified by
<parameter>where</parameter>.This method  emits the "mark_set" signal as
notification of the move.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--delete-mark">
      <title>gtk.TextBuffer.delete_mark</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>delete_mark</methodname>
	  <methodparam><parameter
			 role="keyword">mark</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">mark</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextmark"><classname>gtk.TextMark</classname></link> in
the textbuffer</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>delete_mark</methodname>() method deletes the
<link linkend="class-gtktextmark"><classname>gtk.TextMark</classname></link>
specified by <parameter>mark</parameter>, so that it's no longer located
anywhere in the textbuffer. Most operations on <parameter>mark</parameter>
become invalid and there is no way to undelete a mark. The <link
linkend="method-gtktextmark--get-deleted"><methodname>get_deleted</methodname>()</link> 
method will return <literal>True</literal> after this method has been called
on a mark to indicate that a mark no longer belongs to a textbuffer. The
"mark_deleted" signal will be emitted as notification after the mark is
deleted.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-mark">
      <title>gtk.TextBuffer.get_mark</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_mark</methodname>
	  <methodparam><parameter
			 role="keyword">name</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">name</parameter>&nbsp;:</term>
	  <listitem><simpara>a mark name</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextmark"><classname>gtk.TextMark</classname></link>, or
None</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The get_mark() method returns the mark named
<parameter>name</parameter> in the textbuffer, or <literal>None</literal> if
no such mark exists in the buffer.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--move-mark-by-name">
      <title>gtk.TextBuffer.move_mark_by_name</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>move_mark_by_name</methodname>
	  <methodparam><parameter
			 role="keyword">name</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">where</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">name</parameter>&nbsp;:</term>
	  <listitem><simpara>the name of a mark</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">where</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the new location for mark</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>move_mark_by_name</methodname>() method moves
the mark named <parameter>name</parameter> (which must exist) to the
textbuffer location specified by <parameter>where</parameter>. See the <link
linkend="method-gtktextbuffer--move-mark"><methodname>move_mark</methodname>()</link> 
method for details.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--delete-mark-by-name">
      <title>gtk.TextBuffer.delete_mark_by_name</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>delete_mark_by_name</methodname>
	  <methodparam><parameter
			 role="keyword">name</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">name</parameter>&nbsp;:</term>
	  <listitem><simpara>the name of a mark in
<parameter>buffer</parameter></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>delete_mark_by_name</methodname>() method
deletes the mark (which must exist) named <parameter>name</parameter>. See
the <link
linkend="method-gtktextbuffer--delete-mark"><methodname>delete_mark</methodname>()</link> 
for details.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-insert">
      <title>gtk.TextBuffer.get_insert</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_insert</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the insertion point mark</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_insert</methodname>() method returns the
mark that represents the cursor (insertion point). Equivalent to calling the
<link
linkend="method-gtktextbuffer--get-mark"><methodname>get_mark</methodname>()</link> 
method to get the mark named "insert", but very slightly more efficient, and
involving less typing.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-selection-bound">
      <title>gtk.TextBuffer.get_selection_bound</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_selection_bound</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the selection bound mark</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_selection_bound</methodname>() method
returns the mark that represents the selection bound.  Equivalent to calling
the <link
linkend="method-gtktextbuffer--get-mark"><methodname>get_mark</methodname>()</link> 
method to get the mark named "selection_bound", but very slightly more
efficient, and involving less typing. The currently-selected text in a
textbuffer is the region between the "selection_bound" and "insert" marks.
If "selection_bound" and "insert" are in the same place, then there is no
current selection. The <link
linkend="method-gtktextbuffer--get-selection-bounds"><methodname>get_selection_bounds</methodname>()</link> 
method is a convenience method for handling the selection, if you just
want to know whether there's a selection and what its bounds are.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--place-cursor">
      <title>gtk.TextBuffer.place_cursor</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>place_cursor</methodname>
	  <methodparam><parameter
			 role="keyword">where</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">where</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying where to put the cursor</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>place_cursor</methodname>() method moves the
"insert" and "selection_bound" marks simultaneously to the location
specified by <parameter>where</parameter>.  If you move them to the same
place in two steps with the <link
linkend="method-gtktextbuffer--move-mark"><methodname>move_mark</methodname>()</link> 
method, you will temporarily select a region in between their old and new
locations, which is inefficient. This method moves them as a unit, which can
be optimized.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--select-range">
      <title>gtk.TextBuffer.select_range</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>select_range</methodname>
	<methodparam><parameter
		       role="keyword">ins</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">bound</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">ins</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying where to put the "insert" mark</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">bound</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying where to put the "selection_bound" mark</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>select_range</methodname>() method moves the
"insert" and "selection_bound" marks simultaneously to the locations
specified by <parameter>ins</parameter> and <parameter>bound</parameter>
respectively.  If you move them to the same place in two steps with the
<link
linkend="method-gtktextbuffer--move-mark"><methodname>move_mark</methodname>()</link>
method, you will temporarily select a region in between their old and new
locations, which is inefficient. This method moves them as a unit, which can
be optimized.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--apply-tag">
      <title>gtk.TextBuffer.apply_tag</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>apply_tag</methodname>
	  <methodparam><parameter
			 role="keyword">tag</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">start</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">end</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">tag</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">start</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the start of the range</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">end</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the end of the range</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>apply_tag</methodname>() method emits the
"apply-tag" signal that causes the <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link>
specified by <parameter>tag</parameter> to be applied to the range of text
between <parameter>start</parameter> and <parameter>end</parameter> by the
default signal handler. <parameter>start</parameter> and
<parameter>end</parameter> do not have to be in order.</para>

    </refsect2>

  <refsect2 id="method-gtktextbuffer--remove-tag">
      <title>gtk.TextBuffer.remove_tag</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>remove_tag</methodname>
	  <methodparam><parameter
			 role="keyword">tag</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">start</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">end</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">tag</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">start</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the start of the range</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">end</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the end of the range</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>delete_tag</methodname>() method emits the
"remove_tag" signal that causes the default handler for the signal to remove
all occurrences of the <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link>
specified by <parameter>tag</parameter> from the text in the range between
<parameter>start</parameter> and <parameter>end</parameter>.
<parameter>start</parameter> and <parameter>end</parameter> don't have to be
in order.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--apply-tag-by-name">
      <title>gtk.TextBuffer.apply_tag_by_name</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>apply_tag_by_name</methodname>
	  <methodparam><parameter
			 role="keyword">name</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">start</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">end</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">name</parameter>&nbsp;:</term>
	  <listitem><simpara>the name of a <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">start</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the start of the range</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">end</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the end of the range</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>apply_tag_by_name</methodname>() method calls
the <link
linkend="method-gtktexttagtable--lookup"><methodname>gtk.TextTagTable.lookup</methodname>()</link> 
method on the textbuffer's tag table to find the <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link> with
the specified <parameter>name</parameter>, then calls the <link
linkend="method-gtktextbuffer--apply-tag"><methodname>apply_tag</methodname>()</link> 
method to apply that tag to the text in the range between
<parameter>start</parameter> and <parameter>end</parameter>.
<parameter>start</parameter> and <parameter>end</parameter> don't have to be
in order.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--remove-tag-by-name">
      <title>gtk.TextBuffer.remove_tag_by_name</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>remove_tag_by_name</methodname>
	  <methodparam><parameter
			 role="keyword">name</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">start</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">end</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">name</parameter>&nbsp;:</term>
	  <listitem><simpara>the name of a <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">start</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the start of the range</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">end</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the end of the range</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>delete_tag_by_name</methodname>() method calls
the <link
linkend="method-gtktexttagtable--lookup"><methodname>gtk.TextTagTable.lookup</methodname>()</link> 
method on the textbuffer's tag table to find the <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link>, then
calls the <link
linkend="method-gtktextbuffer--remove-tag"><methodname>remove_tag</methodname>()</link> 
method to remove that that tag from the text in the range between
<parameter>start</parameter> and <parameter>end</parameter>.
<parameter>start</parameter> and <parameter>end</parameter> don't have to be
in order.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--remove-all-tags">
      <title>gtk.TextBuffer.remove_all_tags</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>remove_all_tags</methodname>
	  <methodparam><parameter
			 role="keyword">start</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">end</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">start</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the start of the range</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">end</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
specifying the end of the range</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>remove_all_tags</methodname>() method removes
all tags in the text in the range between <parameter>start</parameter> and
<parameter>end</parameter>.  Be careful with this function; it could remove
tags added in code unrelated to the code you're currently writing. That is,
using this function is probably a bad idea if you have two or more unrelated
code sections that add tags. <parameter>start</parameter> and
<parameter>end</parameter> don't have to be in order.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--create-tag">
      <title>gtk.TextBuffer.create_tag</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>create_tag</methodname>
	  <methodparam><parameter>tag_name</parameter>
	    <initializer>None</initializer></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter>tag_name</parameter>&nbsp;:</term>
	  <listitem><simpara>the name of the new tag, or
<literal>None</literal> if the tag is anonymous</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>one or more property_name= value pairs
</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a new tag</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>create_tag</methodname>() method creates a tag
with the name specified by <parameter>tag_name</parameter> and adds it to
the tag table for the textbuffer. If one or more
<literal>property_name=value</literal> pairs are available they are used to
set the properties of the tag. Note the <literal>property_name</literal>
must be specified using underscores instead of dashes e.g. use
pixels_above_lines=10 instead of pixels-above-lines=10. This method is
equivalent to calling the <link
linkend="constructor-gtktexttag">gtk.TextTag</link>() constructor and then
adding the tag to the buffer's tag table with the <link
linkend="method-gtktexttagtable--add"><methodname>gtk.TextTagTable.add</methodname>()</link> 
method. If <parameter>tag_name</parameter> is <literal>None</literal>, the
tag is anonymous. If <parameter>tag_name</parameter> is
non-<literal>None</literal>, a tag called <parameter>tag_name</parameter>
must not already exist in the tag table for this buffer.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-iter-at-line-offset">
      <title>gtk.TextBuffer.get_iter_at_line_offset</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_iter_at_line_offset</methodname>
	  <methodparam><parameter
			 role="keyword">line_number</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">char_offset</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">line_number</parameter>&nbsp;:</term>
	  <listitem><simpara>the line number counting from
0</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">char_offset</parameter>&nbsp;:</term>
	  <listitem><simpara>the char offset from start of
line</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The<methodname> get_iter_at_line_offset</methodname>() returns
an iterator pointing to the position specified by
<parameter>char_offset</parameter> within the line specified by
<parameter>line_number</parameter>. The <parameter>char_offset</parameter>
must exist, offsets off the end of the line are not allowed. Note specify
<emphasis>characters</emphasis>, not bytes; UTF-8 may encode one character
as multiple bytes.</para>

    </refsect2>

  <refsect2 id="method-gtktextbuffer--get-iter-at-line-index">
      <title>gtk.TextBuffer.get_iter_at_line_index</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_iter_at_line_index</methodname>
	  <methodparam><parameter
			 role="keyword">line_number</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">byte_index</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">line_number</parameter>&nbsp;:</term>
	  <listitem><simpara>the line number counting from
0</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">byte_index</parameter>&nbsp;:</term>
	  <listitem><simpara>the byte index from start of
line</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_iter_at_line_index</methodname>() method
returns an iterator pointing to the position specified by
<parameter>byte_index</parameter> within the line specified by
<parameter>line_number</parameter>. <parameter>byte_index</parameter> must
be the start of a UTF-8 character, and must not be beyond the end of the
line.  Note specify <emphasis>bytes</emphasis>, not characters; UTF-8 may
encode one character as multiple bytes.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-iter-at-offset">
      <title>gtk.TextBuffer.get_iter_at_offset</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_iter_at_offset</methodname>
	  <methodparam><parameter
			 role="keyword">char_offset</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">char_offset</parameter>&nbsp;:</term>
	  <listitem><simpara>the char offset from start of buffer, counting
from 0</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_iter_at_offset</methodname>() method returns
an iterator pointing to the location specified by
<parameter>char_offset</parameter> characters from the start of the entire
buffer.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-iter-at-line">
      <title>gtk.TextBuffer.get_iter_at_line</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_iter_at_line</methodname>
	  <methodparam><parameter
			 role="keyword">line_number</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">line_number</parameter>&nbsp;:</term>
	  <listitem><simpara>line number counting from
0</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_iter_at_line</methodname>() method returns
an iterator pointing to the start of the line specified by
<parameter>line_number</parameter>.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-start-iter">
      <title>gtk.TextBuffer.get_start_iter</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_start_iter</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_start_iter</methodname>() method returns an
iterator pointing at the location of the first position in the text buffer.
This is the same as using the <link
linkend="method-gtktextbuffer--get-iter-at-offset"><methodname>get_iter_at_offset</methodname>()</link> 
with an argument of 0.
</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-end-iter">
      <title>gtk.TextBuffer.get_end_iter</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_end_iter</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_end_iter</methodname>() method returns an
iterator pointing at the "end iterator," one past the last valid character
in the text buffer. If passed to the <link
linkend="method-gtktextiter--get-char"><methodname>gtk.TextIter.get_char</methodname>()</link> 
method, the end iterator has a character value of 0. The entire buffer lies
in the range from the first position in the buffer (call the <link
linkend="method-gtktextbuffer--get-start-iter"><methodname>get_start_iter</methodname>()</link> 
method to get character position 0) to the end iterator.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-bounds">
      <title>gtk.TextBuffer.get_bounds</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_bounds</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a tuple containing <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link> objects
that point at the first and last positions in the buffer</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_bounds</methodname>() method returns a tuple
containing the first and last iterators in the buffer, i.e. the entire
buffer lies within the range.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-iter-at-mark">
      <title>gtk.TextBuffer.get_iter_at_mark</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_iter_at_mark</methodname>
	  <methodparam><parameter
			 role="keyword">mark</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">mark</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextmark"><classname>gtk.TextMark</classname></link> in
the textbuffer</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_iter_at_mark</methodname>() method returns
an iterator that points at the current position of
<parameter>mark</parameter>.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-iter-at-child-anchor">
      <title>gtk.TextBuffer.get_iter_at_child_anchor</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_iter_at_child_anchor</methodname>
	  <methodparam><parameter
			 role="keyword">iter</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">anchor</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">anchor</parameter>&nbsp;:</term>
	  <listitem><simpara>a child anchor that appears in the
textbuffer</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_iter_at_child_anchor</methodname>() method
returns an iterator that points at the location of
<parameter>anchor</parameter> within the textbuffer.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-modified">
      <title>gtk.TextBuffer.get_modified</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_modified</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the buffer has been
modified</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_modified</methodname>() method returns
<literal>True</literal> if the buffer has been modified since the last call
to the <link
linkend="method-gtktextbuffer--set-modified"><methodname>set_modified</methodname>()</link> 
method set the modification flag to <literal>False</literal>. Used for
example to enable a "save" function in a text editor.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--set-modified">
      <title>gtk.TextBuffer.set_modified</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_modified</methodname>
	  <methodparam><parameter
			 role="keyword">setting</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">setting</parameter>&nbsp;:</term>
	  <listitem><simpara>the modification flag
setting</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_modified</methodname>() method sets the
modification flag of the textbuffer to the value specified by
<parameter>setting</parameter>. The modification flag is used to keep track
of whether the buffer has been modified since the last time it was saved.
Whenever the buffer is saved to disk, call this method with a
<parameter>setting</parameter> of <literal>False</literal>. When the buffer
is modified, it will automatically set the modification flag to
<parameter>True</parameter> and emit a "modified_changed" signal.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--add-selection-clipboard">
      <title>gtk.TextBuffer.add_selection_clipboard</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>add_selection_clipboard</methodname>
	  <methodparam><parameter role="keyword">clipboard</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
	  role="keyword">clipboard</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
	  linkend="class-gtkclipboard"><classname>gtk.Clipboard</classname></link></simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>add_selection_clipboard</methodname>() method
adds the <link
linkend="class-gtkclipboard"><classname>gtk.Clipboard</classname></link>
specified by <parameter>clipboard</parameter> to the list of clipboards in
which the selection contents of the buffer are available. In most cases,
<parameter>clipboard</parameter> will be the
<literal>gtk.gdk.SELECTION_PRIMARY</literal> clipboard</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--remove-selection-clipboard">
      <title>gtk.TextBuffer.remove_selection_clipboard</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>remove_selection_clipboard</methodname>
	  <methodparam><parameter role="keyword">clipboard</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
	  role="keyword">clipboard</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
	  linkend="class-gtkclipboard"><classname>gtk.Clipboard</classname></link>
	  added to the buffer by the <link
	  linkend="method-gtktextbuffer--add-selection-clipboard"><methodname>add_selection_clipboard()</methodname></link>
	  method.</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>remove_selection_clipboard</methodname>() method
removes the <link
linkend="class-gtkclipboard"><classname>gtk.Clipboard</classname></link>
added with the <link
linkend="method-gtktextbuffer--add-selection-clipboard"><methodname>add_selection_clipboard</methodname>()</link>
method.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--cut-clipboard">
      <title>gtk.TextBuffer.cut_clipboard</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>cut_clipboard</methodname>
	  <methodparam><parameter role="keyword">clipboard</parameter></methodparam>
	  <methodparam><parameter role="keyword">default_editable</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
	  role="keyword">clipboard</parameter>&nbsp;:</term>
	  <listitem><simpara>the <link
	  linkend="class-gtkclipboard"><classname>gtk.Clipboard</classname></link>
	  object to cut to.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
	  role="keyword">default_editable</parameter>&nbsp;:</term>
	  <listitem><simpara>the default editability of the
	  buffer</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>cut_clipboard</methodname>() method copies the
currently-selected text to the <link
linkend="class-gtkclipboard"><classname>gtk.Clipboard</classname></link>
specified by <parameter>clipboard</parameter>, then deletes said text if
it's editable as specified by
<parameter>default_editable</parameter>. Typically the result of the <link
linkend="method-gtktextview--get-editable"><methodname>gtk.TextView.get_editable</methodname>()</link>
method is appropriate here.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--copy-clipboard">
      <title>gtk.TextBuffer.copy_clipboard</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>copy_clipboard</methodname>
	  <methodparam><parameter role="keyword">clipboard</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
	  role="keyword">clipboard</parameter>&nbsp;:</term>
	  <listitem><simpara>the <link
	  linkend="class-gtkclipboard"><classname>gtk.Clipboard</classname></link>
	  object to copy to.</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>copy_clipboard</methodname>() method copies the
currently-selected text to the <link
linkend="class-gtkclipboard"><classname>gtk.ClipBoard</classname></link>
specified by <parameter>clipboard</parameter>.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--paste-clipboard">
      <title>gtk.TextBuffer.paste_clipboard</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>paste_clipboard</methodname>
	  <methodparam><parameter role="keyword">clipboard</parameter></methodparam>
	  <methodparam><parameter role="keyword">override_location</parameter></methodparam>
	  <methodparam><parameter role="keyword">default_editable</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
	  role="keyword">clipboard</parameter>&nbsp;:</term>
	  <listitem><simpara>the <link
	  linkend="class-gtkclipboard"><classname>gtk.Clipboard</classname></link>
	  to paste from</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
	  role="keyword">override_location</parameter>&nbsp;:</term>
	  <listitem><simpara>the <link
	  linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
	  specifying the location to insert pasted text, or
	  <literal>None</literal> for at the cursor</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
	  role="keyword">default_editable</parameter>&nbsp;:</term>
	  <listitem><simpara>the default editability of the
	  buffer</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>paste_clipboard</methodname>() method pastes the
contents of the <link
linkend="class-gtkclipboard"><classname>gtk.ClipBoard</classname></link>
specified by <parameter>clipboard</parameter> at the insertion point, or at
the location specified by <parameter>override_location</parameter> (if not
<literal>None</literal>).  (Note: pasting is asynchronous, that is, we'll
ask for the paste data and return, and at some point later after the main
loop runs, the paste data will be inserted.)</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-selection-bounds">
      <title>gtk.TextBuffer.get_selection_bounds</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_selection_bounds</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a tuple containing <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link> objects pointing to the selection start and end or an empty tuple if there is no
selection</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_selection_bounds</methodname>() method
returns a tuple containing iterators that point at the start and end of the
selection, if any. If there is no selection an empty tuple is
returned.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--delete-selection">
      <title>gtk.TextBuffer.delete_selection</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>delete_selection</methodname>
	  <methodparam><parameter
			 role="keyword">interactive</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">default_editable</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">interactive</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal> the deletion is
caused by user interaction</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">default_editable</parameter>&nbsp;:</term>
	  <listitem><simpara>if <parameter>True</parameter> the buffer is
editable by default</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if there was a
non-empty selection to delete</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>delete_selection</methodname>() method deletes
the text in the range between the "insert" and "selection_bound" marks, i.e.
the currently-selected text. If <parameter>interactive</parameter> is
<literal>True</literal>, the editability of the selection will be considered
(users can't delete uneditable text) and default_editable is used to
determine the default editability of the textbuffer usually as a result of a
call to the <link
linkend="method-gtktextview--get-editable"><methodname>gtk.TextView.get_editable</methodname>()</link> 
method.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--begin-user-action">
      <title>gtk.TextBuffer.begin_user_action</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>begin_user_action</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>

      <para>The <methodname>begin_user_action</methodname>() method is
called to indicate that the textbuffer operations until a call to the <link
linkend="method-gtktextbuffer--end-user-action"><methodname>end_user_action</methodname>()</link> 
method are part of a single user-visible operation. The operations between
the <methodname>begin_user_action</methodname>() and <link
linkend="method-gtktextbuffer--end-user-action"><methodname>end_user_action</methodname>()</link> 
methods can then be grouped when creating an undo stack. <link
linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link>
maintains a count of calls to the
<methodname>begin_user_action</methodname>() method that have not been
closed with a call to the <link
linkend="method-gtktextbuffer--end-user-action"><methodname>end_user_action</methodname>()</link> 
method, and emits the "begin_user_action" and "end_user_action" signals only
for the outermost pair of calls. This allows you to chain user
actions.</para>

      <para>The "interactive" textbuffer mutation methods, such as the <link
linkend="method-gtktextbuffer--insert-interactive"><methodname>insert_interactive</methodname>()</link> 
method, automatically call the begin and end user action methods around the
textbuffer operations they perform, so there's no need to add extra calls if
you user action consists solely of a single call to one of those
methods.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--end-user-action">
      <title>gtk.TextBuffer.end_user_action</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>end_user_action</methodname>
	  <methodparam></methodparam>
        </methodsynopsis></programlisting>

      <para>The <methodname>end_user_action</methodname>() method should be
paired with a call to the <link
linkend="method-gtktextbuffer--begin-user-action"><methodname>begin_user_action</methodname>()</link> 
method.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--backspace">
      <title>gtk.TextBuffer.backspace</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>backspace</methodname>
          <methodparam><parameter
                         role="keyword">iter</parameter></methodparam>
          <methodparam><parameter
                         role="keyword">interactive</parameter></methodparam>
          <methodparam><parameter
                         role="keyword">default_editable</parameter></methodparam>
        </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">interactive</parameter>&nbsp;:</term>
	  <listitem><simpara>if <literal>True</literal> the deletion is
caused by user interaction</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter
role="keyword">default_editable</parameter>&nbsp;:</term>
	  <listitem><simpara>if <parameter>True</parameter> the buffer is
editable by default</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the buffer was
modified</simpara></listitem>
	</varlistentry>
      </variablelist>

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

      <para>The <methodname>backspace</methodname>() method performs the
appropriate action as if the user hit the delete key with the cursor at the
position specified by <parameter>iter</parameter>. In the normal case a
single character will be deleted, but when combining accents are involved,
more than one character can be deleted, and when precomposed character and
accent combinations are involved, less than one character will be
deleted.</para>

      <para>Because the buffer is modified, all outstanding iterators become
invalid after calling this function; however, <parameter>iter</parameter>
will be re-initialized to point to the location where text was
deleted.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-has-selection">
      <title>gtk.TextBuffer.get_has_selection</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_has_selection</methodname>
        <methodparam></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara><literal>True</literal> if there is text
          selected</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>Indicates whether the buffer has some text currently
      selected.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-copy-target-list">
      <title>gtk.TextBuffer.get_copy_target_list</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_copy_target_list</methodname>
        <methodparam></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a list of the targets each represented as a
          3-tuple containing the target name, a combination of the <xref
          linkend="gtk-target-flags-constants"
          endterm="gtk-target-flags-constants-title"></xref> and an
          application assigned integer</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>This method returns the list of targets this text buffer can
      provide for copying and as DND source. The targets in the list are
      added with <literal>info</literal> values from the <xref
      linkend="gtk-textbuffer-target-info-constants"
      endterm="gtk-textbuffer-target-info-constants-title"></xref>, using
      the <link
      linkend="function-gtk--target-list-add-rich-text-targets"><function>gtk.target_list_add_rich_text_targets</function>()</link>
      and <link
      linkend="function-gtk--target-list-add-text-targets"><function>gtk.target_list_add_text_targets</function>()</link>
      functions.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-paste-target-list">
      <title>gtk.TextBuffer.get_paste_target_list</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_paste_target_list</methodname>
        <methodparam></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a list of the targets each represented as a
          3-tuple containing the target name, a combination of the <xref
          linkend="gtk-target-flags-constants"
          endterm="gtk-target-flags-constants-title"></xref> and an
          application assigned integer</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>This method returns the list of targets this text buffer supports
      for pasting and as DND destination. The targets in the list are
      added with <literal>info</literal> values from the <xref
      linkend="gtk-textbuffer-target-info-constants"
      endterm="gtk-textbuffer-target-info-constants-title"></xref>, using
      the <link
      linkend="function-gtk--target-list-add-rich-text-targets"><function>gtk.target_list_add_rich_text_targets</function>()</link>
      and <link
      linkend="function-gtk--target-list-add-text-targets"><function>gtk.target_list_add_text_targets</function>()</link>
      functions.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--register-serialize-format">
      <title>gtk.TextBuffer.register_serialize_format</title>

      <programlisting><methodsynopsis language="python">
        <methodname>register_serialize_format</methodname>
        <methodparam><parameter role="keyword">mime_type</parameter></methodparam>
        <methodparam><parameter role="keyword">function</parameter></methodparam>
        <methodparam><parameter role="keyword">user_data</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">mime_type</parameter>&nbsp;:</term>
          <listitem><simpara>the format's mime-type</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">function</parameter>&nbsp;:</term>
          <listitem><simpara>the serialize function to register</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
          <listitem><simpara><literal>function</literal>'s user_data</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the newly registered format's
          mime-type.</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>This method registers a rich text serialization
      <literal>function</literal> along with its
      <literal>mime_type</literal> with the passed
      <literal>buffer</literal>.</para>

      <para>The signature of function is:</para>

      <programlisting>
  def function(register_buf, content_buf, start, end, data):
      </programlisting>

      <para>where <parameter>register_buf</parameter> is the textbuffer that
      the format is registered with, <parameter>content_buf</parameter> is
      the textbuffer containing the text to be serialized,
      <parameter>start</parameter> and <parameter>end</parameter> are
      textiters bounding the text to be serialized and
      <parameter>data</parameter> is
      <parameter>user_data</parameter>. <parameter>function</parameter>
      should return the serialized data.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--register-serialize-tagset">
      <title>gtk.TextBuffer.register_serialize_tagset</title>

      <programlisting><methodsynopsis language="python">
        <methodname>register_serialize_tagset</methodname>
        <methodparam><parameter role="keyword">tagset_name</parameter><initializer>NULL</initializer></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">tagset_name</parameter>&nbsp;:</term>
          <listitem><simpara>an optional tagset name, or
          <literal>None</literal></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the newly registered format's
          mime-type.</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>This method registers GTK+'s internal rich text serialization
      format with this textbuffer. The internal format does not comply to
      any standard rich text format and only works between <link
      linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link>
      instances. It is capable of serializing all of a text buffer's tags
      and embedded pixbufs.</para>
      
      <para>This method is just a wrapper around <link
      linkend="method-gtktextbuffer--register-serialize-format"><methodname>gtk.TextBuffer.register_serialize_format()</methodname></link>. The
      <literal>mime_type</literal> used for registering is
      "application/x-gtk-text-buffer-rich-text", or
      "application/x-gtk-text-buffer-rich-text;format=<literal>tagset_name</literal>"
      if a <literal>tagset_name</literal> was passed.</para>
      
      <para>The <literal>tagset_name</literal> can be used to restrict the
      transfer of rich text to buffers with compatible sets of tags, in
      order to avoid unknown tags from being pasted. It is probably the
      common case to pass a non-<literal>None</literal> tagset here,
      since the <literal>None</literal> tagset requires the receiving buffer
      to deal with with pasting of arbitrary tags.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--register-deserialize-format">
      <title>gtk.TextBuffer.register_deserialize_format</title>

      <programlisting><methodsynopsis language="python">
        <methodname>register_deserialize_format</methodname>
        <methodparam><parameter role="keyword">mime_type</parameter></methodparam>
        <methodparam><parameter role="keyword">function</parameter></methodparam>
        <methodparam><parameter role="keyword">user_data</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">mime_type</parameter>&nbsp;:</term>
          <listitem><simpara>the format's mime-type</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">function</parameter>&nbsp;:</term>
          <listitem><simpara>the deserialize function to register</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">user_data</parameter>&nbsp;:</term>
          <listitem><simpara><literal>function</literal>'s user_data</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the newly registered format's
          mime-type.</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>This method registers a rich text deserialization
      <literal>function</literal> along with its
      <literal>mime_type</literal> with the passed
      <literal>buffer</literal>.</para>

      <para>The signature of function is:</para>

      <programlisting>
  def function(register_buf, content_buf, iter, data, create_tags, udata):
      </programlisting>

      <para>where <parameter>register_buf</parameter> is the textbuffer that
      the format is registered with, <parameter>content_buf</parameter> is
      the textbuffer that data will be deserialized into,
      <parameter>iter</parameter> is a textiter indicating the start of the
      deserialized data in <parameter>content_buf</parameter>, create_tags
      is a boolean indicating if tags should be created during
      deserializtion and <parameter>udata</parameter> is
      <parameter>user_data</parameter>. <parameter>function</parameter>
      should return <literal>True</literal> if the data was successfully
      deserialized.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--register-deserialize-tagset">
      <title>gtk.TextBuffer.register_deserialize_tagset</title>

      <programlisting><methodsynopsis language="python">
        <methodname>register_deserialize_tagset</methodname>
        <methodparam><parameter role="keyword">tagset_name</parameter><initializer>NULL</initializer></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">tagset_name</parameter>&nbsp;:</term>
          <listitem><simpara>an optional tagset name, or
          <literal>None</literal></simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the newly registered format's
          mime-type.</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>This method registers GTK+'s internal rich text serialization
      format with this buffer. See the <link
      linkend="method-gtktextbuffer--register-serialize-tagset"><methodname>gtk.TextBuffer.register_serialize_tagset()</methodname></link>
      method for details.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--unregister-serialize-format">
      <title>gtk.TextBuffer.unregister_serialize_format</title>

      <programlisting><methodsynopsis language="python">
        <methodname>unregister_serialize_format</methodname>
        <methodparam><parameter role="keyword">format</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">format</parameter>&nbsp;:</term>
          <listitem><simpara>a target string representing a registered rich
          text format.</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>This method unregisters a rich text format that was previously
      registered using the <link
      linkend="method-gtktextbuffer--register-serialize-format"><methodname>gtk.TextBuffer.register_serialize_format()</methodname></link>
      or <link
      linkend="method-gtktextbuffer--register-serialize-tagset"><methodname>gtk.TextBuffer.register_serialize_tagset()</methodname></link>
      methods.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--unregister-deserialize-format">
      <title>gtk.TextBuffer.unregister_deserialize_format</title>

      <programlisting><methodsynopsis language="python">
        <methodname>unregister_deserialize_format</methodname>
        <methodparam><parameter role="keyword">format</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">format</parameter>&nbsp;:</term>
          <listitem><simpara>a target string representing a registered rich
          text format.</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>This method unregisters a rich text format that was previously
      registered using the <link
      linkend="method-gtktextbuffer--register-deserialize-format"><methodname>gtk.TextBuffer.register_deserialize_format()</methodname></link>
      or <link
      linkend="method-gtktextbuffer--register-deserialize-tagset"><methodname>gtk.TextBuffer.register_deserialize_tagset()</methodname></link>
      methods.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--deserialize-set-can-create-tags">
      <title>gtk.TextBuffer.deserialize_set_can_create_tags</title>

      <programlisting><methodsynopsis language="python">
        <methodname>deserialize_set_can_create_tags</methodname>
        <methodparam><parameter role="keyword">format</parameter></methodparam>
        <methodparam><parameter role="keyword">can_create_tags</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">format</parameter>&nbsp;:</term>
          <listitem><simpara>a target string representing a registered rich
          text format</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">can_create_tags</parameter>&nbsp;:</term>
          <listitem><simpara>if <literal>True</literal> deserializing
          <parameter>format</parameter> may create tags</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>Use this method to allow a rich text deserialization function to
      create new tags in the receiving buffer. Note that using this method
      is almost always a bad idea, because the rich text functions you
      register should know how to map the rich text format they handle to
      your text buffers set of tags.</para>
      
      <para>The ability of creating new (arbitrary!) tags in the receiving
      buffer is meant for special rich text formats like the internal one
      that is registered using <link
      linkend="method-gtktextbuffer--register-deserialize-tagset"><methodname>gtk.TextBuffer.register_deserialize_tagset()</methodname></link>,
      because that format is essentially a dump of the internal structure of
      the source buffer, including its tag names.</para>
      
      <para>You should allow creation of tags only if you know what you are
      doing, e.g. if you defined a tagset name for your application suite's
      text buffers and you know that it's fine to receive new tags from
      these buffers, because you know that your application can handle the
      newly created tags.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--deserialize-get-can-create-tags">
      <title>gtk.TextBuffer.deserialize_get_can_create_tags</title>

      <programlisting><methodsynopsis language="python">
        <methodname>deserialize_get_can_create_tags</methodname>
        <methodparam><parameter role="keyword">format</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">format</parameter>&nbsp;:</term>
          <listitem><simpara>a target string representing a registered rich
          text format</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara><literal>True</literal> if deserializing
          <parameter>format</parameter> may create tags</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>This method returns the value set with the <link
      linkend="method-gtktextbuffer--deserialize-set-can-create-tags"><methodname>gtk.TextBuffer.deserialize_set_can_create_tags()</methodname></link>
      method.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-serialize-formats">
      <title>gtk.TextBuffer.get_serialize_formats</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_serialize_formats</methodname>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a list of target strings representing the
          registered formats.</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>This method returns a list of the rich text serialize formats
      registered using the <link
      linkend="method-gtktextbuffer--register-serialize-format"><methodname>gtk.TextBuffer.register_serialize_format()</methodname></link>
      or <link
      linkend="method-gtktextbuffer--register-serialize-tagset"><methodname>gtk.TextBuffer.register_serialize_tagset()</methodname></link>
      methods.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--get-deserialize-formats">
      <title>gtk.TextBuffer.get_deserialize_formats</title>

      <programlisting><methodsynopsis language="python">
        <methodname>get_deserialize_formats</methodname>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a list of target strings representing the
          registered formats.</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>This method returns the rich text deserialize formats registered
      using the <link
      linkend="method-gtktextbuffer--register-deserialize-format"><methodname>gtk.TextBuffer.register_deserialize_format()</methodname></link>
      or <link
      linkend="method-gtktextbuffer--register-deserialize-tagset"><methodname>gtk.TextBuffer.register_deserialize_tagset()</methodname></link>
      methods.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--serialize">
      <title>gtk.TextBuffer.serialize</title>

      <programlisting><methodsynopsis language="python">
        <methodname>serialize</methodname>
        <methodparam><parameter role="keyword">content_buffer</parameter></methodparam>
        <methodparam><parameter role="keyword">format</parameter></methodparam>
        <methodparam><parameter role="keyword">start</parameter></methodparam>
        <methodparam><parameter role="keyword">end</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">content_buffer</parameter>&nbsp;:</term>
          <listitem><simpara>the <link
          linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link>
          to serialize</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">format</parameter>&nbsp;:</term>
          <listitem><simpara>the rich text format to use for
          serializing</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">start</parameter>&nbsp;:</term>
          <listitem><simpara>start of block of text to
          serialize</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">end</parameter>&nbsp;:</term>
          <listitem><simpara>end of block of test to
          serialize</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>the serialized data, encoded as
          <literal>format</literal></simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>This method serializes the portion of text between <literal>start</literal>
      and <literal>end</literal> in the rich text format represented by <literal>format</literal>.</para>
      
            <para>The formats to be used must be registered using the <link
            linkend="method-gtktextbuffer--register-serialize-format"><methodname>gtk.TextBuffer.register_serialize_format()</methodname></link>
            or <link
            linkend="method-gtktextbuffer--register-serialize-tagset"><methodname>gtk.TextBuffer.register_serialize_tagset()</methodname></link>
            methods beforehand.</para>

    </refsect2>

    <refsect2 id="method-gtktextbuffer--deserialize">
      <title>gtk.TextBuffer.deserialize</title>

      <programlisting><methodsynopsis language="python">
        <methodname>deserialize</methodname>
        <methodparam><parameter role="keyword">content_buffer</parameter></methodparam>
        <methodparam><parameter role="keyword">format</parameter></methodparam>
        <methodparam><parameter role="keyword">iter</parameter></methodparam>
        <methodparam><parameter role="keyword">data</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">content_buffer</parameter>&nbsp;:</term>
          <listitem><simpara>the <link
          linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link>
          to deserialize into</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">format</parameter>&nbsp;:</term>
          <listitem><simpara>the rich text format to use for
          deserializing</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">iter</parameter>&nbsp;:</term>
          <listitem><simpara>insertion point for the deserialized
          text</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">data</parameter>&nbsp;:</term>
          <listitem><simpara>data to deserialize</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara><literal>True</literal> on success,
          <literal>False</literal> otherwise.</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>This method deserializes rich text in format
      <literal>format</literal> and inserts it at <literal>iter</literal> in
      <parameter>content_buffer</parameter>.</para>
      
            <para>The formats to be used must be registered using the <link
            linkend="method-gtktextbuffer--register-deserialize-format"><methodname>gtk.TextBuffer.register_deserialize_format()</methodname></link>
            or <link
            linkend="method-gtktextbuffer--register-deserialize-tagset"><methodname>gtk.TextBuffer.register_deserialize_tagset()</methodname></link>
            methods beforehand.</para>

    </refsect2>
    
    <refsect2 id="method-gtktextbuffer--add-mark">
      <title>gtk.TextBuffer.add_mark</title>

      <programlisting><methodsynopsis language="python">
        <methodname>add_mark</methodname>
        <methodparam><parameter role="keyword">mark</parameter></methodparam>
        <methodparam><parameter role="keyword">where</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter role="keyword">mark</parameter>&nbsp;:</term>
          <listitem><simpara>the <link
          linkend="class-gtktextmark"><classname>gtk.TextMark</classname></link>
          to add</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter role="keyword">where</parameter>&nbsp;:</term>
          <listitem><simpara>the location to place mark.</simpara></listitem>
        </varlistentry>
      </variablelist>

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

      <para>Adds the <parameter>mark</parameter> at position <parameter>where</parameter>.
      The mark must not be added to another buffer, and if its name is not <literal>None</literal>
      then there must not be another mark in the buffer with the same name.</para>
      
      <para>Emits the "mark_set" signal as notification of the mark's initial placement.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Signals</title>

    <refsect2 id="signal-gtktextbuffer--apply-tag">
      <title>The "apply-tag" gtk.TextBuffer Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>textbuffer</parameter></methodparam>
	  <methodparam><parameter>texttag</parameter></methodparam>
	  <methodparam><parameter>start</parameter></methodparam>
	  <methodparam><parameter>end</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>textbuffer</parameter>&nbsp;:</term>
	  <listitem><simpara>the textbuffer that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>texttag</parameter>&nbsp;:</term>
	  <listitem><simpara>the <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link> being
applied</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>start</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
pointing to the start of the range of text</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>end</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
pointing to the end of the range of text</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "apply-tag" signal is emitted when
<parameter>texttag</parameter> is applied to the text in
<parameter>textbuffer</parameter> in the range specified by
<parameter>start</parameter> and <parameter>end</parameter>.</para>

    </refsect2>

    <refsect2 id="signal-gtktextbuffer--begin-user-action">
      <title>The "begin-user-action" gtk.TextBuffer Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>textbuffer</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>textbuffer</parameter>&nbsp;:</term>
	  <listitem><simpara>the textbuffer that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "begin-user-action" signal is emitted on the first call to
the <link
linkend="method-gtktextbuffer--begin-user-action"><methodname>begin_user_action</methodname>()</link> 
method.</para>

    </refsect2>

    <refsect2 id="signal-gtktextbuffer--changed">
      <title>The "changed" gtk.TextBuffer Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>textbuffer</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>textbuffer</parameter>&nbsp;:</term>
	  <listitem><simpara>the textbuffer that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "changed" signal is emitted when text is inserted in
<parameter>textbuffer</parameter>.</para>

    </refsect2>

    <refsect2 id="signal-gtktextbuffer--delete-range">
      <title>The "delete-range" gtk.TextBuffer Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>textbuffer</parameter></methodparam>
	  <methodparam><parameter>start</parameter></methodparam>
	  <methodparam><parameter>end</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>textbuffer</parameter>&nbsp;:</term>
	  <listitem><simpara>the textbuffer that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>start</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
pointing to the start of the range of text</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>end</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
pointing to the end of the range of text</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "delete-range" signal is emitted when the text in the range
specified by <parameter>start</parameter> and <parameter>end</parameter> is
to be deleted.</para>

    </refsect2>

    <refsect2 id="signal-gtktextbuffer--end-user-action">
      <title>The "end-user-action" gtk.TextBuffer Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>textbuffer</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>textbuffer</parameter>&nbsp;:</term>
	  <listitem><simpara>the textbuffer that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "end-user-action" signal is emitted when the call to the
<link
linkend="method-gtktextbuffer--end-user-action"><methodname>end_user_action</methodname>()</link> 
method reduces the user action count to zero i.e. undoes the first call to
the <link
linkend="method-gtktextbuffer--begin-user-action"><methodname>begin_user_action</methodname>()</link> 
method.</para>

    </refsect2>

    <refsect2 id="signal-gtktextbuffer--insert-child-anchor">
      <title>The "insert-child-anchor" gtk.TextBuffer Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>textbuffer</parameter></methodparam>
	  <methodparam><parameter>iter</parameter></methodparam>
	  <methodparam><parameter>anchor</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>textbuffer</parameter>&nbsp;:</term>
	  <listitem><simpara>the textbuffer that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>anchor</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextchildanchor"><classname>gtk.TextChildAnchor</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "insert-child-anchor" signal is emitted when
<parameter>anchor</parameter> is inserted into
<parameter>textbuffer</parameter> at the location specified by
<parameter>iter</parameter>.</para>

    </refsect2>

    <refsect2 id="signal-gtktextbuffer--insert-pixbuf">
      <title>The "insert-pixbuf" gtk.TextBuffer Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>textbuffer</parameter></methodparam>
	  <methodparam><parameter>iter</parameter></methodparam>
	  <methodparam><parameter>pixbuf</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>textbuffer</parameter>&nbsp;:</term>
	  <listitem><simpara>the textbuffer that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>pixbuf</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "insert-pixbuf" signal is emitted when
<parameter>pixbuf</parameter> is inserted into
<parameter>textbuffer</parameter> at the location specified by
<parameter>iter</parameter>.</para>

    </refsect2>

    <refsect2 id="signal-gtktextbuffer--insert-text">
      <title>The "insert-text" gtk.TextBuffer Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>textbuffer</parameter></methodparam>
	  <methodparam><parameter>iter</parameter></methodparam>
	  <methodparam><parameter>text</parameter></methodparam>
	  <methodparam><parameter>length</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>textbuffer</parameter>&nbsp;:</term>
	  <listitem><simpara>the textbuffer that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>text</parameter>&nbsp;:</term>
	  <listitem><simpara>the text inserted in
<parameter>textbuffer</parameter></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>length</parameter>&nbsp;:</term>
	  <listitem><simpara>the length of the text inserted in
<parameter>textbuffer</parameter></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "insert-text" signal is emitted when
<parameter>text</parameter> of the size specified by
<parameter>length</parameter> is inserted into
<parameter>textbuffer</parameter> at the location specified by
<parameter>iter</parameter>.</para>

    </refsect2>

    <refsect2 id="signal-gtktextbuffer--mark-deleted">
      <title>The "mark-deleted" gtk.TextBuffer Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>textbuffer</parameter></methodparam>
	  <methodparam><parameter>textmark</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>textbuffer</parameter>&nbsp;:</term>
	  <listitem><simpara>the textbuffer that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>textmark</parameter>&nbsp;:</term>
	  <listitem><simpara>the <link
	  linkend="class-gtktextmark"><classname>gtk.TextMark</classname></link>
	  that is being deleted</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "mark-deleted" signal is emitted when
<parameter>textmark</parameter> is being deleted from
<parameter>textbuffer</parameter>.</para>

    </refsect2>

    <refsect2 id="signal-gtktextbuffer--mark-set">
      <title>The "mark-set" gtk.TextBuffer Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>textbuffer</parameter></methodparam>
	  <methodparam><parameter>iter</parameter></methodparam>
	  <methodparam><parameter>textmark</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>textbuffer</parameter>&nbsp;:</term>
	  <listitem><simpara>the textbuffer that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>iter</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
pointing at the location where <parameter>textmark</parameter> will be
set.</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>textmark</parameter>&nbsp;:</term>
	  <listitem><simpara>the <link
	  linkend="class-gtktextmark"><classname>gtk.TextMark</classname></link>
	  that is being set</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "mark-set" signal is emitted when
<parameter>textmark</parameter> is being set at the location specified by
<parameter>iter</parameter> in <parameter>textbuffer</parameter>.</para>

    </refsect2>

    <refsect2 id="signal-gtktextbuffer--modified-changed">
      <title>The "modified-changed" gtk.TextBuffer Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>textbuffer</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>textbuffer</parameter>&nbsp;:</term>
	  <listitem><simpara>the textbuffer that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "modified-changed" signal is emitted when the modification
flag is changed.</para>

    </refsect2>

    <refsect2 id="signal-gtktextbuffer--paste-done">
      <title>The "paste-done" gtk.TextBuffer Signal</title>

      <programlisting><methodsynopsis language="python">
        <methodname>callback</methodname>
        <methodparam><parameter>textbuffer</parameter></methodparam>
        <methodparam><parameter>user_param1</parameter></methodparam>
        <methodparam><parameter>...</parameter></methodparam>
      </methodsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><parameter>textbuffer</parameter>&nbsp;:</term>
          <listitem><simpara>the textbuffer that received the signal</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified with the
          <link linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
          method</simpara></listitem>
        </varlistentry>
        <varlistentry>
          <term><parameter>...</parameter>&nbsp;:</term>
          <listitem><simpara>additional user parameters (if any)</simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
          <para>This signal is available in GTK+ 2.16 and above.</para>
      </note>

      <para>The "paste-done" signal is emitted after paste operation has been completed.
      This is useful to properly scroll the view to the end of the pasted text.</para>

    </refsect2>

    <refsect2 id="signal-gtktextbuffer--remove-tag">
      <title>The "remove-tag" gtk.TextBuffer Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>textbuffer</parameter></methodparam>
	  <methodparam><parameter>texttag</parameter></methodparam>
	  <methodparam><parameter>start</parameter></methodparam>
	  <methodparam><parameter>end</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>textbuffer</parameter>&nbsp;:</term>
	  <listitem><simpara>the textbuffer that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>texttag</parameter>&nbsp;:</term>
	  <listitem><simpara>the <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link> being
removed</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>start</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
pointing to the start of the range of text</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>end</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
 pointing to the end of the range of text</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "remove-tag" signal is emitted when
<parameter>texttag</parameter> is being removed from the
<parameter>textbuffer</parameter> text in the range specified by
<parameter>start</parameter> and <parameter>end</parameter>.</para>

    </refsect2>

  </refsect1>

</refentry>
