#include "lyxfont.h"
#include "Painter.h"
#include "buffer.h"
-//#include "lyx_gui_misc.h"
+#include "support/LOstream.h"
+#include "lyx_gui_misc.h"
+using std::ostream;
InsetERT::InsetERT(Buffer * bf)
: InsetCollapsable(bf)
labelfont.setColor(LColor::ert);
setLabelFont(labelfont);
setAutoCollapse(false);
+ setInsetName("ERT");
}
Inset * InsetERT::Clone() const
{
InsetERT * result = new InsetERT(buffer);
+ result->init(buffer, this);
+
+ result->collapsed = collapsed;
return result;
}
-void InsetERT::Write(ostream & os) const
+char const * InsetERT::EditMessage() const
{
- os << "ERT\n";
- WriteParagraphData(os);
+ return _("Opened ERT Inset");
}
+
bool InsetERT::InsertInset(BufferView *, Inset *)
{
return false;
_("Not permitted to change font-types inside ERT-insets!"),
_("Sorry."));
}
+
+void InsetERT::Edit(BufferView * bv, int x, int y, unsigned int button)
+{
+ InsetCollapsable::Edit(bv, x, y, button);
+ LyXFont font(LyXFont::ALL_SANE);
+ font.setLatex (LyXFont::ON);
+ current_font = real_current_font = font;
+}