#include "InsetMarginal.h"
#include "Buffer.h"
-#include "gettext.h"
#include "OutputParams.h"
+#include "TocBackend.h"
-#include "support/std_ostream.h"
+#include "support/gettext.h"
+
+#include <ostream>
namespace lyx {
InsetMarginal::InsetMarginal(BufferParams const & bp)
: InsetFootlike(bp)
-{
- setLayout(bp);
-}
+{}
InsetMarginal::InsetMarginal(InsetMarginal const & in)
Inset * InsetMarginal::clone() const
{
- new InsetMarginal(*this);
+ return new InsetMarginal(*this);
}
}
+void InsetMarginal::addToToc(Buffer const & buf,
+ ParConstIterator const & cpit) const
+{
+ ParConstIterator pit = cpit;
+ pit.push_back(*this);
+
+ Toc & toc = buf.tocBackend().toc("marginalnote");
+ docstring str;
+ str = getNewLabel(str);
+ toc.push_back(TocItem(pit, 0, str));
+}
+
} // namespace lyx