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

Trait containing all LinkButton methods.

Implementors

LinkButton

Required Methods

Retrieves the URI set using set_uri().

Returns

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

Returns

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.

uri

a valid URI

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

visited

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.

Implementors