1 /* This file is part of
2 * ======================================================
4 * LyX, The Document Processor
6 * Copyright 1998 The LyX Team.
8 *======================================================*/
13 #pragma implementation
21 #include "support/LOstream.h"
22 #include "lyx_gui_misc.h"
26 InsetERT::InsetERT() : InsetCollapsable()
29 LyXFont font(LyXFont::ALL_SANE);
30 font.setLatex (LyXFont::ON);
31 labelfont = LyXFont(LyXFont::ALL_SANE);
34 labelfont.setColor(LColor::ert);
35 setAutoCollapse(false);
40 void InsetERT::Write(Buffer const * buf, ostream & os) const
42 os << getInsetName() << "\n";
43 InsetCollapsable::Write(buf, os);
47 Inset * InsetERT::Clone() const
49 InsetERT * result = new InsetERT();
52 result->collapsed = collapsed;
57 char const * InsetERT::EditMessage() const
59 return _("Opened ERT Inset");
63 bool InsetERT::InsertInset(BufferView *, Inset *)
69 void InsetERT::SetFont(BufferView *, LyXFont const &, bool)
71 WriteAlert(_("Impossible Operation!"),
72 _("Not permitted to change font-types inside ERT-insets!"),
76 void InsetERT::Edit(BufferView * bv, int x, int y, unsigned int button)
78 InsetCollapsable::Edit(bv, x, y, button);
79 LyXFont font(LyXFont::ALL_SANE);
80 font.setLatex (LyXFont::ON);