]> git.lyx.org Git - lyx.git/blob - src/mathed/math_support.h
enable direct input of #1...#9; some whitespace changes
[lyx.git] / src / mathed / math_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 class MathInset;
13
14 extern char const * latex_mathspace[];
15
16 int mathed_char_height(MathTextCodes type, MathMetricsInfo const & size,
17         unsigned char c, int & asc, int & des);
18 void mathed_char_dim(MathTextCodes type, MathMetricsInfo const & size,
19         unsigned char c, int & asc, int & des, int & wid);
20 int mathed_char_width(MathTextCodes type, MathMetricsInfo const & size,
21         unsigned char c);
22 int mathed_char_ascent(MathTextCodes type, MathMetricsInfo const & size,
23         unsigned char c);
24 int mathed_char_descent(MathTextCodes type, MathMetricsInfo const & size,
25         unsigned char c);
26
27 void mathed_draw_deco(Painter & pain, int x, int y, int w, int h,
28         string const & name);
29
30 void mathed_draw_framebox(Painter & pain, int x, int y, MathInset const *);
31
32 void mathed_string_dim(MathTextCodes type, MathMetricsInfo const & size,
33         string const & s, int & asc, int & des, int & wid);
34 int mathed_string_height(MathTextCodes type, MathMetricsInfo const & size,
35         string const & s, int & asc, int & des);
36
37 int mathed_string_width(MathTextCodes type, MathMetricsInfo const & size,
38         string const & s);
39 int mathed_string_ascent(MathTextCodes type, MathMetricsInfo const & size,
40         string const & s);
41 int mathed_string_descent(MathTextCodes type, MathMetricsInfo const & size,
42         string const & s);
43
44 void drawStr(Painter & pain, MathTextCodes type, MathMetricsInfo const & siz,
45         int x, int y, string const & s);
46 void drawChar(Painter & pain, MathTextCodes type, MathMetricsInfo const & siz,
47         int x, int y, char c);
48
49 void math_font_max_dim(MathTextCodes code, MathMetricsInfo const & siz,
50         int & asc, int & desc);
51
52 bool math_font_available(MathTextCodes code);
53
54 // decrease math size for super- and subscripts
55 void smallerStyleScript(MathMetricsInfo &);
56
57 // decrease math size for fractions
58 void smallerStyleFrac(MathMetricsInfo & st);
59
60 char const * math_font_name(MathTextCodes type);
61
62
63 #endif