]> git.lyx.org Git - lyx.git/blob - src/insets/insetnote.C
f5d7fc8ca5fa5a1e5ababfdefec7c160e624902a
[lyx.git] / src / insets / insetnote.C
1 /* This file is part of
2  * ======================================================
3  * 
4  *           LyX, The Document Processor
5  *       
6  *          Copyright 1998 The LyX Team.
7  *
8  * ======================================================
9  */
10
11 #include <config.h>
12
13 #ifdef __GNUG__
14 #pragma implementation
15 #endif
16
17 #include "insetnote.h"
18 #include "gettext.h"
19 #include "lyxfont.h"
20 #include "BufferView.h"
21 #include "lyxtext.h"
22 #include "insets/insettext.h"
23 #include "support/LOstream.h"
24 #include "debug.h"
25
26 using std::ostream;
27
28 InsetNote::InsetNote()
29         : InsetCollapsable()
30 {
31         LyXFont font(LyXFont::ALL_SANE);
32         font.decSize();
33         font.decSize();
34         font.setColor(LColor::note);
35         setLabelFont(font);
36         setAutoCollapse(true);
37
38         setLabel(_("note"));
39         setInsetName("Note");
40 }
41
42
43 Inset * InsetNote::clone(Buffer const &, bool same_id) const
44 {
45         InsetNote * result = new InsetNote;
46         result->inset.init(&inset, same_id);
47
48         result->collapsed_ = collapsed_;
49         if (same_id)
50                 result->id_ = id_;
51         return result;
52 }
53
54
55 string const InsetNote::editMessage() const 
56 {
57         return _("Opened Note Inset");
58 }
59
60
61 void InsetNote::write(Buffer const *buf, ostream & os) const
62 {
63         //os << getInsetName() << "\n";
64         os << "Info\n";
65         InsetCollapsable::write(buf, os);
66 }
67