<?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-gtktexttag">
  <refnamediv>
    <refname>gtk.TextTag</refname>
    <refpurpose>an object used to apply attributes to text in a <link
linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link></refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.TextTag</classname></ooclass>
      <ooclass><classname><link
linkend="class-gobject">gobject.GObject</link></classname></ooclass>
      <constructorsynopsis language="python">
	<methodname><link
linkend="constructor-gtktexttag">gtk.TextTag</link></methodname>
	<methodparam><parameter role="keyword">name</parameter>
	  <initializer>None</initializer></methodparam>
      </constructorsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktexttag--get-priority">get_priority</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktexttag--set-priority">set_priority</link></methodname>
	<methodparam><parameter
		       role="keyword">priority</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtktexttag--event">event</link></methodname>
	<methodparam><parameter
		       role="keyword">event_object</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">event</parameter></methodparam>
	<methodparam><parameter
		       role="keyword">iter</parameter></methodparam>
      </methodsynopsis>
    </classsynopsis>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-gtktexttag">gtk.TextTag</link>
</synopsis>

  </refsect1>

  <refsect1 id="properties-gtktexttag">
    <title>gtk.TextTag 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>"accumulative-margin"</entry>
	      <entry>Read-Write</entry>
	      <entry>Whether the margins accumulate or override each other. When set to
          <literal>True</literal> the margins of this tag are added to the margins
          of any other non-accumulative margins present. When set to
          <literal>False</literal> the margins override one another (the default).
          Default value: <literal>False</literal>
          This property is available in GTK+ 2.12 and above.</entry>
	    </row>
        
        <row valign="top">
	      <entry>"background"</entry>
	      <entry>Write</entry>
	      <entry>The background color as a string</entry>
	    </row>

	    <row valign="top">
	      <entry>"background-full-height"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, the background color fills
the entire line height</entry>
	    </row>

	    <row valign="top">
	      <entry>"background-full-height-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects background
height</entry>
	    </row>

	    <row valign="top">
	      <entry>"background-gdk"</entry>
	      <entry>Read-Write</entry>
	      <entry>The background color as a (possibly unallocated) <link
linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link></entry>
	    </row>

	    <row valign="top">
	      <entry>"background-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the
background color</entry>
	    </row>

	    <row valign="top">
	      <entry>"background-stipple"</entry>
	      <entry>Read-Write</entry>
	      <entry>The bitmap to use as a mask when drawing the text
background</entry>
	    </row>

	    <row valign="top">
	      <entry>"background-stipple-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the
background stipple</entry>
	    </row>

	    <row valign="top">
	      <entry>"direction"</entry>
	      <entry>Read-Write</entry>
	      <entry>The text direction:
<literal>gtk.TEXT_DIR_NONE</literal>, <literal>gtk.TEXT_DIR_LTR</literal> or
<literal>gtk.TEXT_DIR_RTL</literal></entry>
	    </row>

	    <row valign="top">
	      <entry>"editable"</entry>
	      <entry>Read-Write</entry>
	      <entry>It <literal>True</literal> the text can be modified by
the user</entry>
	    </row>

	    <row valign="top">
	      <entry>"editable-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects text
editability</entry>
	    </row>

	    <row valign="top">
	      <entry>"family"</entry>
	      <entry>Read-Write</entry>
	      <entry>The name of the font family, e.g. Sans, Helvetica,
Times, Monospace</entry>
	    </row>

	    <row valign="top">
	      <entry>"family-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the font
family</entry>
	    </row>

	    <row valign="top">
	      <entry>"font"</entry>
	      <entry>Read-Write</entry>
	      <entry>The font description as a string, e.g. "Sans Italic
12"</entry>
	    </row>

	    <row valign="top">
	      <entry>"font-desc"</entry>
	      <entry>Read-Write</entry>
	      <entry>The font description as a pango.FontDescription
object</entry>
	    </row>

	    <row valign="top">
	      <entry>"foreground"</entry>
	      <entry>Write</entry>
	      <entry>The foreground color as a string</entry>
	    </row>

	    <row valign="top">
	      <entry>"foreground-gdk"</entry>
	      <entry>Read-Write</entry>
	      <entry>The foreground color as a (possibly unallocated) <link
linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link></entry>
	    </row>

	    <row valign="top">
	      <entry>"foreground-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the
foreground color</entry>
	    </row>

	    <row valign="top">
	      <entry>"foreground-stipple"</entry>
	      <entry>Read-Write</entry>
	      <entry>The bitmap to use as a mask when drawing the text
foreground</entry>
	    </row>

	    <row valign="top">
	      <entry>"foreground-stipple-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the
foreground stipple</entry>
	    </row>

	    <row valign="top">
	      <entry>"indent"</entry>
	      <entry>Read-Write</entry>
	      <entry>The amount to indent the paragraph, in pixels</entry>
	    </row>

	    <row valign="top">
	      <entry>"indent-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects
indentation</entry>
	    </row>

	    <row valign="top">
	      <entry>"invisible"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this text is hidden</entry>
	    </row>

	    <row valign="top">
	      <entry>"invisible-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects text
visibility</entry>
	    </row>

	    <row valign="top">
	      <entry>"justification"</entry>
	      <entry>Read-Write</entry>
	      <entry>The text justification:
<literal>gtk.JUSTIFY_LEFT</literal>, <literal>gtk.JUSTIFY_RIGHT</literal>,
<literal>gtk.JUSTIFY_CENTER</literal> or
<literal>gtk.JUSTIFY_FILL</literal></entry>
	    </row>

	    <row valign="top">
	      <entry>"justification-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects paragraph
justification</entry>
	    </row>

	    <row valign="top">
	      <entry>"language"</entry>
	      <entry>Read-Write</entry>
	      <entry>The language this text is in, as an ISO code. Pango can
use this as a hint when rendering the text. If you don't understand this
parameter, you probably don't need it.</entry>
	    </row>

	    <row valign="top">
	      <entry>"language-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the
language the text is rendered as</entry>
	    </row>

	    <row valign="top">
	      <entry>"left-margin"</entry>
	      <entry>Read-Write</entry>
	      <entry>The width of the left margin in pixels</entry>
	    </row>

	    <row valign="top">
	      <entry>"left-margin-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the left
margin</entry>
	    </row>

	    <row valign="top">
	      <entry>"name"</entry>
	      <entry>Read-Write</entry>
	      <entry>The name of the texttag or <literal>None</literal> if
anonymous</entry>
	    </row>

            <row valign="top">
              <entry>"paragraph-background"</entry>
              <entry>Write</entry>
              <entry>The paragraph background color as a string.  This
              property is available in GTK+ 2.8 and above.</entry>
            </row>

            <row valign="top">
              <entry>"paragraph-background-gdk"</entry>
              <entry>Read-Write</entry>
              <entry>The paragraph background color as a as a (possibly
              unallocated) <link
              linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link>.
              This property is available in GTK+ 2.8 and above.</entry>
            </row>

            <row valign="top">
              <entry>"paragraph-background-set"</entry>
              <entry>Read-Write</entry>
              <entry>if <literal>True</literal> this tag affects the
              paragraph background color</entry>
            </row>

	    <row valign="top">
	      <entry>"pixels-above-lines"</entry>
	      <entry>Read-Write</entry>
	      <entry>The number of pixels of blank space above
paragraphs</entry>
	    </row>

	    <row valign="top">
	      <entry>"pixels-above-lines-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the number
of pixels above lines</entry>
	    </row>

	    <row valign="top">
	      <entry>"pixels-below-lines"</entry>
	      <entry>Read-Write</entry>
	      <entry>The number of pixels of blank space below
paragraphs</entry>
	    </row>

	    <row valign="top">
	      <entry>"pixels-below-lines-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the number
of pixels above lines</entry>
	    </row>

	    <row valign="top">
	      <entry>"pixels-inside-wrap"</entry>
	      <entry>Read-Write</entry>
	      <entry>The number of pixels of blank space between wrapped
lines in a paragraph</entry>
	    </row>

	    <row valign="top">
	      <entry>"pixels-inside-wrap-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the number
of pixels between wrapped lines</entry>
	    </row>

	    <row valign="top">
	      <entry>"right-margin"</entry>
	      <entry>Read-Write</entry>
	      <entry>The width of the right margin in pixels</entry>
	    </row>

	    <row valign="top">
	      <entry>"right-margin-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the right
margin</entry>
	    </row>

	    <row valign="top">
	      <entry>"rise"</entry>
	      <entry>Read-Write</entry>
	      <entry>The offset of text above the baseline (below the
baseline if rise is negative) in pixels</entry>
	    </row>

	    <row valign="top">
	      <entry>"rise-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the
rise</entry>
	    </row>

	    <row valign="top">
	      <entry>"scale"</entry>
	      <entry>Read-Write</entry>
	      <entry>The font size as a scale factor relative to the default
font size. This properly adapts to theme changes etc. so is recommended.
Pango predefines some scales such as
<literal>pango.SCALE_XX_SMALL</literal>,
<literal>pango.SCALE_X_SMALL</literal>,
<literal>pango.SCALE_SMALL</literal>, <literal>pango.SCALE_MEDIUM</literal>,
<literal>pango.SCALE_LARGE</literal>,
<literal>pango.SCALE_X_LARGE</literal>,
<literal>pango.SCALE_XX_LARGE</literal>.</entry>
	    </row>

	    <row valign="top">
	      <entry>"scale-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag scales the font
size by a factor</entry>
	    </row>

	    <row valign="top">
	      <entry>"size"</entry>
	      <entry>Read-Write</entry>
	      <entry>The font size in Pango units.</entry>
	    </row>

	    <row valign="top">
	      <entry>"size-points"</entry>
	      <entry>Read-Write</entry>
	      <entry>The font size in points</entry>
	    </row>

	    <row valign="top">
	      <entry>"size-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the font
size</entry>
	    </row>

	    <row valign="top">
	      <entry>"stretch"</entry>
	      <entry>Read-Write</entry>
	      <entry>The font stretch - one of:
<literal>pango.STRETCH_ULTRA_CONDENSED</literal>,
<literal>pango.STRETCH_EXTRA_CONDENSED</literal>,
<literal>pango.STRETCH_CONDENSED</literal>,
<literal>pango.STRETCH_SEMI_CONDENSED</literal>,
<literal>pango.STRETCH_NORMAL</literal>,
<literal>pango.STRETCH_SEMI_EXPANDED</literal>,
<literal>pango.STRETCH_EXPANDED</literal>,
<literal>pango.STRETCH_EXTRA_EXPANDED</literal>,
<literal>pango.STRETCH_ULTRA_EXPANDED</literal></entry>
	    </row>

	    <row valign="top">
	      <entry>"stretch-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the font
stretch</entry>
	    </row>

	    <row valign="top">
	      <entry>"strikethrough"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, strike through the
text</entry>
	    </row>

	    <row valign="top">
	      <entry>"strikethrough-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects
strikethrough</entry>
	    </row>

	    <row valign="top">
	      <entry>"style"</entry>
	      <entry>Read-Write</entry>
	      <entry>The font style - one of:
<literal>pango.STYLE_NORMAL</literal>,
<literal>pango.STYLE_OBLIQUE</literal> or
<literal>pango.STYLE_ITALIC</literal>.</entry>
	    </row>

	    <row valign="top">
	      <entry>"style-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the font
style</entry>
	    </row>

	    <row valign="top">
	      <entry>"tabs"</entry>
	      <entry>Read-Write</entry>
	      <entry>The custom tabs for this text</entry>
	    </row>

	    <row valign="top">
	      <entry>"tabs-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects
tabs</entry>
	    </row>

	    <row valign="top">
	      <entry>"underline"</entry>
	      <entry>Read-Write</entry>
	      <entry>The style of underline for this text:
<literal>pango.UNDERLINE_NONE</literal>,
<literal>pango.UNDERLINE_SINGLE</literal>,
<literal>pango.UNDERLINE_DOUBLE</literal> or
<literal>pango.UNDERLINE_LOW</literal></entry>
	    </row>

	    <row valign="top">
	      <entry>"underline-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects
underlining</entry>
	    </row>

	    <row valign="top">
	      <entry>"variant"</entry>
	      <entry>Read-Write</entry>
	      <entry>The font variant - either
<literal>pango.VARIANT_NORMAL</literal> or
<literal>pango.VARIANT_SMALL_CAPS</literal>.</entry>
	    </row>

	    <row valign="top">
	      <entry>"variant-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the font
variant</entry>
	    </row>

	    <row valign="top">
	      <entry>"weight"</entry>
	      <entry>Read-Write</entry>
	      <entry>The font weight as an integer:
<literal>pango.WEIGHT_ULTRALIGHT</literal> = 200,
<literal>pango.WEIGHT_LIGHT</literal> = 300,
<literal>pango.WEIGHT_NORMAL</literal> = 400,
<literal>pango.WEIGHT_BOLD</literal> = 700,
<literal>pango.WEIGHT_ULTRABOLD</literal> = 800,
<literal>pango.WEIGHT_HEAVY</literal> = 900.</entry>
	    </row>

	    <row valign="top">
	      <entry>"weight-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects the font
weight</entry>
	    </row>

	    <row valign="top">
	      <entry>"wrap-mode"</entry>
	      <entry>Read-Write</entry>
	      <entry>The wrap mode of the text:
<literal>gtk.WRAP_NONE</literal>, <literal>gtk.WRAP_CHAR</literal> or
<literal>gtk.WRAP_WORD</literal></entry>
	    </row>

	    <row valign="top">
	      <entry>"wrap-mode-set"</entry>
	      <entry>Read-Write</entry>
	      <entry>If <literal>True</literal>, this tag affects line wrap
mode</entry>
	    </row>

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

  </refsect1>

  <refsect1 id="signal-prototypes-gtktexttag">
    <title>gtk.TextTag Signal Prototypes</title>

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

    <variablelist>
      <varlistentry>
        <term>"<link linkend="signal-gtktexttag--event">event</link>"</term>
        <listitem>
          <methodsynopsis language="python"><methodname>callback</methodname>
            <methodparam><parameter>texttag</parameter></methodparam>
            <methodparam><parameter>widget</parameter></methodparam>
            <methodparam><parameter>event</parameter></methodparam>
            <methodparam><parameter>iter</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-gtktexttag"><classname>gtk.TextTag</classname></link> object
holds attributes that can be applied to a range of text in a <link
linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link>.
A texttag can be associated with more than one <link
linkend="class-gtktextbuffer"><classname>gtk.TextBuffer</classname></link>
by adding it to the <link
linkend="class-gtktexttagtable"><classname>gtk.TextTagTable</classname></link> 
objects of the textbuffers. The attributes of a texttag can be set using the
<link
linkend="method-gobject--set-property"><methodname>GObject.set_property</methodname>()</link> 
method  or as part of texttag creation using the <link
linkend="method-gtktextbuffer--create-tag"><methodname>gtk.TextBuffer.create_tag</methodname>()</link> 
method. Since not every attribute property of a <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link> may be
set each attribute property has a boolean property that indicates whether
the attribute property is set by this texttag. Therefore before retrieving
an attribute value from a texttag you have to check if the associated
boolean property of the attribute property is
<literal>True</literal>.</para>

  </refsect1>

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

    <programlisting><constructorsynopsis language="python">
	<methodname>gtk.TextTag</methodname>
	<methodparam><parameter
		       role="keyword">name</parameter>
	  <initializer>None</initializer></methodparam>
      </constructorsynopsis></programlisting>
    <variablelist>
      <varlistentry>
	<term><parameter role="keyword">name</parameter>&nbsp;:</term>
	<listitem><simpara>tag name, or <literal>None</literal> if the
texttag is anonymous</simpara></listitem>
      </varlistentry>
      <varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	<listitem><simpara>a new <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link></simpara></listitem>
      </varlistentry>
    </variablelist>

    <para>Creates a <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link> with
the name specified by <parameter>name</parameter>. If
<parameter>name</parameter> is <literal>None</literal> the texttag will be
anonymous. The texttag attributes are configured using the <link
linkend="method-gobject--set-property"><methodname>GObject.set_property</methodname>()</link> 
method.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gtktexttag--get-priority">
      <title>gtk.TextTag.get_priority</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_priority</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the texttag's priority.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The get_priority() method returns the priority or the
texttag.</para>

    </refsect2>

    <refsect2 id="method-gtktexttag--set-priority">
      <title>gtk.TextTag.set_priority</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_priority</methodname>
	  <methodparam><parameter
			 role="keyword">priority</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">priority</parameter>&nbsp;:</term>
	  <listitem><simpara>the new priority</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_priority</methodname>() method sets the
priority of a <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link> to the
value specified by <parameter>priority</parameter>. Valid priorities start
at 0 and go to one less than the value returned by the <link
linkend="method-gtktexttagtable--get-size"><methodname>gtk.TextTagTable.get_size</methodname>()</link> 
method. Each texttag in a table has a unique priority; setting the priority
of one texttag shifts the priorities of all the other texttags in the table
to maintain a unique priority for each texttag. Higher priority tags "win"
if two texttags both set the same text attribute for a range of text. When
adding a texttag to a <link
linkend="class-gtktexttagtable"><classname>gtk.TextTagTable</classname></link>, 
it will be assigned the highest priority in the table by default; so
normally the precedence of a set of texttags is the order in which they were
added to the table, or created with the <link
linkend="method-gtktextbuffer--create-tag"><methodname>gtk.TextBuffer.create_tag</methodname>()</link> 
method, that adds the texttag to the buffer's table automatically.</para>

    </refsect2>

    <refsect2 id="method-gtktexttag--event">
      <title>gtk.TextTag.event</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>event</methodname>
	  <methodparam><parameter
			 role="keyword">event_object</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">event</parameter></methodparam>
	  <methodparam><parameter
			 role="keyword">iter</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">event_object</parameter>&nbsp;:</term>
	  <listitem><simpara>the object that received the event, such as a
widget</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">event</parameter>&nbsp;:</term>
	  <listitem><simpara>the event</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter role="keyword">iter</parameter>&nbsp;:</term>
	  <listitem><simpara>the location where the event was
received</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the result of signal emission (whether the
event was handled)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>event</methodname>() method emits the "event"
signal on the <link
linkend="class-gtktexttag"><classname>gtk.TextTag</classname></link> for the
widget specified by <parameter>event_object</parameter> with the event
specified by <parameter>event</parameter> at the textbuffer location
specified by <parameter>iter</parameter>. This method returns
<literal>True</literal> if the event was handled.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Signals</title>

    <refsect2 id="signal-gtktexttag--event">
      <title>The "event" gtk.TextTag Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>texttag</parameter></methodparam>
	  <methodparam><parameter>widget</parameter></methodparam>
	  <methodparam><parameter>event</parameter></methodparam>
	  <methodparam><parameter>iter</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>texttag</parameter>&nbsp;:</term>
	  <listitem><simpara>the texttag that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>widget</parameter>&nbsp;:</term>
	  <listitem><simpara>the widget that received
<parameter>event</parameter></simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>event</parameter>&nbsp;:</term>
	  <listitem><simpara>the event</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>iter</parameter>&nbsp;:</term>
	  <listitem><simpara>the <link
linkend="class-gtktextiter"><classname>gtk.TextIter</classname></link>
pointing to the location where the event was received</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 "event" signal is emitted when an event occurs in a range of
text that is enclosed in the <parameter>texttag</parameter>. The widget that
the event occurred in is specified by <parameter>widget</parameter>.
<parameter>iter</parameter> holds the location that the event occurred at
and <parameter>event</parameter> describes the event.</para>

    </refsect2>

  </refsect1>

</refentry>
