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"
30 InsetMarginal::InsetMarginal()
33 setLabel(_("margin"));
34 setInsetName("Marginal");
38 Inset * InsetMarginal::Clone() const
40 InsetMarginal * result = new InsetMarginal;
41 result->inset->init(inset);
43 result->collapsed = collapsed;
48 string const InsetMarginal::EditMessage() const
50 return _("Opened Marginal Note Inset");
54 int InsetMarginal::Latex(Buffer const * buf,
55 ostream & os, bool fragile, bool fp) const
57 os << "\\marginpar{%\n";
59 int i = inset->Latex(buf, os, fragile, fp);
66 bool InsetMarginal::InsertInsetAllowed(Inset * in) const
68 if ((in->LyxCode() == Inset::FOOT_CODE) ||
69 (in->LyxCode() == Inset::MARGIN_CODE)) {