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