lyx_mirror/src/insets/insetert.C
Jürgen Vigna 4bcf99c809 Various fixes to Tabular, InsetTabular and InsetText. Fixed left border for
multicolumn cells, fixed repaint and recalc issues of insets, fixed scrolling
of large tabulars, ADDED settings of fonts on selections, more minor stuff
I cannot remember right now, more to follow.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2027 a592a061-630c-0410-9148-cb99ea01b6c8
2001-05-28 15:11:24 +00:00

80 lines
1.7 KiB
C

/* This file is part of
* ======================================================
*
* LyX, The Document Processor
*
* Copyright 1998 The LyX Team.
*
*======================================================*/
#include <config.h>
#ifdef __GNUG__
#pragma implementation
#endif
#include "insetert.h"
#include "gettext.h"
#include "lyxfont.h"
#include "buffer.h"
#include "insets/insettext.h"
#include "support/LOstream.h"
#include "lyx_gui_misc.h"
using std::ostream;
InsetERT::InsetERT() : InsetCollapsable()
{
setLabel(_("ERT"));
LyXFont font(LyXFont::ALL_SANE);
font.setLatex (LyXFont::ON);
labelfont = LyXFont(LyXFont::ALL_SANE);
labelfont.decSize();
labelfont.decSize();
labelfont.setColor(LColor::ert);
setAutoCollapse(false);
setInsetName("ERT");
}
void InsetERT::Write(Buffer const * buf, ostream & os) const
{
os << getInsetName() << "\n";
InsetCollapsable::Write(buf, os);
}
Inset * InsetERT::Clone(Buffer const &) const
{
InsetERT * result = new InsetERT;
result->inset.init(&inset);
result->collapsed = collapsed;
return result;
}
string const InsetERT::EditMessage() const
{
return _("Opened ERT Inset");
}
void InsetERT::SetFont(BufferView *, LyXFont const &, bool, bool selectall)
{
// if selectall is activated then the fontchange was an outside general
// fontchange and this messages is not needed
if (!selectall)
WriteAlert(_("Impossible Operation!"),
_("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);
}