1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1998 The LyX Team.
8 *======================================================*/
13 #pragma implementation
21 #include "insets/insettext.h"
22 #include "support/LOstream.h"
23 #include "lyx_gui_misc.h"
27 InsetERT::InsetERT() : InsetCollapsable()
30 LyXFont font(LyXFont::ALL_SANE);
31 font.setLatex (LyXFont::ON);
32 labelfont = LyXFont(LyXFont::ALL_SANE);
35 labelfont.setColor(LColor::ert);
36 setAutoCollapse(false);
41 void InsetERT::Write(Buffer const * buf, ostream & os) const
43 os << getInsetName() << "\n";
44 InsetCollapsable::Write(buf, os);
48 Inset * InsetERT::Clone() const
50 InsetERT * result = new InsetERT;
51 result->inset->init(inset);
53 result->collapsed = collapsed;
58 char const * InsetERT::EditMessage() const
60 return _("Opened ERT Inset");
64 bool InsetERT::InsertInset(BufferView *, Inset *)
70 void InsetERT::SetFont(BufferView *, LyXFont const &, bool)
72 WriteAlert(_("Impossible Operation!"),
73 _("Not permitted to change font-types inside ERT-insets!"),
77 void InsetERT::Edit(BufferView * bv, int x, int y, unsigned int button)
79 InsetCollapsable::Edit(bv, x, y, button);
80 LyXFont font(LyXFont::ALL_SANE);
81 font.setLatex (LyXFont::ON);