Next: , Previous: AtkHyperlinkImpl, Up: Top


8 AtkHyperlink

An ATK object which encapsulates a link or set of links in a hypertext document.

8.1 Overview

An ATK object which encapsulates a link or set of links (for instance in the case of client-side image maps) in a hypertext document. It may implement the AtkAction interface. AtkHyperlink may also be used to refer to inline embedded content, since it allows specification of a start and end offset within the host AtkHypertext object.

8.2 Usage

— Class: <atk-hyperlink>

Derives from <atk-action>, <gobject>.

This class defines the following slots:

selected-link
Specifies whether the AtkHyperlink object is selected
number-of-anchors
The number of anchors associated with the AtkHyperlink object
end-index
The end index of the AtkHyperlink object
start-index
The start index of the AtkHyperlink object
— Signal on <atk-hyperlink>: link-activated

The signal link-activated is emitted when a link is activated.

— Function: atk-hyperlink-get-uri (self <atk-hyperlink>) (int) ⇒  (ret mchars)
— Method: get-uri

Get a the URI associated with the anchor specified by i of link.

Multiple anchors are primarily used by client-side image maps.

link
an <atk-hyperlink>
i
a (zero-index) integer specifying the desired anchor
ret
a string specifying the URI
— Function: atk-hyperlink-get-object (self <atk-hyperlink>) (int) ⇒  (ret <atk-object>)
— Method: get-object

Returns the item associated with this hyperlinks nth anchor. For instance, the returned <atk-object> will implement <atk-text> if link is a text hyperlink, <atk-image> if link is an image hyperlink etc.

Multiple anchors are primarily used by client-side image maps.

link
an <atk-hyperlink>
i
a (zero-index) integer specifying the desired anchor
ret
an <atk-object> associated with this hyperlinks i-th anchor
— Function: atk-hyperlink-get-end-index (self <atk-hyperlink>) ⇒  (ret int)
— Method: get-end-index

Gets the index with the hypertext document at which this link ends.

link
an <atk-hyperlink>
ret
the index with the hypertext document at which this link ends
— Function: atk-hyperlink-get-start-index (self <atk-hyperlink>) ⇒  (ret int)
— Method: get-start-index

Gets the index with the hypertext document at which this link begins.

link
an <atk-hyperlink>
ret
the index with the hypertext document at which this link begins
— Function: atk-hyperlink-is-valid (self <atk-hyperlink>) ⇒  (ret bool)
— Method: is-valid

Since the document that a link is associated with may have changed this method returns ‘#t’ if the link is still valid (with respect to the document it references) and ‘#f’ otherwise.

link
an <atk-hyperlink>
ret
whether or not this link is still valid
— Function: atk-hyperlink-is-inline (self <atk-hyperlink>) ⇒  (ret bool)
— Method: is-inline

Indicates whether the link currently displays some or all of its content inline. Ordinary HTML links will usually return ‘#f’, but an inline &lt;src&gt; HTML element will return ‘#t’. a *

link
an <atk-hyperlink>
ret
whether or not this link displays its content inline.
— Function: atk-hyperlink-get-n-anchors (self <atk-hyperlink>) ⇒  (ret int)
— Method: get-n-anchors

Gets the number of anchors associated with this hyperlink.

link
an <atk-hyperlink>
ret
the number of anchors associated with this hyperlink
— Function: atk-hyperlink-is-selected-link (self <atk-hyperlink>) ⇒  (ret bool)
— Method: is-selected-link

Determines whether this AtkHyperlink is selected

Returns:

link
an <atk-hyperlink>
ret
True is the AtkHyperlink is selected, False otherwise

Since ATK 1.4 @Deprecated: This method is deprecated since ATK version 1.8. Please use ATK_STATE_SELECTED to indicate when a hyperlink within a Hypertext container is selected.