![]() |
![]() |
![]() |
libsexy Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Signals |
struct SexyUrlLabel; GtkWidget * sexy_url_label_new (void
); void sexy_url_label_set_markup (SexyUrlLabel *url_label
,const gchar *markup
);
GObject +----GInitiallyUnowned +----GtkObject +----GtkWidget +----GtkMisc +----GtkLabel +----SexyUrlLabel
SexyUrlLabel is a GtkLabel with support for embedded hyperlinks. It uses a modified form of the Pango markup format that supports the <a href="...">...</a> tag. The hyperlink will appear in blue and can be activated by clicking it. Right-clicking the hyperlink displays a menu offering the ability to activate it or to copy the URL.
struct SexyUrlLabel;
The SexyUrlLabel struct contains private data only, and should be manipulated using the functions below.
GtkWidget * sexy_url_label_new (void
);
Creates a new SexyUrlLabel widget.
Returns : |
a new SexyUrlLabel. |
void sexy_url_label_set_markup (SexyUrlLabel *url_label
,const gchar *markup
);
Parses markup
which is marked up with the Pango text markup language as well as
HTML-style hyperlinks, setting the label's text and attribute list based
on the parse results. If the markup
is external data, you may need to
escape it with g_markup_escape_text()
or g_markup_printf_escaped()
|
A SexyUrlLabel. |
|
a markup string (see Pango markup format) |
"url-activated"
signalvoid user_function (SexyUrlLabel *url_label,
gchar *url,
gpointer user_data) : Action
The ::url-activated signal is emitted when a URL in the label was clicked.
|
The label on which the signal was emitted. |
|
The URL which was activated. |
|
user data set when the signal handler was connected. |