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>(
        f: F
    ) -> SignalHandlerId; fn connect_uri_notify<F: Fn(&Self) + 'static>(
        f: F
    ) -> SignalHandlerId; fn connect_visited_notify<F: Fn(&Self) + 'static>(
        f: F
    ) -> SignalHandlerId; }
Expand description

Trait containing all LinkButton methods.



Required Methods

Retrieves the URI set using set_uri().


a valid URI. The returned string is owned by the link button and should not be modified or freed.

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().


true if the link has been visited, false otherwise

Sets uri as the URI where the LinkButton points. As a side-effect this unsets the “visited” state of the button.


a valid URI

Sets the “visited” state of the URI where the LinkButton points. See is_visited() for more details.


the new “visited” state

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.