]> git.lyx.org Git - lyx.git/blob - src/insets/insetert.C
two missing files
[lyx.git] / src / insets / insetert.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 #include <config.h>
11
12 #ifdef __GNUG__
13 #pragma implementation
14 #endif
15
16 #include "insetert.h"
17 #include "gettext.h"
18 #include "lyxfont.h"
19 #include "Painter.h"
20 #include "buffer.h"
21 //#include "lyx_gui_misc.h"
22
23
24 InsetERT::InsetERT(Buffer * bf)
25         : InsetCollapsable(bf)
26 {
27     setLabel(_("ERT"));
28     LyXFont font(LyXFont::ALL_SANE);
29     font.setLatex (LyXFont::ON);
30     real_current_font = current_font = font;
31     LyXFont labelfont(LyXFont::ALL_SANE);
32     labelfont.decSize();
33     labelfont.decSize();
34     labelfont.setColor(LColor::ert);
35     setLabelFont(labelfont);
36     setAutoCollapse(false);
37 }
38
39
40 Inset * InsetERT::Clone() const
41 {
42     InsetERT * result = new InsetERT(buffer);
43     return result;
44 }
45
46
47 void InsetERT::Write(ostream & os) const
48 {
49     os << "ERT\n";
50     WriteParagraphData(os);
51 }
52
53 bool InsetERT::InsertInset(BufferView *, Inset *)
54 {
55     return false;
56 }
57
58
59 void InsetERT::SetFont(BufferView *, LyXFont const &, bool)
60 {
61     WriteAlert(_("Impossible Operation!"),
62                _("Not permitted to change font-types inside ERT-insets!"),
63                _("Sorry."));
64 }