]> git.lyx.org Git - lyx.git/blobdiff - src/metricsinfo.h
Point fix, earlier forgotten
[lyx.git] / src / metricsinfo.h
index c1acab6a67c0a2be5c908dcb06fee04695a04d9c..4881cf8ad6de4df6c5419d81bee6c74ec9d13fc1 100644 (file)
@@ -1,11 +1,22 @@
+// -*- C++ -*-
+/**
+ * \file metricsinfo.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
 #ifndef METRICSINFO_H
 #define METRICSINFO_H
 
-
 #include "lyxfont.h"
 #include "LString.h"
 
 class Painter;
+class BufferView;
 
 
 /// Standard Sizes (mode styles)
@@ -27,16 +38,18 @@ enum Styles {
 struct MetricsBase {
        ///
        MetricsBase();
-
        ///
+       MetricsBase(BufferView * bv, LyXFont const & font, int textwidth);
+
+       /// the current view
+       BufferView * bv;
+       /// current font
        LyXFont font;
-       ///
+       /// current math style (display/text/script/..)
        Styles style;
-       ///
+       /// name of current font - mathed specific
        string fontname;
-       /// if this is set...
-       bool restrictwidth;
-       /// ... this is valid
+       /// This is the width available in pixels
        int textwidth;
 };
 
@@ -48,11 +61,11 @@ struct MetricsBase {
 struct MetricsInfo {
        ///
        MetricsInfo();
+       ///
+       MetricsInfo(BufferView * bv, LyXFont const & font, int textwidth);
 
        ///
        MetricsBase base;
-       ///
-       bool fullredraw;
 };
 
 
@@ -62,7 +75,7 @@ struct MetricsInfo {
 //
 struct PainterInfo {
        ///
-       PainterInfo(Painter & pain);
+       explicit PainterInfo(BufferView * bv);
        ///
        void draw(int x, int y, char c);
 
@@ -70,6 +83,8 @@ struct PainterInfo {
        MetricsBase base;
        ///
        Painter & pain;
+       /// width of current item
+       int width;
 };