Synopsis
#include <gtk/gtk.h>
GtkLinkButton;
GtkWidget* gtk_link_button_new (const gchar *uri);
GtkWidget* gtk_link_button_new_with_label (const gchar *uri,
const gchar *label);
const gchar* gtk_link_button_get_uri (GtkLinkButton *link_button);
void gtk_link_button_set_uri (GtkLinkButton *link_button,
const gchar *uri);
void (*GtkLinkButtonUriFunc) (GtkLinkButton *button,
const gchar *link_,
gpointer user_data);
GtkLinkButtonUriFunc gtk_link_button_set_uri_hook (GtkLinkButtonUriFunc func,
gpointer data,
GDestroyNotify destroy);
gboolean gtk_link_button_get_visited (GtkLinkButton *link_button);
void gtk_link_button_set_visited (GtkLinkButton *link_button,
gboolean visited);
Object Hierarchy
GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----GtkContainer
+----GtkBin
+----GtkButton
+----GtkLinkButton
DescriptionA GtkLinkButton is a GtkButton 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
The URI bound to a GtkLinkButton can be set specifically using
GtkLinkButton offers a global hook, which is called when the used clicks
on it: see GtkLinkButton was added in GTK+ 2.10. DetailsGtkLinkButtontypedef struct _GtkLinkButton GtkLinkButton; The GtkLinkButton struct contains private data only, and should be manipulated using the functions below. gtk_link_button_new ()GtkWidget* gtk_link_button_new (const gchar *uri); Creates a new GtkLinkButton with the URI as its text.
Since 2.10 gtk_link_button_new_with_label ()GtkWidget* gtk_link_button_new_with_label (const gchar *uri, const gchar *label); Creates a new GtkLinkButton containing a label.
Since 2.10 gtk_link_button_get_uri ()const gchar* gtk_link_button_get_uri (GtkLinkButton *link_button);
Retrieves the URI set using
Since 2.10 gtk_link_button_set_uri ()void gtk_link_button_set_uri (GtkLinkButton *link_button, const gchar *uri);
Sets
Since 2.10 GtkLinkButtonUriFunc ()void (*GtkLinkButtonUriFunc) (GtkLinkButton *button, const gchar *link_, gpointer user_data); The type of a function which is called when the GtkLinkButton is clicked.
gtk_link_button_set_uri_hook ()GtkLinkButtonUriFunc gtk_link_button_set_uri_hook (GtkLinkButtonUriFunc func, gpointer data, GDestroyNotify destroy);
Sets
Since 2.10 gtk_link_button_get_visited ()gboolean gtk_link_button_get_visited (GtkLinkButton *link_button); Retrieves the 'visited' state of the URI where the GtkLinkButton 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
Since 2.14 gtk_link_button_set_visited ()void gtk_link_button_set_visited (GtkLinkButton *link_button, gboolean visited);
Sets the 'visited' state of the URI where the GtkLinkButton
points. See
Since 2.14 | ||||||||||||||||||||||||||||||||||||||||||||||||||