8 #include "BufferView.h"
9 #include "LaTeXFeatures.h"
12 #include "frontends/Dialogs.h"
18 InsetUrl::InsetUrl(InsetCommandParams const & p, bool)
23 void InsetUrl::edit(BufferView * bv, int, int, unsigned int)
25 bv->owner()->getDialogs()->showUrl( this );
29 void InsetUrl::edit(BufferView * bv, bool)
35 string const InsetUrl::getScreenLabel(Buffer const *) const
38 if (getCmdName() == "url" )
41 temp = _("HtmlUrl: ");
43 if (!getOptions().empty())
46 temp += getContents();
52 int InsetUrl::latex(Buffer const *, ostream & os,
53 bool fragile, bool /*free_spc*/) const
55 if (!getOptions().empty())
56 os << getOptions() + ' ';
59 os << "\\url{" << getContents() << '}';
64 int InsetUrl::ascii(Buffer const *, ostream & os, int) const
66 if (getOptions().empty())
67 os << "[" << getContents() << "]";
69 os << "[" << getContents() << "||" << getOptions() << "]";
74 int InsetUrl::linuxdoc(Buffer const *, ostream & os) const
76 os << "<" << getCmdName()
77 << " url=\"" << getContents() << "\""
78 << " name=\"" << getOptions() << "\">";
84 int InsetUrl::DocBook(Buffer const *, ostream & os) const
86 os << "<ulink url=\"" << getContents() << "\">"
87 << getOptions() << "</ulink>";
92 void InsetUrl::validate(LaTeXFeatures & features) const