LinkButton
Superclasses: Button
, Widget
, InitiallyUnowned
, Object
Implemented Interfaces: Accessible
, Actionable
, Buildable
, ConstraintTarget
- Constructors:
LinkButton(**properties)
new(uri:str) -> Gtk.Widget
new_with_label(uri:str, label:str=None) -> Gtk.Widget
Constructors
Methods
- class LinkButton
-
- get_visited() → bool
Retrieves the “visited” state of the
GtkLinkButton
.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
.
- set_uri(uri: str) → None
Sets
uri
as the URI where theGtkLinkButton
points.As a side-effect this unsets the “visited” state of the button.
- Parameters:
uri – a valid URI
- set_visited(visited: bool) → None
Sets the “visited” state of the
GtkLinkButton
.See
get_visited
for more details.- Parameters:
visited – the new “visited” state
Properties
Signals
- class LinkButton.signals
- activate_link() → bool
Emitted each time the
GtkLinkButton
is clicked.The default handler will call
launch
with the URI stored inside theuri
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.