1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1998 The LyX Team.
8 * ======================================================
14 #pragma implementation
17 #include "insetnote.h"
21 #include "BufferView.h"
23 #include "insets/insettext.h"
24 #include "support/LOstream.h"
25 #include "support/lstrings.h"
30 void InsetNote::init()
32 LyXFont font(LyXFont::ALL_SANE);
34 font.setColor(LColor::note);
37 setAutoCollapse(false);
38 setBackgroundColor(LColor::note);
45 InsetNote::InsetNote()
52 InsetNote::InsetNote(Buffer const * buf, string const & contents,
54 : InsetCollapsable(collapsed)
58 Paragraph * par = inset.paragraph();
59 Paragraph::size_type pos = 0;
60 buf->insertStringAsLines(par, pos, LyXFont(LyXFont::ALL_INHERIT),
61 strip(contents, '\n'));
65 string const InsetNote::editMessage() const
67 return _("Opened Note Inset");
71 void InsetNote::write(Buffer const *buf, ostream & os) const
73 os << getInsetName() << "\n";
74 InsetCollapsable::write(buf, os);