1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1998 The LyX Team.
8 * ======================================================
14 #pragma implementation
17 #include "insetmarginal.h"
20 #include "BufferView.h"
22 #include "insets/insettext.h"
23 #include "support/LOstream.h"
27 InsetMarginal::InsetMarginal()
30 setLabel(_("margin"));
31 setInsetName("Marginal");
35 Inset * InsetMarginal::clone(Buffer const &) const
37 InsetMarginal * result = new InsetMarginal;
38 result->inset.init(&inset);
40 result->collapsed = collapsed;
45 string const InsetMarginal::editMessage() const
47 return _("Opened Marginal Note Inset");
51 int InsetMarginal::latex(Buffer const * buf,
52 std::ostream & os, bool fragile, bool fp) const
54 os << "%\n\\marginpar{";
56 int const i = inset.latex(buf, os, fragile, fp);
63 bool InsetMarginal::insertInsetAllowed(Inset * in) const
65 if ((in->lyxCode() == Inset::FOOT_CODE) ||
66 (in->lyxCode() == Inset::MARGIN_CODE)) {