+/**
+ * \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"
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());
void InsetTOC::edit(BufferView * bv, int, int, mouse_button::state)
{
- bv->owner()->getDialogs().showTOC(this);
+ InsetCommandMailer mailer("toc", *this);
+ mailer.showDialog(bv);
}