]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetcaption.C
move inset related stuff from src/graphics to src/inset/
[lyx.git] / src / insets / insetcaption.C
index f1ba9df2deaec60738e83e180d931f365bd05bc7..f0417a212e650ed2e65f190cc3a577db8b199e4e 100644 (file)
@@ -1,8 +1,8 @@
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
- *      
+ *
  *          Copyright 2000-2001 The LyX Team.
  *
  * ======================================================
@@ -15,8 +15,8 @@
 #endif
 
 #include "insetcaption.h"
-#include "Painter.h"
-#include "font.h"
+#include "frontends/Painter.h"
+#include "frontends/font_metrics.h"
 #include "BufferView.h"
 #include "FloatList.h"
 #include "insets/insetfloat.h"
@@ -27,8 +27,8 @@
 using std::ostream;
 using std::endl;
 
-InsetCaption::InsetCaption()
-       : InsetText()
+InsetCaption::InsetCaption(BufferParams const & bp)
+       : InsetText(bp)
 {
        setAutoBreakRows(true);
        setDrawFrame(0, InsetText::LOCKED);
@@ -59,7 +59,7 @@ void InsetCaption::read(Buffer const * buf, LyXLex & lex)
 }
 
 
-string const InsetCaption::editMessage() const 
+string const InsetCaption::editMessage() const
 {
        return _("Opened Caption Inset");
 }
@@ -87,9 +87,9 @@ void InsetCaption::draw(BufferView * bv, LyXFont const & f,
 
        // Generate the label
        string const label = _(fl) + " " + num + ":";
-       
+
        Painter & pain = bv->painter();
-       int const w = lyxfont::width(label, f);
+       int const w = font_metrics::width(label, f);
        pain.text(int(x), baseline, label, f);
        x += w;