#ifndef MATH_SUPPORT_H
#define MATH_SUPPORT_H
-#include "lyxfont.h"
-
-#ifndef byte
-#define byte unsigned char
-#endif
+#include "math_defs.h"
+#include "LString.h"
class Painter;
-
-struct math_deco_struct {
- int code;
- float * data;
- int angle;
-};
+class MathArray;
+class MathMatrixInset;
extern char const * math_font_name[];
extern char const * latex_mathspace[];
-extern int mathed_char_height(short type, int size, byte c,
- int & asc, int & des);
-extern int mathed_char_width(short type, int size, byte c);
-extern void mathed_draw_deco(Painter & pain, int x, int y,
- int w, int h, int code);
-
-extern LyXFont mathed_get_font(short type, int size);
-extern int mathed_string_height(short type, int size, string const & s,
- int & asc, int & des);
-extern int mathed_string_width(short type, int size, string const & s);
-extern math_deco_struct const * search_deco(int code);
+int mathed_char_height(MathTextCodes type, MathStyles size, unsigned char c,
+ int & asc, int & des);
+int mathed_char_width(MathTextCodes type, MathStyles size, unsigned char c);
+void mathed_char_dim(MathTextCodes type, MathStyles size, unsigned char c,
+ int & asc, int & des, int & wid);
+
+void mathed_draw_deco(Painter & pain, int x, int y, int w, int h, int code);
+
+void mathed_string_dim(MathTextCodes type, MathStyles size, string const & s,
+ int & asc, int & des, int & wid);
+int mathed_string_height(MathTextCodes type, MathStyles size, string const & s,
+ int & asc, int & des);
+int mathed_string_width(MathTextCodes type, MathStyles size, string const & s);
+
+bool MathIsInset(MathTextCodes x);
+bool MathIsAlphaFont(MathTextCodes x);
+bool MathIsBOPS(MathTextCodes x);
+bool MathIsSymbol(MathTextCodes x);
+bool MathIsRelOp(unsigned char c, MathTextCodes f);
+
+void drawStr(Painter & pain, MathTextCodes type, MathStyles siz,
+ int x, int y, string const & s);
+void drawChar(Painter & pain, MathTextCodes type, MathStyles siz,
+ int x, int y, char c);
+
+void math_font_max_dim
+ (MathTextCodes code, MathStyles siz, int & asc, int & desc);
+
#endif