+void InsetHyperlink::forToc(docstring & os, size_t) const
+{
+ docstring const & n = getParam("name");
+ if (!n.empty()) {
+ os += n;
+ return;
+ }
+ os += getParam("target");
+}
+
+
+docstring InsetHyperlink::toolTip(BufferView const & /*bv*/, int /*x*/, int /*y*/) const
+{
+ docstring url = getParam("target");
+ docstring type = getParam("type");
+ docstring guitype = _("www");
+ if (type == "mailto:")
+ guitype = _("email");
+ else if (type == "file:")
+ guitype = _("file");
+ return bformat(_("Hyperlink (%1$s) to %2$s"), guitype, url);
+}
+
+