Trait gtk::prelude::LinkButtonExt
source · [−]pub trait LinkButtonExt: 'static {
fn uri(&self) -> Option<GString>;
fn is_visited(&self) -> bool;
fn set_uri(&self, uri: &str);
fn set_visited(&self, visited: bool);
fn connect_activate_link<F: Fn(&Self) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_uri_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
fn connect_visited_notify<F: Fn(&Self) + 'static>(
&self,
f: F
) -> SignalHandlerId;
}
Expand description
Required Methods
fn is_visited(&self) -> bool
fn is_visited(&self) -> bool
Retrieves the “visited” state of the URI where the LinkButton
points. The button becomes visited when it is clicked. If the URI
is changed on the button, the “visited” state is unset again.
The state may also be changed using set_visited()
.
Returns
Sets uri
as the URI where the LinkButton
points. As a side-effect
this unsets the “visited” state of the button.
uri
a valid URI
fn set_visited(&self, visited: bool)
fn set_visited(&self, visited: bool)
Sets the “visited” state of the URI where the LinkButton
points. See is_visited()
for more details.
visited
the new “visited” state
fn connect_activate_link<F: Fn(&Self) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
fn connect_activate_link<F: Fn(&Self) -> Inhibit + 'static>(
&self,
f: F
) -> SignalHandlerId
The ::activate-link signal is emitted each time the LinkButton
has been clicked.
The default handler will call show_uri_on_window()
with the URI stored inside
the property::LinkButton::uri
property.
To override the default behavior, you can connect to the ::activate-link
signal and stop the propagation of the signal by returning true
from
your handler.