]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inseterror.C
move inset related stuff from src/graphics to src/inset/
[lyx.git] / src / insets / inseterror.C
index 20810a11ae8b1cbc370173847bcb120c9a6d9477..dd1a12acd632aef5ae99f405465fd88ae78d2c9a 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
- *      
+ *
  *         Copyright 1995 Matthias Ettrich
  *          Copyright 1995-2001 The LyX Team.
  *
 #endif
 
 #include "BufferView.h"
-#include "font.h"
+#include "frontends/font_metrics.h"
+#include "lyxfont.h"
 #include "gettext.h"
 #include "inseterror.h"
-#include "LyXView.h"
-#include "Painter.h"
+#include "frontends/LyXView.h"
+#include "frontends/Painter.h"
 #include "frontends/Dialogs.h"
 
 using std::ostream;
@@ -35,7 +36,7 @@ int InsetError::ascent(BufferView *, LyXFont const & font) const
 {
        LyXFont efont;
        efont.setSize(font.size()).decSize();
-       return lyxfont::maxAscent(efont) + 1;
+       return font_metrics::maxAscent(efont) + 1;
 }
 
 
@@ -43,7 +44,7 @@ int InsetError::descent(BufferView *, LyXFont const & font) const
 {
        LyXFont efont;
        efont.setSize(font.size()).decSize();
-       return lyxfont::maxDescent(efont) + 1;
+       return font_metrics::maxDescent(efont) + 1;
 }
 
 
@@ -51,7 +52,7 @@ int InsetError::width(BufferView *, LyXFont const & font) const
 {
        LyXFont efont;
        efont.setSize(font.size()).decSize();
-       return 6 + lyxfont::width(_("Error"), efont);
+       return 6 + font_metrics::width(_("Error"), efont);
 }
 
 
@@ -62,7 +63,7 @@ void InsetError::draw(BufferView * bv, LyXFont const & font,
        LyXFont efont;
        efont.setSize(font.size()).decSize();
        efont.setColor(LColor::error);
-   
+
        // Draw as "Error" in a framed box
        x += 1;
        pain.fillRectangle(int(x), baseline - ascent(bv, font) + 1,
@@ -79,19 +80,19 @@ void InsetError::draw(BufferView * bv, LyXFont const & font,
 }
 
 
-string const InsetError::editMessage() const 
+string const InsetError::editMessage() const
 {
        return _("Opened error");
 }
 
 
-void InsetError::edit(BufferView * bv, int, int, unsigned int)
+void InsetError::edit(BufferView * bv, int, int, mouse_button::state)
 {
-       bv->owner()->getDialogs()->showError( this );
+       bv->owner()->getDialogs()->showError(this);
 }
 
 
 void InsetError::edit(BufferView * bv, bool)
 {
-       edit(bv, 0, 0, 0);
+       edit(bv, 0, 0, mouse_button::none);
 }