atk.Hyperlink
Prev | The atk Class Reference | Next

## atk.Hyperlink

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

## Synopsis

    class atk.Hyperlink(gobject.GObject):
        def get_uri(i)
        def get_object(i)
        def get_end_index()
        def get_start_index()
        def is_valid()
        def get_n_anchors()
        def is_inline()
        def is_selected_link()

## Ancestry

    +-- gobject.GObject
      +-- atk.Hyperlink

## atk.Hyperlink Properties

"end-index" | Read | The end index of the `atk.Hyperlink` object. Allowed values: >= 0. Default value: 0.
"number-of-anchors" | Read | The number of anchors associated with the `atk.Hyperlink` object. Allowed values: >= 0. Default value: 0.
"selected-link" | Read | if `True` the `atk.Hyperlink` object is selected. Default value: `False`.
"start-index" | Read | The start index of the AtkHyperlink object. Allowed values: >= 0. Default value: 0.

## atk.Hyperlink Signal Prototypes

gobject.GObject Signal Prototypes

"link-activated" | `def callback(`atkhyperlink`, `user_param1`, `...`)`

## Description

An ATK object which encapsulates a link or set of links in a hypertext document. It implements the `atk.Action` interface.

## Methods

### atk.Hyperlink.get_uri

        def get_uri(i)

`i` : | a (zero-index) integer specifying the desired anchor
Returns : | a string specifying the URI

Get a the URI associated with the anchor specified by `i`.

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

### atk.Hyperlink.get_object

        def get_object(i)

`i` : | a (zero-index) integer specifying the desired anchor
Returns : | an `atk.Object` associated with this hyperlinks i-th anchor

Returns the item associated with this hyperlinks nth anchor. For instance, the returned `atk.Object` will implement `atk.Text` if the link is a text hyperlink, `atk.Image` if the link is an image hyperlink etc.

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

### atk.Hyperlink.get_end_index

        def get_end_index()

Returns : | the index with the hypertext document at which this link ends

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

### atk.Hyperlink.get_start_index

        def get_start_index()

Returns : | the index with the hypertext document at which this link begins

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

### atk.Hyperlink.is_valid

        def is_valid()

Returns : | if `True` this link is still valid

Since the document that a link is associated with may have changed this method returns `True` if the link is still valid (with respect to the document it references) and `False` otherwise.

### atk.Hyperlink.get_n_anchors

        def get_n_anchors()

Returns : | the number of anchors associated with this hyperlink

Gets the number of anchors associated with this hyperlink.

### atk.Hyperlink.is_inline

        def is_inline()

Returns : | if `True` this link displays its content inline.

Indicates whether the link currently displays some or all of its content inline. Ordinary HTML links will usually return `False`, but an inline <src> HTML element will return `True`.

### atk.Hyperlink.is_selected_link

        def is_selected_link()

Returns : | `True` if the `atk.Hyperlink` is selected.

Determines whether this `atk.Hyperlink` is selected

## Signals

### The "link-activated" atk.Hyperlink Signal

        def callback(atkhyperlink, user_param1, ...)

`atkhyperlink` : | the object which received the signal.
`user_param1` : | the first user parameter (if any) specified with the `connect`() method
`...` : | additional user parameters (if any)

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

Prev | Up | Next
atk.GObjectAccessible | Home | atk.Hypertext