8 #include "BufferView.h"
9 #include "LaTeXFeatures.h"
12 #include "frontends/Dialogs.h"
17 InsetUrl::InsetUrl(InsetCommandParams const & p)
22 void InsetUrl::Edit(BufferView * bv, int, int, unsigned int)
24 bv->owner()->getDialogs()->showUrl( this );
28 string const InsetUrl::getScreenLabel() const
31 if( getCmdName() == "url" )
34 temp = _("HtmlUrl: ");
36 if(!getOptions().empty())
39 temp += getContents();
45 int InsetUrl::Latex(Buffer const *, ostream & os,
46 bool fragile, bool /*free_spc*/) const
48 if (!getOptions().empty())
49 os << getOptions() + ' ';
52 os << "\\url{" << getContents() << '}';
57 int InsetUrl::Ascii(Buffer const *, ostream & os, int) const
59 if (getOptions().empty())
60 os << "[" << getContents() << "]";
62 os << "[" << getContents() << "||" << getOptions() << "]";
67 int InsetUrl::Linuxdoc(Buffer const *, ostream & os) const
69 os << "<" << getCmdName()
70 << " url=\"" << getContents() << "\""
71 << " name=\"" << getOptions() << "\">";
77 int InsetUrl::DocBook(Buffer const *, ostream & os) const
79 os << "<ulink url=\"" << getContents() << "\">"
80 << getOptions() << "</ulink>";
85 void InsetUrl::Validate(LaTeXFeatures & features) const