Add link support to GtkLabel
This patch is based on SexyUrlLabel, but with significantly enhanced functionality: keynav, tooltips, context menu, theming.
This commit is contained in:
@ -162,6 +162,24 @@ aligns in its available space, see gtk_misc_set_alignment().
|
||||
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title>Links</title>
|
||||
|
||||
<para>
|
||||
Since 2.18, GTK+ supports markup for clickable hyperlinks in addition
|
||||
to regular Pango markup. The markup for links is borrowed from HTML, using the
|
||||
<tag>a</tag> with href and title attributes. GTK+ renders links similar to the
|
||||
way they appear in web browsers, with colored, underlined text. The title
|
||||
attribute is displayed as a tooltip on the link. An example looks like this:
|
||||
<informalexample><programlisting>
|
||||
gtk_label_set_markup (label, "Go to the <a href=\"http://www.gtk.org\" title=\"&lt;i&gt;Our&/i&gt; website\">GTK+ website</a> for more...");
|
||||
</programlisting></informalexample>
|
||||
It is possible to implement custom handling for links with the
|
||||
#GtkLabel::activate-link signal and the gtk_label_get_current_uri() function.
|
||||
</para>
|
||||
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user