[][src]Trait gtk::prelude::LinkButtonExt

pub trait LinkButtonExt: 'static {
    fn get_uri(&self) -> Option<GString>;
fn get_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_property_uri_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_visited_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all LinkButton methods.

Implementors

LinkButton

Required methods

fn get_uri(&self) -> Option<GString>

Retrieves the URI set using LinkButtonExt::set_uri.

Returns

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

fn get_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 LinkButtonExt::set_visited.

Returns

true if the link has been visited, false otherwise

fn set_uri(&self, uri: &str)

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)

Sets the “visited” state of the URI where the LinkButton points. See LinkButtonExt::get_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 gtk_show_uri_on_window with the URI stored inside the 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.

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

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

Loading content...

Implementors

impl<O: IsA<LinkButton>> LinkButtonExt for O[src]

Loading content...