1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
|
<?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-atkhypertext">
<refnamediv>
<refname>atk.Hypertext</refname>
<refpurpose>the ATK interface which provides standard mechanism for
manipulating hyperlinks. </refpurpose>
</refnamediv>
<refsect1>
<title>Synopsis</title>
<classsynopsis language="python">
<ooclass><classname>atk.Hypertext</classname></ooclass>
<ooclass><classname>gobject.GInterface</classname></ooclass>
<methodsynopsis language="python">
<methodname><link linkend="method-atkhypertext--get-link">get_link</link></methodname>
<methodparam><parameter role="keyword">link_index</parameter></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-atkhypertext--get-n-links">get_n_links</link></methodname>
<methodparam></methodparam>
</methodsynopsis>
<methodsynopsis language="python">
<methodname><link linkend="method-atkhypertext--get-link-index">get_link_index</link></methodname>
<methodparam><parameter role="keyword">char_index</parameter></methodparam>
</methodsynopsis>
</classsynopsis>
</refsect1>
<refsect1 id="signal-prototypes-atkhypertext">
<title>atk.Hypertext Signal Prototypes</title>
<variablelist>
<varlistentry>
<term>"<link linkend="signal-atkhypertext--link-selected">link-selected</link>"</term>
<listitem>
<methodsynopsis language="python"><methodname>callback</methodname>
<methodparam><parameter>atkhypertext</parameter></methodparam>
<methodparam><parameter>index</parameter></methodparam>
<methodparam><parameter>user_param1</parameter></methodparam>
<methodparam><parameter>...</parameter></methodparam>
</methodsynopsis>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1>
<title>Description</title>
<para>An interface used for objects which implement linking between
multiple resource or content locations, or multiple 'markers' within a
single document. A <link
linkend="class-atkhypertext"><classname>atk.Hypertext</classname></link>
instance is associated with one or more <link
linkend="class-atkhyperlink"><classname>atk.Hyperlink</classname></link>
objects, which are associated with particular offsets within the <link
linkend="class-atkhypertext"><classname>atk.Hypertext</classname></link>'s
included content. While this interface is derived from <link
linkend="class-atktext"><classname>atk.Text</classname></link>, there is
no requirement that <link
linkend="class-atkhypertext"><classname>atk.Hypertext</classname></link>
instances have textual content; they may implement <link
linkend="class-atkimage"><classname>atk.Image</classname></link> as
well, and <link
linkend="class-atkhyperlink"><classname>atk.Hyperlink</classname></link>
objects need not have non-zero text offsets.</para>
</refsect1>
<refsect1>
<title>Methods</title>
<refsect2 id="method-atkhypertext--get-link">
<title>atk.Hypertext.get_link</title>
<programlisting><methodsynopsis language="python">
<methodname>get_link</methodname>
<methodparam><parameter role="keyword">link_index</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">link_index</parameter> :</term>
<listitem><simpara>an integer specifying the desired
link</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the link in this hypertext document at
index <parameter>link_index</parameter></simpara></listitem>
</varlistentry>
</variablelist>
<para>Gets the link in this hypertext document at index
<parameter>link_index</parameter></para>
</refsect2>
<refsect2 id="method-atkhypertext--get-n-links">
<title>atk.Hypertext.get_n_links</title>
<programlisting><methodsynopsis language="python">
<methodname>get_n_links</methodname>
<methodparam></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>the number of links within this hypertext
document</simpara></listitem>
</varlistentry>
</variablelist>
<para>Gets the number of links within this hypertext document.</para>
</refsect2>
<refsect2 id="method-atkhypertext--get-link-index">
<title>atk.Hypertext.get_link_index</title>
<programlisting><methodsynopsis language="python">
<methodname>get_link_index</methodname>
<methodparam><parameter role="keyword">char_index</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter role="keyword">char_index</parameter> :</term>
<listitem><simpara>a character index</simpara></listitem>
</varlistentry>
<varlistentry>
<term><emphasis>Returns</emphasis> :</term>
<listitem><simpara>an index into the array of hyperlinks in the
hypertext</simpara></listitem>
</varlistentry>
</variablelist>
<para>Gets the index into the array of hyperlinks that is associated
with the character specified by <parameter>char_index</parameter>, or
-1 if there is no hyperlink associated with this character.</para>
</refsect2>
</refsect1>
<refsect1>
<title>Signals</title>
<refsect2 id="signal-atkhypertext--link-selected">
<title>The "link-selected" atk.Hypertext Signal</title>
<programlisting><methodsynopsis language="python"><methodname>callback</methodname>
<methodparam><parameter>atkhypertext</parameter></methodparam>
<methodparam><parameter>index</parameter></methodparam>
<methodparam><parameter>user_param1</parameter></methodparam>
<methodparam><parameter>...</parameter></methodparam>
</methodsynopsis></programlisting>
<variablelist>
<varlistentry>
<term><parameter>atkhypertext</parameter> :</term>
<listitem><simpara>the object which received the
signal.</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>index</parameter> :</term>
<listitem><simpara>the index of the hyperlink which is
selected</simpara></listitem>
</varlistentry>
<varlistentry>
<term><parameter>user_param1</parameter> :</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> :</term>
<listitem><simpara>additional user parameters (if any)</simpara></listitem>
</varlistentry>
</variablelist>
<para>The "link-selected" signal is emitted by an <link
linkend="class-atkhypertext"><classname>atk.HyperText</classname></link>
object when one of the hyperlinks associated with the object is
selected.</para>
</refsect2>
</refsect1>
</refentry>
|