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(Buffer * bf)
27 : InsetCollapsable(bf)
30 LyXFont font(LyXFont::ALL_SANE);
31 font.setLatex (LyXFont::ON);
32 real_current_font = current_font = font;
33 labelfont = LyXFont(LyXFont::ALL_SANE);
36 labelfont.setColor(LColor::ert);
37 setAutoCollapse(false);
42 Inset * InsetERT::Clone() const
44 InsetERT * result = new InsetERT(buffer);
45 result->init(buffer, this);
47 result->collapsed = collapsed;
52 char const * InsetERT::EditMessage() const
54 return _("Opened ERT Inset");
58 bool InsetERT::InsertInset(BufferView *, Inset *)
64 void InsetERT::SetFont(BufferView *, LyXFont const &, bool)
66 WriteAlert(_("Impossible Operation!"),
67 _("Not permitted to change font-types inside ERT-insets!"),
71 void InsetERT::Edit(BufferView * bv, int x, int y, unsigned int button)
73 InsetCollapsable::Edit(bv, x, y, button);
74 LyXFont font(LyXFont::ALL_SANE);
75 font.setLatex (LyXFont::ON);
76 current_font = real_current_font = font;