]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inseturl.C
The speed patch: redraw only rows that have changed
[lyx.git] / src / insets / inseturl.C
index fa918fa99d3f7109c7c6f1a9ef63c7e06c5f1a6b..4802f14eedd1f979fe2031c3df6ad4663f6603f9 100644 (file)
@@ -14,9 +14,9 @@
 
 #include "dispatchresult.h"
 #include "funcrequest.h"
-#include "latexrunparams.h"
 #include "LaTeXFeatures.h"
 #include "gettext.h"
+#include "outputparams.h"
 
 #include "support/lstrings.h"
 
@@ -29,35 +29,10 @@ using std::ostream;
 
 
 InsetUrl::InsetUrl(InsetCommandParams const & p)
-               : InsetCommand(p)
+       : InsetCommand(p, "url")
 {}
 
 
-// InsetUrl::InsetUrl(InsetCommandParams const & p, bool)
-//             : InsetCommand(p, false)
-// {}
-
-
-InsetUrl::~InsetUrl()
-{
-       InsetCommandMailer("url", *this).hideDialog();
-}
-
-
-DispatchResult
-InsetUrl::priv_dispatch(FuncRequest const & cmd,
-                       idx_type & idx, pos_type & pos)
-{
-       switch (cmd.action) {
-               case LFUN_INSET_EDIT:
-                       InsetCommandMailer("url", *this).showDialog(cmd.view());
-                       return DISPATCHED;
-               default:
-                       return InsetCommand::priv_dispatch(cmd, idx, pos);
-       }
-}
-
-
 string const InsetUrl::getScreenLabel(Buffer const &) const
 {
        string temp;
@@ -83,7 +58,7 @@ string const InsetUrl::getScreenLabel(Buffer const &) const
 
 
 int InsetUrl::latex(Buffer const &, ostream & os,
-                   LatexRunParams const & runparams) const
+                   OutputParams const & runparams) const
 {
        if (!getOptions().empty())
                os << getOptions() + ' ';
@@ -94,7 +69,8 @@ int InsetUrl::latex(Buffer const &, ostream & os,
 }
 
 
-int InsetUrl::ascii(Buffer const &, ostream & os, int) const
+int InsetUrl::plaintext(Buffer const &, ostream & os,
+                   OutputParams const &) const
 {
        if (getOptions().empty())
                os << '[' << getContents() << ']';
@@ -104,7 +80,8 @@ int InsetUrl::ascii(Buffer const &, ostream & os, int) const
 }
 
 
-int InsetUrl::linuxdoc(Buffer const &, ostream & os) const
+int InsetUrl::linuxdoc(Buffer const &, ostream & os,
+                      OutputParams const &) const
 {
        os << '<' << getCmdName()
           << " url=\""  << getContents() << "\""
@@ -114,7 +91,8 @@ int InsetUrl::linuxdoc(Buffer const &, ostream & os) const
 }
 
 
-int InsetUrl::docbook(Buffer const &, ostream & os, bool) const
+int InsetUrl::docbook(Buffer const &, ostream & os,
+                     OutputParams const &) const
 {
        os << "<ulink url=\"" << subst(getContents(),"&","&amp;")
           << "\">" << getOptions() << "</ulink>";
@@ -122,6 +100,13 @@ int InsetUrl::docbook(Buffer const &, ostream & os, bool) const
 }
 
 
+int InsetUrl::textString(Buffer const & buf, ostream & os,
+                      OutputParams const & op) const
+{
+       return plaintext(buf, os, op);
+}
+
+
 void InsetUrl::validate(LaTeXFeatures & features) const
 {
        features.require("url");