X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finseterror.C;h=b1a879cfaa531a2959cc8b80029722a9af58f07a;hb=3c8aba3b556871fb1100a2f98cd93d5d4e3f70c9;hp=2b34768f0a7f42ccc439a7bb7df1f83feacb4ed8;hpb=fa492d6bf09db7f1c278687e0000ad1c4833af3d;p=lyx.git diff --git a/src/insets/inseterror.C b/src/insets/inseterror.C index 2b34768f0a..b1a879cfaa 100644 --- a/src/insets/inseterror.C +++ b/src/insets/inseterror.C @@ -4,7 +4,7 @@ * LyX, The Document Processor * * Copyright 1995 Matthias Ettrich - * Copyright 1995-1999 The LyX Team. + * Copyright 1995-2000 The LyX Team. * * ====================================================== */ @@ -18,6 +18,9 @@ #include "gettext.h" #include "lyx_gui_misc.h" // CancelCloseBoxCB #include "Painter.h" +#include "font.h" + +using std::ostream; /* Error, used for the LaTeX-Error Messages */ @@ -48,7 +51,7 @@ int InsetError::ascent(Painter &, LyXFont const & font) const { LyXFont efont; efont.setSize(font.size()).decSize(); - return efont.maxAscent() + 1; + return lyxfont::maxAscent(efont) + 1; } @@ -56,7 +59,7 @@ int InsetError::descent(Painter &, LyXFont const & font) const { LyXFont efont; efont.setSize(font.size()).decSize(); - return efont.maxDescent() + 1; + return lyxfont::maxDescent(efont) + 1; } @@ -64,7 +67,7 @@ int InsetError::width(Painter &, LyXFont const & font) const { LyXFont efont; efont.setSize(font.size()).decSize(); - return 6 + efont.textWidth(_("Error"), strlen(_("Error"))); + return 6 + lyxfont::width(_("Error"), efont); } @@ -101,7 +104,14 @@ void InsetError::Read(LyXLex &) } -int InsetError::Latex(ostream &, signed char /*fragile*/, bool /*fs*/) const +int InsetError::Latex(ostream &, + bool /*fragile*/, bool /*fs*/) const +{ + return 0; +} + + +int InsetError::Ascii(ostream &) const { return 0; } @@ -149,6 +159,12 @@ extern "C" void C_InsetError_CloseErrorCB(FL_OBJECT * ob, long data) } +char const * InsetError::EditMessage() const +{ + return _("Opened error"); +} + + void InsetError::Edit(BufferView *, int, int, unsigned int) { static int ow = 400, oh = 240;