]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetindex.C
Rename ascii to plaintext and LatexRunParams to OutputParams.
[lyx.git] / src / insets / insetindex.C
index b1a3a39677d57629cad50629460d9b4c5d30fd8d..7eb8cd376360a987908c9f06c18f241d2a52ef6f 100644 (file)
 
 #include "insetindex.h"
 
+#include "dispatchresult.h"
 #include "funcrequest.h"
 #include "gettext.h"
 #include "LaTeXFeatures.h"
 #include "metricsinfo.h"
 
+#include "support/std_ostream.h"
+
+using std::string;
 using std::ostream;
 
 
@@ -53,24 +57,26 @@ void InsetPrintIndex::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void InsetPrintIndex::draw(PainterInfo & pi, int x, int y) const
 {
-                   InsetCommand::draw(pi, x + center_indent_, y);
+       InsetCommand::draw(pi, x + center_indent_, y);
 }
 
 
-dispatch_result InsetIndex::localDispatch(FuncRequest const & cmd)
+DispatchResult InsetIndex::priv_dispatch(FuncRequest const & cmd,
+       idx_type & idx, pos_type & pos)
 {
        switch (cmd.action) {
-               case LFUN_INSET_EDIT:
+               case LFUN_MOUSE_RELEASE:
                        InsetCommandMailer("index", *this).showDialog(cmd.view());
-                       return DISPATCHED;
+                       return DispatchResult(true, true);
 
                default:
-                       return InsetCommand::localDispatch(cmd);
+                       return InsetCommand::priv_dispatch(cmd, idx, pos);
        }
 }
 
 
-int InsetIndex::docbook(Buffer const &, ostream & os, bool) const
+int InsetIndex::docbook(Buffer const &, ostream & os,
+                       OutputParams const &) const
 {
        os << "<indexterm><primary>" << getContents()
           << "</primary></indexterm>";