]> git.lyx.org Git - lyx.git/blob - src/insets/insetfoot.C
fix compilation pb ; update eu.po
[lyx.git] / src / insets / insetfoot.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 "insetfoot.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 InsetFoot::InsetFoot()
28         : InsetFootlike()
29 {
30         setLabel(_("foot"));
31         setInsetName("Foot");
32 }
33
34
35 Inset * InsetFoot::Clone(Buffer const &) const
36 {
37         InsetFoot * result = new InsetFoot;
38         result->inset.init(&inset);
39
40         result->collapsed = collapsed;
41         return result;
42 }
43
44
45 string const InsetFoot::EditMessage() const
46 {
47         return _("Opened Footnote Inset");
48 }
49
50
51 int InsetFoot::Latex(Buffer const * buf,
52                      std::ostream & os, bool fragile, bool fp) const
53 {
54         os << "\\footnote{%\n";
55         
56         int const i = inset.Latex(buf, os, fragile, fp);
57         os << "}%\n";
58         
59         return i + 2;
60 }
61
62
63 bool InsetFoot::InsertInsetAllowed(Inset * in) const
64 {
65         if ((in->LyxCode() == Inset::FOOT_CODE) ||
66             (in->LyxCode() == Inset::MARGIN_CODE)) {
67                 return false;
68         }
69         return true;
70 }