]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetindex.C
The markDirty() and fitCursor() changes
[lyx.git] / src / insets / insetindex.C
index 7c220fb782ae7d23c407295f7247187ebf396bd4..c7f4b935eb046a8007d58add7bfcbaf507b21fea 100644 (file)
@@ -1,12 +1,18 @@
+/**
+ * \file insetindex.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Lars Gullik Bjønnes
+ *
+ * Full author contact details are available in file CREDITS
+ */
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
 
 #include "insetindex.h"
 #include "BufferView.h"
-#include "LyXView.h"
+#include "frontends/LyXView.h"
 #include "frontends/Dialogs.h"
 #include "LaTeXFeatures.h"
 #include "gettext.h"
@@ -19,28 +25,37 @@ InsetIndex::InsetIndex(InsetCommandParams const & p, bool)
 {}
 
 
+InsetIndex::~InsetIndex()
+{
+       InsetCommandMailer mailer("index", *this);
+       mailer.hideDialog();
+}
+
+
 string const InsetIndex::getScreenLabel(Buffer const *) const
 {
        return _("Idx");
 }
 
 
-void InsetIndex::edit(BufferView * bv, int, int, unsigned int)
+void InsetIndex::edit(BufferView * bv, int, int, mouse_button::state)
 {
-       bv->owner()->getDialogs()->showIndex(this);
+       InsetCommandMailer mailer("index", *this);
+       mailer.showDialog(bv);
 }
 
 
 void InsetIndex::edit(BufferView * bv, bool)
 {
-       edit(bv, 0, 0, 0);
+       edit(bv, 0, 0, mouse_button::none);
 }
 
 
-int InsetIndex::docbook(Buffer const *, ostream & os) const
+int InsetIndex::docbook(Buffer const *, ostream & os, bool) const
 {
-  os << "<indexterm><primary>" << getContents() << "</primary></indexterm>";
-  return 0;
+       os << "<indexterm><primary>" << getContents()
+          << "</primary></indexterm>";
+       return 0;
 }
 
 
@@ -54,6 +69,7 @@ InsetPrintIndex::InsetPrintIndex(InsetCommandParams const & p, bool)
        : InsetCommand(p)
 {}
 
+
 string const InsetPrintIndex::getScreenLabel(Buffer const *) const
 {
        return _("Index");