atk.Hypertext

atk.Hypertext — the ATK interface which provides standard mechanism for manipulating hyperlinks.

Synopsis

class atk.Hypertext(gobject.GInterface):
    def get_link(link_index)
def get_n_links()
def get_link_index(char_index)

atk.Hypertext Signal Prototypes

"link-selected"

def callback(atkhypertext, index, user_param1, ...)

Description

An interface used for objects which implement linking between multiple resource or content locations, or multiple 'markers' within a single document. A atk.Hypertext instance is associated with one or more atk.Hyperlink objects, which are associated with particular offsets within the atk.Hypertext's included content. While this interface is derived from atk.Text, there is no requirement that atk.Hypertext instances have textual content; they may implement atk.Image as well, and atk.Hyperlink objects need not have non-zero text offsets.

Methods

atk.Hypertext.get_link

    def get_link(link_index)

link_index :

an integer specifying the desired link

Returns :

the link in this hypertext document at index link_index

Gets the link in this hypertext document at index link_index

atk.Hypertext.get_n_links

    def get_n_links()

Returns :

the number of links within this hypertext document

Gets the number of links within this hypertext document.

atk.Hypertext.get_link_index

    def get_link_index(char_index)

char_index :

a character index

Returns :

an index into the array of hyperlinks in the hypertext

Gets the index into the array of hyperlinks that is associated with the character specified by char_index, or -1 if there is no hyperlink associated with this character.

Signals

The "link-selected" atk.Hypertext Signal

    def callback(atkhypertext, index, user_param1, ...)

atkhypertext :

the object which received the signal.

index :

the index of the hyperlink which is selected

user_param1 :

the first user parameter (if any) specified with the connect() method

... :

additional user parameters (if any)

The "link-selected" signal is emitted by an atk.HyperText object when one of the hyperlinks associated with the object is selected.