]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_metricsinfo.h
- reduce sizeof(MathCharInset) by 20 by better font caching
[lyx.git] / src / mathed / math_metricsinfo.h
index ee67ca71865afda15ad58b0f98abf4434e26fd02..26b542405b5f8bf51e5d16548fe696782330eb05 100644 (file)
@@ -1,9 +1,10 @@
-#ifndef MATH_METRICSINFO
-#define MATH_METRICSINFO
+#ifndef MATH_METRICSINFO_H
+#define MATH_METRICSINFO_H
 
 #include "lyxfont.h"
 
 class BufferView;
+class MathNestInset;
 
 
 /// Standard Math Sizes (Math mode styles)
@@ -22,11 +23,15 @@ enum MathStyles {
 struct MathMetricsInfo {
        ///
        MathMetricsInfo()
-               : view(0), font(), style(LM_ST_TEXT)
+               : view(0), font(), style(LM_ST_TEXT),
+                 inset(0), idx(0),
+                 fullredraw(false)
        {}
        ///
        MathMetricsInfo(BufferView * v, LyXFont const & f, MathStyles s)
-               : view(v), font(f), style(s)
+               : view(v), font(f), style(s),
+                 inset(0), idx(0),
+                 fullredraw(false)
        {}
 
        ///
@@ -35,6 +40,23 @@ struct MathMetricsInfo {
        LyXFont font;
        ///
        MathStyles style;
+       /// used to pass some info down
+       MathNestInset const * inset;
+       ///
+       int idx;
+       ///
+       bool fullredraw;
+};
+
+
+struct TextMetricsInfo {
+       ///
+       TextMetricsInfo()
+               {}
+       /// used to pass some info down
+       MathNestInset const * inset;
+       ///
+       int idx;
 };
 
 #endif