]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettoc.C
The markDirty() and fitCursor() changes
[lyx.git] / src / insets / insettoc.C
index af6fb2d0ab43b97bd960502ab816c21fea9b7899..8b7816766f6ed10a2efd5209fd4aea00b9f1cf0c 100644 (file)
@@ -1,8 +1,14 @@
+/**
+ * \file insettoc.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 "gettext.h"
 #include "insettoc.h"
@@ -16,6 +22,18 @@ using std::vector;
 using std::ostream;
 
 
+InsetTOC::InsetTOC(InsetCommandParams const & p, bool same_id)
+       : InsetCommand(p, same_id)
+{}
+
+
+InsetTOC::~InsetTOC()
+{
+       InsetCommandMailer mailer("toc", *this);
+       mailer.hideDialog();
+}
+
+
 string const InsetTOC::getScreenLabel(Buffer const *) const
 {
        string const cmdname(getCmdName());
@@ -37,7 +55,8 @@ Inset::Code InsetTOC::lyxCode() const
 
 void InsetTOC::edit(BufferView * bv, int, int, mouse_button::state)
 {
-       bv->owner()->getDialogs().showTOC(this);
+       InsetCommandMailer mailer("toc", *this);
+       mailer.showDialog(bv);
 }