8 #include "BufferView.h"
9 #include "LaTeXFeatures.h"
12 #include "frontends/Dialogs.h"
17 InsetUrl::InsetUrl(InsetCommandParams const & p)
28 char const * InsetUrl::EditMessage() const
30 return _("Opened Url");
34 void InsetUrl::Edit(BufferView * bv, int, int, unsigned int)
36 bv->owner()->getDialogs()->showUrl( this );
40 string InsetUrl::getScreenLabel() const
43 if( getCmdName() == "url" )
46 temp = _("HtmlUrl: ");
48 if(!getOptions().empty())
51 temp += getContents();
57 int InsetUrl::Latex(Buffer const *, ostream & os,
58 bool fragile, bool /*free_spc*/) const
60 if (!getOptions().empty())
61 os << getOptions() + ' ';
64 os << "\\url{" << getContents() << '}';
69 int InsetUrl::Ascii(Buffer const *, ostream & os) const
71 if (getOptions().empty())
72 os << "[" << getContents() << "]";
74 os << "[" << getContents() << "||" << getOptions() << "]";
79 int InsetUrl::Linuxdoc(Buffer const *, ostream & os) const
81 os << "<" << getCmdName()
82 << " url=\"" << getContents() << "\""
83 << " name=\"" << getOptions() << "\">";
89 int InsetUrl::DocBook(Buffer const *, ostream & os) const
91 os << "<ulink url=\"" << getContents() << "\">"
92 << getOptions() << "</ulink>";
97 void InsetUrl::Validate(LaTeXFeatures & features) const