atk.Hyperlink — An ATK object which encapsulates a link or set of links in a hypertext document.
class atk.Hyperlink( |
|
def callback( |
An ATK object which encapsulates a link or set of links in a
hypertext document. It implements the atk.Action
interface.
def get_uri(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.
def get_object(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.
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.
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.
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.
def get_n_anchors()
Returns : | the number of anchors associated with this hyperlink |
Gets the number of anchors associated with this hyperlink.
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
.
def is_selected_link()
Returns : | True if the atk.Hyperlink
is selected. |
Determines whether this atk.Hyperlink
is selected
def callback(atkhyperlink
, user_param1
, ...
)
| the object which received the signal. |
| the first user parameter (if any) specified
with the connect () |
| additional user parameters (if any) |
The signal "link-activated" is emitted when a link is activated.