]> git.lyx.org Git - lyx.git/blob - src/mathed/math_metricsinfo.h
- reduce sizeof(MathCharInset) by 20 by better font caching
[lyx.git] / src / mathed / math_metricsinfo.h
1 #ifndef MATH_METRICSINFO_H
2 #define MATH_METRICSINFO_H
3
4 #include "lyxfont.h"
5
6 class BufferView;
7 class MathNestInset;
8
9
10 /// Standard Math Sizes (Math mode styles)
11 enum MathStyles {
12         ///
13         LM_ST_DISPLAY = 0,
14         ///
15         LM_ST_TEXT,
16         ///
17         LM_ST_SCRIPT,
18         ///
19         LM_ST_SCRIPTSCRIPT
20 };
21
22
23 struct MathMetricsInfo {
24         ///
25         MathMetricsInfo()
26                 : view(0), font(), style(LM_ST_TEXT),
27                   inset(0), idx(0),
28                   fullredraw(false)
29         {}
30         ///
31         MathMetricsInfo(BufferView * v, LyXFont const & f, MathStyles s)
32                 : view(v), font(f), style(s),
33                   inset(0), idx(0),
34                   fullredraw(false)
35         {}
36
37         ///
38         BufferView * view;
39         ///
40         LyXFont font;
41         ///
42         MathStyles style;
43         /// used to pass some info down
44         MathNestInset const * inset;
45         ///
46         int idx;
47         ///
48         bool fullredraw;
49 };
50
51
52 struct TextMetricsInfo {
53         ///
54         TextMetricsInfo()
55                 {}
56         /// used to pass some info down
57         MathNestInset const * inset;
58         ///
59         int idx;
60 };
61
62 #endif