]> 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 97cd20f4896ef0542ab0c6721b8063a47f1adf0c..b1a879cfaa531a2959cc8b80029722a9af58f07a 100644 (file)
@@ -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,31 +104,18 @@ void InsetError::Read(LyXLex &)
 }
 
 
-int InsetError::Latex(ostream &, signed char /*fragile*/, bool /*fs*/) const
-{
-       return 0;
-}
-
-
-#ifndef USE_OSTREAM_ONLY
-int InsetError::Latex(string &, signed char /*fragile*/, bool /*fs*/) const
-{
-       return 0;
-}
-
-
-int InsetError::Linuxdoc(string &) const
+int InsetError::Latex(ostream &,
+                     bool /*fragile*/, bool /*fs*/) const
 {
        return 0;
 }
 
 
-int InsetError::DocBook(string &) const
+int InsetError::Ascii(ostream &) const
 {
        return 0;
 }
 
-#else
 
 int InsetError::Linuxdoc(ostream &) const
 {
@@ -137,7 +127,6 @@ int InsetError::DocBook(ostream &) const
 {
        return 0;
 }
-#endif
 
 
 bool InsetError::AutoDelete() const
@@ -170,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;