]> git.lyx.org Git - lyx.git/blob - src/insets/insetmarginal.C
two small patches
[lyx.git] / src / insets / insetmarginal.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 "insetmarginal.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
27 InsetMarginal::InsetMarginal()
28         : InsetFootlike()
29 {
30         setLabel(_("margin"));
31         setInsetName("Marginal");
32 }
33
34
35 InsetMarginal::InsetMarginal(InsetMarginal const & in, bool same_id)
36         : InsetFootlike(in, same_id)
37 {
38         setLabel(_("margin"));
39         setInsetName("Marginal");
40 }
41
42
43 Inset * InsetMarginal::clone(Buffer const &, bool same_id) const
44 {
45         return new InsetMarginal(*const_cast<InsetMarginal *>(this), same_id);
46 }
47
48
49 string const InsetMarginal::editMessage() const
50 {
51         return _("Opened Marginal Note Inset");
52 }
53
54
55 int InsetMarginal::latex(Buffer const * buf,
56                          std::ostream & os, bool fragile, bool fp) const
57 {
58         os << "%\n\\marginpar{";
59         
60         int const i = inset.latex(buf, os, fragile, fp);
61         os << "%\n}";
62         
63         return i + 2;
64 }