]> git.lyx.org Git - features.git/blob - src/mathed/support.h
write \mathrm{x}\mathrm{y} as \mathrm{xy} again
[features.git] / src / mathed / support.h
1 // -*- C++ -*-
2
3 #ifndef MATH_SUPPORT_H
4 #define MATH_SUPPORT_H
5
6 #include "math_defs.h"
7 #include "LString.h"
8
9 class Painter;
10 class latexkeys;
11 class MathMetricsInfo;
12
13 extern char const * latex_mathspace[];
14
15 int mathed_char_height(MathTextCodes type, MathMetricsInfo const & size,
16         unsigned char c, int & asc, int & des);
17 void mathed_char_dim(MathTextCodes type, MathMetricsInfo const & size,
18         unsigned char c, int & asc, int & des, int & wid);
19 int mathed_char_width(MathTextCodes type, MathMetricsInfo const & size,
20         unsigned char c);
21 int mathed_char_ascent(MathTextCodes type, MathMetricsInfo const & size,
22         unsigned char c);
23 int mathed_char_descent(MathTextCodes type, MathMetricsInfo const & size,
24         unsigned char c);
25
26 void mathed_draw_deco(Painter & pain, int x, int y, int w, int h,
27         string const & name);
28
29 void mathed_string_dim(MathTextCodes type, MathMetricsInfo const & size,
30         string const & s, int & asc, int & des, int & wid);
31 int mathed_string_height(MathTextCodes type, MathMetricsInfo const & size,
32         string const & s, int & asc, int & des);
33
34 int mathed_string_width(MathTextCodes type, MathMetricsInfo const & size,
35         string const & s);
36 int mathed_string_ascent(MathTextCodes type, MathMetricsInfo const & size,
37         string const & s);
38 int mathed_string_descent(MathTextCodes type, MathMetricsInfo const & size,
39         string const & s);
40
41 void drawStr(Painter & pain, MathTextCodes type, MathMetricsInfo const & siz,
42         int x, int y, string const & s);
43 void drawChar(Painter & pain, MathTextCodes type, MathMetricsInfo const & siz,
44         int x, int y, char c);
45
46 void math_font_max_dim(MathTextCodes code, MathMetricsInfo const & siz,
47         int & asc, int & desc);
48
49 bool math_font_available(MathTextCodes code);
50
51 // decrease math size for super- and subscripts
52 void smallerStyleScript(MathMetricsInfo &);
53
54 // decrease math size for fractions
55 void smallerStyleFrac(MathMetricsInfo & st);
56
57 char const * math_font_name(MathTextCodes type);
58
59
60 #endif