[]Struct gtk::LinkButton

pub struct LinkButton(_, _);

A LinkButton is a Button with a hyperlink, similar to the one used by web browsers, which triggers an action when clicked. It is useful to show quick links to resources.

A link button is created by calling either LinkButton::new or LinkButton::new_with_label. If using the former, the URI you pass to the constructor is used as a label for the widget.

The URI bound to a LinkButton can be set specifically using LinkButtonExt::set_uri, and retrieved using LinkButtonExt::get_uri.

By default, LinkButton calls gtk_show_uri_on_window when the button is clicked. This behaviour can be overridden by connecting to the LinkButton::activate-link signal and returning true from the signal handler.

CSS nodes

LinkButton has a single CSS node with name button. To differentiate it from a plain Button, it gets the .link style class.

Implements

LinkButtonExt, ButtonExt, BinExt, ContainerExt, WidgetExt, glib::object::ObjectExt, BuildableExt, ActionableExt, WidgetExtManual, BuildableExtManual

Implementations

impl LinkButton[src]

pub fn new(uri: &str) -> LinkButton[src]

Creates a new LinkButton with the URI as its text.

uri

a valid URI

Returns

a new link button widget.

pub fn with_label(uri: &str, label: Option<&str>) -> LinkButton[src]

Trait Implementations

impl Clone for LinkButton

impl Debug for LinkButton

impl Display for LinkButton[src]

impl Eq for LinkButton

impl Hash for LinkButton

impl IsA<Actionable> for LinkButton

impl IsA<Bin> for LinkButton

impl IsA<Buildable> for LinkButton

impl IsA<Button> for LinkButton

impl IsA<Container> for LinkButton

impl IsA<Widget> for LinkButton

impl Ord for LinkButton

impl<T: ObjectType> PartialEq<T> for LinkButton

impl<T: ObjectType> PartialOrd<T> for LinkButton

impl StaticType for LinkButton

Auto Trait Implementations

impl RefUnwindSafe for LinkButton

impl !Send for LinkButton

impl !Sync for LinkButton

impl Unpin for LinkButton

impl UnwindSafe for LinkButton

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.