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