package Implements_Gtk_Actionable is new Glib.Types.Implements (Gtk.Actionable.Gtk_Actionable, Gtk_Link_Button_Record, Gtk_Link_Button);
package Implements_Gtk_Activatable is new Glib.Types.Implements (Gtk.Activatable.Gtk_Activatable, Gtk_Link_Button_Record, Gtk_Link_Button);
package Implements_Gtk_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_Link_Button_Record, Gtk_Link_Button);
type Gtk_Link_Button_Record is new Gtk_Button_Record with null record;
type Gtk_Link_Button is access all Gtk_Link_Button_Record'Class;
type Cb_Gtk_Link_Button_Boolean is not null access function (Self : access Gtk_Link_Button_Record'Class) return Boolean;
type Cb_GObject_Boolean is not null access function (Self : access Glib.Object.GObject_Record'Class) return Boolean;
URI_Property : constant Glib.Properties.Property_String;
Visited_Property : constant Glib.Properties.Property_Boolean;
Signal_Activate_Link : constant Glib.Signal_Name := "activate-link";
procedure Gtk_New
( | Widget | : out Gtk_Link_Button; |
URI | : UTF8_String); |
procedure Initialize
( | Widget | : not null access Gtk_Link_Button_Record'Class; |
URI | : UTF8_String); |
function Gtk_Link_Button_New
( | URI | : UTF8_String) return Gtk_Link_Button; |
procedure Gtk_New_With_Label
( | Widget | : out Gtk_Link_Button; |
URI | : UTF8_String; | |
Label | : UTF8_String := ""); |
procedure Initialize_With_Label
( | Widget | : not null access Gtk_Link_Button_Record'Class; |
URI | : UTF8_String; | |
Label | : UTF8_String := ""); |
function Gtk_Link_Button_New_With_Label
( | URI | : UTF8_String; |
Label | : UTF8_String := "") return Gtk_Link_Button; |
function Get_Type return Glib.GType;
function Get_Uri
( | Widget | : not null access Gtk_Link_Button_Record) return UTF8_String; |
procedure Set_Uri
( | Widget | : not null access Gtk_Link_Button_Record; |
URI | : UTF8_String); |
function Get_Visited
( | Widget | : not null access Gtk_Link_Button_Record) return Boolean; |
procedure Set_Visited
( | Widget | : not null access Gtk_Link_Button_Record; |
Visited | : Boolean); |
function Get_Action_Name
( | Self | : not null access Gtk_Link_Button_Record) return UTF8_String; |
procedure Set_Action_Name
( | Self | : not null access Gtk_Link_Button_Record; |
Action_Name | : UTF8_String); |
function Get_Action_Target_Value
( | Self | : not null access Gtk_Link_Button_Record) return Glib.Variant.Gvariant; |
procedure Set_Action_Target_Value
( | Self | : not null access Gtk_Link_Button_Record; |
Target_Value | : Glib.Variant.Gvariant); |
procedure Set_Detailed_Action_Name
( | Self | : not null access Gtk_Link_Button_Record; |
Detailed_Action_Name | : UTF8_String); |
procedure Do_Set_Related_Action
( | Self | : not null access Gtk_Link_Button_Record; |
Action | : not null access Gtk.Action.Gtk_Action_Record'Class); |
function Get_Related_Action
( | Self | : not null access Gtk_Link_Button_Record) return Gtk.Action.Gtk_Action; |
procedure Set_Related_Action
( | Self | : not null access Gtk_Link_Button_Record; |
Action | : not null access Gtk.Action.Gtk_Action_Record'Class); |
function Get_Use_Action_Appearance
( | Self | : not null access Gtk_Link_Button_Record) return Boolean; |
procedure Set_Use_Action_Appearance
( | Self | : not null access Gtk_Link_Button_Record; |
Use_Appearance | : Boolean); |
procedure Sync_Action_Properties
( | Self | : not null access Gtk_Link_Button_Record; |
Action | : access Gtk.Action.Gtk_Action_Record'Class); |
procedure On_Activate_Link
( | Self | : not null access Gtk_Link_Button_Record; |
Call | : Cb_Gtk_Link_Button_Boolean; | |
After | : Boolean := False); |
procedure On_Activate_Link
( | Self | : not null access Gtk_Link_Button_Record; |
Call | : Cb_GObject_Boolean; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
function "+"
( | Widget | : access Gtk_Link_Button_Record'Class) return Gtk.Actionable.Gtk_Actionable renames Implements_Gtk_Actionable.To_Interface; |
function "-"
( | Interf | : Gtk.Actionable.Gtk_Actionable) return Gtk_Link_Button renames Implements_Gtk_Actionable.To_Object; |
function "+"
( | Widget | : access Gtk_Link_Button_Record'Class) return Gtk.Activatable.Gtk_Activatable renames Implements_Gtk_Activatable.To_Interface; |
function "-"
( | Interf | : Gtk.Activatable.Gtk_Activatable) return Gtk_Link_Button renames Implements_Gtk_Activatable.To_Object; |
function "+"
( | Widget | : access Gtk_Link_Button_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Gtk_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Link_Button renames Implements_Gtk_Buildable.To_Object; |
A GtkLinkButton is a Gtk.Button.Gtk_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 Gtk.Link_Button.Gtk_New or Gtk.Link_Button.Gtk_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 GtkLinkButton can be set specifically using Gtk.Link_Button.Set_Uri, and retrieved using Gtk.Link_Button.Get_Uri.
By default, GtkLinkButton calls gtk_show_uri() when the button is clicked.
This behaviour can be overridden by connecting to the Gtk.Link_Button.Gtk_Link_Button::activate-link signal and returning True from the signal handler.