mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
6bba977f42
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@807 a592a061-630c-0410-9148-cb99ea01b6c8
77 lines
1.6 KiB
C
77 lines
1.6 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 "Painter.h"
|
|
#include "buffer.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);
|
|
real_current_font = current_font = font;
|
|
labelfont = LyXFont(LyXFont::ALL_SANE);
|
|
labelfont.decSize();
|
|
labelfont.decSize();
|
|
labelfont.setColor(LColor::ert);
|
|
setAutoCollapse(false);
|
|
setInsetName("ERT");
|
|
}
|
|
|
|
|
|
Inset * InsetERT::Clone() const
|
|
{
|
|
InsetERT * result = new InsetERT();
|
|
result->init(this);
|
|
|
|
result->collapsed = collapsed;
|
|
return result;
|
|
}
|
|
|
|
|
|
char const * InsetERT::EditMessage() const
|
|
{
|
|
return _("Opened ERT Inset");
|
|
}
|
|
|
|
|
|
bool InsetERT::InsertInset(BufferView *, Inset *)
|
|
{
|
|
return false;
|
|
}
|
|
|
|
|
|
void InsetERT::SetFont(BufferView *, LyXFont const &, bool)
|
|
{
|
|
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);
|
|
current_font = real_current_font = font;
|
|
}
|