]> git.lyx.org Git - lyx.git/blob - src/mathed/support.h
move more stuff to math_hash
[lyx.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
11 extern char const * math_font_name[];
12 extern char const * latex_mathspace[];
13
14 int mathed_char_height(MathTextCodes type, MathStyles size, unsigned char c,
15         int & asc, int & des);
16 void mathed_char_dim(MathTextCodes type, MathStyles size, unsigned char c,
17         int & asc, int & des, int & wid);
18 int mathed_char_width(MathTextCodes type, MathStyles size, unsigned char c);
19 int mathed_char_ascent(MathTextCodes type, MathStyles size, unsigned char c);
20 int mathed_char_descent(MathTextCodes type, MathStyles size, unsigned char c);
21
22 void mathed_draw_deco(Painter & pain, int x, int y, int w, int h, int code);
23
24 void mathed_string_dim(MathTextCodes type, MathStyles size, string const & s,
25   int & asc, int & des, int & wid);
26 int mathed_string_height(MathTextCodes type, MathStyles size, string const & s,
27   int & asc, int & des);
28
29 int mathed_string_width(MathTextCodes type, MathStyles size, string const & s);
30 int mathed_string_ascent(MathTextCodes type, MathStyles size, string const & s);
31 int mathed_string_descent(MathTextCodes type, MathStyles size, string const & s);
32
33 bool MathIsAlphaFont(MathTextCodes x);
34 bool MathIsSymbol(MathTextCodes x);
35
36 void drawStr(Painter & pain, MathTextCodes type, MathStyles siz,
37         int x, int y, string const & s);
38 void drawChar(Painter & pain, MathTextCodes type, MathStyles siz,
39         int x, int y, char c);
40
41 void math_font_max_dim
42         (MathTextCodes code, MathStyles siz, int & asc, int & desc);
43
44 #endif