#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;
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>";