8 #include "BufferView.h"
9 #include "LaTeXFeatures.h"
12 #include "frontends/Dialogs.h"
18 InsetUrl::InsetUrl(InsetCommandParams const & p)
23 void InsetUrl::edit(BufferView * bv, int, int, unsigned int)
25 bv->owner()->getDialogs()->showUrl( this );
29 string const InsetUrl::getScreenLabel() const
32 if (getCmdName() == "url" )
35 temp = _("HtmlUrl: ");
37 if (!getOptions().empty())
40 temp += getContents();
46 int InsetUrl::latex(Buffer const *, ostream & os,
47 bool fragile, bool /*free_spc*/) const
49 if (!getOptions().empty())
50 os << getOptions() + ' ';
53 os << "\\url{" << getContents() << '}';
58 int InsetUrl::ascii(Buffer const *, ostream & os, int) const
60 if (getOptions().empty())
61 os << "[" << getContents() << "]";
63 os << "[" << getContents() << "||" << getOptions() << "]";
68 int InsetUrl::linuxdoc(Buffer const *, ostream & os) const
70 os << "<" << getCmdName()
71 << " url=\"" << getContents() << "\""
72 << " name=\"" << getOptions() << "\">";
78 int InsetUrl::DocBook(Buffer const *, ostream & os) const
80 os << "<ulink url=\"" << getContents() << "\">"
81 << getOptions() << "</ulink>";
86 void InsetUrl::validate(LaTeXFeatures & features) const