pub trait HyperlinkExt: 'static {
    fn end_index(&self) -> i32;
    fn n_anchors(&self) -> i32;
    fn object(&self, i: i32) -> Option<Object>;
    fn start_index(&self) -> i32;
    fn uri(&self, i: i32) -> Option<GString>;
    fn is_inline(&self) -> bool;
    fn is_valid(&self) -> bool;
    fn number_of_anchors(&self) -> i32;
    fn connect_link_activated<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_end_index_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_number_of_anchors_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_start_index_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }
Expand description

Trait containing all Hyperlink methods.

Implementors

Hyperlink

Required Methods

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

Returns

the index with the hypertext document at which this link ends

Gets the number of anchors associated with this hyperlink.

Returns

the number of anchors associated with this hyperlink

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

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

i

a (zero-index) integer specifying the desired anchor

Returns

an Object associated with this hyperlinks i-th anchor

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

Returns

the index with the hypertext document at which this link begins

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

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

i

a (zero-index) integer specifying the desired anchor

Returns

a string specifying the URI

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.

Returns

whether or not this link displays its content inline.

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.

Returns

whether or not this link is still valid

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

Implementors