1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>gtk.TextTag</title><link rel="stylesheet" href="style.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="prev" href="class-gtktextmark.html" title="gtk.TextMark"><link rel="next" href="class-gtktexttagtable.html" title="gtk.TextTagTable"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.TextTag</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtktextmark.html">Prev</a> </td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"> <a accesskey="n" href="class-gtktexttagtable.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtktexttag"></a><div class="titlepage"></div><div class="refnamediv"><h2>gtk.TextTag</h2><p>gtk.TextTag — an object used to apply attributes to text in a <a class="link" href="class-gtktextbuffer.html" title="gtk.TextBuffer"><code class="classname">gtk.TextBuffer</code></a></p></div><div class="refsect1" lang="en"><a name="id3546988"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.TextTag</span></span>(<span class="ooclass"><span class="classname"><PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a class="link" href="class-gtktexttag.html#constructor-gtktexttag" title="Constructor">gtk.TextTag</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span><span class="initializer">=None</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktexttag.html#method-gtktexttag--get-priority" title="gtk.TextTag.get_priority">get_priority</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktexttag.html#method-gtktexttag--set-priority" title="gtk.TextTag.set_priority">set_priority</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>priority</code></strong></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a class="link" href="class-gtktexttag.html#method-gtktexttag--event" title="gtk.TextTag.event">event</a></span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>event_object</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>event</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>iter</code></strong></span></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3547151"></a><h2>Ancestry</h2><pre class="synopsis">+-- <PYGTKDOCLINK HREF="class-gobject">gobject.GObject</PYGTKDOCLINK>
+-- <a class="link" href="class-gtktexttag.html" title="gtk.TextTag">gtk.TextTag</a>
</pre></div><div class="refsect1" lang="en"><a name="properties-gtktexttag"></a><h2>gtk.TextTag Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"accumulative-margin"</td><td valign="top">Read-Write</td><td valign="top">Whether the margins accumulate or override each other. When set to
<code class="literal">True</code> the margins of this tag are added to the margins
of any other non-accumulative margins present. When set to
<code class="literal">False</code> the margins override one another (the default).
Default value: <code class="literal">False</code>
This property is available in GTK+ 2.12 and above.</td></tr><tr valign="top"><td valign="top">"background"</td><td valign="top">Write</td><td valign="top">The background color as a string</td></tr><tr valign="top"><td valign="top">"background-full-height"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, the background color fills
the entire line height</td></tr><tr valign="top"><td valign="top">"background-full-height-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects background
height</td></tr><tr valign="top"><td valign="top">"background-gdk"</td><td valign="top">Read-Write</td><td valign="top">The background color as a (possibly unallocated) <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a></td></tr><tr valign="top"><td valign="top">"background-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the
background color</td></tr><tr valign="top"><td valign="top">"background-stipple"</td><td valign="top">Read-Write</td><td valign="top">The bitmap to use as a mask when drawing the text
background</td></tr><tr valign="top"><td valign="top">"background-stipple-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the
background stipple</td></tr><tr valign="top"><td valign="top">"direction"</td><td valign="top">Read-Write</td><td valign="top">The text direction:
<code class="literal">gtk.TEXT_DIR_NONE</code>, <code class="literal">gtk.TEXT_DIR_LTR</code> or
<code class="literal">gtk.TEXT_DIR_RTL</code></td></tr><tr valign="top"><td valign="top">"editable"</td><td valign="top">Read-Write</td><td valign="top">It <code class="literal">True</code> the text can be modified by
the user</td></tr><tr valign="top"><td valign="top">"editable-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects text
editability</td></tr><tr valign="top"><td valign="top">"family"</td><td valign="top">Read-Write</td><td valign="top">The name of the font family, e.g. Sans, Helvetica,
Times, Monospace</td></tr><tr valign="top"><td valign="top">"family-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the font
family</td></tr><tr valign="top"><td valign="top">"font"</td><td valign="top">Read-Write</td><td valign="top">The font description as a string, e.g. "Sans Italic
12"</td></tr><tr valign="top"><td valign="top">"font-desc"</td><td valign="top">Read-Write</td><td valign="top">The font description as a pango.FontDescription
object</td></tr><tr valign="top"><td valign="top">"foreground"</td><td valign="top">Write</td><td valign="top">The foreground color as a string</td></tr><tr valign="top"><td valign="top">"foreground-gdk"</td><td valign="top">Read-Write</td><td valign="top">The foreground color as a (possibly unallocated) <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a></td></tr><tr valign="top"><td valign="top">"foreground-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the
foreground color</td></tr><tr valign="top"><td valign="top">"foreground-stipple"</td><td valign="top">Read-Write</td><td valign="top">The bitmap to use as a mask when drawing the text
foreground</td></tr><tr valign="top"><td valign="top">"foreground-stipple-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the
foreground stipple</td></tr><tr valign="top"><td valign="top">"indent"</td><td valign="top">Read-Write</td><td valign="top">The amount to indent the paragraph, in pixels</td></tr><tr valign="top"><td valign="top">"indent-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects
indentation</td></tr><tr valign="top"><td valign="top">"invisible"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this text is hidden</td></tr><tr valign="top"><td valign="top">"invisible-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects text
visibility</td></tr><tr valign="top"><td valign="top">"justification"</td><td valign="top">Read-Write</td><td valign="top">The text justification:
<code class="literal">gtk.JUSTIFY_LEFT</code>, <code class="literal">gtk.JUSTIFY_RIGHT</code>,
<code class="literal">gtk.JUSTIFY_CENTER</code> or
<code class="literal">gtk.JUSTIFY_FILL</code></td></tr><tr valign="top"><td valign="top">"justification-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects paragraph
justification</td></tr><tr valign="top"><td valign="top">"language"</td><td valign="top">Read-Write</td><td valign="top">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.</td></tr><tr valign="top"><td valign="top">"language-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the
language the text is rendered as</td></tr><tr valign="top"><td valign="top">"left-margin"</td><td valign="top">Read-Write</td><td valign="top">The width of the left margin in pixels</td></tr><tr valign="top"><td valign="top">"left-margin-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the left
margin</td></tr><tr valign="top"><td valign="top">"name"</td><td valign="top">Read-Write</td><td valign="top">The name of the texttag or <code class="literal">None</code> if
anonymous</td></tr><tr valign="top"><td valign="top">"paragraph-background"</td><td valign="top">Write</td><td valign="top">The paragraph background color as a string. This
property is available in GTK+ 2.8 and above.</td></tr><tr valign="top"><td valign="top">"paragraph-background-gdk"</td><td valign="top">Read-Write</td><td valign="top">The paragraph background color as a as a (possibly
unallocated) <a class="link" href="class-gdkcolor.html" title="gtk.gdk.Color"><code class="classname">gtk.gdk.Color</code></a>.
This property is available in GTK+ 2.8 and above.</td></tr><tr valign="top"><td valign="top">"paragraph-background-set"</td><td valign="top">Read-Write</td><td valign="top">if <code class="literal">True</code> this tag affects the
paragraph background color</td></tr><tr valign="top"><td valign="top">"pixels-above-lines"</td><td valign="top">Read-Write</td><td valign="top">The number of pixels of blank space above
paragraphs</td></tr><tr valign="top"><td valign="top">"pixels-above-lines-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the number
of pixels above lines</td></tr><tr valign="top"><td valign="top">"pixels-below-lines"</td><td valign="top">Read-Write</td><td valign="top">The number of pixels of blank space below
paragraphs</td></tr><tr valign="top"><td valign="top">"pixels-below-lines-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the number
of pixels above lines</td></tr><tr valign="top"><td valign="top">"pixels-inside-wrap"</td><td valign="top">Read-Write</td><td valign="top">The number of pixels of blank space between wrapped
lines in a paragraph</td></tr><tr valign="top"><td valign="top">"pixels-inside-wrap-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the number
of pixels between wrapped lines</td></tr><tr valign="top"><td valign="top">"right-margin"</td><td valign="top">Read-Write</td><td valign="top">The width of the right margin in pixels</td></tr><tr valign="top"><td valign="top">"right-margin-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the right
margin</td></tr><tr valign="top"><td valign="top">"rise"</td><td valign="top">Read-Write</td><td valign="top">The offset of text above the baseline (below the
baseline if rise is negative) in pixels</td></tr><tr valign="top"><td valign="top">"rise-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the
rise</td></tr><tr valign="top"><td valign="top">"scale"</td><td valign="top">Read-Write</td><td valign="top">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
<code class="literal">pango.SCALE_XX_SMALL</code>,
<code class="literal">pango.SCALE_X_SMALL</code>,
<code class="literal">pango.SCALE_SMALL</code>, <code class="literal">pango.SCALE_MEDIUM</code>,
<code class="literal">pango.SCALE_LARGE</code>,
<code class="literal">pango.SCALE_X_LARGE</code>,
<code class="literal">pango.SCALE_XX_LARGE</code>.</td></tr><tr valign="top"><td valign="top">"scale-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag scales the font
size by a factor</td></tr><tr valign="top"><td valign="top">"size"</td><td valign="top">Read-Write</td><td valign="top">The font size in Pango units.</td></tr><tr valign="top"><td valign="top">"size-points"</td><td valign="top">Read-Write</td><td valign="top">The font size in points</td></tr><tr valign="top"><td valign="top">"size-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the font
size</td></tr><tr valign="top"><td valign="top">"stretch"</td><td valign="top">Read-Write</td><td valign="top">The font stretch - one of:
<code class="literal">pango.STRETCH_ULTRA_CONDENSED</code>,
<code class="literal">pango.STRETCH_EXTRA_CONDENSED</code>,
<code class="literal">pango.STRETCH_CONDENSED</code>,
<code class="literal">pango.STRETCH_SEMI_CONDENSED</code>,
<code class="literal">pango.STRETCH_NORMAL</code>,
<code class="literal">pango.STRETCH_SEMI_EXPANDED</code>,
<code class="literal">pango.STRETCH_EXPANDED</code>,
<code class="literal">pango.STRETCH_EXTRA_EXPANDED</code>,
<code class="literal">pango.STRETCH_ULTRA_EXPANDED</code></td></tr><tr valign="top"><td valign="top">"stretch-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the font
stretch</td></tr><tr valign="top"><td valign="top">"strikethrough"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, strike through the
text</td></tr><tr valign="top"><td valign="top">"strikethrough-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects
strikethrough</td></tr><tr valign="top"><td valign="top">"style"</td><td valign="top">Read-Write</td><td valign="top">The font style - one of:
<code class="literal">pango.STYLE_NORMAL</code>,
<code class="literal">pango.STYLE_OBLIQUE</code> or
<code class="literal">pango.STYLE_ITALIC</code>.</td></tr><tr valign="top"><td valign="top">"style-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the font
style</td></tr><tr valign="top"><td valign="top">"tabs"</td><td valign="top">Read-Write</td><td valign="top">The custom tabs for this text</td></tr><tr valign="top"><td valign="top">"tabs-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects
tabs</td></tr><tr valign="top"><td valign="top">"underline"</td><td valign="top">Read-Write</td><td valign="top">The style of underline for this text:
<code class="literal">pango.UNDERLINE_NONE</code>,
<code class="literal">pango.UNDERLINE_SINGLE</code>,
<code class="literal">pango.UNDERLINE_DOUBLE</code> or
<code class="literal">pango.UNDERLINE_LOW</code></td></tr><tr valign="top"><td valign="top">"underline-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects
underlining</td></tr><tr valign="top"><td valign="top">"variant"</td><td valign="top">Read-Write</td><td valign="top">The font variant - either
<code class="literal">pango.VARIANT_NORMAL</code> or
<code class="literal">pango.VARIANT_SMALL_CAPS</code>.</td></tr><tr valign="top"><td valign="top">"variant-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the font
variant</td></tr><tr valign="top"><td valign="top">"weight"</td><td valign="top">Read-Write</td><td valign="top">The font weight as an integer:
<code class="literal">pango.WEIGHT_ULTRALIGHT</code> = 200,
<code class="literal">pango.WEIGHT_LIGHT</code> = 300,
<code class="literal">pango.WEIGHT_NORMAL</code> = 400,
<code class="literal">pango.WEIGHT_BOLD</code> = 700,
<code class="literal">pango.WEIGHT_ULTRABOLD</code> = 800,
<code class="literal">pango.WEIGHT_HEAVY</code> = 900.</td></tr><tr valign="top"><td valign="top">"weight-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects the font
weight</td></tr><tr valign="top"><td valign="top">"wrap-mode"</td><td valign="top">Read-Write</td><td valign="top">The wrap mode of the text:
<code class="literal">gtk.WRAP_NONE</code>, <code class="literal">gtk.WRAP_CHAR</code> or
<code class="literal">gtk.WRAP_WORD</code></td></tr><tr valign="top"><td valign="top">"wrap-mode-set"</td><td valign="top">Read-Write</td><td valign="top">If <code class="literal">True</code>, this tag affects line wrap
mode</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="signal-prototypes-gtktexttag"></a><h2>gtk.TextTag Signal Prototypes</h2><p><PYGTKDOCLINK HREF="signal-prototypes-gobject">gobject.GObject Signal Prototypes</PYGTKDOCLINK></p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term">"<a class="link" href="class-gtktexttag.html#signal-gtktexttag--event" title='The "event" gtk.TextTag Signal'>event</a>"</span></p></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>texttag</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>widget</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>iter</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3549010"></a><h2>Description</h2><p>A <a class="link" href="class-gtktexttag.html" title="gtk.TextTag"><code class="classname">gtk.TextTag</code></a> object
holds attributes that can be applied to a range of text in a <a class="link" href="class-gtktextbuffer.html" title="gtk.TextBuffer"><code class="classname">gtk.TextBuffer</code></a>.
A texttag can be associated with more than one <a class="link" href="class-gtktextbuffer.html" title="gtk.TextBuffer"><code class="classname">gtk.TextBuffer</code></a>
by adding it to the <a class="link" href="class-gtktexttagtable.html" title="gtk.TextTagTable"><code class="classname">gtk.TextTagTable</code></a>
objects of the textbuffers. The attributes of a texttag can be set using the
<PYGTKDOCLINK HREF="method-gobject--set-property"><code class="methodname">GObject.set_property</code>()</PYGTKDOCLINK>
method or as part of texttag creation using the <a class="link" href="class-gtktextbuffer.html#method-gtktextbuffer--create-tag" title="gtk.TextBuffer.create_tag"><code class="methodname">gtk.TextBuffer.create_tag</code>()</a>
method. Since not every attribute property of a <a class="link" href="class-gtktexttag.html" title="gtk.TextTag"><code class="classname">gtk.TextTag</code></a> 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
<code class="literal">True</code>.</p></div><div class="refsect1" lang="en"><a name="constructor-gtktexttag"></a><h2>Constructor</h2><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.TextTag</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>name</code></strong></span><span class="initializer">=None</span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>name</code></strong> :</span></p></td><td>tag name, or <code class="literal">None</code> if the
texttag is anonymous</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>a new <a class="link" href="class-gtktexttag.html" title="gtk.TextTag"><code class="classname">gtk.TextTag</code></a></td></tr></tbody></table><p>Creates a <a class="link" href="class-gtktexttag.html" title="gtk.TextTag"><code class="classname">gtk.TextTag</code></a> with
the name specified by <em class="parameter"><code>name</code></em>. If
<em class="parameter"><code>name</code></em> is <code class="literal">None</code> the texttag will be
anonymous. The texttag attributes are configured using the <PYGTKDOCLINK HREF="method-gobject--set-property"><code class="methodname">GObject.set_property</code>()</PYGTKDOCLINK>
method.</p></div><div class="refsect1" lang="en"><a name="id3549222"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtktexttag--get-priority"></a><h3>gtk.TextTag.get_priority</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_priority</span>(<span class="methodparam"></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the texttag's priority.</td></tr></tbody></table><p>The get_priority() method returns the priority or the
texttag.</p></div><div class="refsect2" lang="en"><a name="method-gtktexttag--set-priority"></a><h3>gtk.TextTag.set_priority</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_priority</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>priority</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>priority</code></strong> :</span></p></td><td>the new priority</td></tr></tbody></table><p>The <code class="methodname">set_priority</code>() method sets the
priority of a <a class="link" href="class-gtktexttag.html" title="gtk.TextTag"><code class="classname">gtk.TextTag</code></a> to the
value specified by <em class="parameter"><code>priority</code></em>. Valid priorities start
at 0 and go to one less than the value returned by the <a class="link" href="class-gtktexttagtable.html#method-gtktexttagtable--get-size" title="gtk.TextTagTable.get_size"><code class="methodname">gtk.TextTagTable.get_size</code>()</a>
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 <a class="link" href="class-gtktexttagtable.html" title="gtk.TextTagTable"><code class="classname">gtk.TextTagTable</code></a>,
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 <a class="link" href="class-gtktextbuffer.html#method-gtktextbuffer--create-tag" title="gtk.TextBuffer.create_tag"><code class="methodname">gtk.TextBuffer.create_tag</code>()</a>
method, that adds the texttag to the buffer's table automatically.</p></div><div class="refsect2" lang="en"><a name="method-gtktexttag--event"></a><h3>gtk.TextTag.event</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">event</span>(<span class="methodparam"><span class="parameter"><strong class="parameter"><code>event_object</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>event</code></strong></span></span>, <span class="methodparam"><span class="parameter"><strong class="parameter"><code>iter</code></strong></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><strong class="parameter"><code>event_object</code></strong> :</span></p></td><td>the object that received the event, such as a
widget</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>event</code></strong> :</span></p></td><td>the event</td></tr><tr><td><p><span class="term"><strong class="parameter"><code>iter</code></strong> :</span></p></td><td>the location where the event was
received</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td>the result of signal emission (whether the
event was handled)</td></tr></tbody></table><p>The <code class="methodname">event</code>() method emits the "event"
signal on the <a class="link" href="class-gtktexttag.html" title="gtk.TextTag"><code class="classname">gtk.TextTag</code></a> for the
widget specified by <em class="parameter"><code>event_object</code></em> with the event
specified by <em class="parameter"><code>event</code></em> at the textbuffer location
specified by <em class="parameter"><code>iter</code></em>. This method returns
<code class="literal">True</code> if the event was handled.</p></div></div><div class="refsect1" lang="en"><a name="id3549591"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtktexttag--event"></a><h3>The "event" gtk.TextTag Signal</h3><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><em class="parameter"><code>texttag</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>widget</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>event</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>iter</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>user_param1</code></em></span></span>, <span class="methodparam"><span class="parameter"><em class="parameter"><code>...</code></em></span></span>)</code></pre><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><p><span class="term"><em class="parameter"><code>texttag</code></em> :</span></p></td><td>the texttag that received the
signal</td></tr><tr><td><p><span class="term"><em class="parameter"><code>widget</code></em> :</span></p></td><td>the widget that received
<em class="parameter"><code>event</code></em></td></tr><tr><td><p><span class="term"><em class="parameter"><code>event</code></em> :</span></p></td><td>the event</td></tr><tr><td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td><td>the <a class="link" href="class-gtktextiter.html" title="gtk.TextIter"><code class="classname">gtk.TextIter</code></a>
pointing to the location where the event was received</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_param1</code></em> :</span></p></td><td>the first user parameter (if any) specified
with the <PYGTKDOCLINK HREF="method-gobject--connect"><code class="methodname">connect</code>()</PYGTKDOCLINK>
method</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "event" signal is emitted when an event occurs in a range of
text that is enclosed in the <em class="parameter"><code>texttag</code></em>. The widget that
the event occurred in is specified by <em class="parameter"><code>widget</code></em>.
<em class="parameter"><code>iter</code></em> holds the location that the event occurred at
and <em class="parameter"><code>event</code></em> describes the event.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtktextmark.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="class-gtktexttagtable.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.TextMark </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> gtk.TextTagTable</td></tr></table></div></body></html>
|