SexyUrlLabel

SexyUrlLabel — A GtkLabel with support for embedded hyperlinks.

Functions

GtkWidget * sexy_url_label_new ()
void sexy_url_label_set_markup ()

Signals

void url-activated Action

Types and Values

struct SexyUrlLabel

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkObject
            ╰── GtkWidget
                ╰── GtkMisc
                    ╰── GtkLabel
                        ╰── SexyUrlLabel

Implemented Interfaces

SexyUrlLabel implements AtkImplementorIface and GtkBuildable.

Description

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.

Functions

sexy_url_label_new ()

GtkWidget *
sexy_url_label_new (void);

Creates a new SexyUrlLabel widget.

Returns

a new SexyUrlLabel.


sexy_url_label_set_markup ()

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()

Parameters

url_label

A SexyUrlLabel.

 

markup

a markup string (see Pango markup format)

 

Types and Values

struct SexyUrlLabel

struct SexyUrlLabel;

The SexyUrlLabel struct contains private data only, and should be manipulated using the functions below.

Signal Details

The “url-activated” signal

void
user_function (SexyUrlLabel *url_label,
               gchar        *url,
               gpointer      user_data)

The ::url-activated signal is emitted when a URL in the label was clicked.

Parameters

url_label

The label on which the signal was emitted.

 

url

The URL which was activated.

 

user_data

user data set when the signal handler was connected.

 

Flags: Action