Skip to main content

HyperlinkExt

Trait HyperlinkExt 

Source
pub trait HyperlinkExt:
    IsA<Hyperlink>
    + Sealed
    + 'static {
    // Provided methods
    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

Provided Methods§

Source

fn end_index(&self) -> i32

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

§Returns

the index with the hypertext document at which this link ends

Source

fn n_anchors(&self) -> i32

Gets the number of anchors associated with this hyperlink.

§Returns

the number of anchors associated with this hyperlink

Source

fn object(&self, i: i32) -> Option<Object>

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

Source

fn start_index(&self) -> i32

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

§Returns

the index with the hypertext document at which this link begins

Source

fn uri(&self, i: i32) -> Option<GString>

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

Source

fn is_inline(&self) -> bool

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.

Source

fn is_valid(&self) -> bool

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

Source

fn number_of_anchors(&self) -> i32

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

Source

fn connect_end_index_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_number_of_anchors_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Source

fn connect_start_index_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§