]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inseterror.C
clear()->erase() ; lots of using directives for cxx
[lyx.git] / src / insets / inseterror.C
index ff1a09a306bca063b449333c8798331c01331016..b1a879cfaa531a2959cc8b80029722a9af58f07a 100644 (file)
@@ -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);
 }
 
 
@@ -102,7 +105,13 @@ void InsetError::Read(LyXLex &)
 
 
 int InsetError::Latex(ostream &,
-                     signed char /*fragile*/, bool /*fs*/) const
+                     bool /*fragile*/, bool /*fs*/) const
+{
+       return 0;
+}
+
+
+int InsetError::Ascii(ostream &) const
 {
        return 0;
 }
@@ -150,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;