Trait atk::prelude::HypertextExt
source · [−]pub trait HypertextExt: 'static {
fn link(&self, link_index: i32) -> Option<Hyperlink>;
fn link_index(&self, char_index: i32) -> i32;
fn n_links(&self) -> i32;
fn connect_link_selected<F: Fn(&Self, i32) + 'static>(
&self,
f: F
) -> SignalHandlerId;
}
Expand description
Required Methods
sourcefn link(&self, link_index: i32) -> Option<Hyperlink>
fn link(&self, link_index: i32) -> Option<Hyperlink>
Gets the link in this hypertext document at index
link_index
link_index
an integer specifying the desired link
Returns
the link in this hypertext document at
index link_index
sourcefn link_index(&self, char_index: i32) -> i32
fn link_index(&self, char_index: i32) -> i32
Gets the index into the array of hyperlinks that is associated with
the character specified by char_index
.
char_index
a character index
Returns
an index into the array of hyperlinks in self
,
or -1 if there is no hyperlink associated with this character.
sourcefn n_links(&self) -> i32
fn n_links(&self) -> i32
Gets the number of links within this hypertext document.
Returns
the number of links within this hypertext document
sourcefn connect_link_selected<F: Fn(&Self, i32) + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_link_selected<F: Fn(&Self, i32) + 'static>(
&self,
f: F
) -> SignalHandlerId
The “link-selected” signal is emitted by an AtkHyperText object when one of the hyperlinks associated with the object is selected.
arg1
the index of the hyperlink which is selected