#include "insetindex.h"
#include "BufferView.h"
+#include "funcrequest.h"
#include "frontends/LyXView.h"
#include "frontends/Dialogs.h"
#include "LaTeXFeatures.h"
using std::ostream;
-InsetIndex::InsetIndex(InsetCommandParams const & p, bool)
+InsetIndex::InsetIndex(InsetCommandParams const & p)
: InsetCommand(p)
{}
+// InsetIndex::InsetIndex(InsetCommandParams const & p, bool)
+// : InsetCommand(p, false)
+// {}
+
+
InsetIndex::~InsetIndex()
{
InsetCommandMailer mailer("index", *this);
}
-void InsetIndex::edit(BufferView *, int, int, mouse_button::state)
-{
- InsetCommandMailer mailer("index", *this);
- mailer.showDialog();
-}
-
-
-void InsetIndex::edit(BufferView * bv, bool)
+dispatch_result InsetIndex::localDispatch(FuncRequest const & cmd)
{
- edit(bv, 0, 0, mouse_button::none);
+ switch (cmd.action) {
+ case LFUN_INSET_EDIT:
+ InsetCommandMailer("index", *this).showDialog(cmd.view());
+ return DISPATCHED;
+
+ default:
+ return InsetCommand::localDispatch(cmd);
+ }
}
}
-Inset::Code InsetIndex::lyxCode() const
+InsetOld::Code InsetIndex::lyxCode() const
{
- return Inset::INDEX_CODE;
+ return InsetOld::INDEX_CODE;
}
-InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p, bool)
+
+InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p)
: InsetCommand(p)
{}
+// InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p, bool)
+// : InsetCommand(p, false)
+// {}
+
+
+InsetPrintIndex::~InsetPrintIndex()
+{}
+
+
string const InsetPrintIndex::getScreenLabel(Buffer const *) const
{
return _("Index");
}
-Inset::Code InsetPrintIndex::lyxCode() const
+InsetOld::Code InsetPrintIndex::lyxCode() const
{
- return Inset::INDEX_PRINT_CODE;
+ return InsetOld::INDEX_PRINT_CODE;
}