gtk.link_button
Module for [LinkButton] class
Types 3
A [gtk.link_button.LinkButton] is a button with a hyperlink.
It is useful to show quick links to resources.
A link button is created by calling either [gtk.link_button.LinkButton.new_] or [gtk.link_button.LinkButton.newWithLabel]. If using the former, the URI you pass to the constructor is used as a label for the widget.
The URI bound to a [gtk.link_button.LinkButton] can be set specifically using [gtk.link_button.LinkButton.setUri].
By default, [gtk.link_button.LinkButton] calls [gtk.file_launcher.FileLauncher.launch] when the button is clicked. This behaviour can be overridden by connecting to the signal@Gtk.LinkButton::activate-link signal and returning true from the signal handler.
CSS nodes
[gtk.link_button.LinkButton] has a single CSS node with name button. To differentiate it from a plain [gtk.button.Button], it gets the .link style class.
Accessibility
[gtk.link_button.LinkButton] uses the [gtk.types.AccessibleRole.Link] role.
LinkButton self()Returns `this`, for use in `with` statements.LinkButtonGidBuilder builder()Get builder for [gtk.link_button.LinkButton] Returns: New builder objectvoid uri(string propval) @propertySet `uri` property. Params: propval = The URI bound to this button.void visited(bool propval) @propertySet `visited` property. Params: propval = The 'visited' state of this button.gtk.link_button.LinkButton newWithLabel(string uri, string label = null)Creates a new [gtk.link_button.LinkButton] containing a label.string getUri()Retrieves the URI of the [gtk.link_button.LinkButton]. Returns: a valid URI. The returned string is owned by the link button and should not be modified or freed.bool getVisited()Retrieves the “visited” state of the [gtk.link_button.LinkButton].void setUri(string uri)Sets uri as the URI where the [gtk.link_button.LinkButton] points.void setVisited(bool visited)Sets the “visited” state of the [gtk.link_button.LinkButton].gulong connectActivateLink(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == bool)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.link_button.LinkButton)))
&& Parameters!T.length < 2)Connect to `ActivateLink` signal.Fluent builder for [gtk.link_button.LinkButton]