]> git.lyx.org Git - lyx.git/blob - src/insets/insetnote.C
4463747b7d2814dcdd9768a2203311f5f2dbce0f
[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.setColor(LColor::note);
34         setLabelFont(font);
35         setAutoCollapse(true);
36
37         setLabel(_("note"));
38         setInsetName("Note");
39 }
40
41
42 Inset * InsetNote::clone(Buffer const &, bool same_id) const
43 {
44         InsetNote * result = new InsetNote;
45         result->inset.init(&inset, same_id);
46
47         result->collapsed_ = collapsed_;
48         if (same_id)
49                 result->id_ = id_;
50         return result;
51 }
52
53
54 string const InsetNote::editMessage() const 
55 {
56         return _("Opened Note Inset");
57 }
58
59
60 void InsetNote::write(Buffer const *buf, ostream & os) const
61 {
62         os << getInsetName() << "\n";
63         InsetCollapsable::write(buf, os);
64 }